Search

Dark theme | Light theme
Showing posts with label Gr8Conf2011. Show all posts
Showing posts with label Gr8Conf2011. Show all posts

May 20, 2011

Gr8Conf 2011 Conference Report: Day 3

The final day of the conference, the last day I could go to informative and inspiring sessions. The whole day there will be parallel sessions, so here is a report of the sessions I have choosen to attend. We can also read the conference reports of day 1 and day 2.

Introducing GContracts presented by Andre Steingress was the first session of the day and it was great. GContracts is a cool product and can really improve the quality of your code. This is really something I want to use in my projects. With GContracts we can add annotation to our classes and method to ensure post-conditions, set required pre-conditions and class invariants. The syntax is simple so it easy to get started.

The next session was about myBalsamiq. This is project colaboration website to work on Balsamiq mockups that will be released later this year. And it is built using Grails! It is cool to see such a site with a lot of interaction and big user base is created with Grails. Also the architecture of the application was very intesting and looked really great. I wish them good luck with the launch of their product and it will be a great new testimonial for Grails applications.

Gaelyk was the subject of the following session presented by Guillaume Laforge the author of Gaelyk. Gaelyk allows us developers to use Groovy on the Google App Engine. First we learned about the way Google App Engine is positioned in the cloud and the payment model.
Also we took a good look at the services Google gives us developers to use, like datastore, memcache, image manipulation, email. Then it was time to see how we can use all this in a Groovy way. All Google services are directly usable in our Groovy code, because the services are added automatically through bindings. Also several DSLs are applied to make using the services easier. With a bit of live coding we could see this in action.
Gaelyk also has a plugin system, so we could write reusable parts as plugins and use them in our code. The presentation is available on SlideShare.

The session about Spock, my favorite test framework, was presented by Peter NiederWiesser who wrote Spock. The first part of the session was an introduction to Spock for those that didn't know Spock before. With small samples we could see how JUnit tests turned into beautiful Spock specifications. With a state machine and interaction sample this was very helpful.
The second half of the presentation was about the more advanced features in Spock for those that already knew Spock. Writing extensions for example is very easy in Spock and Peter showed this with a sample.
The code Peter used is available on GitHub.

Václav Pech gave a session about GPars. And because GPars is now part of Groovy 1.8 we can all use the very usable features of GPars to create concurrent and parallel running application code. Concurrency will play a big role in the future to create performant applications and with GPars we use Groovy to this. Multi-cores are already here and we will get more of them in the future in all our computers and appliances. And the good thing is, the implementation of the code is not difficult. For example to work with collections in parallel we only add two lines of code and we are done. The impact on the code is also small.
We can also choose to use the dataflow variable paradigm to create concurrent code, which will require a code rewrite, but the result is very elegant and will probably be worth it.
Finally Václav showed how actors can be used and how easy it to write the code. GPars is really something for me to get into in the near future and want to implement in my projects.

Testing is very important when we write code and the next session, Testing with Fitnesse, was just about that. Fitnesse is a framework that is used to write test scenarios in a Wiki with a very simple syntax. Erik Pragt and Marcin Erdmann have created a Grails plugin to use Fitnesse in Grails applications. First Erik gave a small introduction on how we can use Fitnesse and how the plugin uses Fitnesse to run tests. Fitnesse is best used for more complex business logic and is addition to unit tests written in for example Spock.
Then Marcin gave an impressive live coding demo to show TDD with Fitnesse and the plugin. Starting from scratch by writing the test scenarios and then implementing the logic in code.
The presentation was very good and gave a good idea about what Fitnesse is about and the power of it.

