The Future of Grails
Peter Ledbrook recently wrote a blog post about the future of Grails, which sparked some deep thoughts about where Grails is heading as a platform.
As a long-term Grails user with interests in programming in the large, functional languages, DDD, CQRS, and high-volume HTTP, I’ve been contemplating what the future holds for this framework.
The Changing Landscape
The industry has changed significantly since Grails was born. Grails emerged from the Spring/MVC consensus - essentially designed to be “Java/Spring web development done right.” It was, and continues to be, a better Spring MVC paired with a better Java (Groovy). This approach has been beneficial to the industry.
However, the consensus upon which Grails rests is now broken. Java web development has reached an inflection point, similar to the previous major shift when Spring displaced J2EE.
A New Philosophy for Grails
I believe Grails needs a new philosophical foundation, moving away from its current large, complex core. Here’s my vision for a reimagined Grails:
Stripped-Down Core
The core of Grails should be focused on:
- Marshalling
- Loading
- Providing hooks for plugins
This minimalist approach would create a more flexible foundation.
Decoupled Plugin Ecosystem
Instead of plugins depending on specific implementations, they should:
- Declare functionality requirements
- Communicate based on provided features
- Work more like a conventionally-done OSGI system
Integration with Modern Tools
Embrace Gradle as a build tool and create a more modular plugin system that can potentially expand beyond web applications.
The Vision
I want the Grails of the future to be a coherent, stable, conventional, runtime architecture with plugins communicating based on their provided features.
This would be similar to OSGI, but “done conventionally, and so done right.” It would maintain Groovy’s pragmatic nature while providing conventions without being overly complex.
Benefits of This Approach
- Flexibility: A lighter core allows for more diverse use cases
- Stability: Fewer moving parts in the core means fewer breaking changes
- Extensibility: Feature-based plugin communication enables better modularity
- Future-Proofing: A more adaptable architecture can evolve with industry changes
Conclusion
The future of Grails lies not in competing directly with newer frameworks, but in evolving into something unique - a convention-driven, plugin-based platform that leverages Groovy’s strengths while embracing modern development practices.
By slimming down the core and creating a more flexible plugin ecosystem, Grails can continue to provide value in a changing landscape while maintaining its philosophy of making development easier and more productive.