Head First Design Patterns

by John Turner

Posted on November 19, 2009

Design Patterns: Elements of Reusable Object-Oriented Software’ by Gamma et. al. is a book credited with popularising design patterns and is probably still today the most popular on the subject. The book itself provides an introduction to design patterns, how they should be presented and the well known design patterns catalog. Each design pattern is presented in a consistent manner, describing different aspects of the pattern such as name, intent, motivation, structure, consequences etc.

I find the book a very good reference as it is very concise, but this is exactly the reason I found it difficult to use as an introduction to design patterns.

Several year’s ago I was introduced to the ‘Head First’ series of books which O’Reilly describe as ‘A Brain Friendly Guide’. This series of books use a very distinct method of presenting material that encourage the reader to engage with the material through posing questions, repeating key information, using visual aids and a conversational style of communication. It took me a while to get used to the unusual style of the book but I soon began to appreciate the advantage of presenting material in this way. Since then I have purchased two other books from the series one of which was ‘Head First Design Patterns’

‘Head First Design Patterns’ describes the majority of the same design patterns presented in the Gamma et. al. book but in the same style as the rest of the Head First series. I thoroughly enjoyed reading this book and I think this is due to the conversational style in which the material is presented. Additionally, rather than just presenting a design pattern as a finished artifact, the design pattern discovery process is explored. This is achieved by initially posing a problem and a potential solution and subsequently evolving both until the design pattern is exposed. During the discovery process the authors discuss the pros and cons of design decisions and the forces acting on the design etc. essentially covering the same key information as the Gamma et. al. book.

Head First Design Patterns presents code samples in Java and I found this a very useful aid as it made the design pattern more tangible. Sample code helped with understanding the essence of the design pattern by presenting a specific implementation.

It is said that you don’t read about design patterns but explore them and I think this book helps you achieve this (or at least begin to). Unlike others on the subject it is one that can be read cover to cover. I recommend this book for someone just starting to explore design patterns and for those who already have a good grounding in design patterns.

Spring Source - Developing Aspects with AOP;

by John Turner

Posted on November 11, 2009

I have previously posted some comments about my experience attending the Core Spring training. Recently I noticed that Spring Source provided a free online training titled Developing Aspects with AOP and decided I’d take a look.

The training is in the form of a Quick Time movie which can be downloaded from the Spring Source community website. One of the first things that is pointed out is that the training is based on material from the 4-day Core Spring course and having attended the course I can say that it is indicative of the presentation and content on the course. If you are considering attending any of the Spring Source courses I would recommend viewing this online training to give you some idea of what to expect.

The ‘Developing Aspects with AOP’ online training takes just over 50 minutes to watch and starts by providing a background to AOP, the problems it solves and the advantages of using AOP to solve these problems. Code tangling and scattering are discussed along with good examples of each using sample code.

The training goes on to introduce AspectJ and Spring AOP and introduces some key concepts such as Join Points, Pointcuts, Aspects and Advice. A simple scenario is outlined and expanded upon to demonstrate applying Spring AOP to log method execution. Some examples of using the AspectJ pointcut expression language are also provided.

Examples of accessing context information from within an Advice are worked through before describing the types of Advice that can be applied with Spring AOP. Finally the training demonstrates the difference of applying Spring AOP using annotations or XML.

If you are interested in Spring and Spring AOP, this material is well worth 50 minutes of your time. I think it complements the reference documentation and for someone new to AOP I would recommend viewing the online training prior to reviewing the reference documentation. The reason I say this is that the reference documentation goes into more depth in certain areas, particularly the subtle nuances of Spring’s proxy based AOP.

Analysis Patterns - Reusable Object Models

by John Turner

Posted on November 03, 2009

Among the resources I enjoy browsing online is Martin Fowler’s own website (www.martinfowler.com) which contains a wealth of information in the form of blogs, articles etc. Some time ago I began to read the category of the articles section that is dedicated to the Analysis Patterns book and found the patterns described interested me enough to invest in a copy of the book.

