Recommendations for a Java 1.4 MVC framework for J

2019-08-22 17:15发布

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条回答
时光不老,我们不散
2楼-- · 2019-08-22 17:52

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

查看更多
放荡不羁爱自由
3楼-- · 2019-08-22 17:56

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!

查看更多
萌系小妹纸
4楼-- · 2019-08-22 18:03

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 ;)

查看更多
登录 后发表回答