views:

257

answers:

3

I am revisiting a project and need to limit it to Java 1.4 (unfortunately). I was interested in introducing a MVC framework to improve ease of maintenance in the future.

Besides Struts 1, what options do I have? The lightweight the framework, the better.

Not to dismiss Struts off hand, I've just heard a lot of bad things about it. If anyone wants to defend it here, please do so.

Additionally the framework has to be able to run on Jrun, which may limit my choices. I can not, for example, get Spring MVC to work.

+3  A: 

Spring MVC is extremely lightweight. You can use as much of Spring, or as little of Spring, as you want.

matt b
I thought that Spring MVC was Java 1.5 only?
James McMahon
Spring 2.5 supports Java 1.4, Spring 3.0 requires 1.5. I would also recommend Spring, their documentation is good, and the API is very well thought out and consistent, making it easy to get started.
Lorin
I've used Spring MVC in another project actually. While I like it, I am hesitant to introduce the overhead of the entire Spring framework to the project.
James McMahon
Unfortunately this doesn't work on Jrun, which is what I am stuck developing on for this particular project. Agh, it is so awful.
James McMahon
Wow, I didn't even know up until now that Adobe offered their own J2EE server. I feel very bad for you now :(
matt b
Not only that but it looks like Adobe has discontinued the product - if I were you I would use that as an argument to move onto a more current and widely used app server/infrastructure.
matt b
@mattb, I don't want to get into the whole thing, but every programmer here knows we need to move off of JRUN but our hands are tied.
James McMahon
@nemo: You don't have to introduce the entire spring framework, you just need to introduce the MVC bit.
skaffman
A: 

Although JSF is hard to understand at the beginning I like it more than Struts 1, in Java 1.4 I used MyFaces to build an application and it worked well for me.

Also I voted up Spring MVC proposal ;)

victor hugo
I did some experimentation with JSF back in the day and couldn't get it to run on JRUN. It also isn't an MVC framework, I believe they call it an "event driven" framework.
James McMahon
JSF is a MVC framework ;)
victor hugo
+1  A: 

I found this question while looking for something else, so I apologize that this answer may not find you in time.

There is a great option for your needs! The MVC framework is Induction, it is written using JDK 1.4. Induction controllers are multi-action, like Spring MVC 2.5, but Induction does not use annotations or XML, the controller get auto-wired by default.

Induction is an extremely light-weight and fast MVC framework (7.7K lines) but has many features absent in the major MVC frameworks, such as:

  • dynamic reloading during development when you change the controllers, views, models
  • file uploads so simple (not much different that a string input)
  • no configuration required for controllers
  • capability to analyze dependencies between your Models, Views and Controllers using your IDE
  • regular expression based URL mappings
  • best support for managing redirects of any MVC framework

Check out the getting started tutorial here: http://www.inductionframework.org/getting-started-tutorial.html

Good luck!

bluecarbon
Thanks, I will look into this.
James McMahon