Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java web frameworks

I was looking around to see if there is an equivalent to django/RoR in java.

I found:

  • Play Framework
  • Grails

Does anyone have ever tried those frameworks, or do you know any other? Are they faster than django/RoR?

like image 933
Roch Avatar asked Dec 01 '09 10:12

Roch


People also ask

What framework does Java web application use?

Struts is an open-source Java EE framework used for creating enterprise-level Java web applications. Development is much easier with Struts since it uses the MVC pattern and convention over configuration. The MVC pattern also enables clean designs that are easy to implement.

Are there any Java frameworks?

Java Frameworks are nothing but the body or platform of already written codes. They are used by Java developers to develop web applications. Java Frameworks consist of a collection of predefined classes and functions, which can be used to process input, manage hardware devices that interact with the system's software.

Which framework is better for Java?

1. Spring: Spring is a powerful, lightweight, and most popular framework which makes Java quicker, easier, and safer to use. This framework is very popular among developers for its speed, simplicity, and productivity which helps to create enterprise-level web applications with complete ease.

Which framework is most widely used in Java?

For starters, Spring is the single most popular framework for building Java-based web applications. Spring is also capable of exposing RESTful services, includes Spring Security (which adds both authentication and authorization features), and is capable of establishing JDBC connections.


2 Answers

I discovered Grails about a year ago, and haven't looked back. It takes a lot of ideas from Ruby on Rails (original it was named Groovy on Rails), and has a rich ecosystems of plugins / extensions. Grails, and underlying Grails language (superset of Java) make it a joy to program - you can really focus on the essentials. Its GORM functionality (a layer on top of hibernate) is also very powerful, and in addition to the plugin system, is one of two huge reasons to check it out (you can use it in your java apps as well).

With version 1.2 about to come out, I feel it's feature-rich and mature enough to be something that any developer should have in their toolbelt.

As far as performance, it's definitely less than that of pure Java, but you have everything from spring / hibernate / J2EE available to you to optimize, and you can always drop into pure java for some critical pieces of code. There have been some recent experiments with allowing to run part of the Groovy code using static method resolution, which, coupled with invokedynamic support, should provide huge performance boosts.

Other ones to check out in Java are Spring Roo, and AribaWeb.

Update Based on Additional Qualifications

Scalability, Productivity, Documentation, and decent Resources consumption

  • Scalability - you get the proven Java / Spring / Hibernate stack, though I can't say Grails provides much itself.
  • Productivity - this is the main reason to use Grails. You do have a performance overhead, but Grails is what you use when development time / productivity is more important.
  • Documentation - the grails docs are great, and there are at least three good books written on Grails alone. The community is thriving and very helpful.
  • Resources Consumption - that is the one tradeoff. Grails (partially because of the underlying java stack) is resource-intensive. If I was building something like Google, Grails would not be the choice. However, in any web app of any sophistication, you'd do well for a caching solution, so same applies here.
like image 78
Jean Barmash Avatar answered Oct 02 '22 14:10

Jean Barmash


Stripes seems to be quite lightweight and embraces Convention over Configuration.

like image 33
John Topley Avatar answered Oct 02 '22 14:10

John Topley