On 3/8/11 9:09 AM, Pierre-Arnaud Marcelot wrote:
Hi Alex,

That's something I had also noticed a few weeks ago.
See [1].

I wanted to decouple the SchemaObjects from the SchemaManager, but I guess I 
ran into other work and couldn't complete it.

AFAIR there are around 5 methods in the SchemaObject interface/abstract class 
that needed to be removed and added in the SchemaManager utilities.
I'm not sure they are that much used outside of SchemaManager related classes.

On the lack of interfaces for schema objects, it's probably a little more 
complex to move them back and requires more refactoring from depending parts.

Just for the record, the reason why we don't have anymore interfaces for AT, OC etc is dur to some heavy refactoring back in august 2009, when the Interfaces were just make it overly complex to get the schema manager refactored. We had classes that were holding schema information AttributeTypeDescription), plus some other classes used in Studio, plus another class named AttributeTypeImpl.

Back then, removing the AttributeType interface was dictated by the need to simplify the merge of those 3 classes into one single class that can be used everywhere. Also this class was not expected to be exposed to the public.

This was a choice, may be not the best one, but it helped me to get this refactoring done. Remember that it took me 3 months to get the SchemaManager working fine in the server, with the extra benefit of being usable in Studio, even if Pierre-Arnaud has spent one week to get it working as expected for his need.

Now that we want to expose the SchemaManager to the users, sure, the lack of interface starts to hurt. It's most certainly time to get those interface back in the code, something that will cost some time, but at least, the current AT/OC... classes are quite clean, and such a refactoring should be easier to conduct than it was 2 years ago...

I want to state here that I haven't removed those interfaces because I 'hate' interfaces, because it's simply not right. I just get rid of the casts I had to apply everywhere when we were using Interfaces, casts that were a PITA in the context of the initial SchemaManager refactoring.

Things change, decisions taken 2 years ago can appears now to be wrong, but the context has changed too. Back then, it was not *that* stupid...

I also want to say that I didn't do that in my corner, I think I carefully expressed the options I selected and informed the project about them. Anyone who could have thought about such a change to be a bad thing 2 years ago could have emitted an opinion. I don't remember having heard about any complaint. Now, I'm quite sure that with the huge number of modifications done every week, it's very hard to check everything, and some bad decisions will still go through into the code. That's life. No need to crucify anyone for such things.


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to