A collection of articles and resources of interest to the modern software developer
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs
Friday, November 23, 2012
Polyglot Programming on the Web | Groovy Zone
Whether you like it or not, the web platform has become the dominant client-side technology. This fact is so obvious that even Microsoft and Adobe have abandoned their solutions in favour of the web. And as we’re going to build larger and larger applications in the browser, we need to find ways of doing it in a more productive fashion. I believe languages are a big part of it. And that’s where the Javascript community can learn a little bit from Java.
Tuesday, January 10, 2012
James Lorenzen's Blog: Groovy Sort List
It's real easy to sort a list of numbers
assert [1,2,3,4] == [3,4,2,1].sort()
Or even strings
assert ['Chad','James','Travis'] == ['James','Travis','Chad'].sort()
But this was my example
class Person { String id String name }def list = [new Person(id: '1', name: 'James'),new Person(id: '2', name: 'Travis'), new Person(id: '3', name: 'Chad')]
list.sort() returns James, Travis, Chad
The solution is ridiculously simple (not that I thought the previous sort would work; I have to be realistic; groovy can't do everything for me).
list.sort{it.name} will produce an order of Chad, James, Travis.
Wednesday, August 10, 2011
No Fluff Just Stuff
Since 2001, the No Fluff Just Stuff Software Symposium Tour has delivered over 200 events with over 30,000 attendees. NFJS is known for excellent speakers and timely presentations which cover the latest trends within the Java Ecosystem and Agility space. Our focus is solely on the attendee and providing a world class experience in a local venue setting. Bring your team and join us for a great experience!
Tuesday, August 2, 2011
Groovy MetaClass Magic in Unit Tests | Jworks.nl - Agile Software Development
As you may or may not know, Groovy has the concept of MetaClasses. MetaClasses enable you to add or change methods at runtime. This is especially handy when doing some mocking during a unit test (or, in our case, GrailsUnitTestCases). By mocking methods, you can mock out certain dependencies or behavior which you might not want during a unit test.
SpringOne 2GX 2011 : Chicago, October 25 - 28, 2011 - Spring Framework , Groovy / Grails, Java / Agility Conference
SpringSource in conjunction with the No Fluff Just Stuff Symposium Series are pleased to present SpringOne 2GX, the premier Java event of 2011. SpringOne 2GX is a collocated event covering the entire Spring ecosystem and Groovy/Grails technologies.
SpringOne 2GX is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop business applications, create multi-device aware web applications, design cloud architectures, and manage high performance infrastructure. The sessions are specifically tailored for developers using the hugely popular open source Spring technologies, Groovy & Grails, and Tomcat. Whether you're building and running mission-critical business applications or designing the next killer cloud application, SpringOne 2GX will keep you up to date with the latest enterprise technology.
Featuring over 100 presentations delivered by development leads and published authors on the Spring, Groovy/Grails, Tomcat and Cloud technology today, it's the ideal place to obtain critical skills to help you build, run and manage tomorrow's software solutions. Plus you'll meet and learn from open source leaders who drive innovation for these technologies.
Tuesday, July 26, 2011
Live Blog: Groovy Android programming | Jworks.nl - Agile Software Development
This blogpost will keep track of our current progress on our effort to make Groovy run on Android phones. Instead of creating a summary like in the previous ‘This Week in Discobot’ posts, we will update this blogpost every half an hour!
Tuesday, July 19, 2011
Inspired by Actual Events: The Three Groovy Books I Use Regularly
During the course of my Groovy evangelism, I've often been asked what the best book is for a Java developer to use to learn Groovy. Unfortunately, this is another of those dreaded "it depends" answers. In this post, I summarize why I like and regularly use three Groovy books: Groovy Recipes: Greasing the Wheels of Java, Programming Groovy: Dynamic Productivity for the Java Developer, and Groovy in Action. I hope to be able to provide details as to what distinguishes each book from the other two for those looking for a single book. They each offer distinct advantages in addition to many common advantages and I have found each one to be useful in different situations. The good news is that all three books are excellent in their own right so one really can't go "wrong" with any of them.
Thursday, June 23, 2011
Using Gant to execute a groovy script within the Grails context (updated) - Ted Naleid
In a previous post I showed a script that I had created to allow the execution of a groovy script within a grails application context (including access to domain objects, controllers, services, etc). A couple of people reported a problem with the script where they were getting lazy initialization exceptions. I finally tracked this issue down to one where many-to-many relationships are being used between two domain classes.
Here is an updated script that fixes this issue by setting up the hibernate session in the Gant script.
Seed data for grails application - Stack Overflow
What is the best way to load seed (initial or test) data into grails application. I'm considering 3 options
- Putting everything in *BootStrap.groovy files. This is tedious if the domain classes and test data are many.
- Write custom functionality to load it through xml. May not be too difficult with the excellent xml support by groovy, but lot of switch statements for different domain classes.
- Use Liquibase LoadData api. I see you can load the data fairly easy from csv files.
Choice 3 seems the easiest. But, I'm not familiar with Liquibase. Is it good in this scenario, or only used for migration, db changes etc. If anyone could provide a better sol, or point to an example with Liquibase, it would be great help..
thanks...
Tuesday, June 21, 2011
Practically Groovy: Unit test your Java code faster with Groovy
Not long ago, developerWorks contributor Andrew Glover penned an article introducing Groovy, a new proposed standard language for the Java platform, as part of our alt.lang.jre series. Reader response was fantastic, so we've decided to launch this column to offer a practical guide to using this hot new technology. This first installment introduces a simple strategy for unit testing Java code with Groovy and JUnit.
Saturday, June 18, 2011
junit - Grails Unit Tests: Why does this statement fail? - Stack Overflow
I've developed in Java in the past, and now I'm trying to learn Grails/Groovy using this slightly dated tutorial.
Thursday, June 16, 2011
Groovy - Closures
A Groovy Closure is like a "code block" or a method pointer. It is a piece of code that is defined and then executed at a later point. It has some special properties like implicit variables, support for currying and support for free variables (which we'll see later on). We'll ignore the nitty gritty details for now (see the formal definition if you want those) and look at some simple examples.
Tuesday, June 14, 2011
Domain Modeling for Grails in Eclipse
HiberObjects can generate JPA classes for Grails from UML class diagrams. This results in a combination of UML domain modeling and agile web development; The model is designed in class diagrams, the view is Groovy Server Pages (similar to JSP), and the controllers are Groovy classes.
So why should you use HiberObjects and Java instead of Groovy for the model? The main reason is if you want to use UML class diagrams to model your domain. Or you could import a database into a class model and quickly create an application with Grails. You can also use the domain classes for other Java code, such as GWT. And you get the object oriented unit testing capabilities of HiberObjects.
Groovy - Design Patterns with Groovy
Using design patterns with Java is a well-established topic. Design patterns also apply to Groovy:
- some patterns carry over directly (and can make use of normal Groovy syntax improvements for greater readability)
- some patterns are no longer required because they are built right into the language or because Groovy supports a better way of achieving the intent of the pattern
- some patterns that have to be expressed at the design level in other languages can be implemented directly in Groovy (due to the way Groovy can blur the distinction between design and implementation)
Sunday, June 12, 2011
5. Object Relational Mapping (GORM) 1.3.7
Domain classes are core to any business application. They hold state about business processes and hopefully also implement behavior. They are linked together through relationships, either one-to-one or one-to-many.GORM is Grails' object relational mapping (ORM) implementation. Under the hood it uses Hibernate 3 (an extremely popular and flexible open source ORM solution) but because of the dynamic nature of Groovy, the fact that it supports both static and dynamic typing, and the convention of Grails there is less configuration involved in creating Grails domain classes.
You can also write Grails domain classes in Java. See the section on Hibernate Integration for how to write Grails domain classes in Java but still use dynamic persistent methods.
Practically Groovy: MVC programming with Groovy templates
Views are an integral part of MVC programming, which is itself a ubiquitous component of enterprise application development. In this installment of Practically Groovy, Andrew Glover shows how Groovy's template engine framework can simplify view programming and make your code more maintainable over time.
Wednesday, June 8, 2011
Practically Groovy: MVC programming with Groovy templates
Views are an integral part of MVC programming, which is itself a ubiquitous component of enterprise application development. In this installment of Practically Groovy, Andrew Glover shows how Groovy's template engine framework can simplify view programming and make your code more maintainable over time.
How can I fix Grails error: "No domain class found for name PrivacyOptions. Please try again and enter a valid domain class name" - Stack Overflow
it's not projectname.Class , it must be dirname.classname .
eg: your projectname is Helloworld, the directory is "grails-app/domain/helloworld/User.groovy" . so , the command is "grails generate-all helloworld.User" ,but not "Helloworld.User"
Create Your First Groovy Project - Groovy - Codehaus
TUTORIAL OVERVIEW
Task - Create a Groovy project in Eclipse.
Level - Basic. The task is simple if you have created a Java project in Eclipse.
Prerequisites - GroovyEclipse v2.0, Eclipse 3.4.2, 3.5, or 3.5.1.
Grails & Groovy Tutorials
Welcome to the grails tutorials powered by Grails. My idea is that with your help these pages will become home of the tutorial, how to and example links to articles on the web regarding Grails and Groovy. As you find interesting article, just paste link to that article here so the all community of Grails and Groovy practicioners can benefit from it. This way our knowledge will be focused and the Grails and Groovy community will be able to grow even faster.