Grails Advantages over other Java Web Application Frameworks

SHARE:

Grails is an open source Java framework for creating web applications. Support of Groovy adds productive and simplicity, whereas support ...


Grails is an open source Java framework for creating web applications. Support of Groovy adds productive and simplicity, whereas support of direct Java language extends feather. This framework is inspired by Ruby on Rails into the Java world such as DRY (Don’t Repeat Yourself) and Convention over Configuration (COC)

Groovy is simple yet powerful scripting language that is targeted to the JVM and features a mix of static and dynamic typing. Groovy scripts are compiled to Java classes and can import regular Java classes (and vice-versa), so we can take advantage of your existing libraries.

Grails is lot like a Rails framework. GORM (Grails Object Relational Mapping) is used to map domain objects to their corresponding database table. Under the hood, GORM using Hibernate. GORM objects look and act very much like ActiveRecord objects of Rails. Grails is targeted at Java developers (a very large community indeed).

Few advantages of Grails framework:
  • Grails is built on several popular frameworks (such as SiteMesh, Hibernate, Spring).
  • Java programmers will have a flat learn curve, especially for those familiar with Hibernate and Spring.
  • Grails is maintained by SpringSource.com, that means the flexibility and scalability
  • Grails application can be deployed on many popular J2EE servers, such as JBoss, Tomcat, WebLogic etc.
  • Direct support of two(2) language extends choice in some use-cases. 
Let's talk about some performance tricks. 

Unique constraint: 
This is very powerful way to check duplicate keys in any DBMS, but it has some impact on application performance. It try to issue multiple query in DBMS. If you are lucky to use PostgreSql use unique index.

Optimize your JVM param:
Default configuration comes with limited heap size. 
    
Use @CompileStatic: 
The @CompileStatic annotation can be added to individual methods as well as to entire classes. So we have choice of using this when appropriate.
    
Bulk inset or data-feed import
In case of bulk insert, use programatic transaction after list of data are inserted: Follow the example below: 

        for ( i in 1..1000000 )
        {
            // add your logic....
            if((index% 500)==0)
            {
                def session = sessionFactory.currentSession
                session.flush()
                session.clear()
            }
        }

Update grails version to latest stable edition:
You will get some improvement with no line of code. 
    
Disable the second level cache of Hibernate for enterprise application.
Auto-flush can be set to true for fast prototyping. Disabling the auto-flush to false to control transaction efficiently for enterprise project. 

Recheck and Disable Unused Plugins  



Content of Title 2
Name

Grails,2,LMS,2,wifi,2,
ltr
item
A Complete Software Company in Bangladesh: Grails Advantages over other Java Web Application Frameworks
Grails Advantages over other Java Web Application Frameworks
https://2.bp.blogspot.com/-2uN1rL2_oAw/Wgu777rSidI/AAAAAAAAG30/ORLsv60HSk8vDrcr2sbp8tHT0Uz0r6SdQCLcBGAs/s1600/Grails-architecture.png
https://2.bp.blogspot.com/-2uN1rL2_oAw/Wgu777rSidI/AAAAAAAAG30/ORLsv60HSk8vDrcr2sbp8tHT0Uz0r6SdQCLcBGAs/s72-c/Grails-architecture.png
A Complete Software Company in Bangladesh
https://www.datawareltd.ca/2017/11/grails-advantages-over-other-java-web.html
https://www.datawareltd.ca/
https://www.datawareltd.ca/
https://www.datawareltd.ca/2017/11/grails-advantages-over-other-java-web.html
true
322230061525184079
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy