Entity2

Posts   
 
    
Emmet
User
Posts: 36
Joined: 12-Jul-2005
# Posted on: 14-Jun-2007 23:32:36   

I know Self Serving was the original template set (and I even used it before the Adapter Templates were available), but the “2” in Entity2, EntityField2, EntityCollection2, etc drives me crazy. It’s like the red-headed step child. Am I the only one who feels this way?

I wish the adapter was broken into a different assembly or namespace. Obviously that can’t happen, as it was cause havoc with breaking changes. But my obsessive compulsiveness has driven me to always refractor the assemblies to exclude the self serving logic so I can use “Entity” instead of “Entity2”.

Anyway that was a trivial rant, but if that is the only real issue I have with LLBL Frans is doing his job right. BTW I just got done reading the 2.5 docs, and I’m excited to find some free time to test out some of the new features.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 15-Jun-2007 10:49:18   

simple_smile Oh, I don't blame you for ranting about this '2' suffix, it's something I don't like either. Another thing I don't really like about the internal structure is that selfservicing and adapter are separated codebases, while selfservicing is actually a specialization of adapter (logically), however as it was released first, refactoring everything so it is a wrapper around adapter is not going to happen, as it breaks fundamentally so many things that existing code is very hard to port.

With v2.0 I tried to combine the code bases into one codebase but after a month of hard work I gave up, it wasn't possible to refactor it without having many breaking changes. It's one of those hard lessons I learned that TDD and Agile and using refactoring to just get things right isn't going to work after you've shipped software and you have to maintain code which simply MUST NOT BREAK. Sure, a change here and there, users can cope with that. But if you have to rewrite a lot of code, no way that that will be accepted. simple_smile

The '2' suffix wasn't my first choice, I first had 'Adapter' as suffix. But I didn't like that either because it would move the name of the template group using the class into the class names, which was IMHO not a good idea, because there could be made yet another template group which might also use these interfaces and classes so having 'adapter' in the name wasn't going to be great.

So I took a page from the Win32 book and defined classes and interfaces with a '2' suffix. It's not great but it's what works.

Another reason I didn't use 'A' or 'Adapter' as suffix is that it would make the naming for selfservicing stuff inconsistent: because then 'IEntity' should get the suffix 'S', which then would break probably every Selfservicing app out there simple_smile

Frans Bouma | Lead developer LLBLGen Pro