Articles and News Blog - Tucanoo Solutions Ltd

A very small but I’m sure useful snippet here for anyone banging their head against a wall trying to figure out why they cannot validate command objects.. Or even why submitting a form they get this rather misleading exception message from Grails.

Method on class [com.tucanoo.SomeCommandObject] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.

This happens when you are using CommandObjects behind your forms, rather than binding directly to Domain objects. Don’t be tempted to avoid Command Objects, they are worth it and help keep your application more secure and maintainable.

I don’t know why a Grails IllegalStateException exception is thrown, but it happens when you are validating (maybe not even explicitly) a command object that is not explicitly marked as Validateable.

Simply mark your class with the annotation @Validateable and you should find the problem goes away.

It’s very easy to forget NOT to mark command objects @Validateable, perhaps they should be by default as certainly for me, I like to supply a whole bunch of constraints with my command objects and ensure they validate before I let the data contained within go near my domain layer.

The days of the static business website may be numbered as more and more businesses opt for a website using a CMS (content management system). Systems such as WordPress, Joomla and others are rapidly growing in popularity. What is it that makes CMS websites so much more attractive than conventional static websites? First lets look how Wikipedia define CMS and then cover the advantages provided by such a system.

Read more ...

We are very happy to announce we have been commissioned to develop a very exciting project that’s causing a lot of buzz here at Tucanoo Towers. Without going into detail all I can say is we’ll be utilising Grails to develop a scalable back end service to complement a mobile app with social and business functionality.

I’d love to be able to give more juicy details away at this stage as what we’re working on has the potential to be HUGE… think FourSquare scale, then think bigger… but at this stage everything is under wraps and will be till close to product launch so watch this space…

With the extremely rapid rapid application development benefits provided by Grails,  It can be tempting to feel you have learned nearly everything you need to know by the time you’ve got your first web app up linked to a database with full CRUD facilities and error handling ready.  I’m sure you were as impressed with the speed of development as I was when I created my first Grails app.

At such a point it can be very tempting to just rush straight into your next project,  however you absolutely must continue your learning path and look over the excellent documentation  otherwise you be will missing out on some of the finer features provided by Grails and the Groovy language.

Read more ...