3 3 15
play

3/3/15 Announcement: Bug of the week (extra credit) Architectural - PDF document

3/3/15 Announcement: Bug of the week (extra credit) Architectural Patterns Each group can nominate a bug TA choose one to be bug of the week . Group gets extra credit. Bug due Sunday evening. Database-centric


  1. 3/3/15 Announcement: Bug of the week (extra credit) Architectural Patterns ❚ Each group can nominate a “ bug ” ❚ TA choose one to be “ bug of the week ” . Group gets extra credit. ❚ Bug due Sunday evening. Database-centric ❚ “ Bug ” can be any mistake; requirements, Model/View/Controller build, documentation. Best bugs will have Games “ lesson learned ” . CS361-10 2 1 More announcements Database-centric ❚ Final project hand in (Mon-Tue, March ❚ Relational database management system 9-10) ❙ Keep data safe ❙ Update the documentation to match the ❘ Crash recovery, human readable, adaptable current system (don’t simply copy-paste from ❙ Concurrency control HW2/HW3) ❘ Transactions - ACID (Atomicity, Consistency, Isolation, Durability) ❙ Integrate different applications ❙ Ad hoc querying CS361-10 3 CS361-10 4 Advantages of RDBMS Disadvantages of RDBMS ❚ Safety, concurrency, integration, queries ❚ Performance bottleneck ❚ Standard ❚ Object-relational impedance mismatch ❙ Compatible tools ❙ Must convert between tables and objects ❙ Expert developers ❙ Differing notions of identity ❚ Scalable (with cost) ❙ RDBMS do not support interfaces, inheritance, collections ❚ Tables not good for trees and graphs ❚ RDBMS work well for financial domain, not so well for the engineering fields CS361-10 5 CS361-10 6 1

  2. 3/3/15 RDBMS for integration New app … ❚ Reuse old tables ❚ Add new table ❚ Add column to old table App App App App ❚ Moving/deleting column is hard because old apps must be changed DBMS CS361-10 7 CS361-10 8 DB Administrator OO Domain Model ❚ Responsible for database design ❚ “ Domain model ” is a set of classes ❚ Ensure database is well-designed ❚ Applications talk to domain model. ❚ Ensure schema changes slowly ❚ Domain model talks to database. • Martin Fowler – • Patterns of Enterprise Application Architecture CS361-10 9 CS361-10 10 Alternatives to DBMS ❚ Persistence ❚ prevayler.org ❙ Flat files ❚ Keep all data in memory ❙ XML ❚ Store snapshot of data on disk, then log ❚ Concurrency every change to the data ❙ Prevayler-style in-memory database ❚ Change data using Command pattern ❚ Integration ❙ Log all commands ❙ SOA, message bus ❙ Lock all commands CS361-10 11 CS361-10 12 2

  3. 3/3/15 Prevayler trade-offs Model/View/Controller ❚ UI implementation pattern ❚ +Very fast ❚ Separate UI from application so UI can be ❚ +No object-relational impedance reused ❚ -Data must fit in memory ❚ Model - application data ❚ View - displays data ❚ -No query language ❚ Controller - maps user events into changes to the data CS361-10 13 CS361-10 14 Model/View/Controller Model/View/Controller ❚ In original MVC, ❙ View is a composite Model ❙ View is observer of Model ❙ Controller is strategy for handling input View Controller ❙ (active) Model pushes notifications to the list of registered viewers CS361-10 15 CS361-10 16 Design Principle: separate Model/View/Controller presentation from data ❚ In web systems, ❚ Make it easier to change presentation ❙ View is a template used to generate page ❙ from desktop, to web-based, to smartphone ❙ Controller is code used to handle “ post ” ❚ Make it easier to change data ❙ No “observer” relationship between the view ❚ Make presentation objects more reusable and the database (passive implementation) ❚ Allow people to specialize in data or in presentation CS361-10 17 CS361-10 18 3

  4. 3/3/15 Separating presentation from data MVC in games ❚ Hard to separate completely http://www.koonsolo.com/news/model- view-controller-for-games/ ❙ New feature requires change to data and to UI http://www.koonsolo.com/news/dewitters- gameloop/ ❚ Cross-functional teams - UI and data CS361-10 19 CS361-10 20 MVC in games MVC in games ❚ Real-time game consists of a game loop ❚ Put user input in a controller ❙ Get input ❚ Controller needs to query view to find ❙ Update game location of on-screen objects ❙ Display game ❚ Easier to test game code (i.e., the model) ❚ Make “ display game ” a separate object so automatically that game code is simpler CS361-10 21 CS361-10 22 MVC in games Architectural Patterns ❚ Determine how program is divided into modules ❚ Have advantages and disadvantages Controller ❚ Influence non-functional requirements / software quality Model ❚ Must be learned View CS361-10 23 CS361-10 24 4

  5. 3/3/15 Architectural Patterns Books Next time ❚ Career options in Software Engineering CS361-10 25 CS361-10 26 5

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend