Wednesday 7 March 2007

SOFTWARE PATTERNS AND FAQ

LECTURE 2 (13-02-2007) – SOFTWARE PATTERNS- BLOGG 2

After lecture 2 – PAFSD, I now have the basic knowledge of what software patterns is and can now define software patterns as an accepted proven solution to solve a recurring software engineering problem in a given context.

Patterns and Software Patterns FAQ’s

Q1. What is a pattern?

Ans: A pattern is a proven accepted solution to solve a recurring problem in a given context. If the context changes even if the problem is the same, then the solution changes too.


Q2. Why applying patterns to software engineering a good idea?

Ans: Benefiting from the knowledge and experience of other people who have put more effort into understanding contexts, forces, and solutions than you have done or want to do. Further, patterns can be more reusable than code, since they can be adapted so that you can build software to address particular special circumstances that cause you to be unable to reuse an existing component.

Q3. What is a software pattern?

Ans: Software patterns can be defined as an accepted proven solution to solve a recurring software engineering problem in a given software engineering context.

Q4. What is not a pattern?

Ans: A general solution to every design problem in a context is not a pattern. Solution to problems in a context that have worked only once is not a pattern.

Q5. Where can software pattern be applied?

Ans: Software patterns can be applied in software engineering development processes.


Q6. What is the difference between software patterns, frameworks, algorithms, and business objects?

Ans: Software patterns can be defined as an accepted proven solution to solve a recurring software engineering problem in a given software engineering context.

Whiles a framework is a set of cooperating classes that make up a reusable design for a specific class of software. A framework provides architectural guidance by partitioning the design into abstract classes and defining their responsibilities and collaborations. A developer customizes a framework to a particular application by subclassing and composing instances of framework classes. [2]

A pattern is not an implementation. It describes when, why, and how to go about creating an implementation or other engineering product.

An algorithm is basically a formula or set of steps for solving a particular problem.
A pattern describes how and why an algorithm may be apply in a given development context, along with guidance for applying them.

Business objects are objects in an object-oriented computer program that abstract the entities in the domain that the program is written to represent. For example, an order entry program needs to work with concepts such as orders, line items, and invoices and so on. Each of these may be represented by a business object. [3]

Q7. In real life can software patterns be used by both beginners and software specialists alike?

Ans: Software patterns can be used by both beginners and software specialists alike as it is said, if there is a proven software engineering solution to a problem in a given context, why not use it rather than creating the wheel. (Finding the solution to the problem from scratch may be a waste of time.

Q8. What is anti-pattern?

Ans: Anti-Pattern are Negative solutions that present more problems than they address. [4] A well formulated Anti-Pattern also tells why the bad solution looks attractive.



References:
[2] http://www.cmcrossroads.com/bradapp/docs/patterns-intro.html#TOC_PatternElements#TOC_PatternElements 14/02/2000


[3] http://en.wikipedia.org/wiki/Business_object_(computer_science) 07:43, 5 October 2006

[4] http://www.antipatterns.com/briefing/sld003.htm, AntiPatterns :Refactoring software architectures, and projects in crisis SWEE 98 hays w. Mc Cormick

4 comments:

Neo Milupi said...
This comment has been removed by the author.
Neo Milupi said...
This comment has been removed by the author.
Neo Milupi said...

I’m impressed with your FQA,
It is fascinating to see how much one can ask to a new topic or subject. I have one question for you.
Why isn’t there a good definition of the term pattern?
No one seems to mind the short slogan “a solution to a problem in a context”. I think the shortness of this slogan can cause confusion.

r Thapa said...

Hi

We understood pattern being context specific but according to Vlissides, one of the writer among GoF, on the "book Pattern Hatching- Design Patterns Applied" explains ten common myth about pattern where he explains how all patterns are not context specific rather it can be used in other context as well. The book is worth a read.
thank you.