The final session of the day I attended was about Building Progressive UIs with Grails by Rob Fletcher. Rob explained why it is important to write progressive UIs for the web. Although you might think everybody has Javascript enabled in their browser and that it is fast, that might not be the case. For example in corporate environments IE6 is still used and upgrading is not on option. But computers nowadays are not the only devices to access your website, mobile phones, tablets and more devices can access your site. These devices don't have all the latest and greatest features, so be humble when you design a site.
By separating markup, CSS and Javascript and providing a functional website with the lowest standard, we are ready to enhance the user experience with Javascript for those users that can use it. He showed some real life examples for Grails applications. The samples showed the different user experiences for the browsers with disabled and enabled Javascript. This was really cool to see and very useful to use in projects. The code is on GitHub.
A very nice tip was to first test of a request is a AJAX request before applying a layout. This way the views can be reused in a AJAX and normal request without changing the view.

I had to leave for the airport before the panel discussion, which I couldn't attend unfortunately.

The overall feeling of this conference is that the Groovy community is very social, friendly and open. I learned a lot during these 3 days and just as last year my list-with-things-to-look-into-and-learn-more-about has grown again. Hopefully I will be able to cross most things off, before next year's Gr8Conf. Because Gr8Conf 2012 is already marked in my agenda.

Gr8Conf 2011 Conference Report: Day 2

After already a first great university day it was now time for the official start of the conference days. After Søren's welcome speech it was for time for Guillaume Laforge to present his brand new presentation about Groovy 1.8. He touched on all the interesting new features we can find in Groovy in his presentation.
The new command chain expressions even allows us to leave out dots when we invoke methods so we can write even nicier and more natural language like DSLs. A lot AST transformations have been added in Groovy 1.8, closure methods, JSON supports, compilation customizers and much more. The slides are available on SlideShare.

Next up was the Grails update. Peter Ledbrook showed us all the goodies we can expect in Grails 1.4. For example we get better looking (supporting progressive Javascript/CSS using HTML5) scaffolding templates. Also we get a complete GORM API implementation for testing purposes. This means everything that is available in the GORM API can be used in a testing enviroment. Yes, even Criteria calls will work! This is all implemented as mix-ins, so we can use it in JUnit testcases, but just as easy in Spock specifications. We don't have to extend our test classes from a specific Grails testcase anymore. The new test report UI is very impressive and looks very useful.
Also a lot of libraries are upgraded for the upcoming Grails 1.4 release, like Spring, Hibernate, Groovy. Tomcat 7 will be the default servlet container. Also hot reloading of classes has been improved. A special agent is used for the JVM, that allows class reloading for almost all classes of the application the speed up development even more.
The database migration and resources plugins will become part of Grails. In the not so near future we can expect Grails 1.4 M1 to be released so we can experience a lot of these nice features already and try them.
Also Peter explained they want to get a better insight to see how plugins are used and for example how many times a plugin is used. With this data the usefulness of a plugin should be more clear to developers when they want to download and use a plugin.

Both the Groovy and Grails update session where single track session, but the rest of the Gr8Conf was with 2 tracks. So I had to make choices and cannot cover every session in this report. I attended the Adopting Grails session, about how Grails can be implemented in a real world situation. Even integrated with another Java web application. We learned how we can split up a Grails application using plugins into several parts. For example a plugin to define only the services layer. This way the plugin could be used in a Java and Grails application. Also we learned that still Java developers are a bit scared of Groovy. If they have to fix bugs in parts of Groovy code with for example a bit of dynamic programming then they couldn't get it.

After the lunch I attended the Gradle Update by Peter Niederwieser. He works at Gradleware and did a good job explaining Gradle. First he showed how easy it is to get started with Gradle of you come from an ANT build system. It is basically just a matter of importing the ANT build and you are ready to. He also show how you can re-use your Maven build from Gradle. He created a new task rule to intercept the commands and then invoke Maven through an exec invocation to get the Maven build going. And of course he showed that Gradle doesn't need much code to use it for a Java (or Groovy) project that already uses the Maven standards for directory structure. Gradle of course shines with parallel test execution, the fact tasks are only executed when they need to be by looking at input and output variables and Peter showed how this works.

