Skip to main content.

Archive for the ‘advocacy’ Category

Groovy and Grails adoption holdups?

Sunday, March 7th, 2010

What are some issues holding up Groovy and Grails adoption that you’ve encountered?  The biggest I see have less to do with the technologies itself and more about the marketplace.  Specifically, issues about finding developers familiar with the technology in the first place seem to be a major issue affecting a company’s confidence in adopting Groovy or Grails for a project.  This seems very much a chicken/egg situation – where will people get the experience using it if it’s not used, right?

Fortunately, I’ve personally been able to see some Grails and Groovy projects launch over the last year, helping to bring the numbers of experienced developers up, if only by a small amount, but I’d like to hear about more success stories.  Matt Woodward’s piece in the March 2010 issue is encouraging as well, because it may help prod developers from other camps (ColdFusion in his case, PHP in mine) to come in to the Grails camp, expanding the total pie.  While it’s great to get Java developers to use Grails as their primary web framework, we’re only growing Grails at the expense of other frameworks, and that does nothing to enlarge the share of the JVM as a web platform.

I see commodity hosting as a longstanding (but hopefully not eternal) stumbling block in the Java world, and keep hoping someone will address this with an offer targeting Grails.  Ideally a customized hosting solution with the breadth of plesk or webmin with custom management for Grails apps.

Maybe I’m too much a stick-in-the-mud, and not with the current ‘cloud’ bandwagon.  Perhaps everyone is content with Google App Engine, but I don’t see those sorts of solutions (AWS, etc) as providing much beyond mechanical plumbing.  There seem to be issues with SSL support for GAE as well, so it’s not something suitable for a majority of security-minded apps.

What’s your view on the state of the Groovosphere?

Call For Groovy Authors – GroovyMag

Wednesday, October 7th, 2009

Do you have an idea for a Groovy or Grails article?  Register at http://webdevpub.com/wdp and submit your idea to JSMag.  We publish on a wide range of Groovy/Grails topics, and we’re looking for pieces that cover new or innovative uses of Groovy, case studies, plugins, etc.  If it’s of interest to you, it’s likely of interest to others as well!

To get started, register at the above address, submit your idea, and if we approve it we’ll send over a basic agreement and put you in touch with one of our editors to get the ball rolling.

WebDev Publishing, GroovyMag’s parent organization, pays for contributions, and you retain the copyright.  We do ask for a nominal amount of exclusivity on your content, after which you’re free to republish on your own blog or in another publication.

Questions?  Email michael@groovymag.com or just post a comment here and we’ll get back to you ASAP.

GroovyMag March 2009 available

Tuesday, March 3rd, 2009

The latest edition of GroovyMag is now available.  Contents include:

Groovy Under the Hood

Kirsten Schwark delves deep in to Groovy to show you exactly what’s going on behind the scenes.

AJAX Forms with Grails

Mo Sayed demonstrates how to make your forms more responsive with AJAX.

New GORM features in Grails 1.1

In this piece, Bashar Abdul-Jawad guides you through all the great new GORM goodness Grails 1.1 has to offer.

Grails in a J2EE World

Shawn Hartsock kicks off a series detailing the best ways to integrate Grails in to your J2EE stack, taken from his own real life experiences.

Community news

Catch up with the latest Groovy and Grails news with Dave Klein.

Plugin Corner

Dave Klein shows you how to make your forms a bit more user-friendly with the Help Balloons plugin.

Griffon Logo Contest

Saturday, February 7th, 2009

The good folks at the Griffon project need your help!

They’re running a contest to have someone develop a logo for the project. The lucky winner will get all the fame, fortune and glory that goes with being said winner, along with a one year subscription to GroovyMag! :) But the runners-up don’t go home empty-handed – they’ll each get one free issue of GroovyMag too!

GroovyMag is proud to sponsor the Griffon project’s logo contest. See their page for more details!

Groovy and Grails training classes

Tuesday, February 3rd, 2009

It seems the Groovy and Grails training services bandwagon is continuing to gain steam, and this time I’m throwing GroovyMag’s hat in to the ring.

Today I announced  upcoming Groovy and Grails classes available through GroovyMag.  There are  four courses to start with:

  • Intro to Groovy (6 hours)
  • Intro to Grails (6 hours)
  • Advanced Groovy (12 hours)
  • Advanced Grails (12 hours)

The classes are taught by Robert Fischer of SmokeJumperIT, and have been developed as a joint venture between GroovyMag and SmokeJumperIT.

Web based training

The classes are web-based, meaning you log on to a conference system from your home or office.  No need for convoluted software set ups.  If you’ve got Flash installed (Mac, Windows or Linux!) you can take the class.  Each course is split up in to multiple 2 hour sessions spread out over a few days.  This is intended to give you time between classes to digest what was discussed, play around with it on your own, ask questions between sessions, and then come to the next session ready to build on what you learned before.

Why web-based?

There’s a few factors here: it keeps our costs lower, meaning the expense to you is lower.  We don’t have large conference facilities to pay for, and you don’t have to pay for travel or hotel costs.  It’s usually far easier for people to work training classes around a couple hours for a few days here and there than it is to schedule time off work and family and travel away for several days for more traditional classroom-style hands-on courses.

The decision may appear to be somewhat timely given the sharp economic downturn, but the germ of this idea has been going on since before GroovyMag was launched.  Late last year I had some discussions with SmokeJumperIT about developing some online classes, and we’ve been working on things since then.

Why 2 hour classes?

Back in the early 2000s, I started running PHP training courses.  These were 3-5 days intensive hands-on classroom style courses.  We had multiple instructors when needed, and we gave everything and then some giving people information, exercises and working with people one-on-one.

It was exhausting….

both for us as instructors, and for most of the students.  Of the hundreds of students we taught, I think less than 10% of them maximized their on-site time with us.  Usually by the middle or end of the second day, students were tired and overwhelmed with new information.  They were in a strange city, away from family and work, and were running close to overload.  Also, because they weren’t in their regular environment, there were often situational questions about work projects that they weren’t able to effectively convey to us in the classroom, which sometimes limited the information they could apply to their jobs.

Two hour chunks work well

Over the last year, I’ve been teaching PHP on a remote basis with similar web conferencing software.  For many of the students, it’s a great situation.  They tend to be more relaxed (because they’re at home or work, and not wondering what’s going on ‘back home’) and can absorb enough over 2 hours to keep them busy before the next class.  Students can email more specific questions between classes to get clarification or simply to go a bit deeper than the regular class might take something, but that doesn’t interfere with the pace for the rest of the students.

Certainly, the danger can be that some students don’t pay attention if you’re not physically in front of them.  However, even in face to face classrooms, students can ignore the instructor, or tune them out, or check email, or whatever.  The students that want to learn will pay attention and ask questions, regardless.

GroovyMag web-based classes offers a convenient and cost-effective way to have access to a live instructor who will walk them through real world Groovy and Grails material.

Only training

When I was doing PHP training back in the early 2000s, one of the side-effects of the training was that it led to custom consulting work.  Students would take training classes, then realize they couldn’t do all the work themselves, and then engage us.  It was a nice position to be in, but was one which caused a lack of focus in my business at that time.

GroovyMag’s goal is to be the publisher of record for Groovy and Grails information.  Some of that information will be in the form of GroovyMag magazine (thanks for buying!) and some will be in the form of training services, and some will be in other forms yet to be announced.  We’re not equipped to provide custom consulting services to you after the class, and in fact we do not want to.  We’ll be happy to recommend Groovy and Grails consultants to you from our network of consultants, but custom development is not our business model.

Other options

Still, web-based training isn’t for everyone.  Some people really will learn better and absorb more by being face to face with an instructor for multiple days, eyeball to eyeball in some cases.  And that’s good.  One of the things I’ve learned over the years is that people have different learning styles, and one size does not fit all.  GroovyMag’s classes are one size, and there are other sizes as well.

ThirstyHead.com, Webucator and  SpringSource.com all offer a variety of custom training options to suit your style, and will tailor a training program to fit your exact needs (on-site or off-site, custom topics, etc.).  If you think your needs are unique, or your learning style is best suited to face-to-face classroom style training, contact the above companies to discuss your needs.

If you’re not sure about what sort of training options would work best for you, give me a call at +1-919-827-4724 (or “mgkimsal” on Skype) to discuss what options might work best for you.  If one of our classes would fit the bill, I’ll let you know, and if not, I’ll put you in touch with someone at one of the other companies that would be a better fit.  There’s enough choices out there these days to enable you to find the perfect fit for your training needs.

Have a look at our training classes to read more about the options we currently offer.

Why Groovy?

Sunday, January 25th, 2009

