For Beginners A Quick Walk-through on Grails and Django Development Frameworks

I recently attended a pretty good demo of Django, an open source web application development written in Python.

Since I am a Java enthusiast and prefer Grails over other frameworks, I wanted to discover how Grails is different from Django. Hence I dabbled a bit with Django and matched it with Grails. The observations compelled me to write about both the frameworks.

First of all let me introduce Grails and Django to those who aren’t aware about either or both of the frameworks.

Grails: Grails is an open source web application development framework based on the Java platform. Grails uses Groovy programming language and works on paradigms like Convention over Configuration, DRY (Don’t Repeat Yourself), Scaffolding, etc. which makes it a highly productive framework for rapid application development.

Django: Django is also an open source web application development framework written in Python programming language. Django follows MVC model and aims at simplifying the development of web projects that deals with complex data tables or complex data driven websites. Django also offers features like reusability of the code, Don’t Repeat Yourself making it equally easy to develop applications in Django.

There is no head to head comparison. I have just noted down features that I have come across in Django and analyzed them with features of Grails. Take a quick look at the two of them as follows.

  1. Programming Language

  • Django: As said above, Django is based on Python which is more preferable for developing complex, database driven websites
  • Grails: Grails is written in Groovy which offers great coding experience compared to Python. Development is Grails is faster due to Groovy language and hence it is mostly used for rapid web application development.
  1. Development Runtime

  • Django: Since Django is based on Python, the command line scripts are faster. Integration and Restarting of applications takes a couple of seconds, probably around 5-10 seconds. Moreover, Django includes auto reloading of changes and hence it has instant start-up time.
  • Grails: the process of running scripts and integration in Grails takes more time as compared to Django i.e. 15 to 30 seconds. Restarting or reloading applications in Grails is also very slow (usually 20-40 seconds).
  1. Structure

  • Django: Django is bit loosely structured as the domain classes and controllers are in the same folder which means there are more configuration files and boilerplate codes which makes the development process long
  • Grails: Grails is structured very well, in that it has templates, controllers, views, scripts, domain classes stored in the logical folder structure. Plus it uses DRY configurations and Convention principles which make development considerably easy and quick.
  1. Internal Resources

  • Django: Django covers a collection of resources for grouping and publishing files such as CSS, Javascript, and Images. However, these plugins are slightly vague in Django
  • Grails: Grails has an excellent support of these resources (CSS, Javascript and Images) over and above Versioning (a hash of content). Versioning allows caching of files which is not found in Django.
  1. Database Support

  • Django: Django officially supports PostgreSQL, MySQL, SQLite, and Oracle. MS SQL Server can be used with django-mssq
  • Grails: Grails support database like CUBRIN, MySql, Oracle, HSQLBB, Postgre and RDBMS
  1. Libraries & Plugins

  • Django: Django has more Plugins which meets every needs of most of the projects
  • Grails: Grails has a huge number of Java libraries and their inclusion in development is very easy
  1. Testing

    Both the frameworks have a good support for unit, functional and integration testing. Testing performance is fairly equal in both the case

  • Django: Django comes with a default testing suite and supports unit test frameworks
  • Grails: Grails support JUnit and supports Spock via a plugin
  1. IDE

  • Django: Django supports Eclipse and PyDev. Check complete list of IDE support for Django
  • Grails: Grails works smoothly with IntelliJ Idea. Check complete list of IDE support for Grails
  1. Websites that uses

  • Django: Pinterest, Instagram, Mozilla, The Washington Times and many more
  • Grails: ESPN, LinkedIn, Walmart,, IBM, Intuit, Netflix & Sky to name a few

After exploring both Django and Grails, you can make out that both the frameworks stand neck and neck in front of each other. In terms of offerings and performance both the frameworks provide satisfactory results. At some points, Grails may exceed your expectations.

To sum up, I would say if your company has a good number of Java developers, it’s worth taking a call on Grails due to its ease of development and lesser time to code.

About Author:

Boni Satani is associated with Cygnet Infotech - a Java Application Development Company. Get in touch with him if you are looking for some help or consultation in Java. Twitter - @bonirulzz

Your email address will not be published. Required fields are marked *