You know how every Apple Mac user says there is something special about the Mac? They can't usually put their finger on it but they say something like "it just does what I expect it" or "it does what is right". Well that's the way I feel about Grails. Recently I wrote my first real tag in Grails and I was just amazed at how it felt and how it does the right thing by encouraging best practices. For starters, writing tag libraries is incredibly easy (Read the Piragua Blog for details on how to write a Grails tag.). So why is this a best practice? Well I have seen a lot of scriptlets written in JSPs that should have been reusable JSP tags. But because it was to difficult or time consuming for a developer to actually spend the time to create a JSP tag or even more difficult yet a JSF component it simply was not done. But with Grails tags it is so simple there is no excuse.
Another example is tag and controller integration tests automatically inject mock request, response and session objects. I have seen many projects with no unit tests for the web components or unit tests that require deploying the application because they do not use mock objects. By automatically including mock objects developers no more have to download and add jars for mock web frameworks or even create instances of the mock objects. This should save time and help improve unit tests.
Random thoughts about my interests in Java, consulting, scripting in Java and software development (especially for small and medium size organizations).
Subscribe to:
Post Comments (Atom)
AWS EC2 Hibernate Java SDK v2 Example
I recently wanted to automate the creation of developer VMs in AWS using EC2 instances. To improve the developer experience (DX), I didn'...
-
In May of 2009, I wrote the blog post The Ultimate Enterprise Java Build Solution . Over the past 7 years since I wrote the post I have help...
-
Early in my career I took on the role of setting up and operating the build infrastructure of many of the projects I have consulted on. I st...
-
Class loading issues are a common frustration for many Java developers. The dreaded java.langClassNotFoundException means they can forget a...
No comments:
Post a Comment