inf123 software architecture
Download
Skip this Video
Download Presentation
INF123 – Software Architecture

Loading in 2 Seconds...

play fullscreen
1 / 44

INF123 – Software Architecture - PowerPoint PPT Presentation


  • 106 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'INF123 – Software Architecture' - ellery


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
inf123 software architecture

INF123 – Software Architecture

INF 123 – Software Architecture

Thomas (Debeauvais)

[email protected]

today
Today …
  • Class info, syllabus
  • Introduction
    • Why, who, where, when, how
    • Definitions
    • Multiple architectures
  • Assignment 2 (= assignment 1)
class info
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
goals
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

graded workload
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%
not always graded workload
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
syllabus
Syllabus
  • Check the website
why and who
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
software architecture
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
more than just the code structure
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?
where
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 …
slide16
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
slide17
How
  • Basic tools: the MASC
    • Modularity
    • Abstraction
    • Separation of Concerns
  • More advanced tools
    • Object-oriented paradigm
    • Domain-specific architectures
this is not a scam
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
oo paradigm
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
domain specific architectures
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”
definitions1
Definitions
  • Component
  • Connector
  • Configuration
  • Style
  • While we’re at it … some basic sweng terms
    • Non-functional requirements
    • Reverse-engineering
component
Component
    • Functionality or data
  • With a way to access it
    • Otherwise it’s called a “black box”
  • Examples: database, web server, library

Database

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

DB connector

configuration
Configuration
  • Graph of components and connectors
    • Graph as in “edges and vertices”, not as in “drawn”

Game Logic

DB connector

Database

architectural style
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

non functional requirements
Non-functional requirements
  • Adaptability
  • Availability
  • Compliance
  • Complexity
  • Efficiency
  • Fault-tolerance
  • Interoperability
  • Robustness
  • Scalability
  • Security
  • Usability
non functional requirements1
Non-functional requirements
  • Functional
    • “The system prints medical records”
  • Non-functional
    • “The system prints medical records quickly and confidentially.”
reverse engineering
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/

multiple architectures1
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
why so many
Why so many?
  • Different stakeholders
  • Different concerns
  • Different perspectives
    • Each abstracts away irrelevant details
    • Each exemplifies something
    • Better understanding
  • Different granularity/level of details
focus of this class
Focus of this class
  • Software and system architectures

Display

Web browser

Logic

Web server

State

Database

weekly assignment 2
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
resources python
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
resources pygame
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
resources git
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
resources single player game
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!
ad