The MetaSieve Blog

March 17, 2010

Continuous Testing with Grails

Filed under: Uncategorized — Tags: , , — Björn Wilmsmann @ 12:37 am

I’ve just released a new Grails plugin called AutoTest. AutoTest provides an automatic (or continuous) testing feature for Grails. After having installed AutoTest you will be able to run the following new Grails script:

grails auto-test

This will start a continuously running Grails test process. Once you modify and save a file within your Grails project unit and integration tests (and as a matter of fact any kind of tests added by plugins) will be run against the new version of the changed file.

This allows you to get continuous feedback on code changes without having to switch between editor and terminal.

For more information, please have a look at the plugin documentation


March 5, 2010

Does Grails have a problem?

Filed under: Uncategorized — Tags: , , , — Björn Wilmsmann @ 5:29 pm

Recently (or rather over the course of the last half year or so), there has been quite some discussion about how the Grails community responds to open source contributions, mainly with regard to Grails plugins.

The main issue Robert Fischer takes offence at is that the Grails community seems less appreciative of contributions, especially with regards to plugin development, than other open source communities like Rails.

According to Robert, Grails users are more demanding in terms of support for open source components. There seems to be a notion of ‘You built it so support it!’ within the Grails community whereas other communities nourish a more cooperative DIY style.

Now, when developing software for commercial purposes ‘You built it so support it!’ is perfectly fine but given that most open source developers don’t get compensated directly for their efforts this is problematic at least. Sure, open source work can gain you a decent job, marketing buzz or new customers for your company but this alone in most cases doesn’t justify doing extensive and often painful support.

I think the root of the matter is the cultural background of Grails in contrast to the background of projects like Rails:

While Rails has been born out of explicit disdain for ‘enterprise’ culture with all its complexities and often cumbersome nonsense, Grails tried to build upon a few positive aspects of enterprise software culture like reliability, scalability and security and do away with unproductive, complex boilerplate code at the same time.

So, while those two frameworks aren’t that different in terms of features and what can be achieved with them, each comes from and mainly caters for a distinctly different background.

Regarding the matter at hand, the problem with the enterprise background of Grails chiefly is that enterprise customers expect to pay often bizarre amounts of money for software allowing them to hold the creators of said software responsible and demand extensive support from them.

In a way this notion maybe shines through here as well. In the enterprise segment people are used to getting support for the software they use so they also demand this kind of support from open source developers, who mostly happen to create their stuff in their spare time.

While I’m perfectly fine with releasing my own plugins under the Apache license and support them whenever I have time to, I can completely comprehend Robert’s point of view and his desire to get a different kind of compensation for his open source work. In fact, there should be plenty of space for both approaches (and anything that lies in-between) within open source software development.

However, in my opinion the Grails community – especially those relying on Grails for commercial applications – does indeed have a problem if one of its most prolific plugin authors feels like he has to resort to such rather unusual measures to gain appreciation for the work he’s doing.

Moreover, although I consider a commercial market for Grails Plugins an interesting idea, I don’t think this is a viable alternative for plugin developers and users alike.
This would first of all require a much wider adoption of Grails to allow developers to get a decent amount of money from plugin development.
Secondly, this would most likely exclude smaller enterprises from adopting Grails at all.

Your thoughts?

List of related articles:

Das Internet: Ein rechtsfreier Raum

Filed under: Deutsche Beiträge — Tags: , , — Björn Wilmsmann @ 4:33 pm

Wenn Politiker über das Internet reden – wie zuletzt Bundeskanzlerin Merkel in ihrer wöchentlichen Videobotschaft aus Anlass der CeBIT – fällt schnell das Wort vom ‘rechtsfreiem Raum’.

Dazu eine Rückblende: Bis Mitte der 90er Jahre und ein bisschen darüber hinaus hatten Politiker und allgemein ein Großteil der Gesellschaft noch nichts vom Internet gehört oder taten es als seltsamen Trend ab, der irgendwann vorbei gehen würde.

