More on EcoModeler

A couple of people in the ECO newsgroups have asked what benefits there are to using EcoModeler instead of Together. I thought I'd repost the response here for all to see. The first list of from the ModelMakerTools website whereas the second is my own thoughts. It's a bit long so I hope you are in a reading mood:

  1. You can uninstall Together. Removing Together (by also deleting the
    bpl files) will improve the responsiveness of your D2006 IDE, and make
    Delphi 2006 startup speed increase.
  2. ECO State machines can be created for Delphi 2006 Enterprise and
    Professional editions.
  3. A fully ECO customised GUI means that you are working with a UML tool
    that looks like it was made for ECO. Class derivation expressions, class
    default string representation, association embedding, association end delete
    actions, etc.
  4. The power of ModelMaker 9. Being based on ModelMaker 9 means that
    Eco3Modeler allows you to additionally create Use case diagrams, Robustness
    diagrams etc.
  5. You also have the refactoring tools, and method-override wizards. You
    may even model (non ECO) overloaded methods.
  6. Full merging is supported from the model into a previously generated
    class. Modeled properties / methods which have renamed in the model will be
    renamed in your source. You can even add your own implementation properties
    / methods etc within your source file without risk.
  7. Regions added for auto hiding of ECO specific code, making your source
    more readable.
  8. Less autogenerated code. Each attribute/association only appears once
    in the source, the additional "protected _Attribute1" underscored protected
    properties are not generated because they are not needed. Exception:
    Attributes with HasUserCode - this is required by ECO.
  9. Better interface support. Eco3Modeler presents a time saving
    Interface Implementation Wizard whenever a class realizes an interface in
    the model. The advanced code-merge will also prevent any interface
    declarations added in code being lost when when the class's source code is
  10. Eco3Modeler stores the entire model plus all diagrams in a single
    file. No need for a ModelSupport folder full of diagram files.
  11. Eco3Modeler is customizable. It is possible to add custom editors, or
    even additional tabs in existing editors. A comprehensive model API allows
    you to write plug-ins capable of manipulating your models in code.

And here were some more I posted off the top of my head:
  1. You can organise your diagrams into folders/subfolders and so on. This
    really helps when organising a large model, and it all still gets saved into
    a single file.
  2. The diagram surface in my opinion is much better. It doesn't lose
    layouts, it is more responsive, it is more flexible.
  3. Deleting elements from a diagram does not remove them from the model,
    only from the diagram.
  4. You can emit source code documentation from your model.
  5. You can automatically implement interfaces just by drawing a realization
    line to the interface.
  6. C# can optionally create source for the interfaces in your model.
  7. You can set diagram display options at EcoModeler level, override at
    project level, diagram level, or diagram element level.
  8. You can colour your association lines. I find this very useful (green = transient, red =
    derived for example.)
  9. You can create UML 2 diagrams.
  10. You can drag/dock the various windows in EcoModeler and save / restore
    the layouts by name.
  11. In Together you cannot have 2 associations going to person with the role name "Owner", you would have to name them "AnimalOwner" and "HouseOwner" for example. This is a Together restriction which does not exist in either EcoModeler or ECO itself.
  12. Unlike Together adding tagged values does not emit [USER_PROPERTY] at the start of the name.
  13. You can add tagged values to an association end.
  14. You can visually specify association classes (a special line that connects a class to an existing association line.)
  15. You can select the platform-independent-mode property types (AutoInc, Blob, Text etc) in EcoDataTypes.XML from a dropdown list in the property dialog, so you don't need to remember what is available.
  16. Classes on diagrams visually indicate persistent/transient classes. Persistent classes have a small database symbol on them.
  17. You can add hotlinks to diagram elements. For example, if you added links to 3 different diagrams on a diagram element 3 small icons would appear next to the class name, clicking on them would take you to that diagram.
  18. EcoModeler has a Back/Next to navigate through recently viewed diagrams.
  19. EcoModeler has multi-level undo/redo for diagrams. This includes all visible changes to the diagram elements, but does not undo/redo changes to the class itself such as renaming, adding properties etc.
  20. The documentation editor has a live spell checker built in.
  21. From a commercial point of view I think it is also good news that being a smaller company means it is much quicker to issue a release if there is a critical bug (which I have never seen in EcoModeler since I first used it for ECO 2).

I hope this is of interest :-)


EcoModeler is released

The new EcoModeler based on ModelMaker V9 is now available! New features include:
  1. EcoModeler can now refer to classes in other models or even in Together generated EcoPkg files, enabling you to reuse packages and inherit from classes in other models or create one-way associations to those classes.
  2. In C# only modeled interfaces may optionally be generated into a single file ModeledInterfaces.cs
  3. Ability to convert an existing EcoPkg file into an EcoModeler file (excludes state machines).
  4. OCL editor now has full support for state machine definitions, transitions and operations.
  5. Ability to specify property types in a platform-independant-mode. Any PIM attribute types (such as "Blob", "Text", and "AutoInc") defined within EcoDataTypes.xml are available from a dropdown list in the property dialog. Selecting a PIM type will set default values (PMapper etc) and generate the correct .NET native type during code generation.
  6. Any documentation entered into the model may optionally be emitted into the source code, the template of the emitted documenation may be defined in EcoModeler.
In addition, EcoModeler is now a separate product! So instead of having to buy ModelMaker and then pay an additional fee for EcoModeler, you now only need to buy EcoModeler. EcoModeler does still require some files from the ModelMaker installation, but you can simply install the trial of ModelMaker9 in order to obtain those files.

Gerrit is charging a mere 129 Euros for EcoModeler. If you order by the 16th of February you can get hold of a license for only 99 Euros!

I'm really excited about this release, give the trial a spin, I'm sure you'll love it. Don't just take my word for it though, keep an eye on Holger Flick's blog, he was a beta tester too and he's now a convert!


Testing a website with a root path

This post is really a reminder to myself, so that I can find the information quickly for the next time I reformat my hard drive!

To run a website with a root path in Visual Studio 2005 follow these steps:
  1. Tools->External tools menu
  2. Click Add
  3. Title = Webserver
  4. Command = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE
  5. Arguments = /port:8080 /path:$(ProjectDir)
  6. Tick "Use output window"
Whenever you need the webserver running just open your project and go to Tools->Webserver.


Calling base constructors in C#

I occasionally find it annoying that I cannot specify at which point in a class's constructor I wish to invoke the base constructor. Having C# always invoke it before any of the code in my descendant constructor is executed sometimes causes me problems.

Considering .NET is capable of calling the ancestor constructor at any point I wondered why C# wont allow it. I contacted Anders Hejlsberg and he was kind enough to reply, unfortunately he seems to have answered a question I didn't ask :-)

Anyway, I have been deleting some old emails today and I came across his response, which he gave me permission to publish:

The problem with Delphi's model (allowing constructors to be called on
an already constructed object) is that it makes it impossible to have
provably immutable objects. Immutability is an important concept because
it allows applications to hand objects to an external party without
first copying those objects and still have a guarantee that the objects
won't be modified. If constructors can be called on already constructed
objects it obviously isn't possible to make such guarantees. In Delphi's
case that may be ok since Delphi doesn't really make type safety
guarantees anyway (you can cast any object reference to a
pointer-to-something and start poking away), but .NET goes further with
type safety and this would be a big hole.

There, now get out of my head ;-)



Blog tag

Jonas blog tagged me:

I have two problems with this
  1. I don't know anyone else to tag
  2. I'm a pretty open person and you probably already know everything about me :-)


A mis-spent childhood playing in abandoned buildings and starting fires meant I have been in a few odd situations. One of these involved throwing a match into a large diesel barrel because I thought it was urine. My missing eyebrows testified to the fact that it was not urine as I had initially suspected.

Practical jokes

I also used to be a bit of a joker at school. Once on the way home a friend and I decided it would be funny if I took my top off, covered myself in fake blood, and then lay my flexible body in a mangled looking state beneath a railway bridge.

The old guy walking his dog we intended to trick must have lived nearby because he disappeared. Not wanting to give the game away I lay there for ages without opening my eyes, I eventually got up and walked away when I noticed a small queue of 3 cars pulled up staring at me, with one guy running over to me shouting "Somebody phone for an ambulance!"

I like eggs

I love eggs, I just can't get enough eggs, especially boiled eggs. I was once at a friend's house after school. It was around lunch time and his dad disappeared into the kitchen. Soon the lovely aroma of boiling eggs filled the house.

"Eeeeyuw, eggs!" my friend exclaimed. His taste in food was a bit odd, he didn't like butter etc.

"Mmmmmm" I said inhaling deeply, "That's delicious!".

Then I heard the toilet flush. What a weird place to have a bathroom!

I am a veggie

My wife and I stopped eating beef in about 1996 due to "Mad cow disease". We decided not to eat lamb (because lambs are cute). After smelling a pig at a local community farm (smelled like excrement and bacon) we decided to stop eating pork too. Eventually we were only eating Chicken + fish, now we only eat fish.

I don't count that as being vegetarian, but it's just quicker than listing everything you don't eat!

I worked in a butcher shop

Not only didn't I go to college but I also didn't do very well at school either. I'm one of those people who learned to program computers because I found it so enjoyable. I started programming in 1984 when I was 11 on my ZX Spectrum. I moved onto 6510 assembly on my C64.

When I left school in 1989 I went on a programming course using Turbo Pascal (V4 I believe). We were taught by an electrician who didn't know programming, so a couple of us just read some books and taught everyone else in the class.

After that I worked in a butcher shop, then a computer shop, then a Laser Quest. Finally my wife persuaded me to apply for a trainee computer programmer job I thought I had no chance of getting (graduates only need apply). Despite the fact that over 600 people applied I was one of only 6 people chosen. Since then things have gone from bad to worse ;-)


