Tuesday, July 28, 2009

You don't need session in Grails service

From time to time there are questions or blog posts that explain how to obtain access to web session from the grails service or domain class. If you really need to access session from the service class e.g. this post from Robert can help you.

But before you start reusing session in your services or even domain classes be careful and think if you really want that. Service should be more or less simple Java class and when ever possible should not depend on special environment classes. And session is actually very special web application environment class.

So what to do if in the service you really need that value from the session? Well the answer is of course very simple. Send it as a method parameter. Or another way is Robert's approach to create service that will return that value from session and inject it into service that really needs that value.

This way your services will not depend on the web container context and you can easily port them to other environment.

Tuesday, July 21, 2009

UK included on spend day with kids

As you may know few weeks ago I have launched spend day with kids web site. In the first release only USA was covered but yesterday I have finished entering attractions for UK.

So please feel invited to visit spenddaywithkids.com and search for ideal places to have a day full of fun with your kids.

Friday, July 17, 2009

Groovy and Grails help build apps faster

Actually this is not my post but a very interesting article about productivity gained using Grails and Groovy.

Usually I am not posting links to other articles but my feeling is that this one deserves this. I didn't notice link to this articles on other grails/groovy related sites so I want to share it.

So navigate to "Groovy and Grails help build apps faster" to read the whole case.

Sunday, July 5, 2009

Spend day with kids Grails web app launched

I have launched new Grails powered web site www.spenddaywithkids.com.

Idea of the web site is to help you find interesting places where you can go with kids. There are places like zoos, water parks, theme parks....

Developing this application was interesting for me because this was for me the first time I used google maps in some of my application. Also new for me was geocoding but actually this turned out to be as easy as reuse formulas available online. Currently on USA is covered but Europe should come soon.

Currently I have three sites online: grails tutorials, software books reviews and spend day with kids.
For me it is just prove that development of web applications with Grails is easy and fun but know I will concentrate on extending my existing site and hope I will not get any fun idea soon :)

Let me know if you have some proposals for any of mentioned sites.