Posts tagged ‘design pattern’

Low coupling

When designing some architecture, you face with the problem “which object should perform X task?” We discussed this question in my previous post in this series. There we noted, that object should perform the tasks he has enough info for. He should be an “expert”. But because one of the main OOP characteristics is interaction between objects, it’s often hard to answer this question.
Continue reading ‘Low Coupling and High Cohesion – GRASP (Design patterns series)’ »

Preface

In November 2008 I’ve got a nice project, that resulted in a complex search engine, that specializes in clothing. I can’t give the link now, but will do when site officially launches. Key features of such service are:

  • Large number of users, which search with various parameters, rate items, leave comments, create articles etc.
  • Large database, that is updated frequently

Sure, the site is running on a dedicated server, sure I use caching, but optimal DB is a key to success.

Continue reading ‘Building high-loaded portal – InnoDB vs MyISAM’ »

Preface

This is an introductory post to the series, where I’ll cover all design patterns, their usage, diagrams. Besides patterns, I am going to guide you through the principles of the high-quality application design. We’ll start from these principles (GRASP), and then advance to patterns, see how they use these principles and develop several systems (architecture only). The whole series will take 10-15 posts. However, I don’t have exact plan yet :) So, let’s go!

So what we’re talking about?

Actually, design pattern is no more, than a proven solution to some common problem. When saying “problem” I mean things you face with when developing the application architecture. These solutions are intended to make you application better – more extensible, flexible, simple.

Common examples of design problems (Let’s agree that in this series “design” means application, not graphics or DB design) are:
Continue reading ‘Creator and Information Expert principles – GRASP (Design patterns series)’ »

When I was studying patterns, I went through main patterns in the alphabetical order. Adapter pattern was in the beginning and Template Method – in the end. And when I came to the latter and read about it, I was confused. Thee solve the same task, implement the same GRASP principle (Protected Variations) – they are the same, but why are they called differently?
Continue reading ‘Difference between Adapter and Template Method pattern’ »