Inf123 software architecture
This presentation is the property of its rightful owner.
Sponsored Links
1 / 44

INF123 – Software Architecture PowerPoint PPT Presentation


  • 69 Views
  • Uploaded on
  • Presentation posted in: General

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.

Download Presentation

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.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 and syllabus

Class infoand Syllabus


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 who where when how

Why, who, Where, when, how


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 …


Inf123 software architecture

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


Inf123 software architecture

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”


Definitions

What is a part?

Definitions


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


    Style vs patterns

    Style vs patterns


    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 architectures

    Multiple architectures


    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


    Web usability architecture

    Web usability architecture


    Web deployment architecture

    Web deployment architecture


    Web system architecture

    Web system architecture


    Apache httpd software architecture

    Apache HTTPD software architecture


    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


    Assignment 1 assignment 2

    Assignment 1 = assignment 2


    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!


  • Login