ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

Inconsistent file naming for generated code... all generated code should use xxxx.generated.cs convention #334

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We encountered an issue where it would have been highly beneficial to be able 
to differentiate generated code from custom code where the individual who was 
performing a merge in the SCC platform was not familiar with netTiers. In this 
specific case we knew that post-merge we'd be regenerating the DAL so we could 
have told him to just ignore anything that followed the 'xxxxx.generated.cs' 
convention.  Unfortunately some of the NetTiers code uses it while others do 
not... i.e. DataRepository.cs

Additionally, if I'm not mistaken, tools such as FxCop are looking for that 
naming convention as well and not generating warnings/errors for generated 
code...

Moving forward, I would think consistent naming should be applied to assist 
those of us trying to do scripting/automation based on the naming of a file...

Original issue reported on code.google.com by bh...@questis.com on 15 Sep 2010 at 9:50

GoogleCodeExporter commented 9 years ago
Hello,

We agree with you 100%, we have rewritten the templates in 3.0 and take this 
into consideration and all custom code is placed in one partial class.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 21 Sep 2010 at 12:25

GoogleCodeExporter commented 9 years ago
One partial class? Are we saying one giant monolithic file for all generated 
classes/code? 

If so - that'd be a HUGE set-back (especially for the client I'm working at)... 
The change-control/SOX people will simply freak out if that is the case - this 
would be even worse than they currently perceive the procedures.xml/sql files 
(I'll be creating an issue for that concern here in a moment)... 

please please please! Keep with the old pattern (for a given class there's a 
generated base, a generated partial that is named xyz.generated.cs and the 
user-editable portion xyz.cs)... just be consistent with the pattern! <grin>

Original comment by bh...@questis.com on 21 Sep 2010 at 5:41

GoogleCodeExporter commented 9 years ago
Hello,

No we have a central .netTiers assembly that handles the core logic and it is 
all unit tested. Then we have 6-7 different partial classes that are all 
cleanly separated out and nested (just like the .generated.cs). There has been 
a MASSIVE!! reduction in the amount of generated code and the code base has 
much more testing code coverage.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 21 Sep 2010 at 8:42