This week in Discobot (45.2011)
Another night of coding, another update on the Discobot project! For those unfamiliar with the Discobot project: it’s the project name for running Groovy on Android. We (Marcin Erdmann and Erik Pragt) are working towards an easy to use framework to run the newest version of Groovy on the newest version of Android. Currently, we’re not there yet, but we will demonstrate our progress at the next Groovy and Grails Exchange in London. A small update though on our current progress, since it has been a while since our last update, and...
read moreThis week in Discobot (40.2011)
After some hectic times at work caused by very tight deadlines and me getting married in the beginning of September we finally managed with Erik to get back to working on Discobot last week. Some of you have probably already noticed that we have a talk on Discobot scheduled at Groovy & Grails Exchange 2011 in London which takes place in early December. Although the progress is good there is still quite a lot of work to be done on Discobot and we decided that probably one evening a week will not be enough. On the other hand knowing about...
read moreMaximizing browser window for all Geb tests
There might be different reasons for setting a browser window size for your Geb tests. For us it was simply the fact that some floating elements where overlapping with other elements rendering them unclickable when the browser window was set to occupy only the half of the screen and that’s the default size of a Firefox window started by Webdriver. There were two requirements for the solution – it had to work on every machine the tests were run without any configuration (so we had to discard all of the solutions involving changing...
read moreFriday Repost: Grails and Bamboo
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog In our development environment, we use the complete Atlassian suite. We (or actually I) choose this environment because the products integrates so well together, but also because it integrates good with other products, like SpringSource Tool Suite, or, in our case, IntelliJ IDEA. And finally, the Atlassian suite has excellent support for building Grails projects,...
read moreFriday Repost: Making Grails work behind an proxy server
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog. Making Grails work behind an NTLM firewall (or using Grails without Internet) Currently, I’m in the process of taking over an existing Grails project and migrating it to a different location. This location has been setup by me, so I have full control over it, except for one tiny detail: the Proxy Server. The application used to work great, and installing...
read moreFriday Repost: Groovy Test Data Builder Pattern
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog Most of us value the quality of our code highly. I do, and I expect you, as a reader, also to care for the quality of your code. Because of that, we write tests. Test which usually contain of 3 parts: the setup, the execution and the verification. And sometimes some cleanup. In this blog, I’d like to focus on the setup part, and try to get rid of some...
read moreFriday Repost: Preventing spam with Groovy and Grails
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog When I created the jworks.nl website in Grails, one of my requirements was to have a blog. Since the website is created in Grails, and the Grails application doesn’t integrate easily with a standard blogging solution like WordPress, I decided to create my own blogging solution. But, since this proved to be much more painful than initially anticipated, I migrated...
read moreFriday Repost: Indexing documents with Tika and Grails
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog In one of the previous blogposts, I described a way to easily upload images by using Grails commands. This blogpost further builds on that, by providing a generic way to index uploaded documents. These documents can later be retrieved by using the search option provided by the Grails Search plugin. To index documents, we’re going to need two components: one of...
read moreGStringImpl cannot be cast to java.lang.String
Last week, we got a nasty error in our application: java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String The stacktrace was not helpful at all, and showed that the error was caused by a NullPointerException in Melody, which was a false message. After some searching around, we found the following code to be the culprit: render(view: 'index', model: ["${command.class.simpleName}": command) What happens here, is that a GString is used as a map key for rendering the model in the view....
read moreFriday Repost: Groovy’s @Immutable pitfalls
The Friday Repost series are copies from my earlier writings. Since I don’t want to loose them, and they might prove useful to others, I’m reposting them on this blog. Groovy 1.6 introduced some Groovy AST transformations like @Lazy, @Delegate and @Immutable, and there are more. This blog describes some pitfalls of using @Immutable, but to do that, a proper example of @Immutable seems well deserved. A first introduction @Immutable, like the name suggests, makes your classes immutable. This means that state changes from the...
read more
Recent Comments