Design Pattern In Real World- part 1

Phases of Business Software applications development:
1. Mainframe COBOL
2. Internet driven Client Server based Language Java/J2EE,.NET
3. ERP: interconnected Module pre-delivered domain based Forms/Reports allowing customisation.
4.  Integrated systems, Mobile, Bigdata and on Cloud platform.
———————————————————————
Interoperability : Bridge or Adapter Design pattern.
Integrated System seamless Coarse-grain integration offered by Web services. Having Restful web services implied SOAP can travel over as http request.
Web services based integration meant less use of COM/DCOM or CORBA.
The inter-operability brought by Web services Also meant Enterprise Application Integration vendors like Web methods and Tibco also employed Web services in Genral.
EAI Tools moved Data Across ERP from Poeplesoft HRMS payroll to SAP Financials General Ledger GL. Thus Forming Like Bridge or Adapter integration pattern.
The EAI Tool having maximum adapters had Edge.To Some Extent Web services based coarse grain integration Changed This a lot.
Every ERP also created its own EAI version like SAP XI/PI, Peopesoft integration broker,Oracle applications had Oracle Fusion Middle ware.
And Some times Back Buzzword was in Oracle : Oracle ERP would be Fusion based.
And Web services engulfed Service Oriented Architecture SOA started entering into Business applications and New Product Architecture.Hence ESB Enterprise service Bus (ESB) Controlling Those coarse grain services are abundant in market.
SOA was buzzword  in 2008 at peak it existed before as well. New Architecture modifications started emerging Like SCA. SCA is also not new atleast 5 yrs there traction i this area.
Look at http://tuscany.apache.org/sca-java-architecture-guide.html
There Changes more affect Server side Coding.
What is There at client Side with AJAX components interacting with SOA in server side.
From Web 2.0 now we are in Web 3.0 and 4.0 started emerging with had effect on both server and client side code with semantic web but more focused on user Ease.
Ajax design pattern started emerging 2005 onwards. As more code started shifting towards Client side in form on AJAX, json, DWR  web remoting languages like Dojo started to play better co-ordinations.
Look at http://directwebremoting.org/dwr/introduction/elsewhere.html
The Flash modified its code base to provide Flex in Action script you get neatly made components configurable by Action script interacting with Web services using Blaze-Ds providing RIA Rich internet Applications.

Every language has Framework
The Languages moved more into framework solving applications issues by employing Struts/Spring. From more program driven towards more declarative languages where properties are defined in XML and based on that Code is configured.
As Framework Solved issue like validation using Struts or Dependency injection in flow of code or using Annotations in Spring. The languages also matured to bring features like annotations in latest Java release. C++ templates entered into Java. And Generics made Entry. From Declarative programming to Dynamic Programming.
The Spring Came with inversion of Control I0C which took callback concept to a new height and as discussed dependency injections.
iphone has Cocoa framework, Php has zend , Java had Structs, hibernate (ORM) and Spring.

Language Entering New Areas:
Language continue to Enter in new areas Like data mining Java data mining API, .net data mining API, like image processing API or 2d/3d graphics API. Language integrating with Phone services using Session Initiation protocol SIP which make digital phone hence Skype call to phone a reality.
Language became better organized with unit testing framework like java junit, .Net nUnit.
kind of project management using maven.

Design Pattern:
Gang Of Four pattern: Structural, decorative, behavioural design pattern etc..
Enterprise design Pattern like one given by martin flower generalises the popular product /service offering behaviours.
The Known Unknown factor has reduced. What is still not captured is Unknown Unknown?
How to drive into knowledge like conceptualized by semantic Web or Ontology?
Can Algorithm behave like pattern ? What I mean Can it be Generalized?
Only thing possible to Algorithm is Space and Time Complexity Analysis The BigO.
Can we treat Unknown Unknown area charted by Algorithms into sort of categorisation?

Open Source program driven file based Real time databases:
Now There is requirement and maturity for program driven real time Database and platform Like using used by social networking products RealTime databases like Cassandra by facebook, Amazon’s Dynamo,

Generalize problem solving through design pattern

