What's Next for Java ActionPack? 3

Posted by Berin Loritsch Mon, 13 Aug 2007 12:28:00 GMT

Java ActionPack is not complete yet, and there are a few rough edges. One of the temporary work arounds I have is that markup is in my Java code. This is not an ideal solution. These are what Ruby on Rails uses partials for. I need to get the partials code working. Another issue, that I really would like some input on is whether JSP code belongs in the WEB-INF directory. I’m planning on making the View base configurable, but defaulting to where it is right now (the context root). That means all your view code (HTML and JSP) will be in the WEB-INF directory if you so choose. I’ve been told this is an industry practice, but I’ve never seen any examples or articles telling me this is truly the case. Lastly, I need a way of writing URLs based on the action/view/parameters that we set up in the Routes file.

I’ll probably have to do this in two stages. The first being all the hook code necessary to generate these things in ActionPack. The second being a new JSP ActionView library to provide a tag and expression library you can use in your pages. The idea is that if you don’t use JSPs, you can still use the core functionality built in to ActionPack. However, if you do use JSPs, you can simply use the convenience parts to make it nicer.

Of course, the next thing I need is a lot more documentation. I realize that Java ActionPack is at the place where Spring used to be a couple of years ago. It’s still an underground technology that really can make it easier to get things done. It is something that can be used along with Spring if you choose, and at the end of the day it is all about what makes it easier for you to get the job done.

Something that I have been struggling with is how to work with Helpers. In Rails, you have Helper modules that get mixed in to both the Controller and the View logic. It can help clean up code, but in Java there is no real clean way to handle this. I could have a dynamically generated “helper” attribute that gets populated when the controller is instantiated. I could do that through a setter ala Spring, a constructor ala Pico, or something similar. The problem is something that requires much more thought. The controller would probably be an easier proposition than the view.

I’m definitely going to need some help, or this will take a long time. I still want to keep ActionPack very focused and as simple as it possibly can be, but there are some cool things that will make developing applications much nicer coming down the pike.