Groovy on Grails framework in java
Groovy on Grails is an open-source application framework build on java language using groovy scripting languages. what is the groovy framework:-
Groovy is a scripting programming language that runs on a java virtual machine. Groovy is a java module that has one dependency jar file. Groovy is a scripting framework for building applications on top of java. It will reduce a lot of java code to write the applications and the files are saved with extension as .groovy.
The syntax for groovy and java looks similar.
Grails is a java web application development framework for building rapid web applications. Grails are integrated with spring and hibernate technologies to develop the applications very quickly. In Grails, to story any model object, we don’t define any configuration or many files to do crud on the model. just by coding by convention approach, we can simplify the development and do our logic quickly.
Grails applications can be built by java developers as well as developers who have development experience easily.
Advantages of the Grails framework:-
- support for building web applications quickly without focusing on software conventions
- Integrate with persistent ORM frameworks like hibernate and other frameworks like spring.
- Provide richer templates build on Groovy server pages to build standard UI elements and MVC features.
- Good documentation and a lot of companies are using these technologies.
- Learning framework is easy and building web applications with this framework is straightforward.
- Generate code automatically based on templates.
- Building new applications is very easy.
Disadvantages with Grails:-
-It is developed on Java, the learning curve is there for non-java developers. Integrating with existing custom frameworks is very difficult and complex. There is a time-consuming process while compiling grails apps as Interpretation of the scripts and conversion to .class files is to be done. Lack of knowledge guidance and reference. The community is very small to get help with issues and errors.
Grails is integrated with Maven for building grail projects.
Grails project code architecture controllers – grails-app/ controllers:- here we can write the groovy files for controller-related code domain – grails-app/domain Contains the list of groovy model objects with package structure
view - grails-app/views
has the list of GSP files which are groovy-based server pages to display the UI elements. Groovy server pages are like java server pages with the support of Groovy scripting languages.
This is just a basic idea that I got to know and blog about.
Please share your views on this.