What do I think about the state-of-the-art Java Web Frameworks?
Well, they’re definitely huge and clumsy. Most of them. Stripes don’t REQUIRE detailed configuration. Still it needs SOME configuration, ’cause it needs you to tell it what method of an autowired class should handle a request.
I’m not that deep into RoR. But it somehow gave me the impression that it needs minimal configuration. It tries to autowire everything by guessing from the names of the classes and the method names, if the user follows the convention. And it works with javascript well. I had the impression that it can push some logic to the browser side and provide AJAX utility.
Now the newest version claims to provide REST utility as well. I think REST is a great thing. I’ve found Restlet, a Java Rest framework. But it needs a bunch of configuration — hard coded in your source, that’s even worse than many web frameworks, which are configured with XML files.
I think a Java Web Framework can do better — much better. I’ve been thinking about it for quite some days now. I gradually had some idea of my ideal framework. It should be able to autowire anything if the user behaves good. On the other hand, the framework should support REST. After giving it some more thoughts, I think it’sbetter to put the controlers at the browser side and let the filters take up more responsibilities in program logic. There will not be actions in various frameworks, all business logic will be carried out by the browser and the filters. Even the greater part of the browser side scripts can be automatically generated. The user needs to configure nothing… nothing specific for the specific app, and everything is expected to be reusable.
Have to close now, may later I can explain myself better.
1 comment:
Concerning Restlet, it is already possible to rely on XML configuration files via Spring autowiring feature.
In version 1.1, we will also support XML configuration by default for the deployment configuration aspects only (virtual hosts, listening ports, etc.). We will also support WAR packaging which will simplify even more the deployment (without the need to add a web.xml descriptors inside the WAR file).
For all programming related work, using a proper programming language is often better than relying on a pseudo language (based on XML for example) as it allows you to use the compilation/syntax checks and refactoring tools.
Beside that, the Restlet framework also provide sensible defaults, for example when you attach a REST resource class to a router.
Best regards,
Jerome Louvel
http://www.restlet.org
Post a Comment