Over the last several weeks, I’ve been asked a few times “Why Groovy?”  More specifically, it’s phrased like “Why should someone who already knows PHP/Ruby/ASP bother to learn Groovy?” or “If I was starting off a new project from scratch and had a choice between XXX (Ruby, Python, .Net, etc.) why should I use Groovy?”  I’ll attempt to tackle these as a whole, though there’s a bit of nuance between these questions I might get to also.

First, some background.  I’ve worked with web technologies since late 1995 (December, I think).  I got started in Perl, but was introduced to PHP/FI (PHP2) very quickly.  I used both Perl and PHP, then later ASP, from 1996 until around 2000/2001.  At that time most of the work I did focused on PHP.  In the intervening years, I’ve done small utilities with Python, played around with Ruby (nothing professional), Java (mainly doing Lucene/SOLR stuff), some .Net (a desktop app and webservice) and done a bit of Flex/Flash/AIR.  I’m by no means a polyglot at the level of a Neal Ford or Venkat Subramanian, but I am comfortable working my way around new languages (except Erlang – another topic for another day!)

In mid 2007 I was introduced to Groovy and Grails via presentations by Scott Davis and Jason Rudolph.  The presentations really got me excited about development again.  A somewhat new syntax with some nice features to make some of the boring stuff a bit easier (or redundant), some newish (to me) features (lambdas/closures) and a passionate community excited about the language were all reasons enough to get me interested in diving in to Groovy and Grails.

Looking back, this was almost the same semblance of qualities which attracted me so much to PHP back in the mid/late 90s.  There were certainly enough things in the language which made all the Perl/CGI stuff irrelevant (setting headers, parsing out POST values or loading the behemoth CGI.pm, etc.), the community was small and excited about the developments (especially when PHP3 hit the scene), and it was different enough (both language-wise and context-wise) from the early VB and Notes work I’d done to get me hooked.

These are also likely the same qualities which get many people excited about Ruby.  I’ve done a small amount of Ruby, and certainly appreciate the elegance of the language (in some cases) and the efficiency people find in Rails.  I just haven’t quite got ‘bit by the bug’ the same way I did with Groovy and Grails.  Yet.  Maybe that’ll change.  I’m working my way through Obie Fernandez’s “Rails Way” book these days.

But back to Groovy.  Why should someone learn Groovy?  I think there’s some abstract arguments to be made, and some practical ones.  I don’t make any claim that these are uniquely my arguments – I’m sure they’ve been made before, just not on my blog.  :)

Abstract

Learning a new language is good

At CodeMash 2008, Neal Ford gave a good keynote on the value of learning multiple programming languages.  When learning new programming languages, you get a better perspective on how problems are tackled by different camps, and can more easily learn to break down whatever problem you’re facing in different ways.  I do think you learn to think differently because of it.

This is not much different from being able to read/write multiple human languages.  My limited experiences learning Spanish and travelling to other countries has forced me to rethink how I use my words, and more importantly, how others may react to what and how I communicate.

This isn’t to say you have to be a master at every single programming language around.  But getting outside of your comfort zone will force you to rethink some assumptions about how you develop in your primary language(s).  You’ll also be exposed to other tools and techniques developers from other camps, which can also give you new ideas about how to tackle your day to day work.

Groovy is new, but not so new that you’re going to find breaking bugs every week like you might have a few years back.  The community is open and willing to help newbies.  This combination makes a great candidate for a learning language.  Yet the skills you learn can have immediate applicability, because Groovy compiles down to Java.

Learning a dynamic language is good

