Understanding of Pattern
Today, in the very first lesson we discussed what patterns are and where this whole idea of design patterns came from. So here we go! Basically we use patterns to make life easy and instead of reinventing a wheel over and over again, we can create pattern once and use the same pattern to solve same or similar given problem in particular context. For instance, reaching from one destination to another lets say your home to work place, there can be numerous ways to reach there but we always take the same route why? Two reasons, either because we know that we’ll reach there safely on time or because we don’t want to spend time and effort looking for direction to reach there. This idea is adapted in software development to save time and effort. Thus, a pattern is more than just a guide, outline or blueprint, in fact we can call it imitate solution for a problem in particular context.
For better understanding I will take an example from real life
Problem: Get Money
Context: Insufficient funds to pay bills, tuition fees, transport and accommodation costs. Not eligible for Bank loan, No friends are willing to lend money, physically unable to work due to medical condition. No criminal convictions so far and not interested to get any to get money. However eligible to apply for income support.
Solution: Apply for benefits
Tuesday, 6 February 2007
Subscribe to:
Post Comments (Atom)
6 comments:
Great example,very understandable and very straight forward.Really appreciate the way you tried to explain the patterns.Looking forward to get some more from you Riz!
well explained in plain words....good work
Hi thanks the effort. Just wondering from what I know the prblem for which the pattern is applied ought to be specific. In this situation donot you think the problem is still general. I may be wrong!!!
Cheers
Does this pattern, "Single Pattern", define the lifetime of a class ?
Sir!
Thanks indeed for the information.
I remember of doing lot of brainstorming when Dr. Sri asked us to find a pattern to be posted in the blog but your e.g. shows if we’ve looked nearby we’d have found out the instance quicker.
Much obliged.
Very simple understanding made it clearer.
Post a Comment