Week Assignment. Software Architecture. Hans-Petter Halvorsen

Like dokumenter
Unit Relational Algebra 1 1. Relational Algebra 1. Unit 3.3

Server-Side Eclipse. Bernd Kolb Martin Lippert it-agile GmbH

Information search for the research protocol in IIC/IID

Server-Side Eclipse. Martin Lippert akquinet agile GmbH

Slope-Intercept Formula

Sascha Schubert Product Manager Data Mining SAS International Copyright 2006, SAS Institute Inc. All rights reserved.

HONSEL process monitoring

Eksamen ENG1002/1003 Engelsk fellesfag Elevar og privatistar/elever og privatister. Nynorsk/Bokmål

of color printers at university); helps in learning GIS.

Endelig ikke-røyker for Kvinner! (Norwegian Edition)

EXAM TTM4128 SERVICE AND RESOURCE MANAGEMENT EKSAM I TTM4128 TJENESTE- OG RESSURSADMINISTRASJON

Hvordan komme i gang med ArchiMate? Det første modelleringsspråket som gjør TOGAF Praktisk

Øystein Haugen, Professor, Computer Science MASTER THESES Professor Øystein Haugen, room D

Den europeiske byggenæringen blir digital. hva skjer i Europa? Steen Sunesen Oslo,

Dynamic Programming Longest Common Subsequence. Class 27

Prosjektet Digital kontaktinformasjon og fullmakter for virksomheter Digital contact information and mandates for entities

Hvordan føre reiseregninger i Unit4 Business World Forfatter:

Databases 1. Extended Relational Algebra

Compello Fakturagodkjenning Versjon 10.5 As a Service. Tilgang til Compello Desktop - Regnskapsføring og Dokument import

SQL Server guide til e-lector

Moving Objects. We need to move our objects in 3D space.

buildingsmart Norge seminar Gardermoen 2. september 2010 IFD sett i sammenheng med BIM og varedata

Compello Fakturagodkjenning Versjon 10 Software as a service. Tilgang til ny modulen Regnskapsføring

Guidance. CBEST, CSET, Middle Level Credential

Uke 5. Magnus Li INF /

FIRST LEGO League. Härnösand 2012

Grunnlag: 11 år med erfaring og tilbakemeldinger

Han Ola of Han Per: A Norwegian-American Comic Strip/En Norsk-amerikansk tegneserie (Skrifter. Serie B, LXIX)

1. Installasjon av SharePoint 2013

Windows Server 2008 Hyper-V, Windows Server 2008 Server Core Installation Notes

Oppgave 1a Definer følgende begreper: Nøkkel, supernøkkel og funksjonell avhengighet.

Kurskategori 2: Læring og undervisning i et IKT-miljø. vår

EN Skriving for kommunikasjon og tenkning

Invitation to Tender FSP FLO-IKT /2013/001 MILS OS

Introduction to DK- CERT Vulnerability Database

GoOpen 2008 Oslo 8. april. Jernbaneverket Fri programvare i driftskritiske systemer. Ole Morten Killi ole.morten.killi@bouvet.

5 E Lesson: Solving Monohybrid Punnett Squares with Coding

Norsk (English below): Guide til anbefalt måte å printe gjennom plotter (Akropolis)

Public roadmap for information management, governance and exchange SINTEF

Administrasjon av postnummersystemet i Norge Post code administration in Norway. Frode Wold, Norway Post Nordic Address Forum, Iceland 5-6.

Elektronisk innlevering/electronic solution for submission:

MID-TERM EXAM TDT4258 MICROCONTROLLER SYSTEM DESIGN. Wednesday 3 th Mars Time:

GLOBALCOMSERVER HP 9100C DIGITAL SENDER GATEWAY ADMINISTRATOR S GUIDE 1998 AVM INFORMATIQUE (UPDATED: AUGUST 22, 2006)

Den som gjør godt, er av Gud (Multilingual Edition)

TILLEGGSSPØRSMÅL BILLETT- OG ADMINISTRASJONSSYSTEM KINONOR AS COMPLEMENTARY QUESTIONS POINT OF SALE SOFTWARE PACKAGE KINONOR AS

Bjørnar Hovemoen Helge Jansen

// Translation // KLART SVAR «Free-Range Employees»

Trådløsnett med. Wireless network. MacOSX 10.5 Leopard. with MacOSX 10.5 Leopard

Hvor mye teoretisk kunnskap har du tilegnet deg på dette emnet? (1 = ingen, 5 = mye)

Fakultet for informasjonsteknologi, Institutt for datateknikk og informasjonsvitenskap AVSLUTTENDE EKSAMEN I. TDT42378 Programvaresikkerhet

Little Mountain Housing

Improving Customer Relationships

Brukerkrav og use case diagrammer og -tekst 19. januar Agenda. Brukerkrav og use case. Diagrammer Tekst.

E-Learning Design. Speaker Duy Hai Nguyen, HUE Online Lecture

Emnedesign for læring: Et systemperspektiv

1 User guide for the uioletter package

KROPPEN LEDER STRØM. Sett en finger på hvert av kontaktpunktene på modellen. Da får du et lydsignal.

System integration testing. Forelesning Systems Testing UiB Høst 2011, Ina M. Espås,

Bostøttesamling

Prosjektstyring, metodikk og løsningsutforming for SAP prosjekter. Sveinung Gehrken Fram

Trådløsnett med Windows XP. Wireless network with Windows XP

GEO231 Teorier om migrasjon og utvikling

Multimedia in Teacher Training (and Education)

Status for IMOs e-navigasjon prosess. John Erik Hagen, Regiondirektør Kystverket

Referansearkitektur use cases. Kjell Sand SINTEF Energi AS NTNU Institutt for elkraftteknikk

Neural Network. Sensors Sorter

Trust in the Personal Data Economy. Nina Chung Mathiesen Digital Consulting

INF2270 Datamaskinarkitektur

Examination paper for TDT4252 and DT8802 Information Systems Modelling Advanced Course

Social Media Insight

The internet of Health

Kundetilfredshetsundersøkelse FHI/SMAP

Viktig informasjon om omlegging til Windows 10

Trigonometric Substitution

åpenbim av eksisterende bygg? Produktbiblioteker (i Open BIM) som støtte for FDV dokumentasjon.

UNIVERSITETET I OSLO ØKONOMISK INSTITUTT

E-learning opportunities for JSEC prototype 1

SAS IN A SOA WORLD MARIUS SOMMERSETH TEAM LEAD TECHNICAL ARCHITECTURE

Presenting a short overview of research and teaching

Vurderingsveiledning SPR3008 Internasjonal engelsk Eleven gir stort sett greie og relevante svar på oppgavene i samsvar med oppgaveordlyden.

INF2270 Datamaskinarkitektur

The regulation requires that everyone at NTNU shall have fire drills and fire prevention courses.

HVILKE ENDRINGER KAN BRANSJEN FORVENTE SEG FREMOVER SETT FRA ET BRUKERPERSPEKTIV CHRISTIAN HEIBERG, EXECUTIVE DIRECTOR CBRE AS NORSK EIENDOM

API: Application programming interface, eller programmeringsgrensesnitt

BIBSYS Brukermøte 2011 Live Rasmussen og Andreas Christensen. Alt på et brett? -om pensum på ipad og lesebrett

Hvor mye praktisk kunnskap har du tilegnet deg på dette emnet? (1 = ingen, 5 = mye)

Software Requirements and Design (SRD) 1 Generelt om dokumenter

The Future of Academic Libraries the Road Ahead. Roy Gundersen

Kanskje en slide som presenterer grunderen?

Hvor mye teoretisk kunnskap har du tilegnet deg på dette emnet? (1 = ingen, 5 = mye)

SRP s 4th Nordic Awards Methodology 2018

GeWare: A data warehouse for gene expression analysis

Geir Lieblein, IPV. På spor av fremragende utdanning NMBU, 7. oktober 2015 GL

Familieeide selskaper - Kjennetegn - Styrker og utfordringer - Vekst og nyskapning i harmoni med tradisjoner

Human Factors relevant ved subsea operasjoner?

