Web services in Grails

This article summarizes my experience with web services in Grails (and also Groovy). It will focus the on client side – consuming web services. If you are looking for server size – providing services, you can use plugins like Metro or XFire. Options Once you want to create a web service client in pure groovy,… Continue reading Web services in Grails

Modalbox in Grails

There is a nice and handy javascript library for creating kind of a modal “window”, similar to the famous lightbox. Here are few lines of code to make it running in a Grails application Installation First of all, you have to download the library. The easiest way is to install a plugin modalbox grails install-plugin… Continue reading Modalbox in Grails

Grails: internationalization in the service

Today I spent some time by creation of localized messages in a service. Here is a small tutorial. 1. Create your service grails create-service Local 2. Add a messageSource variable to your new service class LocalService { def messageSource } 3. Use it in a service method // Initialize parameters Object[] testArgs = {} def… Continue reading Grails: internationalization in the service

Live fulltext search in Ruby on Rails

Some time ago I promised to create a small tutorial about live fulltext search. A fulltext search, that gives you results as you type. Ingredients: Ruby on rails ferret gem (gem install ferret) acts_as_ferret gem (gem install acts_as_ferret) auto_complete plugin (from the application root: ruby script/plugin install auto_complete) What we will do Create an empty… Continue reading Live fulltext search in Ruby on Rails

Bootstrapping Grails integration tests

It is quite easy to prepare test environment the same as the development one. Just use Bootstrap. class BootstrappedTests extends GroovyTestCase { void testBootstrap() { new BootStrap().init(null) assert MyDomain.count() == 5 // Perform your tests here } }

Custom iterative tag in Grails with named variable

I will show you how to create an iterative Grails tag that can contain another tag. The inner tag will use variable of the iterative tag. So, we are going to implement a tag that creates n links ‘/show/1’, ‘/show/2’, etc. with description ‘Article number 1’, ‘Article number 2’ etc.: First of all, there is… Continue reading Custom iterative tag in Grails with named variable

From Mysql to Oracle: Grails application migration

Today I have finished migration of our Grails prototype. Originally we did develop it for MySQL, but the final system have to work with Oracle. This post summarize troubles and differences I was facing. User creation Since I am not Oracle administrator, it took me some time to put together script that creates user and… Continue reading From Mysql to Oracle: Grails application migration

MagicDraw documentation

I like MagicDraw as a versatile CASE open to customizations. But recently, I’ve found this in the official MagicDraw javadoc: Well, you can’t say the OpenAPI is missing open (ended) documentation, can you? Update: For a start, I’ve created an index of MagicDraw 14.0 OpenAPI examples. You may find it useful – place it in… Continue reading MagicDraw documentation

Categorized as Fun, Java