Turbogears and Seam
I want to shake Kevin Dangoor's hand. I probably would like to meet Gavin King someday, because he seems like a smart fellow too, but Kevin Dangoor is a genius. We've been struggling with JBoss and Seam in our group for over six weeks now, and so far have produced an overengineered, complex, brittle application that works on only half of our boxes. To be honest, development has picked up quickly when more energy is applied to it; however, if you look at it mathematically, I think it's a useless point. Out of curiosity and frustration, Robert and I hammered out a simplified version of the app, complete with CRUD pages in two nights, using Turbogears and tgcrud. It's far from complete, but it didn't take that long. Fleshing out the data model to include all the information should be relatively easy compared. Generating the crud pages again will take about 20-40 minutes depending on how complex it gets. But if seven people were to work on adding in the other stuff, in an organized fashion, I think we could have this app done in about two weeks time.What I really don't understand is if Seam has all these goodies, (and the sheer number alone really impresses me, coming from a Struts background), why does it take longer to develop for it? Well, I probably do. Our group certainly isn't within the statistic norm. For most of us, this is the first time doing an enterprise application. When the code base expands, seam should keep the maintenance required fairly level, and the level of difficulty in adding more content should also be low. In contrast Turbogears is missing alot of these features. Yet setting up what we needed on a basic level was Very Very Fast (TM).
Either way, here is what we've done in the past three days.
- We discussed a simplified version of the data model, so that we could do some RAD, rather than making sure stupid stuff, like validators for each and every piece of data were correct and functioning.
- That was implemented in almost no time at all in SQLObject
- Bobby pointed me to tgcrud, which I spent an evening going through, and setting up. It's buggy, it's not polished, but I got some useful starting pages out of it.
- I put a few touches on them, and we have some barebones crud pages that will let us populate the database theoretically.
- Using one of those CRUD pagesets as an example, I've been working on a CRUD Widget, that can be embedded anywhere almost pythonically. I'm nearly done.
To put this in MVC perspective, there is the model, that is the database object, in a nutshell, with metadata such as validation. There is the view, that shows how to display a view to do whatever to said model, and the controller which can push data changes from the view back to the model. It's a mini MVC component, that can be integrated almost wholesale into the app. The cool thing is that you will be able to put controller code, via python that will know how to get information from the view to the model. Likewise, there will be a small snippet of code that has to almost cut and paste into the KID file, for parsing. Finally, I want to make this generic, and templatified (I made that word up ^_^) so that I can make this simple to do via tgcrud.
What's left to do? Make complicated pages with more unique ways of looking at the data. Such as having a user login and only see information pertinent to their group, rather than just a generic list of events. There are a number of things that Seam does quite neatly to make this easier to develop. TG doesn't have them. It'll be interesting to see how far I can go in my spare time to make this work.
Happy 4th, aka declaration of presumed (falsely) right to bully the other nations of the world day!
0 flames:
Een reactie posten