Thursday, 11 September 2008

Patterns of Enterprise Application Architecture

I have just started reading this book and was fascinated. What I loved most about was that I could start identifying patterns I was already using - just didn't know what they were called.

The book starts of as a conversation about the different types of patterns (but always gives a page number where you can get more information) as you get towards the end of the book each pattern is discussed in much more detail (including examples in mostly Java and sometimes .net)

Unfortunately Jave appears to be Martin Fowlers language of choice - the Table Data Gateway pattern has this bit of code:-

public void LoadWhere(String whereClause){
String commandString=
String.Format("select * from {0} where {1}", TableName,WhereClause);
Holder.FillData(commandString, TableName);
}

Now I suspect most people reading this will spot the issue with the above instantly, but if not read up on SQL injection!!! (if you are unsure how devastating a sql injection attack can be then watch this video from TechEd - scary! http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=989)

Perhaps I'm being picky, this is definitely only sample code - but it worries me how many people might just use this code and not notice the potential issue.

Anyway - the book is very good and I do recommend reading it - as Martin Fowler him self says

"Since patterns are common solutions to recurring problems, there's a good chance that you have already come across some of them... I'm not claiming to present anything new in this book. Indeed, I claim the opposite, this is a book of (for our industry) old ideas.... An important part of patterns is trying to build a common vocabulary, so you can say that this class is a Remote Facade and other designers will know what you mean"

The common vocabulary is exactly what I have found most useful about this book.

You can find the book on amazon here:

http://tinyurl.com/3ntvlm (ISBN: 0-32101274200)

9 comments:

Joshua Smith said...

We're glad to know more and read this review. I'm happy to share with insurance instant rates that is provided by best home insurance companies. Customer could save on cheap life insurance rates which allow customers to obtain cheap affordable policy.

Data Science Course in Bangalore said...

I was very happy to find this site. I really enjoyed reading this article today and think it might be one of the best articles I have read so far. I wanted to thank you for this excellent reading !! I really enjoy every part and have bookmarked you to see the new things you post. Well done for this excellent article. Please keep this work of the same quality.
Data Science Course in Bangalore

unknown said...

I always like to read a quality content having accurate information regarding the subject and the same thing I found in this post.

Website Development Company in Gwalior |

unknown said...

Great information, i was searching of this kind of information, thank you very much for sharing with us.

Craigslist Posting Service for Car Dealers |

unknown said...

This is really amazing website that I have been found on google regarding website Blog Commenting sites. and I would like to thank admin who also given us to post the link on his side.

Lubbock moving company |

unknown said...

This was something I was looking for, really helpful, and great work is done. Thank you so much for sharing such valuable information.

Car Auction Software |

unknown said...

It’s really a cool and helpful piece of information. I am glad that you shared useful information with us. Please keep us up to date like this. Thanks for sharing.

Best CRM for Small Businesses |

unknown said...

I am really like it very much for the interesting info in this blog that to this website is providing the wonderful info in this blog that to utilize the great technology in this blog.

Web Development Company in Gwalior |

unknown said...

Thank you very much for writing this blog. It was very easy to understand.

Marriage Garden in Gwalior |