1 / 21

Designer’s Challenge

Designer’s Challenge. Preparing Applications for the Future Using MVC Concepts. By Don Bakke President, SRP Computer Solutions, Inc. What is MVC?. At the very least it’s just another computer acronym…Model-View-Controller It might be new to you but it’s been around for 30 years

sarila
Télécharger la présentation

Designer’s Challenge

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Designer’s Challenge Preparing Applications for the Future Using MVC Concepts By Don Bakke President, SRP Computer Solutions, Inc.

  2. What is MVC? • At the very least it’s just another computer acronym…Model-View-Controller • It might be new to you but it’s been around for 30 years • In varying degrees it is probably something you are already doing but didn’t know it • But before we explain MVC any further…

  3. Audience Poll • Who here already has been or will plan to integrate an OpenInsight application with an alternative visual interface and/or with an alternative database server? • If you answered “yes” to this question then MVC should be of interest to you…

  4. “The Shape of Things to Come”

  5. Model-View-Controller – A Bit of History • Architectural pattern for designing software where an application is described in and designed in three separate layers: • Model = Relates to the application’s database and business logic • View = Relates to the application’s presentation of the data • Controller = Relates to the application’s flow and ties the other layers together • Generally assumes that application layers are loosely connected

  6. Model-View-Controller – A Bit of History • Coined in the late 70’s and made popular in the early 80’s with Smalltalk • Developed with Object Oriented technology in mind • Early versions assumed dumb clients • Spin-off versions include Model-View-Presenter, Model-View-Template, and Model-View-ViewModel

  7. Who Needs to Know MVC? • Anyone who needs to substitute or allow for alternative layers with minimal code rewrite • Presentation layer - WPF, Flex, HTML, iPhone, webOS • Data layer - SQL, U2, AmazonS3, Google App Engine (e.g. Cloud resources – Tom Wilson) • Leverage existing resources – Tom Wilson • Anyone who wants easier code management and documentation • Anyone who develops with teams who are focused on a specific layer of the application

  8. Who Needs to Know MVC? • Anyone who wants better unit testing of their code • Anyone who wants more reusability of their code • Anyone who wants more scalability in their application • Ask a Java, PHP, Ruby, .NET, or Cocoa developer

  9. Who Doesn’t Need to Know MVC? • Anyone who prefers a ‘git-r-done’ approach • Anyone who never intends to work outside of OpenInsight

  10. Model-View-Controller – A Closer Look • Disclaimers • I am not an MVC purist or expert • Much of what I am presenting is a “work-in-progress” effort • While MVC philosophy is always the same, pundits will differ on how to apply it

  11. Model-View-Controller – A Closer Look • Separation of Concerns (Layers) • Model • View • Controller API Events Requests Notifications API Results Responses Notifications • View • Model • Controller • Presents Data to User • Handles Event Processing • Receivers User Inputs • Calls Appropriate Resources • Handles Data • Handles Business Logic

  12. Model-View-Controller vs. n-Tier Architecture • View • Presentation Tier • Controller • Logic Tier • Model • Business Logic • Physical Data • Data Tier MVC n-Tier

  13. PROOF OF CONCEPT – CART APPLICATION

  14. Amazon’s Shopping Cart

  15. AREV

  16. OpenInsight

  17. Flex - Form Design Courtesy of Clay Borne

  18. Calculate Shipping - Flowchart Start Have Zipcode? No Yes Shipping Logic Set “Missing Zipcode” Error Return Shipping Costs Display Error Display Shipping Cost (Color Red if too much) End

  19. MVC Examples – Side by Side Comparison Flex / OI HTML / OI OI/ SQL Basic MVC Pure OI • View • HTML • Javascript • Flex/Flash • ActionScript • OI Form • Basic+ (Commuter) • OI Form • Basic+ (Commuter) • In Process Engine • Basic + • OECGI/2 • Basic+ • Controller • In Process Engine • Basic + • OECGI/2 • Basic+ • Linear Hash • Basic+ (MFS) • Linear Hash • Basic+ (MFS) • Linear Hash • Basic+ (MFS) • SQL • Basic+ or Direct • Model

  20. Final Thoughts • Don’t swallow the elephant • Take one bite at a time • Translation: Don’t force yourself to convert everything to MVC. Ease into it • Don’t force a square peg in a round hole • Build a framework and standards to make this easier

  21. Thank you Any Questions?

More Related