Software applications developed for the maritime service at the Danish Meteorological Institute

Profile handbook. for

Microsoft Dynamics C5 Version 2008 Oversigt over Microsoft Reporting Services rapporter

Smart High-Side Power Switch BTS730

Transkript:

2017.02.27 Week Assignment Software Architecture B. Lund. Lunch. Available: http://www.lunchstriper.no, http://www.dagbladet.no/tegneserie/lunch/ Hans-Petter Halvorsen

Note! All Documents, Code, etc. you create should be uploaded to Visual Studio Team Services (VSTS) Week Assignment 1. Cont. Implementing your System Work with Beta Iteration (Iteration #2) Consider implement some of the Software Architectures mentioned here Make sure your Architecture is documented in the Software Requirements and Design (SRD) document 2. Discussion and Reflection See Next Slides for more details...

Introduction Software Architecture Hans-Petter Halvorsen, M.Sc.

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)

Software Architecture Hans-Petter Halvorsen, M.Sc.

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

What is Software Architecture? -> A model of your Software System Important to have when building your Software

Server(s) Bad Architecture Example Clients 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. http://blogs.msdn.com/b/martinkearn/archive/2015/01/05/introduction-to-rest-and-net-web-api.aspx

Good Architecture Example Server(s) Clients Web Service API 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. http://blogs.msdn.com/b/martinkearn/archive/2015/01/05/introduction-to-rest-and-net-web-api.aspx

Software Architecture Styles 2-Tier Web Services Web Services: A standard way to get data over a network/internet using standard Web protocols (HTTP, etc.) There are many others, but we will focus on these 3-Tier: A way to structure your code into logical parts. Different devices or software modules can share the same code. Good Software! APIs & Libraries 3-Tier Architecture Client- Server n-tier API: Application Programming Interface. Different devices or software modules can share the same code. Code once, use it many times.

http://en.wikipedia.org/wiki/multitier_architecture n-tier Architecture In software engineering, multi-tier architecture (often referred to as n- tier architecture) is a client server architecture in which presentation, application processing, and data management functions are physically separated. The most widespread use of multi-tier architecture is the three-tier architecture. N-tier application architecture provides a model by which developers can create flexible and reusable applications. By segregating an application into tiers, developers acquire the option of modifying or adding a specific layer, instead of reworking the entire application. A three-tier architecture is typically composed of a presentation tier, a domain logic tier, and a data storage tier.

Det gjenstår en del testing i samarbeid med Difi som oppdragsgiver. 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 kjerneteknologien 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 http://www.digi.no/itnorge/2015/03/04/mer-forsinkelser-for-e-boks

Microsoft Application Architecture Guide https://msdn.microsoft.com/en-us/library/ee658109.aspx

Client Server Architecture Hans-Petter Halvorsen, M.Sc.

Client Client-Server Response Server 2-layer architecture E.g. Windows 10 Request Data Storage E.g. Windows Server 2016

API Application Programming Interface Hans-Petter Halvorsen, M.Sc.

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

API Example Database API Module 1 Module 2 Module 3 Module 1 Module 2 Module 3 Common Database API Database 3 different Modules/Applications have created 3 different ways to get the same information from the database Database The Developers of 3 different modules/applications have created a standard way to get the same information from the database

Database Communication API Database 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 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.

A Typical Database API Your Code The API Interface to your Code C# Classes and Methods Stored Procedures Database API Views Tables SQL Server

The Benefits of API Driven Design When 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.

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.

3 Layer/Tier Architecture N Layer/Tier Architecture Hans-Petter Halvorsen, M.Sc.

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

3 Tier/Layer Architecture Note! The different layers can be on the same computer (Logic Layers) or on different Computers in a network (Physical Layers) Presentation Layer Business Logic Layer Data Access Layer Data Source PL BL DAL Data Layer - DL Logic Layer Note! Different Names for the layers may be used in different litterature

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. 26

Fat Client vs. Thin Client Fat Client: Presentation Tier Business Logic Tier Data Access Tier Client Server Thin Client: Presentation Tier Business Logic Tier Data Access Tier Client Server