Next up was my own presentation for CodeNarc & GMetrics. I did a live coding session where we started to take a look at a bit of Groovy code and then see which CodeNarc rules where fired. We learned CodeNarc contains many rules and they are also great for new Groovy developers to learn about how you code can be more Groovier. CodeNarc has for example a lot of rules that will tell you that certain parts of your code are a bit Java-ish and how to turn into something more Groovy-ish. I explained how can use the configuration to change rule priorities or even disabled them completely. We learned how to customize certain rules and I wrote a complete new rule and showed how it could be used in our CodeNarc analysis.
GMetrics is more about calculcation and reporting of code metrics like ABC (Assignment/Branch/Condition) counts and cyclomatic complexity. We finally looked at how we can customize the report from both tools.

The next session I attended was Paul King's Groovy Testing. The focus was on how Groovy can be used for testing with web drivers like HTMLUnit. He explained the many possibilities that are out there to do testing and you probably will need a combination of different techniques to get a satisfying test outcome. There is no one golden solution to cover each testing need. Each project has different characteristics and therefore different testing needs. But Groovy is very powerful to use for testing purpose, because the language is so powerful and dynamic that is easy to express your testing needs.
He also told us to create a testing API or DSL for your own testing to provide an abstract layer between how you express your tests and the real test implementation that can be used.
He ended with showing how you can use Groovy to generate test data for your testing. Different scenario's can be created with combinations of test data, but you can also for an optimal instead of a maximal set of test data to keep your tests running quickly. On SlideShare we can find slides that where used during the presentation.

The last session for the first day I attended was Effective Groovy by Hamlet D'Arcy. Following the guidelines and rules from Effective Java he showed how to implement those rules in Groovy. And of course the power of Groovy really shines when we only have to one-liners or add annotations to implement the Effective Java rules.
He also added new "Effective Groovy" rules which are not in Effective Java but apply to Groovy applications. A lot of the rules were already implemented with the new Groovy 1.8 features, so it was great to see these features already mentioned and shown. The presentation was a lot of fun and just showed again how powerful Groovy really is. Hamlet also posted the slides.

To end this beautiful and great first conference day we were treated by snacks and beer for a social gathering between all conference attendees. Thank you Gennemtaenkt for organizing this tasty and fun meeting.

Read more about day 3.

Gr8Conf 2011 Conference Report: Day 1

For the first time this year Gr8Conf organized a university day. On this day 3 hour sessions where given about Groovy (in the morning) and Grails (in the afternoon). In the morning I did the session about Getting Groovy together with Søren Berg Glasius (one of the organizers of Gr8Conf). We had a lot of topics to cover and didn't make it to cover it all during the session. Luckily we created a big document with all the topics and a lot of sample code (also from the Groovy Goodness blog series) for the attendees. So hopefully people will look into the document to learn more about the topics we couldn't cover.

Also in the morning was a more advanced Groovy session about AST transformations by Hamlet D'Arcy. I couldn't attend this session, but after 3 days of Gr8Conf I can say AST is now at the top of my agenda to look into further. AST is powerful and provides many benefits for developing Groovy applications.

The afternoon sessions where about Grails. The Grails Kickstart session was a beginner's session on how to create Grails applications. I attended the session about How to write a Grails plugin presented by Burt Beckwith. Burt is of course a famous Grails plugin developer and he has a lot of plugins he contributed to or developed. We learned that writing a Grails plugin is not that different from writing a Grails application. He explained the small difference and also the little pitfalls. During the session he wrote a calendar plugin that was able to communicate via the Google Data API to get and save the data. The source code is on GitHub. The session was very useful and provided enough insight to get me started on writing a Grails plugin myself.

And then after the session it was time for Hackergarten hosted by the guys from Canoo. At Hackergarten people get together and work in small teams on (open source) projects. The goal is to have real contributions to a project at the end of the evening. This is of course a great way to get involved into an open source project and become one of the contributors. I joined the team developing new rules or fixing bug on rules for CodeNarc. Hamlet D'Arcy took the lead and give some outstanding issues that needed to be fixed or new rules that needed to be written. We paired up and wrote an extra addition to the ConfusingMethodName rule. It is great that I now contributed a small part to CodeNarc and the evening was really inspiring.

Read more about day 2 and day 3.