Jared Richardson gave our JUG some advice last year – learn something different.  This applies to the point above, but he was more specific.  To people who’ve only done Java their entire career (or C#, for the .Net people out there), learn Ruby, or Python, or Groovy.  This echoed Venkat’s point at CodeMash 2009 (lots of people are making this point these days!)

There’s productivity benefits in dynamic languages, and many of the drawbacks people have traditionally levelled against dynamic languages simply aren’t true, or aren’t true *enough* to warrant avoiding them.

Groovy is an excellent standalone dynamic language for learning dynamic language concepts.  The integration it has with Java makes it that much more comfortable for Java people wanting to experiment with dynamic langauges, but with the ability to fallback to ‘mainline’ Java, even in the same file, should they feel the need.

Learning a statically typed language is good

Many of the suggestions I’ve heard have been aimed at Java/C# people, urging them to took at dynamic languages.  I think there’s also something to be gained by people traditionally using dynamic languages like PHP, Python or Perl to learn from statically typed languages.  Understanding why compilers need certain things spelled out for them, or at least the implications of doing so or not, is a useful thing when thinking about how to write code.

Because Groovy sits on top of Java, you can be as dynamic or as static as you want.  Want to declare your property types as String, Int, Float, etc?  Go ahead.  Want to skip it for now?  Skip it.  Groovy makes a great learning environment for dynamic people looking to learn more about one of the most prevalant statically typed languages out there – Java.

Practical

Ecosystem

The Java ecosystem is one of, if not, the largest software ecosystem in the world.  If you need a library for something, there’s likely a Java version of it.  Because Groovy and Java can coexist in the same project (even the same file!) reusing all the solid libraries out there can be a real time saver.   There’s quite a lot of industrial-strength open source stuff already out there in Java.  This is not to say it’s “better” – certainly you could write the same libraries in almost any language.  Given that it’s usually already written, though, the practical argument for the rapid development aspect of Groovy gluing together the functionality of strong, time-tested Java libraries is a hard one to ignore.

The Apache foundation has a sizable library of high-quality Java components for many needs (Roller and JackRabbit come to mind). This is the sort of ecosystem I’m referring to.

Compact syntax

Optional typing, closures, builders and other goodies in Groovy make some of the repetitive boilerplate Java code (which made for nightmarish maintenance) a thing of the past.  I understand that other languages have this advantage too in some measure.  PHP could make most Perl code shorter *and* more understandable at the same time, for example.  If you like Ruby compactness and elegance, you’ll like Groovy’s too.  It’s not 100% the same, but definitely a similar spirit.

Productivity

This is more a plug for Grails than Groovy.  The Grails framework makes it very easy to build simple-to-moderately complex applications very quickly, and makes the very complex ones *easier* to manage.  The plugin architecture has spawned a growing mini-ecosystem of its own, and there are dozens of plugins to help manage many different aspects of your projects, from UI to database to security and logging and more.  The “domain first” strategy in Grails, coupled with the heavy-hitting GORM library, can also make for very rapid prototyping.

Being able to write this sort of code as a domain:

class Person {
    String name
    String email
    String phone
    Date birthday
 
    static constraints = {
        name(nullable:false)
        birthday(nullable:false)
    }
}

and have to do *no* database work because GORM creates the database tables for you, coupled with scaffolding which will generate (beforehand or at runtime – your pick) the forms with appropriate validation (and internationalization of messages) lets me focus on sketching out ideas of data structures, flow and business logic rather than thinking about creating databases tables and relations and stuff. You *can* manage all that by hand if you want (and you might *need* to later) but for getting ideas out quickly to test them, Grails has helped me be very productive.

Newer language features

Groovy is new enough that there’s still some new language features making it in these days (multiple assignments, for example).  But even if Groovy didn’t make one syntax change ever again, the syntax set is still far advanced beyond the traditional Java language.  Pure Java might not get Groovy’s feature set natively for many years, but you can enjoy the time-saving features today.

Drawbacks

Are there any drawbacks to Groovy and Grails?  Yep, there’s some.  Stacktraces in Grails when you hit an error really stink (still).  Groovy isn’t as fast as native Java (and may never be).  There’s a bit of a one-time startup hit due to some compilation (which is getting shorter every version). I’m sure there’s others many of you can think of.

Should this be enough to keep you away from at least *learning* Groovy?  I’d say emphatically *no*.  Learn it.  Play with it.  Take the time to soak up the ideas that are different from what you do day to day.  You’ll learn some new things, and will likely see your ‘regular’ language in a new light.

Wrapping up…

I still do PHP work, and probably will for some time, though I’m doing some Grails these days too. But the experience of having worked with Groovy and Grails the last 18 months or so has made me rethink my PHP yet again.  It’s not that I wasn’t aware of other language ideas (I’d put together one of the first MVCish frameworks for PHP back in 2000) which could be implemented in PHP.  However, continually keeping a pulse on other technology camps continues to make me a better developer.

The hardest thing is keeping a balance.  Many people suggest learning a new language every year.  I’m not quick enough to be able to do that, only because once I get in to one I like I tend to dig further in to that.  But I will likely do more Ruby this year, and continue with my PHP and Groovy as well.

I hope this has given you some food for thought as to why Groovy deserves some investigation if you haven’t done so already.