Book a Demo

Author Topic: Best Practice: .Net Framework classes in diagram  (Read 16300 times)

RainerQ

  • EA User
  • **
  • Posts: 122
  • Karma: +1/-0
    • View Profile
Best Practice: .Net Framework classes in diagram
« on: May 15, 2010, 09:09:01 pm »
HI,

is there a better way to show .Net Framwork classes (contained in System.dll, mscorelib.dll ect.) than to "import binary modules" ?
This is what I did, to get the "SerialPort" class from System.dll, but it increased my model size form 3.8 Mb to more then 18 MB.

I hope there is better way to do this!

Regards
Rainer

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Best Practice: .Net Framework classes in diagr
« Reply #1 on: May 17, 2010, 03:50:39 pm »
Quote
but it increased my model size form 3.8 Mb to more then 18 MB.

And you're running out of space on your harddrive now?!?

I mean, seriously, any serious modelling you do will increase the model size with a lot more then that.

Geert

RainerQ

  • EA User
  • **
  • Posts: 122
  • Karma: +1/-0
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #2 on: May 17, 2010, 04:26:47 pm »
Hi Geert,

having lots of resource does not mean, that it is a good idea to waste them, right?

So, is there a "smarter" way to have a "FEW" framework classes in the model than importing the "WHOLE" framework?

Regards
Rainer
« Last Edit: May 17, 2010, 04:27:06 pm by RQ »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Best Practice: .Net Framework classes in diagr
« Reply #3 on: May 17, 2010, 04:37:03 pm »
Rainer,

Of course you are right.
The only way I know to import only a few classes is to import the whole lot, and then delete what you don't need.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #4 on: May 17, 2010, 04:43:41 pm »
Quote
The only way I know to import only a few classes is to import the whole lot, and then delete what you don't need.
Or import the whole lot into a separate model, keep that model as a reference, and export then import the few classes/packages that you need (that way you won't delete what you later end up needing)
« Last Edit: May 17, 2010, 04:44:25 pm by KP »
The Sparx Team
[email protected]

RainerQ

  • EA User
  • **
  • Posts: 122
  • Karma: +1/-0
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #5 on: May 17, 2010, 05:41:06 pm »
Hi all,

thanks for the last hints. The idea with the separate model and export/import sounds like a good way. I think I will follow this path.

Regards
Rainer

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #6 on: June 29, 2010, 07:46:20 am »
This the same problem as when using the Java Libraries amongst other framwork class libraries.

Perhaps an addin is available to automate the export / import workflow, the index to help navigatoring the framework might add a little to the HD resource, but if youre using the framework a lot then ease of access might outweight that downer.

Kevin [smiley=2vrolijk_08.gif]

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #7 on: August 12, 2010, 04:48:25 am »
Hi'ya again....

At a seminar today, one of the debugging sessions highlighted the availablity of .Net Framework Source and Symbol references that enable you to step into and through framework classes ( not the disemberly listing) while debugging youre code.  The demonstration showed stepping through a number of framework classes, in full C# source.  The guy confirmed that the source was available for the SerialPort class (I was impressed that I rememberee that detail).

My thinking is that instead of reverse engineering the complete framework and incurring the size issue you noted, you could just reverse engineer / import the particular class(es) you wanted.  Cool or what... I'm not sure how you stop EA from regenerating these artifacts on subsequent forward engineering your model.

Here's the link http://referencesource.microsoft.com/netframework.aspx to the index page for the versions of the .Net Framework available (loads in fact, 2.0, 3.5, 4 Beta2, RC, and RTM).  Download, unpack ... and play.

I haven't had a chance to actually test this yet (be a few days before I'm home and able to try)... so if anyone does I would I'd appreciate feedback n coment.

Hope this helps, if not solve the 18mb growth in model size, this wont help with the Java thingie tho

Regards,
Kevin [smiley=2vrolijk_08.gif]

RainerQ

  • EA User
  • **
  • Posts: 122
  • Karma: +1/-0
    • View Profile
Re: Best Practice: .Net Framework classes in diagr
« Reply #8 on: August 12, 2010, 03:51:02 pm »
Hello Kevin,

thank you very much for this information!
To have the source code available is always better than to use the reverse engineered assemblies :)

The regeneration of those artifacts should not be a problem, since they won't be modified in the model, or am I wrong there?

I will give your suggestion a try, when I need to use .NET framework classes the next time.

Regards
Rainer