1 / 44

INF123 – Software Architecture

INF123 – Software Architecture. INF 123 – Software Architecture Thomas ( Debeauvais ) tdebeauv@uci.edu. Today …. Class info, syllabus Introduction Why, who, where, when, how Definitions Multiple architectures Assignment 2 (= assignment 1). Class info and Syllabus. Class info.

ellery
Télécharger la présentation

INF123 – Software Architecture

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. INF123 – Software Architecture INF 123 – Software Architecture Thomas (Debeauvais) tdebeauv@uci.edu

  2. Today … • Class info, syllabus • Introduction • Why, who, where, when, how • Definitions • Multiple architectures • Assignment 2 (= assignment 1)

  3. Class infoand Syllabus

  4. Class info • Lecture MW 3:30- 4:50p in ICS 180 • Discussion Tu 5:00-5:50p in SSTR 103 • Out of town Wed 4/2 and Mon 4/7 • Requirements • Basics in CS and software engineering • Fluent in Python

  5. Goals • Learn some architecture theory • And lots of practical knowledge and tools • This includes Python and Github • Github is a must-have in a resume • To write elegantsoftware • Domain: online games From www.hurl.it

  6. Graded workload • Mid-term exam – 20% • Final exam – 40% • Quarter-long project – 40% • Groups of 2 or 3 • Weekly updates – 20% • Final report and presentation – 20%

  7. Not-always-graded workload • Weekly assignments • Due on Thursdays 11:59p • For practice, not always graded • Weekly QQ (quick quizzes) • First 5 minutes of the Monday class • For practice, never graded

  8. Syllabus • Check the website

  9. Why, who, Where, when, how

  10. Why and Who • Objective: source code • Hacker • Code that works • 1 file with 5k lines of code • Developer • Code with structure • 10 files, 3k lines total • Engineer/Architect • Code with a purpose • 1 API, 13 files, 4k lines

  11. Software Architecture • The set of most important design decisions • “Most important” • According to the stakeholders • “Design decisions” • Aware of the options • Also called constraints • More than just the code structure • Elegant

  12. More than just the code structure • Off-the-shelf components/reuse • Should I use Pygame? • Stakeholders • Stakeholder Thomas says: “Pygame is mandatory” • Deployment • py2exe or command line? Embed libraries? • Code structure AND behavior • At the file, package, and project levels • The decisions may change over time • Which decisions are certain vs unsure, critical vs minor?

  13. Where • Every software has at least one architecture • One from the requirements • Another from the documentation • Another in the code itself • They are usually all different …

  14. When • Architecture is not a phase of development • Think, document, write code faithful to the doc • Write OK code, debug, code is documentation • Think, write, think, write, think, write … • In all cases, there are architectures

  15. How • Basic tools: the MASC • Modularity • Abstraction • Separation of Concerns • More advanced tools • Object-oriented paradigm • Domain-specific architectures

  16. This is not a SCAM • Separation of Concerns • Divide a problem into independent parts • Abstraction • Reduce to its essential structure/behavior • Modularity • Consequence of separation of concerns • Modules have interfaces • Monolithic is the opposite of modular

  17. OO Paradigm • Pros • Design patterns • UML • Cons • Only 1 connector (method call) • At the programming level • Sometimes, other programming paradigms (functional, constraint, …) are more appropriate

  18. Domain-specific architectures • Your system belongs to a domain • Online games, banking, web servers, airplanes • This domain has existing solutions • Game engines, infrastructures, architectural styles • You have business goals • Reduce costs (Battle.net = one authentication for all Blizzard games) • Develop a product line (FIFA 2010  FIFA 2011  …) • DSSA = reference architecture with replaceable “parts”

  19. What is a part? Definitions

  20. Definitions • Component • Connector • Configuration • Style • While we’re at it … some basic sweng terms • Non-functional requirements • Reverse-engineering

  21. Component • Functionality or data • With a way to access it • Otherwise it’s called a “black box” • Examples: database, web server, library Database

  22. Connector • A link between components • Between 2, 3, .. N components • Examples: procedure call, DB connector, global variable, event brokers DB connector

  23. Configuration • Graph of components and connectors • Graph as in “edges and vertices”, not as in “drawn” Game Logic DB connector Database

  24. Architectural Style • Proven, recurring, and named architecture • Ex: Three-tier and related architectures Display GUI Web browser Logic Game Logic Web server State Model Database

  25. Style vs patterns

  26. Non-functional requirements • Adaptability • Availability • Compliance • Complexity • Efficiency • Fault-tolerance • Interoperability • Robustness • Scalability • Security • Usability • …

  27. Non-functional requirements • Functional • “The system prints medical records” • Non-functional • “The system prints medical records quickly and confidentially.”

  28. Reverse engineering • “How does this work?” = curious hacker • “Why does this work?” = curious engineer • Reverse: • Hardware • Binaries • Source code • Protocol • Architecture • Aka arch recovery http://www.youngmindsatplay.com/

  29. Multiple architectures

  30. Multiple Architectures • Usability architecture: HCI • The user experience • Deployment architecture: sys admin • Mapping between software and hardware • System architecture: sys engineer • The system’s concept and operation • Software architecture: software architect • The software itself

  31. Web usability architecture

  32. Web deployment architecture

  33. Web system architecture

  34. Apache HTTPD software architecture

  35. Why so many? • Different stakeholders • Different concerns • Different perspectives • Each abstracts away irrelevant details • Each exemplifies something • Better understanding • Different granularity/level of details

  36. Focus of this class • Software and system architectures Display Web browser Logic Web server State Database

  37. Assignment 1 = assignment 2

  38. Weekly Assignment 2 • Due Thursday 10th of April, 23:59pm • Install Python 2.7 (NOT Python 3) • Install Pygame 1.9.1 or 1.9.2 • Create a github account • Create a repository • Push a single-player game to your repo • Submit on EEE dropbox the URL of your repo • DO NOT SUBMIT CODE ON EEE

  39. Resources – Python • Python path in Windows • http://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7 • Notepad++, vim, … • Eclipse (+ PyDev plugin) • Help – install software – http://pydev.org/updates

  40. Resources – Pygame • Pygame 1.9.1 or 1.9.2 • http://www.pygame.org/download.shtml • 64-bit for Windows at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame • Ubuntu: sudo apt-get python-pygame • Double-check: “import pygame” in python console

  41. Resources – Git • Git • https://help.github.com/articles/set-up-git • Cheat sheet: http://cheat.errtheblog.com/s/git • Troubleshooting: https://help.github.com/categories/56/articles • Windows: Git Bash, GitHub Windows • Frequently used Git commands • git pull • git status • git add . • git commit –m ‘finished assignment 5; fixed issue #3’ • git push

  42. Resources – single-player game • Pummel the chimp • https://www.pygame.org/docs/tut/chimp/ChimpLineByLine.html • Solo snake or whale from my githubhttps://github.com/gentimouton/swarch/tree/master/solo • Your own game • No extra library beyond Pygame!

More Related