Grails is a high productivity framework for JVM, based on Groovy language. It has been around since 2006. Since then, innumerable sites have successfully been launched using the framework. Below are 15 reasons that make Grails the web development framework of choice:
- Based on tested and proven frameworks : Grails itself has been used by a lot of big enterprises and products such as Sky, LinkedIn, WalMart, ESPN, etc and Grails is no-longer a new technology now. The underlying technologies are already proven and tested frameworks (Spring, Hibernate, SiteMesh, etc) with a very huge user base.
- Groovy language: Groovy code is much more concise, expressive and DRY than Java code, which means there are fewer lines of code, which translates to much higher developer productivity and less code to maintain.
- Easy to set-up and get started: It is very easy for a Java developer to get started with using Grails; and start experiencing the joy of web-application development with Grails.
- GORM: Grails’ object relational mapping (GORM) provides a very easy-to-use and flexible layer over Hibernate and few other non-relational Data Sources. This makes it extremely easy to talk to any GORM supported Data Source. GORM supports all relational databases which are supported by Hibernate (JDBC); and it also supports other Data Sources such as Redis, MongoDb, etc.
- Doesn’t stop you from using the power of underlying frameworks: GORM does a good job of shielding you from dealing with Hibernate directly. But at the same time, if you want to bypass GORM and directly use hibernate API, map POJO/POGO to existing tables, then it does not stop you from doing so. Similarly, you can use the underlying power of Spring if you were to do so. Similarly, you are not forced to use Groovy, you can choose to use Java or stronger typing wherever you want/need.
- DRY / Convention over Configuration / No painful XML configuration & XML Management: You don’t have to write all of the plumbing/boilerplate code yourself when using Grails. This allows the developer to spend more time on writing code for developing features rather than struggling & configuring the framework components. Grails uses convention over configuration, uses sensible defaults and auto-wires based on simple naming conventions.
- Scaffolding: Scaffolding utilities provided by Grails is a great advantage when building prototypes to validate the idea; or to build Admin interfaces. For a lot of new developers evaluating Grails, scaffolding is the first thing that brings the “wow” effect.
- Built-in REST support: Grails includes flexible features that make it easy to create RESTful APIs. Creating a RESTful resource can be as simple as one line of code. With modern hardware featuring multiple cores, Grails has now a great support for Asynchronous Programming API as well.
- Tag Lib Authoring mechanism: Grails makes it quite easy to modularize and reuse view layer code; especially because of the ease with which tags can be created. It is as easy to write a tag in Grails as it is to write a Java or a Groovy class.
- Integrates easily with already written Java code: Grails/Groovy integrates easily with code already written in Java. You can even intermix Java and Groovy code in the same file and it will work just fine. On one hand, it allows a Java developer to start using Grails very quickly; on the other hand; it allows use of already written Java code.
- Plugin based development approach for modularity and reuse: Grails promotes reuse of code between different Grails application by modularizing your application in the form of plugins. Taking a plugin-centric development approach promotes and forces clear separation of concern and easy reuse.
- Tons of available plugins: Grails has over one thousand plugins which have been contributed by the core development team and other Grails application developers. More often than not, if you want to integrate an existing framework or use an API, you will find a plugin to make the integration much easier.
- Minimal server restart required while development: While developing with Grails, you don’t need to restart your web-container after making every change. It uses an intelligent mechanism to reload and apply your changes. (There are very less cases where Grails requires container restart). This saves lot of development time wasted in server restarts.
- A very responsive and supporting community and mailing list: Grails is not only about technology, it has a very responsive and supporting community. There is hardly any question that doesn’t get answered on the mailing list.
- Hundreds of small things that make development fun with Groovy and Grails: Can’t explain this, in order to understand this, you need to develop with Grails for a week and you would know.
*Check out GrailsConf India, India’s first Groovy-Grails conference
* Call For Speakers! Submit A Talk on Web Technologies, Internet Of Things, Serverside, Cloud or Big Data For The Upcoming
IndicThreads.com Developer Conference, Feb 2015, Pune – India.
Latest posts by Amit Jain (see all)
- 15 Reasons Why You Should Use The Grails Web Application Framework - January 9, 2014