<pedrocorreia.net ⁄>
 

<Design Patterns #1 - The Factory Pattern ⁄ >




clicks: 3027 3027 2007-03-08 2007-03-08 goto tecnologia myNews tecnologia  Bookmark This Bookmark This


Design patterns are important in software engineering as they provide a tried and tested method of solving a set of business problems. As my pattern knowledge is a little rusty, I thought I'd take another look at them here; if you want, you guys can come along for the ride.

The first pattern I'm going to look at is the Factory Pattern. This pattern solves the problem of not knowing at compile/design time which "kind of" object will be required at run time as this decision will be based on knowledge not yet known. In other words, the "kind of" object required at run time depends on knowledge the software will only get when it is running.

For example, lets say you turn up at an office with a complaint about their service. Depending on how you conduct yourself you may be directed to a customer service representative or the receptionist may call security. There's no way to know at compile/design time which "object" will be required as the "kind of" object required is dependent on your behaviour.



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://www.garyshort.org/?p=565




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="tecnologia" ⁄>

MongoDb Architecture new ...

NOSQL has become a very heated topic for large web-scale deployment where scalability and semi-struc (...)

clicks: 17750 17750 2012-05-14 2012-05-14 goto url (new window) horicky.blogspo... goto myNews tecnologia


A Hopefully Fair and Useful Comparison of Haskell Web Frameworks new ...

Recently there has been a lot of discussion and questions about the differences between the big thre (...)

clicks: 14305 14305 2012-05-13 2012-05-13 goto url (new window) softwaresimply.... goto myNews tecnologia


Retina graphics for your website new ...

retina.js is an open source script that makes it easy to serve high-resolution images to devices wit (...)

clicks: 14150 14150 2012-05-11 2012-05-11 goto url (new window) retinajs.com/ goto myNews tecnologia


What every programmer should know about memory, Part 1 new ...

In the early days computers were much simpler. The various components of a system, such as the CPU, (...)

clicks: 15477 15477 2012-05-10 2012-05-10 goto url (new window) lwn.net/Article... goto myNews tecnologia


The State Of HTML5 Video

HTML5 has entered the online video market, which is both exciting and challenging for developers in (...)

clicks: 6096 6096 2012-02-14 2012-02-14 goto url (new window) longtailvideo.c... goto myNews tecnologia


A Tour of Amazon's DynamoDB

Amazon's recent release of DynamoDB, a database whose name is inspired by Dynamo, the key-value data (...)

clicks: 5810 5810 2012-02-13 2012-02-13 goto url (new window) paperplanes.de/... goto myNews tecnologia


Video: CSS3 Secrets: 10 things you might not know about CSS3

A number of prominent front-end developers delivered helpful talks at this year's Fronteers 2011 con (...)

clicks: 6352 6352 2011-11-30 2011-11-30 goto url (new window) css.dzone.com/a... goto myNews tecnologia


Google BigQuery Service: Big data analytics at Google speed

Rapidly crunching terabytes of big data can lead to better business decisions, but this has traditio (...)

clicks: 5463 5463 2011-11-30 2011-11-30 goto url (new window) googlecode.blog... goto myNews tecnologia