I had a very hard-working weekend because of problems I reported in my last posts but I'm really amazed how quick it was to scrap all webparts code and start over. Really, I thought it was going to be difficult after long months of coding but in one day and a half I basically converted most of my code to a simpler version based on webcontrols instead of webparts and I'm basically 70% done for display things.

I have to say that most of such "easyness" was related to how simple is to work with objects databases and, specifically, Perst. If I wanted to be sure that I'm getting down to the right path, I'm more than sure now. I was able to refactor about 10 classes, extend another 2-3 of them and plug such code into old codebase and everything started working again without any reference to webparts. Amazing ! I'm not loosing my time to adapt / create / generate / map DB code. I simply refactor classes I needed, create new fields and use them. Sure, I also notice that it's mandatory to pay attention to new classes structure and that objects upgrades, while included, cannot be done without taking care to explicitly handle them. For example, you can upgrade a class to a new version and include a new field and that field will instantly be available to your code and your old objects will be able to use it. BUT you also have to take care to upgrade your objects some way or handle versioning. Such new fields will surely be nothing (null) for new objects and you must handle such case or upgrade and initialize your objects before using them. That's a problem for sure but it's extremely easier to take care about this rather than refactor your classes since you change your DB schema, expecially when your dealing with hundreds, if not thousands, of lines of code. Plus, how sweet is to work with your objects, using those nice and useful collections where needed to make things for you (and people using your API !) much simpler !

Perst (and database objects in general) are hot technologies. Don't forget to give them a chance.