> No I have not thought about that before, and it is an interesting idea > indeed! I've been happy about some new features of the language, but I've > been kinda conservative about a few of them, and partial classes has been > one . I guess I'm getting old :)
heh :) I think it's not that weird to avoid partial classes when you can. AFter all, it's not really increasing maintainability that much, as code is scattered over multiple files. But it's a big step forward compared to the in-file code regions which were 'safe havens' for custom code in generated code. Code generation is a topic that's being researched a lot. There are a lot of neat ideas but not a lot of these flow down to the developer's toolbox. Lets hope that changes in the coming year(s) ;) FB > > Cheers > > Seref > > On Thu, Jul 24, 2008 at 10:35 PM, Sébastien Lorion < > [EMAIL PROTECTED]> wrote: > > > On Thu, Jul 24, 2008 at 2:54 AM, Seref Arikan > > <[EMAIL PROTECTED]> wrote: > > > Let me just say that I do not feel comfortable about injecting business > > > logic related code into generated ORM classes. Even if the generated code > > is > > > OO (which is true in your product's case:) I am not comforable with > > adding > > > behavior for purposes other than persistence to that code. Since > > behaviour > > > can not exist on its own in an OO context, this implicitly forces me to > > > define domain objects as another set of classes. This leads to a > > situation > > > where I have two sets of classes that represent the same domain, but have > > > different responsibilities. One set covers business requirements, the > > other > > > covers persistence. I know that they can be combined, but It feels > > cleaner > > > this way. > > > > > > Before partial classes, adding custom business logic to generated > > classes would have been out of the question, but have you considered > > their use in your scenario now that they are available ? > > > > Sébastien > > > > =================================== > > This list is hosted by DevelopMentor(R) http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > =================================== > This list is hosted by DevelopMentor® http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com