About a month ago I went down to the DC area to visit with Sean Corfield, Joe Rinehart, Doug Hughes, Scott Boyziod, and a few others, and for some reason Doug and I were talking about his port of ModelGlue for .Net. I don’t know why, maybe for pure masochism, I mentioned that maybe I would be interested in porting ModelGlue to Java. Well Joe though it was a good idea as well, so I decided to give it a go! Over the past month a few people have asked me why I would want to do such a crazy thing, and I do have some reasons! Most importantly, I know a lot of cfers are starting to think about getting into J2EE development, and I know from personal experience, that the initial learning curve, not so much of the language itself, but really of the architecture of J2EE, can stop people in their tracks. Maybe a familiar framework would be a bit of a helping hand? I think so. I’ve done a few J2EE apps and one of the things that I always seem to find myself saying is, ‘man I really like working with mach-ii and modelglue much better that any of these java frameworks’. Struts is too big and too messy for me, SpringMVC is actually pretty nice, but still kind of heavy. For me, I think ModelGlue sits about right for an MVC framework, since it is so lightweight. So I’d like to announce that an early alpha pre-release is not available from svn://clearsoftware.net/clearsoftware.net/ModelGlueJava.
A few notes about this early release:
Spring support is built into the framework, but by doing so, it is currently dependent on the spring distribution. Spring.jar is included in the lib folder of the distribution, along with other dependencies such as commons.beanUtils. An example of defining your controllers in a Spring config file can be seen in the Klondike Records sample app.
I have not implemented asynchronous messaging or session state container support yet, but everything from the current BER of ModelGlue should (maybe) be implemented.
I did make one possibly major, but really semantic change, that I just thought fit better into java. The viewState that you would normally access in views is called eventModel, and is of type EventModel, which extends HashMap. So add(Object key, Object value) and get(Object key) as well as other HashMap methods are available if getValue(String key [, Object defaultValue]) ) is not to your liking. I just really feel strongly that as a user we are dealing with a model object that is tied to the event when setting/accessing values in our controllers and our views. The names have changed to protect the innocent, but nothing more!
Final notes, I’m not done at all! I’m hoping an early preview will gain some interest, and maybe some input and assistance from other java/cfers out there, so have fun, and of course, I’ll be changing things for a while!