Tuesday, January 13, 2009

Mea Culpa Groovy.mn

After posting on Twitter about two Groovy / Grails user group meetings this week, I was reminded that I had neglected to mention the gang in the Groovy capital of the mid-west, Minneapolis.  The Groovy Users  of Minnesota (GUM) have one of the oldest and most active groups in the G2 community.  The have meetings every 2nd Tuesday (including last night) and a very active and helpful mailing list.  This group is also home of some very prolific G2 bloggers, plugin developers and generally Groovy developers.  If you're anywhere near the Twin Cities, check them out.  If you're not in the area, you can still join the mailing list.   There's always something Groovy going on.

Wednesday, December 10, 2008

Gateway Groovy Users Recap

We had the first meeting of the Gateway Groovy Users tonight.  We didn't get quite the turnout that Alex Miller got with the Lambda Lounge, but what we lacked in numbers we made up for in left over food!  But seriously, the six of us had a great time.  We had a good discussion followed by a Groovy hacking session.   We also set the date for our next meeting.  Mark your calendars, Thursday, January 15th, we will be have an overview of Grails 1.1 ( which should be released by then) by an as yet undisclosed presenter.  Join the Google Group for updates.  

Also, this just in... The Chicago Groovy Users Group is having their first meeting on Tuesday, January 13th.  See their site www.cgug.org for more details.

Monday, December 8, 2008

GSP Page Without a Controller

Grails uses convention to serve up .gsp views using the name of an action in a controller.  For example, if you have a list action in a BookController Grails will try to load grails-app/views/book/list.gsp when this action is called.  But what if you want to use a .gsp but do not need or want a controller?  How can you call that page in Grails?  Like most things in Grails, there is more than one way to do this and they are all easy.

You can create the .gsp file in /grails-app/views or directly in the web-app directory.  I'd prefer the former since that's where all your other .gsp pages are going to be.  If you do either of these, then you can call the page like this:  myapp/mypage.gsp.  Or, if you nested the .gsp in a sub-directory, like this: myapp/mysubdir/mypage.gsp.  In any case you will have to include the .gsp extension and that's a bit ugly.  You can fix this with URL mapping by adding something like "/mypage"(view:"mypage") to the mappings block of your URLMapping class.  Now you can just call myapp/mypage and all is well.

With any of these approaches you have most of the power of GSP.  You can use the standard Grails GSP tags as well as any custom tags added to your project, you can include Groovy code in your pages (but please keep it to a minimum) and you have access to the objects that Grails makes available to all GSP pages, such as request, session and params.  What you don't have is a way to pass model data to your page or to perform other operations before your page is rendered.

Keep in mind that a controller action does not need to have any code in it.  So, you can always just create a controller with actions named the same as your .gsp file and then Grails will render it by convention.  If  your app includes other pages that are called from controllers then this will keep you app more consistent as well as making it easier to later add more functionality.    Maybe it's 6 of one and a half dozen of the other but at least it's nice to know that whichever way you go, Grails makes it easy.

Groovy User Groups

If you read the Community News in the December issue of GroovyMag, then you already know about the two new US Groovy User Groups.   The Chicago Groovy User Group is holding their first meeting in January and the Gateway Groovy Users will be holding our first meeting this week!  

December 10th at 6:30 pm in downtown St. Louis Contegix will be hosting the first meeting of the Gateway Groovy Users.  If you are in, or can get to, the St. Louis area and are interested in Groovy, Grails, Griffon, etc, please plan on joining us.  You can join the Google group to keep up to date -  http://groups.google.com/group/gateway-groovy   The website should be live soon, and that will be announced on the mailing list.  

This is an exciting time to be working in this fast growing and just plain fun technology.  I think we will be seeing many more Groovy/ Grails user groups in the near future.  If you know of one that is starting up in your area, drop me a line and I'll be happy to help get the word out.

Sunday, November 23, 2008

Final Day of Final No Fluff Just Stuff of 2008

At many conferences the last day is where the less gifted speakers or the less interesting topics get placed.  Not here!  Today was jam-packed with interesting presentations given by such notables as Brian Sletten, Andy Glover, Ken Sipe, David Geary and Stu Halloway.   This was actually the toughest day to choose which talks to go to.  I considered trying to run back and forth to try to catch more than one, but wisdom and laziness prevented that.  

So I started the day out with Andy Glover's "Groovin' builds Gant get any easier".  Andy did a great job of explaining what happens when you combine the utility of a feature-rich build system like Ant with the expressiveness and power of Groovy.  Anyone using Ant can benefit from Gant.  I can't see why anyone would stay with XML based Ant.   One thing that I always appreciate about Mr. Glover's talks is the way he draws even the most recalcitrant audience into his talks.  It's fun to see a master at work.

Speaking of masters, the next session I went to was Brian Sletten's "Restlet for the Weary".  I kept getting this feeling that a Restlet plugin for Grails might be a good thing.  I wonder if anyone has done that yet.  I don't think it's mere coincidence that you can rearrange the letters in Brian's name to spell "Brain".  

