File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Difference Between Design Pattern and Architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Difference Between Design Pattern and Architecture" Watch "Difference Between Design Pattern and Architecture" New topic
Author

Difference Between Design Pattern and Architecture

Vikas
Ranch Hand

Joined: Dec 16, 2004
Posts: 63
Hi All,

I think this is the best place to clear my doubt about the difference between an architecture and design pattern. Could any one please make this clear to me as I havn't got much stuff to clear this doubt.

Thank you
Vikas Sharda
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
- Architecture : sets which functionality the system should perform, split the functionality between components, set how components should behave and communicate in the system context, set the physical location of components and finally choose the tools in order to create components.



- Design : while architecture deals more with the wide picture, design should drill down in to the details relating to implementing certain components. Designing of components end up with classes, interfaces, abstract classes and other OO feature in order to fulfill the given component tasks.


Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
sergio mendez-rueda
Ranch Hand

Joined: May 12, 2005
Posts: 37
Hi,
hier something about desing patterns
(He is the father of the Pattern Language movement in computer science)
Design patterns:
Each pattern describes a problem which occurs over and
over again in our environment, and then describes the
core of the solution to that problem, in such a way
that you can use this solution a million times over,
without ever doing it the same way twice. -- ChristopherAlexander

A design pattern systematically names, motivates,
and explains a general design that addresses a recurring
design problem in object-oriented systems. It describes the
problem, the solution, when to apply the solution, and its
consequences. It also gives implementation hints and examples.
The solution is a general arrangement of objects and classes
that solve the problem. The solution is customized and
implemented to solve the problem in a particular context. -- DesignPatternsBook.
--- Architecture:
upps! 4 books "the nature of order by christopher alexander"!!!
wonderful stuff
cheers
Vikas
Ranch Hand

Joined: Dec 16, 2004
Posts: 63
Thank you Pawan and Sergio, It's a great help, now where does a framework fits in??
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
A framework is an implementation of a design pattern, viz., Struts.

A design pattern is an established solution to a commonly recurring problem, viz., MVC, Dependency Injection.
(Or, a workaround for limitations in the API. )

An architecture is an abstraction of the layers in an application, say, web application, viz. 2-tier architecture.

Example:
You can have a 3-tier or n-tier architecture using the Struts framework which implements the MVC design pattern.
Period.
Vikas
Ranch Hand

Joined: Dec 16, 2004
Posts: 63
Thank you Kedar, but sometimes we hear MVC as an architecture and somtimes it is heard as a design pattern.... can you clear this picture as well??

Thank you
Vikas Sharda
Pawan Ramchandani
Ranch Hand

Joined: Aug 15, 2003
Posts: 78
Kedar is correct framwork is implementaion of pattens.
Framework is not necessary based on an particular pattern rather you can also apply more then one pattern for single framwork.
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Hi Vikas,

you are definitly in the wrong place here to discuss design patterns and architectures .

There is a much better place to discuss your question at JavaRanch namely the OO, Patterns, UML and Refactoring forum. (Haven't you seen that ?).

Concerning your questions. Here is my view :

A framework is a structure that predefines the architecture for a specific class of applications. A framework specifies an architecture and the architectural components for a particular type of application.

MVC is often called architecture or compound design pattern because it contains a bunch of commonly known (classical GOF) design patterns.

Now a software architecture describe the overall structure of an application.

Regards,
Darya
[ July 12, 2005: Message edited by: Darya Akbari ]

SCJP, SCJD, SCWCD, SCBCD
samunder singh
Greenhorn

Joined: Dec 12, 2013
Posts: 1
simple difference from http://aspnet.blogershub.com/Archive/2013/12/what-is-difference-Application-Architecture-and-Design-Patterns

Application Architecture describes the structure and behavior of applications used in a business. It focuses on how these applications interact with each other and with users. It focuses on the inputs and outputs of applications rather then there internal structure. The applications architecture is specified on the basis of business requirements. It involves defining the interaction between application packages, databases, and middleware systems in terms of functional coverage. Application architecture is at a more abstract level and is independent of the implementation.

Design Patterns are the guidelines to avoid/solve common problems in application development. Design patterns tell us how we can achieve a solution in terms of implementation. Design patterns are independent of the programming language and technology platform i.e. we can implement a particular design pattern in any language.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2380
    
    7

Darya Akbari wrote:
There is a much better place to discuss your question at JavaRanch namely the OO, Patterns, UML and Refactoring forum. (Haven't you seen that ?).


Sure is moving.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Sergey Zhylinsky
Greenhorn

Joined: Nov 15, 2013
Posts: 26
As I understand, architecture is something that is more general, abstract. On the basis of an architecture a software is then realized. And design patterns are what can help to deal with bad code organization. A very old but really helpful book, devoted to design patterns is this.
T. Sharma
Author
Ranch Hand

Joined: Jul 30, 2013
Posts: 46
    
    5
If you are making a house, architecture is like deciding number of room, their size, and how they will be connected to each other. Design pattern is like deciding on windows to get maximum sunlight.


Tushar Sharma (Twitter: @Sharma__Tushar)
http://sharmatushar.blogspot.in/
 
Consider Paul's rocket mass heater.
 
subject: Difference Between Design Pattern and Architecture