Category Archives: Code

Announcing Grails Constraints Custom Domain Constraint Plugin

I’ve released my first public Grails Plugin today. The Grails Constraint plugin gives you the ability to create custom Constraints that you can apply to your Domain classes to validate them. These are applied and act just like the built … Continue reading

Posted in Code, Groovy | Tagged , , | 6 Comments

DRYing Grails Criteria Queries

When you’re writing code, Don’t Repeat Yourself. Now say that 5 times. *rimshot* One of the things that I find myself repeating a lot of in many business apps is queries. It’s common to have a rule or filter that … Continue reading

Posted in Code, Groovy, Web | Tagged , , , | 12 Comments

Struts2 Map Form to Collection of Objects

The Struts2 documentation contains examples that are often basic at best which can make it challenging to figure out how to do things sometimes. I was working on creating a form that would allow me to select values from a … Continue reading

Posted in Code, Java | Tagged , , , , | 7 Comments

Password Strength Validation with Regular Expressions

Regular Expressions are both complex and elegant at the same time. They can be made to look like someone was just randomly hammering on their keyboard. They are also an incredibly efficient and elegant solution to describing the structure of … Continue reading

Posted in Code | Tagged , | 25 Comments

Scala and Adding New Syntax

One interesting thing about some languages is their support for adding new syntax. While all languages have the ability to add new functions or types some have specific properties that make it easy to add what looks like new built-in … Continue reading

Posted in Code, Scala | Tagged , , , | 14 Comments

Grails Embedded Classes ClassCastException

Using ORM tools allow you to map the data to a database independently of how your object model looks. Grails supports one-to-many and one-to-one relationships if you want to have the data in different table. But what about when you … Continue reading

Posted in Code, Groovy | Tagged , , | 6 Comments

Update Table Data in Grails using Ajax Calls

Using Ajax for simple forms can offer users a very clean, simple and fast way to input data. I came across a situation recently where I was looking into replacing a document based workflow with an application. The documents themselves … Continue reading

Posted in Code, Groovy | Tagged , , | 5 Comments

Using Quartz.NET, Spring.NET and NHibernate to run Scheduled Tasks in ASP.NET

Running scheduled tasks in web applications is not normally a straightforward thing to do. Web applications are built to respond to requests from users and respond to that request. This request/response lifecycle doesn’t always match well to a long running … Continue reading

Posted in .NET, Web | Tagged , , , , | 8 Comments

Using Ruby Subversion Bindings to Create Repositories

Subversion has a default Web UI that is served up by Apache if you run Subversion that way. It is pretty boring and read-only. Then there are things like WebSVN that make it less boring, but still read-only. I got … Continue reading

Posted in Code, Ruby | Tagged , , | 1 Comment

DRY your CruiseControl.NET Configuration

Don’t Repeat Yourself (DRY) is one of the principles of good software development. The idea is that there should ideally be one and only one “source of knowledge” for a particular fact or calculation in a system. Basically it comes … Continue reading

Posted in .NET, Automation | Tagged , , | 4 Comments