3 Tier Application (Physical Layers) Database Client Program Application Server Database Server Note! The different layers can be on the same computer (Logic Layers) or on different Computers in a network (Physical Layers->Tiers)

3-tier Example ASP.NET Web Site Server (s) Client Internet Information Services (IIS) Access your Data through Stored Procedures Web Server Business/Data Logic Tier Database Presentation Tier ASP.NET Web Pages Stored Procedures Your C# Code Data Tier Response Request HTML

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

Data Tier Triggers Stored Procedures Views Tables Data Tier SQL Server

Model-View-Controller Hans-Petter Halvorsen, M.Sc.

Model-View-Controller (MVC) Model View Controller Note! ASP.NET Core is using the MVC architecture

MVC Web Requests Each controller is responsible for handling user requests Controller Updates Updates User Interface View Model Get Data from

3.layer vs. MVC Presentation View Business Controller Data Model

Web Services Web Servces, REST APIs, Web APIs,... Hans-Petter Halvorsen, M.Sc.

Problem How to Share Data between Devices in a Network? Server(s) Firewalls Security Local Network/Internet Clients Database Routers/Switches, etc.

Problem How to Share Data between Devices in a Network? Database Clients 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!!

3 Private Homes Internet USN Network Example Visual Studio Online Server Router Wi-Fi Router 4 Visual Studio Eduroam (Wi-Fi) 2 Servers with Databases LAN (Wired) 1 Employees @ Work Different Campuses: Porsgrunn, Notodden, Bø,... Wi-Fi Router Student & Employees @ Campus USN has a complex Network Infrastructure Network topology is a subject next semester

Solution: Web Service Web Service No Problems with Firewalls Internet HTTP Clients Database If you have access to the Web, you will have access to your Data Web Services uses standard Web Protocols like HTTP, etc. HTTP is supported by all Web Browser, Servers and many Programming Languages

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,...

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 Service Internet HTTP Clients

Web Services Web Services 1.0: Uses SOAP Complex, XML based Web Services 2.0: Uses REST Lightweight and Flexible, Less Complex than using SOAP, The preferred model today JSON or XML (JSON is simpler than XML) Visual Studio: ASP.NET Web API Web Service Visual Studio: ASP.NET ASMX Web Service Internet HTTP Clients

Web Service Architecture Example Server(s) Clients Web Service API 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. http://blogs.msdn.com/b/martinkearn/archive/2015/01/05/introduction-to-rest-and-net-web-api.aspx

Web Architecture Hans-Petter Halvorsen, M.Sc.

Web Architecture The Web uses all these architecture principles mentioned Client-Server 3-tier/n-tier MVC APIs Web Services/REST APIs etc.

Servers Web Architecture The Cloud/ Internet/ Local Network Clients HTML Database Servers Web Servers HTML PCs with Web Browsers

Web Server Platforms PHP (pronounced "engine x") - Has become very popular lately Cross-platform: UNIX, Linux, OS X, Windows,... Internet Information Services ASP.NET 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.

Architecture and Implementation Cont. Implementing your System Consider implement some of the Software Architectures mentioned here Make sure your Architecture is documented in the Software Requirements and Design (SRD) document

Software Architecture & Deployment Teknisk 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.

Software Architecture & Deployment Teknisk 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 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.

Software Architecture & Deployment Stikkord: 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. Bruk alle tilgjengelige resurser for å finne svar på disse tingene, internett, lærebøker, kompendium, fagets websider, m.m. Lag en kortfattet PowerPoint på 2-4 sider som oppsummerer det viktigste, samt husk å oppdatere SRD dokumentet med denne informasjonen

Deployment Architecture Scenarios Forskjellige 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.

Project Start Week Assignment 1 Week Assignment 2 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 Week Assignment 3 Project Management...... Implementation/Coding The next 4 weeks our main focus will be Implementation/Coding of our System... Week Assignment N Project Finished

Team Discussion and Reflection 1. 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

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-startedwith-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

Hans-Petter Halvorsen, M.Sc. University College of Southeast Norway www.usn.no E-mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/~hansha/