Select Page
My Thoughts on Grails and Groovy

My Thoughts on Grails and Groovy

Getting Started with Grails

I’ve been using Grails for developing web applications for a while and in this post I’m going to give an overview of Grails and provide some of the benefits and disadvantages of I’ve come across when using it.

Grails overview

Grails is a web framework based on Groovy and Java which can be deployed onto web servers such as Tomcat or Jetty.

Grails follows the convention over configuration concept that Ruby on Rails has made famous. It provides a command line interface and code scaffolding that allows you to create a full application quickly.

Groovy

If you haven’t used Groovy before the best way to describe it as being a superset of Java; most valid Java constructs are also valid Groovy constructs. Groovy has a number advanced features that complement the capabilities of Java, the syntax is more concise, you can use closures, and there is native support for lists and maps

Grails benefits

  • The primary benefit is that Grails is a highly productive framework; the emphasis is on being able to automatically create artefacts quickly from the command prompt.

For example grails create-controller creates a new controller and automatically does all of the plumbing related to that controller. Even more powerful is the grails generate-all, which creates all the artefacts and interfaces for performing CRUD (Create/Read/Update/Delete) for the domain specified.

  • Grails also underpinned by solid frameworks – it uses frameworks such as Spring, Hibernate (uses GORM which is based on Hibernate) and Sitemesh which are very mature and established frameworks.
  • Another important benefit is that Spring Webflow is also built in to the framework – which helps make complex workflows a lot easier to handle.
  • Validation is straightforward in Grails; the rules are defined within a static code block within the domain class.
  • There is also a very rich plugin ecosystem with Grails – it was built with plug-ability in mind and there is a large set of useful plugins that have been created by the grails community. It is also very easy to use these plugins within your own application using the install-plugin command.

Grails Disadvantages

  • There are not many real issues with using Grails, however one of the main things to bear in mind is that there is a learning curve associated with using Groovy, so that may make it more difficult to recommend to your colleagues.
  • There is also slightly less IDE support for groovy – especially in comparison with developing a vanilla Java application using them.
  • A grails application can also be a bit of a resource hog – which can probably be attributed to all of the heavyweight frameworks that Grails is made up of.
  • One of the problems using a dynamic language such as Groovy is that some errors that are normally caught at compile time with normal java will be not be caught until run time.

Grails in Action

My favourite book on grails is Grails in action. It is very well written and the authors seem to have a genuine interest in development.

Final thoughts on Grails

I have enjoyed using grails on my last few projects – there was a learning curve at the beginning but the rewards more than make up for that. I will be looking to using it on future projects and would definitely recommend it to other developers.

 

How to gain a competitive edge in Business

How to gain a competitive edge in Business

If you have a business you probably spend a lot of time thinking about how to gain an edge over your competitors. Gaining a competitive advantage over your rivals can be highly lucrative and help secure the future of your business.

In this post I will discuss some useful concepts around competitive advantage that have helped me find kick start new ideas in the past.

What is Competitive Advantage

As outlined in the diagram below, Michael Porter has a very popular theory in which he outlines three different approaches that can be used to gain competitive advantage.

Cost Leadership

The primary focus is to create the product at a lower cost than the competitors. This can be achieved through methods such as increasing efficiency or negotiating better contracts with your suppliers.

This advantage would allow you sell the product at a lower price, in the way that budget airlines do, or you could simply retain the original price and make a better margin.

Differentiation

Using differentiation you develop a product that offers the customer something that they value which unique or different that they can’t get from anywhere else. You need to have access to a lot of Innovation and Creativity within your business if you are to succeed with this approach.

The rewards are high as you are able to charge a higher price for your product. Apple and Dyson are good examples of companies that have used differentiation.

 Focus Or Niche

With Focus you design your product in such a way that it appeals to a smaller, more focussed niche than you otherwise would. Within that segment you would either proceed with a differentiation strategy or a cost leadership strategy. This approach is favoured by smaller companies that cannot afford to compete against larger ones for a broader market.

An example would be a company such as Waitrose who target a wealthier demographic of shopper in comparison with someone like Tesco.

The diagram below helps to illustrate the different strategies available, and the way the Focus strategy can be used with Cost Leadership and Differentiation.

 Final Thoughts on Competitive Advantage

While porter’s strategies have been very popular it is worth pointing out that there are a few shortcomings. Porter says that you need to pick either a cost based or differentiation strategy and not be stuck in the middle. However I think that that a lot of businesses are both different and low cost, it seems counterintuitive to just focus on one of these things and ignore the other.

I believe these strategies are a good starting point when looking for ways to improve your business, or are considering the launch of a new product.

How to Harness the Power of Innovation

How to Harness the Power of Innovation

Innovation can provide numerous benefits to your company. It stops the company stagnating and it allows you gain an edge over your competitors through staying relevant adapting to new opportunities quicker.

All companies have people that are capable of innovation, below are some techniques through which you can promote innovation and benefit from your existing resources.

Focused Innovation
Try and promote innovation around a particular problem to get everyone focused. It could be said that “Constraints are the engines for innovation”. Getting everyone focused on a particular problem also avoids people going off on unproductive tangents or suggesting things that may not be useful or relevant at the present time.

Foster a culture that supports and rewards innovation
Highlighting previous ideas that have been successful can be inspirational. It is also worthwhile having a good and generous reward scheme in place to provide incentive for creating new ideas.

Encourage Inter-disciplinary Learning
Group together individuals that don’t normally work together in brainstorming sessions. This cross fertilization will help people gain a different perspective on an idea they had clearly established in their own mind, and hopefully create new ideas and solutions.

Include Everyone
Use all members of an organisation. As all those different perspectives could be beneficial. Also there may be certain people who you wouldn’t expect to have good ideas that do, but no one ever asked them.

Use different prompts to facilitate innovation
There are many different tools and techniques that can be used facilitate innovation. Brainstorming is one of the classic techniques, creating mind-maps and setting up a forum where people can post and discuss ideas is also very useful.

Get inspiration from other industries
Take a good look at a company that has been successful in another industry and see if there is anything that you can incorporate into your own business.

Identify your innovators
Some people tend to be more innovative than others – try and identify the most innovative people and provide them with the resources and encouragement they require to help them innovate more effectively.

Give people “Innovation Time Off”

Give people a set amount of time every week where they can let their imaginations run wild where they can work on their own projects.

This may be difficult in today’s economy, but look at the big picture – take a look at Google for inspiration. Their AdSense for Content program was developed using “20% time”, and it is now clearly established as one of their most profitable revenue streams.

 

In short there are numerous ways to improve innovation, so why not give it a try and reap the rewards.