Your Privacy

This site uses cookies to enhance your browsing experience and deliver personalized content. By continuing to use this site, you consent to our use of cookies.
COOKIE POLICY

Making Apps Groovy

Making Apps Groovy
Back to insights

Programmers are lazy.  We try to write the least amount of code we can, reuse our old work and tend to require a lot of caffeine.  The field of computing has evolved over time to address this.  From punch cards to IBM mainframes to the promises of “The Cloud”, each step has increased how expressive developers can be with their code and how much work that requires.  Developers learned very quickly that the more code they write means more time spent on code maintenance and less on new features.  We hate writing unnecessary code, messing with configuration files, and as a result, programming conventions have evolved to address this.  Open source libraries are standard in most code bases and principles like Don’t Repeat Yourself (DRY) are our motto.  I want all of my functionality to work as easily and simply as possible, and my manager wants most of my time focused on business logic.  Groovy and its associated web framework, Grails put this idea into practice.  By using a dynamic language with simplified configurations, it becomes easy to write clean, maintainable code that facilitates a rapid development cycle.

I come from a Java background.  As one of the current most popular languages, it incorporates many current design philosophies and enjoys support from a wide range of third party libraries.  With the release of Java 8, the language has become more functional, and thus more expressive with the inclusion of Lambda functions and Streams.  These features work great, but at times feels overly verbose when compared to other popular languages.  Java has proven to be effective for creating web applications.  Java has been used by a wide variety of companies for many different use cases by taking advantage of frameworks such as Hibernate and Spring.  While these frameworks are great and I have enjoyed using them in the past, there is a lot of configuration that can be tedious, lead to bugs, and slow down development.  Whether a developer forgot to add the spring annotation to a service, or the xml config had a misspelling, the set up for seemingly simple operations gets annoying.  Why can’t the framework just know the basics about your application?

That brings me to the programming language Groovy and its web framework Grails.  Groovy is a dynamic language built on top of the Java Platform.  The syntax is familiar to Java, yet much more dynamic and simplified.  This means seasoned Java developers can quickly get comfortable to the new language, and take advantage of the expressive features.  With a simplified syntax the code is less bulky making it easier to read, maintain and get new developers up to speed.

The advantages become apparent when developing web applications with Grails.  Using the dynamic nature of Groovy, Grails builds on this with a Convention-over-Configuration approach, utilizes sensible defaults and provides easy to use object relational mapping.   Coding by convention removes unnecessary complexity from an application allowing a developer to focus on business goals.  Instead of registering services and controllers with the framework, Grails recognizes the function of any file the ends with “Controller” or “Service.”  While this is a simple example, similar conventions exist all over the framework that simplify implementation and save time.  All of this is built around Grail’s easy to use domain modeling through GORM.  This allows a web application to model and create relationships between the data in the database.  Under the hood, GORM uses Hibernate so the design patterns will feel similar to Java developers.  However due to the dynamic nature of Groovy, the domain classes take less time to set up and querying is easier to read and understand.  GORM supports multiple ways to query the database depending on the complexity of the query.  A simple search can be done in with a dynamic finder (Company.findByName(“UDig”)), a simplified criteria search or even using HQL.

Grails is a powerful web framework that takes advantage of the dynamic and expressive Groovy programming language.  In my experience, I have been able to produce clean, maintainable code with minimal configuration. I find myself concentrating on the business logic, the real purpose of the app, more than comparable frameworks.  Since it is built on the Java platform, it is familiar enough for Java developers and contains enough value adding features that extend a programmer’s toolbox.  The technology is fun to use, easy to read and applicable for many applications.

Digging In

  • Digital Products

    Unlocking Business Potential: The Power of Custom Application Development

    Like any savvy business leader, you’re likely always on the lookout for tools to give your company a competitive edge. And in doing so, you’ve undoubtedly considered investing in custom application development. But the question is, how do you ensure that such a major investment in a custom web application development provides a strong return on […]

  • Digital Products

    Mastering Legacy Application Modernization: Strategies for Success

    The ironic truth of the business world is that change is the only constant. But this means that failing to keep pace with the competition and its technologies will only end with you falling behind. That’s where legacy application modernization enters the fold. When you modernize legacy applications, your team gains access to new features […]

  • Digital Products

    CTO Confessions Podcast

    In this episode of CTO Confessions, Rob Phillips, the Vice President of Software Engineering at UDig, digs into his journey from a passionate technologist in his youth to a seasoned leader in the tech industry. He shares valuable lessons on transitioning to senior leadership, the importance of understanding and articulating company problems, and the art of empowering teams for high performance.

  • Digital Products

    Navigating the Challenges of On Premise to Cloud Migration

    In today’s rapidly evolving technological landscape, the shift from on premise solutions to cloud-based infrastructure has become a pivotal transformation for organizations seeking to modernize their IT operations. This transition holds the promise of increased agility, cost savings, and enhanced scalability. However, it is not without its set of formidable challenges that organizations must navigate. […]

  • Digital Products

    The Power of Transferrable Skills in Tech Projects

    Every project has its own unique elements that require flexibility to be effective and achieve success. This often requires picking up new pieces of a tech stack, learning a new programming language, or a new project methodology. Fortunately, there are also many transferrable skills that carry over from one project to the next. In my […]

  • Digital Products

    The Four Pillars of Effective Digital Product Development

    In 2020 alone, approximately two billion consumers purchased at least one digital product. From software licenses to mobile apps and tech tools, consumers are becoming increasingly active in the digital product market, a trend that has naturally spurred brands across a wide range of industries to reevaluate their digital product design and development process workflows. […]