Software engineering has become awash with patterns since the publication of ‘Design Patterns - Elements of Reusable Object-Orientated Software ‘ way back in 1994. My own bookshelf contains no less than 11 books dedicated to the subject but of them Analysis Patterns stands out because it is the only one that focuses on modelling patterns as opposed to software design patterns.

The analysis patterns are described by initially outlining the context of the modelling problem and then the solution. The book separates analysis patterns into different domains including accountability, accounting, trading etc. but I found that, as mentioned in the foreword, all the analysis pattern’s were familiar to some degree.

Having spent several years working with CRM and workflow solutions the Accountability patterns were very familiar. Despite this familiarity, and perhaps due to this familiarity, I still found the material interesting and informative. I actually find this to be the case with most books on patterns; that is they are very familiar and in a lot of ways don’t bring anything new to light but the manner in which they are laid out in black and white brings greater clarity to the problem and solution. The manner in which Martin communicates through the book allows you to share his thought process as he develops the solutions he presents.

I would strongly recommend reading through the analysis patterns Martin has published on his website and if you like them, invest in a copy of the book.

Spring Source Certified Spring Professional

by John Turner

Posted on October 28, 2009

Having used the Spring Framework for several years and having taken other Java certifications I decided that it would be worthwhile to take the Spring Source Certified Spring Professional certification. Demand for Spring knowledge and experience has increased over the years and more and more development roles require a background in Spring.

In order to be eligible to take the certification exam you have to be able to demonstrate that you have made a contribution to the Spring community (forum posts, articles, raised JIRA or submitted patches) or have taken the Spring Source Core Spring course. Given that I had taken the Core Spring course I was eligible and received an exam voucher to take the exam.

To prepare for the exam I decided that I would read through the reference documentation and work through the slides and practicals provided at the Core Spring course. I felt that this, along with my previous experience with Spring would suffice. In hindsight, I felt the review of the slides and practicals from the Core Spring course was most helpful and the material was easier to recall because the practicals reinforced the slide material.

The exam itself was reasonably tricky. I think the main reason for this was the scope of material covered which was quite extensive. That said, the questions fell within the syllabus and all the material was covered by the Core Spring course material. Thankfully I passed and am now a Spring Source Certified Spring Professional so await a deluge of job offers!!

NOTE: I cannot provide copies of the course material and will ignore any requests for same.

Spring Source - Core Spring Training

by John Turner

Posted on October 27, 2009

The Core Spring training course delivered by Spring Source is their flagship training product covering a significant proportion of the functionality provided by the Spring Framework and Spring Security libraries. I had been considering taking this training course for some time and given that Spring Source began delivering the course in Ireland and I had some free time I registered for a course in July 09.

The course is run over 4 days and the Spring Source website provides a detailed breakdown of the course content. Going into the course I had several years experience working with the Spring Framework so many of the topics were already familiar to me. What I wanted to get out of the course was to reinforce the knowledge I already had, find new ways of accomplishing the same tasks and to explore areas of the framework I had not yet touched on. I also wanted to take the associated certification.

The course itself was very well delivered and included a hard copy of the course slides and a USB memory key which contained all the material required for the course. This was extremely useful as you could take away the practical labs and instructions (provided in PDF) and undertake these in your own time. This was to prove even more helpful when later studying for the certification exam.

Given the well defined structure of the course, the material covered followed the syllabus closely but there was ample time to explore different ways of accomplishing the same task. The instructor was very knowledgeable about what would work in the real world and what the trade offs were when choosing one method over another. It was clear that the instructor not only knew the training material well but was very experienced in using the Spring Framework to deliver real world applications.

Even though I already had several years experience with the Spring Framework I found the course was beneficial and I was able to apply some of the things I learned straight away. It would be possible to learn the same from the reference material and forums but the manner in which the course was delivered made the learning painless. The 50-50 split between lecture and practical also really helped to reinforce the key concepts.

NOTE: I cannot provide copies of the course material and will ignore any requests for same.

About - MonkeyLittle

Thoughts on Software Engineering, Infrastructure and everything in between.

Twitter Feed