I've just finished reading The Definitive Guide to Grails, an excellent book by Graeme Rocher.
While there is a lot of interesting content in the book, I'd like to highlight a few Grails features that are relevant in the context of enterprise software engineering as these features usually evade basic tutorials and getting started guides.
Services
You don't have to jam your business logic into the controllers. A Grails service class feels like a natural place for it. And the service class can be easily injected into the controller via a simple naming convention.
Transactions
Transaction support in a service class can be enabled via a single line of code:
def transactional = true
The declaration above will presumably make all the methods in the class transactional with the transaction propagation semantics of required.
For a fine-grained transaction control one might want to tap into the rich transaction support provided by Spring framework.
Security
Acegi Security (now Spring Security) can be integrated into an application. Acegi Security 1.0 configuration is admittedly bulky. This changed to the better in version 2.0. Hopefully a future release of Grails will organically integrate with Spring Security 2.0.
Enterprise Application Integration
A great deal of engineering effort in the enterprise is spent for interfacing with legacy systems. Creating a brand new database is a luxury that is rarely affordable, there are gobs or Java code out there, and service-oriented architecture is beginning to yield tangible results. To tackle these issues Grails provides custom ORM, direct Spring dependency injection, and seamless Java integration.
If you are an enterprise architect, put Grails on your technology watch list.
0 comments:
Post a Comment