week assignment · week assignment 1. cont. implementing your system –work with “eta”...
TRANSCRIPT
![Page 1: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/1.jpg)
Week AssignmentSoftware Architecture
Hans-Petter Halvorsen
https://www.halvorsen.blog
![Page 2: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/2.jpg)
Week Assignment1. Cont. Implementing your System– Work with “Beta” Iteration (Iteration #2)– Make sure your Architecture is documented in the
Software Requirements and Design (SRD) document – Make one or more System Sketches
– Do Scrum! – Have Scrum Meetings and use Scrum features in Azure DevOps
2. Discussion and Reflection
See Next Slides for m
ore details...Note! All Documents, Code, etc. you create should be uploaded to Teams/Azure DevOps
![Page 3: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/3.jpg)
Scrum
Hans-Petter Halvorsen
Scrum Meetings
![Page 4: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/4.jpg)
Scrum Meetings• Sprint Planning Meeting
– The purpose with the Sprint Planning is to discuss and select the work items for the next Sprint.– You select work items from the Product Backlog into the next Sprint Backlog.
• Daily Scrum Meeting (Standup Meeting). 3 Questions:1. What has been accomplished since last meeting?2. What will be done before the next meeting?3. What obstacles are in the way?
• Sprint Review Meeting– The purpose with the Sprint Review is to have a complete review of all the tasks/features that
should be completed in the Sprint (Sprint Backlog items)– In this meeting, your team demonstrates the features that it completed in the sprint
• Sprint Retrospective Meeting– Learn form previous Sprints. Find Improvements the Scrum Team will agree on for the next Sprint.– Making Actionable Commitments
1. Keep Doing2. Start Doing3. Stop Doing
![Page 5: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/5.jpg)
Scrum Meetings
Planning Meeting
Daily Scum Meeting
Review Meeting
Retro. Meeting
Sprint #1 (“Alpha“)
Planning Meeting
Daily Scum Meeting
Review Meeting
Retro. Meeting
Sprint #2 (“Beta“)
… …
Sprint #N
Previous Week/This Week
The Scrum Master is responsible for that these meetings are held
(Finish Alpha, start working on Beta)
![Page 6: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/6.jpg)
Introduction
Hans-Petter Halvorsen
Software Architecture
![Page 7: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/7.jpg)
Software Architecture• What is Software Architecture?• Client-Server Architecture• APIs and Libraries• 3 Layer/Tier Architecture (N Tier Architecture)• Model-View-Controller (MVC)• Web Services (Service Oriented Architecture,
SOA)– REST API
![Page 8: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/8.jpg)
Software Architecture
Hans-Petter Halvorsen
![Page 9: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/9.jpg)
What is Software Architecture?
Software architecture is the high level structure of a software system, the discipline of creating such structures, the documentation and Implementation of these structures
http://en.wikipedia.org/wiki/Software_architecture
![Page 10: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/10.jpg)
What is Software Architecture?-> A “model” of your Software System
Important to have when “building” your Software
![Page 11: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/11.jpg)
Bad Architecture Example
Let’s consider a modern application which may include several mobile apps on various platforms and usually some kind of web application too. Without an API, a basic architecture may look like this where each client app has its own embedded business logic.
Server(s)Clients
![Page 12: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/12.jpg)
Good Architecture Example
Each app uses the same API to get, update and manipulate data. All apps have feature parity and when you need to make a change you just make it in one place in line with the ‘Don’t Repeat Yourself’ (DRY) principle of software development. The apps themselves then become relatively lightweight UI layers.
Web Service API
Server(s)Clients
![Page 13: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/13.jpg)
API: Application Programming Interface. Different devices or software modules can share the same code. Code once, use it many times.
Client-Server
Software Architecture Styles
Web Services
APIs&
Libraries
3-Tier Architecture
Web Services: A standard way to get data over a network/Internet using standard Web protocols (HTTP, etc.)
3-Tier: A way to structure your code into logical parts. Different devices or software modules can share the same code.
Good Software!
2-Tier
n-Tier
There are many others, but we will focus on these
![Page 14: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/14.jpg)
http://www.digi.no/itnorge/2015/03/04/mer-forsinkelser-for-e-boks
Det viste seg at løsningen ikke holdt mål, hverken i forhold til de formelle kravene fra Difi eller det øvrige markedet. Derfor måtte selve kjerne-teknologien bygges om for å kunne håndtere mer komplekse oppgaver.
“Rent teknisk har vi bygget om til en lagdelt arkitektur, slik at E-boks kan utvikles på en mer moderne plattform. Det skal gi bedre forhold på både sikkerhet, kapasitet og fleksibilitet”
– Det gjenstår en del testing i samarbeid med Difi som oppdragsgiver.
![Page 15: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/15.jpg)
Client – Server Architecture
Hans-Petter Halvorsen, M.Sc.
![Page 16: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/16.jpg)
Client-Server
DataStorage
Client
Server
Request
Response
2-layer architecture
E.g. Windows 10
E.g. Windows Server 2019
![Page 17: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/17.jpg)
Web Architecture
PCs with Web Browsers
ClientsServers
The Cloud/Internet/
Local Network
Web Servers
Database Servers
HTML
HTML
![Page 18: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/18.jpg)
Example: https://web01.usn.no
PCs with Web Browsers
Clients
Server-side
Internet
HTML
HTML
HTTP RequestResponse
![Page 19: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/19.jpg)
API
Hans-Petter Halvorsen
Application Programming Interface
![Page 20: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/20.jpg)
API/Library• API - Application Programming Interface• A specification of how some software components
should interact with each other.• A library with functions, etc. you can use in your code• Examples:– Windows API– Java API– ADO.NET ...
• But you can also create your own API that you use internally in the development team or expose to others
![Page 21: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/21.jpg)
Module 1
Database Database
Module 2 Module 3 Module 1 Module 2 Module 3
API Example
GetUserInfo GetU
serD
ata
GetUse
rList
Common Database API
GetUsers GetUsers
GetUsers
3 different Modules/Applications have created 3 different ways to get the same information from the database
The Developers of 3 different modules/Applications have created a standard way to get the same information from the database
Database API
![Page 22: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/22.jpg)
Database API• Database Communication API• Stored Procedures and Views as a natural part of such a
Database API.• API using Layers:
– A good practice is to create a New Project with one or more Classes/Methods (Class Library) where you put the API code that can be shared among the Developers.
– Each Developer can then add this Project to their Solution in order to use it and maintain it.
![Page 23: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/23.jpg)
A Typical Database API
Tables
Views
Stored Procedures
SQL Server
C# Classes and Methods
Database API
Your Code
The API Interface to your Code
![Page 24: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/24.jpg)
The Benefits of API Driven DesignWhen an API is used in a project, it• Allows to focus on the project• Saves development time• Reduces errors and debugging• Facilitates modular design• Provides a consistent development platform
è API driven design requires planning and programming skills. API driven design is costly initially, but it pays in the long run. So, obviously, creating APIs is good software practice in most cases.
![Page 25: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/25.jpg)
C# Class
Database
Application #1Application #2
C# ClassGetBooks() GetBooks()
GetBookInformation()GetBookInformation()
etc.etc.
2 Applications in Visual Studio
![Page 26: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/26.jpg)
Class Library
Database
Application #1
Application #2
Put everything that is common for these 2 Application into a Class Library
GetBooks()GetBookInformation()etc.
Using Class Library
![Page 27: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/27.jpg)
Class Library Example - Solution Explorers
29
Application #1Application #2
The same Class Library is used by both Applications
![Page 28: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/28.jpg)
API Summary
Use of an API will make the architecture of your application much cleaner, making it easier to add features and fix bugs as your project progresses.
![Page 29: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/29.jpg)
3 Layer/Tier Architecture
Hans-Petter Halvorsen, M.Sc.
N Layer/Tier Architecture
![Page 30: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/30.jpg)
Layers vs. Tiers• “Layers” are a logical separation and “Tiers”
are a physical separation• The Terms are often mixed• It is probably better to use the terms “Logic
Layer” and “Physical Layer” if you need inform that they are on the same computer or not
![Page 31: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/31.jpg)
3 Tier/Layer ArchitecturePresentation Layer
Business Logic Layer
Data Access Layer
Data Source
PL
BL
DAL
Not
e! T
he d
iffer
ent l
ayer
s can
be
on th
e sa
me
com
pute
r (Lo
gic
Laye
rs) o
r on
diffe
rent
Co
mpu
ters
in a
net
wor
k (P
hysic
al
Laye
rs)
Data Layer - DL
Logic Layer
Note! Different Names for the layers may be used in different litterature
![Page 32: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/32.jpg)
34
2-tier: The database-centric style. Typically, the clients communicate directly with the database.
A three-tier style, in which clients do not connect directly to the database. Web Services, etc.
![Page 33: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/33.jpg)
Fat Client vs. Thin ClientFat Client:
Thin Client:
Presentation Tier Business Logic Tier Data Access Tier
Presentation Tier Business Logic Tier Data Access Tier
Client Server
ServerClient
![Page 34: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/34.jpg)
3 Tier Application (Physical Layers)
Note! The different layers can be on the same computer (Logic Layers) or on different Computers in a network (Physical Layers->Tiers)
Database
Client Program Application Server Database Server
![Page 35: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/35.jpg)
Web Server
3-tier Example – ASP.NET Web Site
Business/Data Logic Tier
Database Data Tier
Stored Procedures
ASP.NET Web Pages
Presentation Tier
Client
Internet Information Services (IIS)
Request
Response
Server (s)
Your C# Code
Access your Data through Stored Procedures
HTML
![Page 36: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/36.jpg)
3-layer (Logical) Examples in Visual Studio
• Your Solution in Visual Studio may contain one or more Projects.
• Each Project will then be a Layer.
• The same Project can then be used in several Solutions, meaning several Developers can maintain and use the same Project (Layer)
This is something you should consider doing in your project
![Page 37: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/37.jpg)
Data Tier
Tables
Views
Stored Procedures
SQL Server
Triggers
Data Tier
![Page 38: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/38.jpg)
Model-View-Controller
Hans-Petter Halvorsen, M.Sc.
![Page 39: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/39.jpg)
MVC
Controller
View Model
Web Requests
Get Data from
Each controller is responsible for handling user requests
Updates Updates
User Interface
Note! In ASP.NET Core it is possible to use the MVC architecture
![Page 40: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/40.jpg)
Model-View-Controller (MVC)The Model-View-Controller (MVC) architectural pattern separates an app into three main components: • Models (M): Classes that represent the data of the app. Typically,
model objects retrieve and store data into a database. • Views (V): Views are the components that display the app's user
interface (UI). Generally, this UI displays the model data.• Controllers (C): Classes that handle browser requests, retrieve model
data, and then specify view templates that return a response to the browser.
In an MVC app, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles route data and query-string values and passes these values to the model. The model might use these values to query the database.
![Page 41: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/41.jpg)
3. Layer vs. MVC
Model
View
Controller
Presentation Layer
Business Layer
Data Layer
![Page 42: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/42.jpg)
ASP.NETASP.NET supports three different development models:
The recommended approach The Web version ofclassic WinForms. GUI and Code is separated. If you are familiar with WinForms or WPF, this is a good choice
For more experienced Web Developers
ASP.NET Web Forms
ASP.NET MVC
ASP.NET Razor
![Page 43: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/43.jpg)
Web Services
Hans-Petter Halvorsen
Web Services, REST APIs, Web APIs, ...
![Page 44: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/44.jpg)
Problem
Clients
Database
How to Share Data between Devices in a Network?
Local Network/Internet
Server(s) Firewalls
Routers/Switches, etc.
Security
![Page 45: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/45.jpg)
Problem
ClientsDatabase
How to Share Data between Devices in a Network?
Direct Connection between the Database and the Clients that need the Data is normally not possible, due to security, compatibility issues, etc. (Firewalls, Hacker Attacks, etc.)Direct Connection in a Local Network (behind the Firewall) is normally OK – but not over the Internet!!
![Page 46: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/46.jpg)
USN Network Example
Eduroam(Wi-Fi)
LAN(Wired)
Internet
Student & Employees@ Campus
Employees @ Work
Router Wi-FiRouter
Wi-FiRouter
Network topology is a subject next semester
Servers with Databases Data
base
2
3 Private Homes
1USN has a complex
Network Infrastructure
Different Campuses: Porsgrunn, Notodden, Bø,...
Visual Studio OnlineServer
4Visual Studio
![Page 47: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/47.jpg)
Solution: Web Service
Web ServiceInternet
HTTPClients
Web Services uses standard Web Protocols like HTTP, etc.HTTP is supported by all Web Browser, Servers and many Programming Languages
Database
Firewall
No Problems with Firewalls
If you have access to the Web, you will have access to your Data
![Page 48: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/48.jpg)
Web Services• A Web service is a method of communications between two
devices over the World Wide Web.• Web API• Standard defined by W3C• Cross-platform• Web Services can be implemented and used in most
Programming Languages (C#/ASP.NET, PHP, LabVIEW, Objective-C, Java, ...)
• Uses standard Web Technology and Web Protocols– HTTP, REST, SOAP, XML, WSDL, JSON, ...
![Page 49: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/49.jpg)
Why Web Service?• Today Web Services have been very popular• Easy Data sharing over Internet• Platform-independent Communication• Makes it possible of integration of different
systems and platforms• Distributed Application Development
Web ServiceInternet
HTTPClients
![Page 50: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/50.jpg)
Web Services• Web Services 1.0: Uses SOAP– “Complex”, XML based
• Web Services 2.0: Uses REST (Referred to as REST API)– Lightweight and Flexible, Less Complex than using SOAP, The
preferred model today– JSON or XML (JSON is simpler than XML)
Web ServiceInternet
HTTPClients
Visual Studio: ASP.NET ASMX Web Service
Visual Studio: ASP.NET Web API
![Page 51: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/51.jpg)
Web Service Architecture Example
http://blogs.msdn.com/b/martinkearn/archive/2015/01/05/introduction-to-rest-and-net-web-api.aspx
Each app uses the same API to get, update and manipulate data. All apps have feature parity and when you need to make a change you just make it in one place in line with the ‘Don’t Repeat Yourself’ (DRY) principle of software development. The apps themselves then become relatively lightweight UI layers.
Web Service API
Server(s)Clients
![Page 52: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/52.jpg)
Web Architecture
Hans-Petter Halvorsen, M.Sc.
![Page 53: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/53.jpg)
Web ArchitectureThe Web uses all these architecture principles mentioned• Client-Server• 3-tier/n-tier• MVC• APIs• Web Services/REST APIs• etc.
![Page 54: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/54.jpg)
Web Architecture
PCs with Web Browsers
ClientsServers
The Cloud/Internet/
Local Network
Web Servers
Database Servers
HTML
HTML
![Page 55: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/55.jpg)
Web Server Platforms
The term web server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver web content that can be accessed through the Internet.The most common use of web servers is to host websites, but there are other uses such as gaming, data storage or running enterprise applications.
Internet Information Services
ASP.NETCross-platform: UNIX, Linux, OS X, Windows, ...
(pronounced "engine x") - Has become very popular lately
PHP
![Page 56: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/56.jpg)
REST API/Web API• REST - Representational State Transfer• Uses HTTP as Communication Protocol• GET, PUT, POST, DELETE• Use the JSON Data Format– customer = { "name": "John", "address": "Highway 37" }
https://en.wikipedia.org/wiki/Web_API
![Page 57: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/57.jpg)
GraphQL• GraphQL is a query language for APIs• It provides an efficient, powerful and flexible approach
to developing Web APIs, and has been compared and contrasted with REST and other web service architectures
• GraphQL is a new concept, originally made by Facebook in 2012
• GraphQL is now Open Source• https://graphql.org
![Page 58: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/58.jpg)
![Page 59: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/59.jpg)
Architecture and ImplementationTasks:• Cont. Implementing your System according to the
SRD• Use Azure DevOps• Make sure your Architecture is documented (with
different sketches and written information) in the Software Requirements and Design (SRD) document
• Use the terms learned in this topic
![Page 60: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/60.jpg)
Software Architecture & DeploymentTeknisk arkitektur, installasjon og utrulling av programvare til kunden:• Alle applikasjoner må installeres, enten det er en
desktop-applikasjon, mobil-applikasjon eller en webside eller en web-applikasjon.
• Systemets arkitektur gjenspeiles i hvordan systemet kan «deployes»/installeres.
• Det er viktig at man tidlig har en formening hvordan dette skal gjøres for deres produkt/system.
![Page 61: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/61.jpg)
Software Architecture & DeploymentTeknisk arkitektur, installasjon og utrulling av programvare til kunden:• F.eks. installerer man Outlook lokalt på maskinen sin ved å
trykke på en setup.exe fil for deretter å gå gjennom en såkalt trinnvis "installasjons-wizard" hvor brukeren må gjøre ulike valg underveis.
• Denne setupen installerer typisk selve outlook applikasjonen men også noen services, lokalt repository, m.m.
• Server biten av Outlook, dvs Exchange må også installeres (på en Server) slik at Outlook klientene kan koble seg på denne.
• Exchange består typisk av en database, diverse services, APIer, websider, m.m. som må installeres.
![Page 62: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/62.jpg)
Software Architecture & DeploymentStikkord:
• Gi oversikt over den tekniske arkitekturen til produktet deres• Forklar og illustrer (tekst og skisser) hvordan deres løsning skal installeres og tas i bruk av
kunden. • Gjerne beskriv og illustrer ulike muligheter (kunden ønsker fleksibilitet). • Hva slags dokumentasjon trenger dere å utarbeide ifm installasjon, drift og vedlikehold? • Forutsetninger og krav?• Krav til hardware og software? Hva slags programvare trengs å installeres før kunden kan
installere produktet som dere lager? m.m.• Krav til servere? Krav til klienter? Hardware og software ifm dette• Database? Arkitektur og installasjon ifm denne?• Sikkerhet og tilgang?• osv.
Oppdatere SRD dokumentet med denne informasjonenBruk alle tilgjengelige resurser for å finne svar på disse tingene, internett, lærebøker, kompendium, fagets websider, m.m.
![Page 63: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/63.jpg)
Deployment Architecture ScenariosForskjellige deployment-scenarier kan være:• Alternativ 1: Kunden ønsker å installere og drifte
løsninger deres i sitt eget bedriftsnettverk. Kunden må kjøpe inn en ny server/flere servere som de kan bruke til dette formålet – eller bruke en eksisterende server de har.
• Alternativ 2: Kunden har ikke egen infrastruktur og serverpark, kunden har heller ikke dypgående kunnskap om drift og vedlikehold av slike systemer.
- Systemet deres bør støtte begge disse scenariene.
![Page 64: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/64.jpg)
Project Management
Implementation/Coding
Week Assignm
ent 1
Week Assignm
ent 2
Week Assignm
ent N
Week Assignm
ent 3
...
This Course/Project
... ...
In Class we have focus on the Week Assignments – But In addition to the Week Assignments you also need to do Project Management and Coding every Week!
Proj
ect S
tart
Project Finished
The next 4 weeks our main focus will be Implementation/Coding of our System
![Page 65: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/65.jpg)
![Page 66: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/66.jpg)
Team Discussion and Reflection1. What defines good Architecture?2. What is the difference between Physical and Logical
Architecture?3. What are the benefits of using a Layered Architecture?4. Specify the Advantages and Disadvantages of creating
the Architecture– before the development start– while the development is ongoing
Dette er relevante eksamensspørsmål
![Page 67: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/67.jpg)
References• SOAP vs. REST Challenges: http://www.soapui.org/The-
World-Of-API-Testing/soap-vs-rest-challenges.html• Web Service: http://en.wikipedia.org/wiki/Web_service• ASP.NET Web API Example:
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
• Introduction to REST and .NET Web API: http://blogs.msdn.com/b/martinkearn/archive/2015/01/05/introduction-to-rest-and-net-web-api.aspx
![Page 68: Week Assignment · Week Assignment 1. Cont. Implementing your System –Work with “eta” Iteration (Iteration #2) –Make sure your Architecture is documented in the Software Requirements](https://reader036.vdocuments.us/reader036/viewer/2022071218/604f3365819f8c0fdf08c3c5/html5/thumbnails/68.jpg)
Hans-Petter Halvorsen
University of South-Eastern Norwaywww.usn.no
E-mail: [email protected]: https://www.halvorsen.blog