When we start solving a problem: first step to to get logic so we can program it.
Like is some where repetition which happens so we can put in loop or we can repeat data structures like stack and array.
Data Structure to generalize 
Then we take storage about which data structure to Use let us suppose we are building a program whose maximum capacity to store a number is 10^12 but we want to add
10^12 +  10 ^12 how to achieve this when max capacity is 10^12?
Then we have to use storage through data structure like Stack…
We can create 2 stacks of each number with digit arranged in LIFO.
How will we add: take simple example : we take two 3 digit numbers
123 + 456
Stack 1             Stack 2
1              |        4                                                                                                                                    2              |        5                                                                                                                                     3              |        6
————————- We can not add these no by poping() stack pointer at top
and multiplying with its position in Stack 1: Like 123= 3 X 1+2 X 10+1 X 100.
and                                                        Stack2:         456=6 X 1+ 5 X10 +6 X 100.
=——————————————————————————                      So We pop  out 1 from (Stack 1) and 6 from (Stack 2) and Add take any carry to next element of stack. We can use array we can create linked list of Equation or we can use Stack (since number are added in LIFO from left to right) Stack are best match.
As we can see How the above is added:
pop unit position from stack 1 + pop unit position from stack 2 = store in stack 3 unit position
Stack 1             Stack 2        =  StackSum
3              |        6              =      9                                                                                                            2              |        5               =      7                                                                                                        1              |        4               =     5                                                                                                            Now Stacksum will contain Numbers in sequence push(9), push(7),push(5).

But Stack pops out in LIFO so Last inserted pop(9) X 1 + pop(7) X 10 + pop(5) X 100=579.
This example used only 3 digit but actually limits of System We can Enhance using data Structure like here..
——————————————————————————————
There can be multiple practical example for menus liked through Linked List or 2 Phase commit is Oracle Using Queue of multiple user request at multiple server.  We can fit in structure based on requirement. (Lowest level of generalisation)
—————————————————————————————

More higher level (top level) from 100 feet above earth we are now coming to 1000 feet We move towards Algorithms to decide which we have used one above.. but
We analyse 2 complexity .. time complexity and space complexity suing popular BigO notation to analyse performance of Algorithm.  This performance evaluation is also generalized using BigO and using popular Algorithms..
Like we want to see segmentation of market but we do not know what are different possibility of Buckets or segments.
Then We use like popular Market Basket Algorithm….
————————————————————————————–

10,000 feet level generalisation: Design Pattern ..

In GoF (Gang of four pattern) we have There are 3 category of design pattern Behavioural, Structural and creational
more read:http://en.wikipedia.org/wiki/Design_Patterns                                                   more general read:http://en.wikipedia.org/wiki/Software_design_pattern

Example:
So We see every time we create a web site we need user login, we need to maintain session hence session level objects,
So in Design pattern We search What pattern matches this design requirements Like (Visitor pattern) fits in here.
Integration Design pattern———————————————————-
Or In general during Integration we use Bridge pattern or Adapter pattern which is used in most integration tools like Webmethods (www.webmethods.com) and TIBCO (www.tibco.com)
We have many Integration design patterns only for integration….
http://en.wikipedia.org/wiki/Enterprise_Integration_Patterns
Nowadays We have more course grain integration using Web services.
With Everything Exposed as web service is interoperable across programming languages like Java and .net and with data in XML we have data portability.
This strategy is used in like enterprise service bus or in design of many BI / BPM tools read:
https://sandyclassic.wordpress.com/2013/10/05/enterprise-service-bus-esb-bpm-orchestration-and-process-re-engineering/
————————————————————————————–
20,000 feet level generalisation: Enterprise Design pattern
Depending on requirement we will mix and match.
There are various design pattern which exist today there are thousands of algorithm which can be chosen inside each mixture of pattern chosen
Let suppose we want to mix data set of two server session user information pattern in used in Observer pattern + Merge Sort (list) and create new list.. and sink in unified database.

Read this Discussion: http://www.sitepoint.com/understanding-the-observer-pattern/

There are at Tool or development level Frameworks which exist to create already known programming structure Like Spring Framework uses Aspect Oriented Programing,
Declarative programming style is generalized with annotation @web service making a POJO exposed as Web service… Then we need to think we want restful web serices