This post is the second in the series of publications about using the Apache ZooKeeper for building configuration management solutions for a distributed system. It focuses on implementing a tool for loading initial configuration data into a fresh ZooKeeper ensemble.
There are very few things in Grain framework that need a detailed explanation except being described in the docs. However, there's one thing, which I really want to clarify in details for Grain users. I wanted to write an article for the people who seek for simple instructions for implementing tasks that require complex manipulation to site pages, like including information from one page to another, creating or replacing pages, etc. As an example, in this guide I will tell you how to create paginated blog archive for your site.
Grain theme is a project that provides a layout-based skeleton for creating static websites by only adjusting the configuration and adding a content. This post shows how to use the theme template in order to create a custom Grain theme — starting from defining content files and page layouts, and up to building user-friendly, page-formatting tools.
With the latest performance enhancements and great dynamic, functional and meta-programming features Groovy becomes a very good choice not only for scripting, but also for big and complex application building. Long term complex application development requires extensive unit testing utilization to allow moving forward without breaking existing features. Groovy plays nicely with powerful Spring framework, which can be used to make application easily extensible and unit testing friendly.
When Groovy has grown up to version 2, it has gained a lot of brand new features and improvements in areas of productivity and security. Groovy now provides the ability to statically type check and statically compile your Groovy code for robustness and performance. This is very useful when you don't need Groovy's dynamic features, or simply want to speed up performance of your scripts.
Gpars (Groovy Parallel Systems) is the best solution for your concurrency problems with mutable objects. Gpars gives you a number of high-level abstractions for writing concurrent and parallel code in Groovy (map/reduce, fork/join, asynchronous closures, actors, agents, dataflow concurrency and other concepts), which can make your Java and Groovy code concurrent and/or parallel with little effort. Gpars is bundled in Groovy starting from version of 2.1.
Several days ago I have a need to launch Groovlets on a web server. I have decided to go with recent Jetty for this task, developed by Eclipse Foundation at these days. It turned out to be non trivial task, but at the end it all worked so I decided to share my experience with you.
Hi, guys, today we’re gonna talk about the really interesting and tricky Grails task, implementation of the custom sorting.
It’s a pretty often appearing situation, when you need to sort the list of items, basing on the values that can only be calculated, and that are not persisted in the db.
I know what you might say, - "Hey, why don’t you just use transient properties for that?"
Unlike Java, which mixes primitive and reference types, Groovy handles everything in common manner — as objects, what makes it truly object-oriented. When a primitive type gets passed into the Groovy world, it is automatically “boxed” into its object equivalent, and vice versa. This allows Groovy to support some interesting concepts like methods on primitives, operator overloading and The Groovy Truth. Let’s look at them more closely.
Groovy is an object oriented dynamic language for the JVM. Dynamically compiled to a bytecode and interoperable with most Java libraries, Groovy is a perfect candidate for writing lightweight scripts that still can benefit from the Java ecosystem. Also, it is really easy to learn since the good old Java syntax is usually valid in Groovy. There are, however, a few caveats that you should be aware of before start coding. This post shows some specific features, and also gives a few suggestions which will help to write a clear, groovy-style code.