Who should I tag now? No idea, I am a programmer and as a result I have no friends :-) I will edit the post if I think of anyone......

For a start I will tag the quietest member of the ECO team - Anders!
Ah yes, and Lasse Karlsen an old friend from IRC - http://usinglvkblog.blogspot.com/


More on EcoModeler

As you know I have been beta testing the new version of EcoModeler based on the ModelMaker 9 source code. One of my duties is to provide Gerrit with an interface to the OCL Editor form within the IDE, so whenever you need to enter OCL you get that nice context sensitive editor you'd get within the IDE.

Gerrit has now completed his work adding references to EcoPkg files. Personally I thought it was going to be too difficult because of the associations causing problems etc, but Gerrit has pulled it off and I am really impressed!

I can now successfully add references to other EcoModeler project files and EcoPkg files too. When I invoke the OCL Editor I see all classes from all referenced files including all of their associations. Renaming a class in the referenced file is handled too. When you open your project you will see a notification telling you that references have been reparsed, when you click this notification all of the class references within your project are updated!

Here is a screenshot (large) from my testing. You can see that BaseClass is being referenced from an external source (Package_1.EcoPkg), the OCL Editor you see was invoked from the ChildClass class which is a descendant of BaseClass, so you can see BaseClass members such as "ReferencedClass" which is an association in Package_1.EcoPkg.

Gerrit is currently working on a tool to import the classes from an EcoPkg file into EcoModeler so that you can convert your legacy EcoPkg projects instead of having to maintain them in Together. This is limited to classes only so currently no class diagrams or state machines, but maybe this will change in the future if there is enough demand for migration.

Ofcourse the really good news is that the new EcoModeler will no longer be an extension to ModelMaker, so you will be able to purchase it without having to own a ModelMaker license, which should save you some money.

PS: There is a 25% pre-order discount on www.modelmakertools.com!

I'm really looking forward to this release!


SQL Server amazes me!

Well, SQL Server amazes me, but not because I am impressed!

Today I wrote an application that does the following:
01) Find all ZIP files in a specific folder
02) Open each ZIP file in turn
03) Extract an XML file from the ZIP into an array of bytes
04) Insert that data into a table

There are 1,978 files in this folder and the XML within each ZIP file is around 2MB in size.

I ran this app and was really surprised at how soon my PC started to crawl, it was so slow that it was taking over 10 seconds to switch between MSN and a Skype text-chat window. So I decided to monitor the process.....

Importing the zip data into SQL Server took a total of 19 minutes and 15 seconds (this includes unzip time). What concerns me is that SQL Server's RAM usage went up to 830MB at its peak, this is what was crippling my PC. Twenty minutes after my app had finished SqlSevr.exe was still holding over 700MB of RAM, I then restarted my PC. SQL Server was using more RAM than I had available and was forcing my PC to use virtual memory!

So I decided to try FireBird 2.0

Importing the zip data into FB took a total of 15 minutes and 15 seconds (again including unzip time). RAM usage for FB started at 21MB but dropped to 16MB at home point within the first 5 minutes. It's memory consumption remained at 16MB.

In both cases I was creating + committing a transaction around each INSERT command. In fact it was the exact same code, I just did a search + replace from Sql to Fb.



Beta testing the new EcoModeler

Gerrit sent me a beta of the new version of EcoModeler to play with today, it's fantastic!

The new version is based on V9 of ModelMaker. One of the new features in MM9 was the ability to refer to classes which are not part of the current model, so I was really looking forward to seeing if this feature was part of EcoModeler, and it is!

I can now select "Add reference" in the new [References] tab and choose from the following file types:
  • Other EcoModeler project files.
  • DLL files
  • Source files (*.cs or *.pas depending on which edition you use)
Once a reference is added you can expand the tree view and see the classes available within it. You can then drag/drop any of these classes onto your diagrams and inherit from them, add associations, etc. Gerrit is currently inspecting the format of EcoPkg files so hopefully it will also be possible to reuse package files created by Together too!

What I really love though is how clever EcoModeler is with regards to these imported classes (place holders). Whether the source of the reference is an EcoModeler project, DLL, source file etc EcoModeler knows all about it. If I descend a class from an imported class I can right-click its Member window and choose "Method override wizard", I will then see a list of methods I can override from the imported class.

As usual the stability of Gerrit's work is impeccable, it's so snappy and reliable, and importantly (to me anyway) the whole model + diagrams etc are stored in a single project file.

One last thing I'd also like to let you all know about. Instead of being an extension to ModelMaker EcoModeler will in future be a stand-alone product, so any of you who couldn't afford ModelMaker and EcoModeler should now hopefully be able to afford it :-)

I love it!



Today my baby girl looked at me, said "DaDa" for the first time ever, and then giggled. What a great day! :-)