Search

Subscribe

Enter your email address to subscribe to this blog.

Recent Comments

PayPal PayflowPro RESULT=117 Failed merchant rule check
Dan Vega said: The one thing I really love about Slatwall is that you aren't forced into one solution. If you don't... [More]

PayPal PayflowPro RESULT=117 Failed merchant rule check
Mark Fuqua said: I have been watching Slatwall from the sidelines since it was first mentioned a few years ago...I ha... [More]

CFGrid Event Listeners
Dan Vega said: @Mark - not sure @Steve - You may be able to listen for a change event and do something but honestl... [More]

CFGrid Event Listeners
Steve Kubrak said: I know this is an ancient thread, but I need help and I can't seem to find it. I'm not a CF newbie, ... [More]

CFGrid Event Listeners
Mark said: Is there an argument that covers the footer of the grid (where the delete button would go)? I'd lik... [More]

Getting Started with Gradle - Hans Dockter

I just wanted to take a second to share a screen cast that I came across. This was a presentation that Hans gave to a Java users group in October of 2012. I have listed the presentation description below but I just wanted to say that he is an absolutely amazing presenter. Very knowledgeable, dynamic and just fun to watch. Gradle can be a little overwhelming to some of us at first but I think he does a great job of showing you everything it can do it a short amount of time.

After sitting down with Marakana for an episode of Breaking Open, Hans Dockter, creator of the open source Gradle platform, and founder of Gradleware, headed over to the SFJava Usergroup to deliver this mammoth of a speech. Chock full of code and demos, Hans goes over everything that makes Gradle awesome: from serious build automation and organization, to Maven and Ant compatibility. If you're dealing with a jumbled mess of plugins and undocumented code, you probably want to check this presentation ou

 
 

Sneakerhead Domain Model & Scaffolding

Just wanted to give a quick project status for anyone following along. I took the branch domain-scaffold a few days ago. Basically this branch has the domain model in place and some static scaffolding. I wanted to keep this on a separate branch so you can where we came from on this project. The domain model is pretty basic and I wanted to keep it that way for this pretty basic demo project. Here is a quick view so we can compare it to what it looks like later.

Since then I have ripped out all of the scaffolding and started building out my own presentation layer. You can follow along on the develop branch. Below is a link to this branch.

https://github.com/cfaddict/sneakerhead/tree/domain-scaffold

 
 

Grails 2.3.0 RC2 Released

Just a heads up that 2.3 RC2 was released today. You can check out the release notes by clicking on the link below. A few of the things that I am excited about are:

  • Defaulting to HTML codec - escaping all GSP expressions and scriptlets
  • The GORM for Hibernate 3 support for Grails has been extracted into a separate project, allowing new support for Hibernate 4 as a separate plugin.
  • URL Mappings may now specify that a redirect should be triggered when the mapping matches an incoming request:
  • Grails' REST support has been significantly improved
  • Grails 2.3 includes a new data binding mechanism which is more flexible and easier to maintain than the data binder used in previous versions.

http://grails.org/2.3.0.RC2+Release+Notes

 
 

Grails MySQL Boolean Gotcha

In the small app I am writing for fun I decided that it was time to switch over to a MySQL database. It was suprisingly easy to get Grails to talk to this new database. I won't go over every little step because Joe Rinehart already wrote up a nice guide for connecting grails to mysql. One comment I will make on that article and this was mentioned in the comments is that you can avoid downloading the mysql drivers and having to drop it in the lib folder. Go into grails-app/conf/BuildConfig.groovy & under dependencies uncomment the following line. Grails will then go out and download the dependency for you.

runtime 'mysql:mysql-connector-java:5.1.22'

So now that we have MySQL up and running we can take a look at the big GOTCHA I ran into tonight. I have a domain class (many actually) that define an active flag (boolean). If we take a look at my Brand domain you will see our boolean active property. This is meant as a flag to tell if the Brand should be active or not. After I was done with the domain model I fired up my application with some default data getting created in the Bootstrap. When I looked at the table structure and content this is what I saw.





Continue Reading >>

 
 

Grails Interactive Mode - USE IT

When you first start playing around with grails you may have the IDE execute commands for you or you may end up running the commands yourself from a shell. I have been running commands in terminal and for the sake of playing around it was fine. Now that I am working on a project and constantly developing running commands using the traditional grails run-app syntax just won't work.

This process is very slow and there is a reason for that. Every single time you run grails {insert_command_here} you are firing up a new JVM. You can use interactive mode by simply by typing the grails command from in your project. The advantage to this is that it keeps the JVM running and allows for quicker execution of commands. Now when you run a command you can omit the grails prefix.

run-app
stop-app
create-controller
generate-all
etc...

Another great feature about interactive mode is that you get tab completion. Start typing something like create and click tab to see a list of available options. Want to see a list of all commands? Simply hit tab once you are in interactive mode.

Finally there are times when you still want to run an external process. I was trying to run clear from the terminal and grails kept complaining that it couldn't find a script with the name clear. Luckily they thought of everything over there and gave us a way to run external processes. Simply start the command with a !. This is ideal for external commands that operate on the file system such as 'clear', 'ls', 'cat', 'git', etc.

Get used to using interactive mode, its quick and intuitive and more fun than waiting for JVMs to load!

 
 

More Entries