Design patterns

1,031 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,031
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Design patterns

  1. 1. Design Patterns<br />
  2. 2. What is a Design Pattern?<br />It is a known solution to commonly occurring problems or scenarios in software applications.<br />A kind of a template or structure on which one can code the application.<br />
  3. 3. Why use a Design Pattern?<br />Reduces development time, as known solutions are used instead of reinventing the wheel.<br />Optimizes the application in terms of:<br />Maintenance<br />Scalability <br />Re-usability<br />
  4. 4. Different Design Patterns<br />Few Common design patterns:<br />Singleton<br />MVC<br />Factory Method<br />Observer<br />
  5. 5. Singleton<br />Used in applications when only a single instance of a resource is required.<br />(Ex: Database connection)<br />
  6. 6. MVC<br />Most commonly used design pattern.<br />Separates the business logic and presentation logic.<br />Uses Controller for interaction between Model and View.<br />
  7. 7. Factory Method<br />Object oriented creational pattern.<br />Method is used to create and initiate objects for classes.<br />An interface is defined for creating an object, but the subclasses decide which class to instantiate.<br />
  8. 8. Observer Pattern<br />Allows one object (the observer) to watch another (the subject).<br />It decouples the observer from the subject.<br />When the subject generates an event, it is passed to each of its observers.<br />
  9. 9. Other Patterns<br />Iterator<br />Adapter<br />Prototype<br />State, etc.<br />
  10. 10. Choosing a Design Pattern<br />Analyze the requirements.<br />Understand the nature of the problem<br />Determine how a particular design pattern solves that problem.<br />
  11. 11. Thank you!<br />e-mail: info@mobicules.com<br />Phone:+91-9871010829<br /> +91-9873778077<br />+1-121-329-11527<br />www.mobicules.com<br />

×