|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2011-12-18 05:43:19
Posts: 9,
Visits: 21
|
|
I have bumped into this issue many times during my development efforts with ECOIII and I HATE it!!
Here's what happens:
- I am working in my model's UML diagram adding / deleting attributes, associations, etc
(I find that you're at greater risk when you are making association changes or adding user code to attributes)
- I then use the 'Regenerate ECO source code' to update the C# code with the model's changes
- then I try to compile
- the compiler complains that there are errors in a class (often a class I'm not evening working with right now) because the code generator has created code for attributes that start like this:
[U[UmlElement(Id=
They SHOULD start like this:
[UmlElement(Id=
Once this happens I'm screwed. There is no way to fix the model such that you can regenerate the code successfully. You can change the .cs file that is broken but it will be broken again next time you generate ECO source code.
I have had only two real solutions to the problem:
1 - roll back to an earlier version of the model (the whole model project) and start redoing the changes / being more careful to generate the ECO code more frequently / more carefully
2 - delete the class (from the model) that is generating bad code and rebuild it from scratch
Both of these solutions are crappy.
Today I think I found a third solution:
3 - make a copy of the .cs code file for the offending class / delete the .cs file from project / regenerate the ECO code / if the code generates correctly use a text file merging tool to move all of your custom code from the old (bad) .cs file into the new (good) .cs file.
I'm posting this for two reasons:
- if someone else is going through this I'd like you to not pay the price of the DAYS of time that this has cost me
- if anyone has any other insight into the issue I'd love to hear about it.
Thanks!
Damian
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230,
Visits: 1 382
|
|
Hi Damian
We are aware that the codegeneration in EcoIII has lots of flaws in it. The problems stem from the fact that ECO forced the CodeDom implementation in RadStudio beyond what it was originally designed to do. There are a few other solutions to the problem:
1. switch to EcoModeler - the codegeneration in EcoModeler has been very solid ever since its first release
2. Upgrade to Eco4 for VS - Since you are using C#, and that language was dropped from D2009, your path forward it to go with VisualStudio. Eco4 for VS comes EcoModeler as the designer/codegenerator.
Unfortunately, we have no possibilities to provide bugfixes to the codegeneration for EcoIII. This particular error lies deep in the IDE and not directly in the code that the ECO team wrote, and even if it had been ECO-related, we have no possibilities to release any kind of updates to EcoIII (CodeGear has the support for D2006/EcoIII, but I doubt even they still have the infrastructure to build new updates).
In Eco5 we have again taken control of the design surface and codegeneration, but this time we rely on partial classes and regenerating entire files rather than merging changes into files that contain user written code. Eco5 is able to import the model files (ecopkg format) used in EcoIII.
/Jonas Hogstrom [CapableObjects]
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2011-12-18 05:43:19
Posts: 9,
Visits: 21
|
|
Jonas;
thanks for your response. I guess it is good to know that the problem is with the tools / not with the developer (me).
My code's future is certainly in moving from Delphi to VS and to stay in the ECO upgrade path. The problem is I am very close to my first release and cannot really afford the time to move to a new environment now. I hope to get my first version released and then, assuming the market is happy, make an immediate move to upgrade to the newest ECO.
If I continue to have code generation get in my way I will look into changing to ECOModeler - this is something I should have done a long time ago.
Thanks.
Damian
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2011-12-18 05:43:19
Posts: 9,
Visits: 21
|
|
Jonas;
One quick question: if I understand you correctly it is going to be easier to upgrade ECOIII to ECOV and skip ECOIV? I'd love to be doing this now but just can't yet.
Thanks,
Damian
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2012-01-27 18:06:44
Posts: 189,
Visits: 777
|
|
Hi Damian,
I really think that EcoModeler is most likely to be the solution for you here, with the one downside that you cannot import your existing model. You will have to re-model it in there, but there after it should be steady and stable.
I had the same issues in Delphi 2005 with ECO2. Once I moved to EcoModeler, that even was much more stable, well as stable as the IDE could be, but more so then usual without using Together. 
Scott
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230,
Visits: 1 382
|
|
If you are in EcoIII now, that means that your models are in the ecopkg-format. This is the same format that we use for the integrated modeler in Eco5, so yes, it would probably be less work to skip directly to Eco5 without going via EcoModeler/Eco4.
We currently don't have any plans to import the Together diagram format from RadStudio, but the model with all the packages, classes, attributes, methods and relations will be handled in Eco5.
/Jonas Hogstrom [CapableObjects]
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290,
Visits: 2 617
|
|
EcoModeler imports EcoPKG files. Not sure if it works on ECO 3 ones but certainly does work for ECO 4 ones. Damian, if you would like to email me an eco package file I would be happy to test it for you.
Note that you would first need to move all of your classes within each single assembly into a single eco package file.
mrpmorris...gmail...com is my email address if you'd like to. Or grab hold of me on skype (mrpmorris).
====
Pete
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2011-12-18 05:43:19
Posts: 9,
Visits: 21
|
|
| Pete - I'd be happy to have you play with it. Remodeling in a new tool is a large effort. I generated a DB today from the model: 96 tables (from 12 packages). I also have a few non-persisted classes too. It's not a small model. Let me know if you'd like me to email it to you.. Damian
|
|
|
|