Dann allerdings gab es in den USA und ein wenig später auch in Deutschland die ersten IPOs von Unternehmen, die ihr Glück im Internet gemacht hatten. So langsam verstanden auch Politiker, dass das Internet nicht nur ein Tummelplatz für sozial derangierte Verlierer ist, sondern in Zukunft von Bedeutung sein würde.

Und prompt begannen die ersten dieser Politiker, ihre Pflöcke einzuschlagen. Das Unwort von der angeblichen Rechtsfreiheit im Internet war geboren.

Frau Merkel hat indes vollkommen recht! Das Internet darf kein rechtsfreier Raum sein. Aber: Früher war das Internet auch kein rechtsfreier Raum. Für das Internet galten damals und gelten heute die gleichen Gesetze wie für die Offline-Welt. Das Internet wurde sogar erst zum rechtsfreiem Raum als sich die Politik eingemischt hat!

Um nur 3 Beispiele zu nennen:

  1. Impressumspflicht: Jeder Betreiber einer gewerblichen oder geschäftsmäßigen Website ist in Deutschland verpflichtet, ein mit maximal einem Klick erreichbares Impressum auf seiner Website vorzuhalten. Was dieses Impressum im Einzelnen enthalten muss, darüber herrscht nicht immer Klarheit.
  2. Haftung für Links: Welcher deutsche Internet-Nutzer kennt ihn nicht, jenen berühmten Disclaimer mit dem Landgericht Hamburg und der Distanzierung vom Inhalt verlinkter Seiten? Total abstrus und juristisch zumindest bedenklich.
  3. Falsche Verdächtigungen: Im Zuge von ‘Operation Himmel’, einer polizeilichen Aktion gegen Kinderpornografie, traten im Nachhinein zahlreiche Unstimmigkeiten zu Tage, die zumindest Zweifel aufkommen lassen, ob durch derlei Aktionen nicht auch vollkommen Unschuldige ins Visier der Ermittler kommen könnten.

Rechtssicherheit sieht anders aus. Betreiber und Nutzer von Websites sehen sich heutzutage viel mehr als früher mit rechtlich kritischen oder vagen Situationen konfrontiert. Und daran ist die Politik nicht ganz unschuldig. Sei es durch aktives Zutun oder auch einfach nur durch passives Ignorieren der Probleme, mit denen sich die Netzwelt konfrontiert sieht.

In Sachen Rechtssicherheit im Internet ist also in der Tat einiges zu tun.

March 1, 2010

MagicNumbers: Dynamic Time and Byte Calculations for Grails – Using the Meta Object Protocol to add behaviour to Grails at runtime

Filed under: Uncategorized — Tags: , , — Björn Wilmsmann @ 1:00 pm

The March issue of GroovyMag, an online-only magazine for everything Groovy and Grails has been published today.

I’ve contributed an article about the Grails MagicNumbers plugin you might find interesting. Here’s a teaser:

Grails plugin development and Groovy‘s Meta Object Protocol are powerful tools for adding runtime modifications to standard Java classes. Introducing the new Grails MagicNumbers plugin, I’d like to show how metaprogramming in Groovy can be used to make code both more readable and easier to write. The MagicNumbers plugin allows you to write readable code like 3.days or 6.megabytes instead of having to manually calculate the equivalent number of seconds or bytes.

[ … ]

Code like this obviously has several advantages over manually calculating and writing the actual numbers:

  • It is written much more easily.
  • The code is much more readable. You can even show this code to someone who hasn’t any programming experience at all and she will immediately understand its purpose.
  • The code is less error-prone and thus more maintainable.

So, I wanted to have this kind of magic in Grails as well. Fortunately, due to Groovy’s Meta Object Protocol and the Grails plugin framework, this kind of functionality can be added quickly and elegantly.

[ … ]

Read the rest of this article at GroovyMag.

Related links:

Blog at