The groovy swing builder is one of Groovys best features. It becomes quite easy to build a gui with the builder. In some cases you may like to add a custom Java swing component to your swing builder. For such cases the swing builder is equipped with the widget() method. The following code uses the [...]
I set up an mobile application that sends data via a REST based interface to a Grails-based server. Unfortunately J2ME does not support all HTTP methods. To overcome this weakness we have to emulate the methods PUT and DELETE. Like Rails just did this by adding a “_method=PUT” parameter to the query URL, we will [...]
For my current grails project I use the Spring Security Plugin (formerly Acegi Security) to secure my views and services. A tutorial at the Grails site gives a great overview how to install the grails plugin.
Right after installation I faced some issues:
Secure your Rest Services
This sounds quite easy due to a simple switch within the [...]
Im Rahmen des Seminars Meta-Programmierung haben Lars Blumberg, Arvid Heise und ich eine Ausarbeitung erstellt, welche die Metaprogrammierung von Groovy untersucht.
Abstract:
Der Name der Programmiersprache ist Programm. Dass Groovy als noch junge Sprache viele neue und interessante Sprachkonzepte mitbringt, möchten wir im ersten Teil dieses Papers aufzeigen. Ein weiteres Highlight des ersten Kapitels ist vielleicht die [...]
Java Iteration Example
import java.util.Date;
public class Foo {
public static void main(String[] args) {
int start = 1;
int summe = 0;
for (int i = start; i <= 5; i++) {
[...]
Check out how easy the integration of OpenID into Grails is:
1. Create a new grails application: grails create-app openID
2. Change into directory: cd openID
3. Install Plugin: grails install-plugin openid
4. Create a new controller: grails create-controller User
5. Create logon.gsp at grails-app/views/user
6. Add the following lines of code
<openid:css />
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
<meta name=”layout” content=”main” />
<title>Login</title>
<openid:css />
</head>
<body>
<h1>Login</h1>
<openid:hasLoginError>
<div [...]
Continue reading about 10 Steps to Integrate OpenID into Grails
The Groovy documentation gives the first hints about how to use the Groovy XML Parser. This post describes how to read an XML file into a groovy class instance. To check for a valid input document advanced XML programs require XSDs for a formal description. Of course the XML processing task becomes more difficult with [...]
Continue reading about How to use Groovy XML Parser with namespaces
Acording to the official Groovy web site Groovy is “an agile dynamic language for the Java Platform with many features that are inspired by languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.”
Besides all marketing I used Groovy for quite some time and I think it’s a great [...]