After another delicious lunch, we came to my favorite event, the expert panel.  The interaction between the speakers, audience and Jay Zimmerman, the host and moderator, is just hilarious, while being informative at the same time.  Ladies and gentlemen, don't try this at home.   

This might not have been a good idea, but I finished up the day in a two part session by Stu Halloway.  Stu has a series of 4 talks based on his recent blog posts titled Java.next.  The two sessions that he had this weekend were great and Stu is one of the smartest people I've ever met, but it was a bit much for my brain after three days.   In fact, I am still mentally digesting much of what he talked about.  I will have to do a follow up to this post.  But in the meantime, I highly recommend that you check out his blog.  Be sure to do it on an empty brain, so to speak.

Well that's it for No Fluff Just Stuff  2008.  I've said it before and I'll say it again.  These are, by far, the best technical events available.  If you haven't been to one, get to one.  If there isn't one near you that's no excuse.  There is a group of guys from the Netherlands that come to one each year.  Since they have to fly in anyway, they go to a different city each year.  So there's no excuse.  Check the schedule.  If you're in the northern midwest, the Milwaukee NFJS will be Feb. 27 - March 1, 2009.  See you there!

Saturday, November 22, 2008

NFJS Chicago Day Two was packed!

Today the schedule was packed with good sessions.  It was very difficult to choose which session to go to.  Though I found out something- if you wait too long to decide the decision gets easier as some of the rooms fill up! 

After a great breakfast and discussion with Mark Richards and a preview of the material for the 10th anniversary meeting of NEJUG (if you live near Boston don't miss the January meeting), I went to Jared Richardson's Distributed Agile talk.  Jared' s high energy and upbeat outlook are great for getting you going in the morning.  Since I am currently working on a distributed team, this was a very timely session.  

Next I caught Alex Miller's tour of Terracotta.  That's an impressive piece of software!  I am going to have to look into it more.  It seems like something you should have to pay a huge amount of money for but it's free and open source.  Wow!  

After lunch where I unsuccessfully attempted to get a CapJug table together (sorry guys!),  I went to hear Neal Ford's talk all about Regular Expressions, which I told him look to me like cartoon swearing.   As part of the talk he had a quiz where he showed different regex samples and we were supposed to guess what they were.  One of them turned out to not be a regular expression at all but real cartoon swearing!  It was a very good discussion though and I think I'm starting to figure those things out.  Maybe between this talk and Ted Naleid's blog post, I'll finally be able to understand the next time a cartoon character cusses me out.

Next was Jeff Brown's Agile Test Driven Development with Groovy.  This is another that I had been to before but it's still got some good reminders in it and besides it was one of only two talks Jeff was giving and I had to go to one of them.  I was kind of bummed that Jeff didn't do any of his Grails talks this weekend.  In fact the whole show was a bit light on Grails goodness.  I'll have to note that on the conference eval :)  

Finally there was the JVM languages BOF with Scott Davis, Stu Halloway and Jeff Brown.  There was some very good discussion on various languages such as JRuby, Clojure, Scala and, of course, Groovy.  Groovy appeared to be the favorite of the audience here, but Clojure does sound pretty interesting.  Or should I say, Stu Halloway makes Clojure sound pretty interesting. Stu is working on a book on the topic which is in beta now.  I'll have to check it out.

All in all, a great day.  My head is swimming with ideas and starting to get a bit stuffed, but there's still one more day of the last No Fluff of the year. 

Friday, November 21, 2008

NFJS Chicago Day One Wrapup

While Scott Davis went on to blow everyone's mind with Groovy: The Red Pill, I snuck over to catch Neal Ford's Productive Programmer talk.  I have the book but it's tough to ask a book questions.  It was great and I picked up some very helpful tips that I can put to use on my recently acquired MacBook Pro.  (which is just awesome! by the way).  Next, while my son Ben was keeping an eye on Scott during Rapid Web Development with Grails and Ajax, I took in Nathaniel Schutta's talk on Improving Code Quality.  Nate gave a good recap of some of the best stuff out of Pragmatic Programmer with excellent anecdotes to drive the points home.  

Dinner was great as usual at a NoFluff.  No boxed lunches here!  I ran into some more Madisonians including a former co-worker from the State of Wisconsin.  It was great to hear that Grails is still making life better for them there.  But then Grails makes life better wherever it is tried.  :-)  

Unfortunately I missed Neal Ford's keynote due to an abundance of good conversations with some of the smartest people I know.   Time now to rest up.  Tomorrow's a big day.  Joining the speaker lineup is the one and only Stu Halloway as well as David Geary, David Hussman, and rounding out the St. Louis contingent, Jeff Brown and Ken Sipe (Alex Miller is also from St. Louis... must be something in the water over there).

Stay tuned for more from this, the last No Fluff Just Stuff of the year.