SlideShare ist ein Scribd-Unternehmen logo
1 von 60
Lecture 11
Application Architecture
Reading
 Fowler 2, 3, 4, 9, 10 , 11, 14, 15
 Fowler 8
Agenda





Layering
Application Architecture
Play! implementation
Introduction to REST
Layering
Layering
 Software systems can get complicated
– Abstractions are needed

 Provides abstraction by separating computer
systems in layers
– Higher layers use services from
lower layers
– Each layer has dedicated task
and hides complexity from upper
layers
Three Layers
 Presentation Layer for the User Interface
 Domain Layer for the domain logic
 Data Source Layer for the data access
Client
Domain

Client

– Separation of concern

Data Source
Presentation Layer
 Consideration
– Separating the Presentation Logic from the Domain
Logic
– Simple vs. Rich user interface
– Should content be editable frequently
User Interfaces
 Clear separation of concerns is important

– Define the Presentation Logic
– Design the domain layer so the presentation can get
the information needed
– Semantics – or the meaning of things is important

– Presentation logic must avoid making assumptions on
the domain – the semantics should be a part of the
domain
• Use Data Transfer Objects to store semantics
Client Types
 Native OS Applications
– Windows, iOS, Android, Linux

 Embedded
– Run inside Web Browsers
– Flash, Java Applets

 Interactive Web Applications
– HTML with JavaScript

 HTML Presentation in Browsers
– Simple HTML
Content Delivery
 Native, Embedded and Interactive Web Apps
– Require HTTP API call for dynamic content
– For example SOAP, REST with Json or XML

 HTML Presentation in Browsers
– Server side generated
Content Type
 Static Content such as graphic assets, doesn’t
change frequently
 Editable Content such as text, layout, mashedup content, editable by content
owners, frequently
 Dynamic Content stored in database and
manipulated by the domain logic
Content Management Systems
 Content is separated form the Enterprise system
– Managed by CMS software with its own database
– HTTP API calls for dynamic content from the
enterprise system
CLIENT
Web Browser
HTML
JavaScript

HTTP/REST/Json

Enterprise
Application

CMS
Editable
content

OPERATOR

Dynamic
content

Static
content

Static
content
Domain Layer
 Where is the domain logic?
– Application Servers
– Lightweight Containers
Application Servers
 Domain Components are deployed on
Application Servers
– Distributed Multi-tiered Applications
– Example:
• Web Servers, EJB Servers
Lightweight Containers
 Assemble components from different projects
into a cohesive application
– Wiring is done with “Inversion of Control” - config
– Provide life-cycle management of objects
– Provide context
Web Server

Lightweight Container

Web Browser
(User Interface)
Web Layer
Web Browser
(User Interface)

Domain
Layer

Data
Source
Layer
Database
Data Source Layer
 How to create the mapping from the domain to
the Data Source Layer
– Gateways with no domain logic
– Records managed with some domain logic
– Data Mappers
Data Source Layer
 Domain Model uses gateway
Domain
Layer

Data
Source
Layer
Object Relational Mapping (ORM)
 Use a mapping layer to map between objects
and tables
– Mapping a data representation from an object model
to a relational data model with a SQL-based schema

 Mapping requires
metadata
– XML

 Authoring and
maintaining
metadata is less work than maintaining SQL
The Big Picture
CMS
Client
Web
Server

REST

Domain

Data
Source

DB
The Big Picture in SOA
CMS

Frameworks

Frameworks

Client
Web
Server

REST

Web
Server

REST

SERVICE

Data
Source

DB

SERVICE

Data
Source

DB

Domain

Domain
Application Architecture
 Advice is a dangerous gift
– There are no right answers
– “Use the advice to prod your thinking, but don’t use it
as a replacement for your thinking”
Three Layers
 Presentation Layer for the User Interface
 Domain Layer for the domain logic
 Data Source Layer for the data access
Presentation
Layer

Domain

– What patterns to use?

Data Source
Domain Layer
 Transaction Script
 Domain Model
 Table Module
Domain Layer
 Transaction Script
– Procedural
– Encapsulates the logic of each transaction
– Works well for systems that are transactional in
nature

 Drawbacks
– Does not handle complexity of logic
– Code duplications
Domain Layer
 Domain Model
– Works nicely for any type of domain logic
– Flexibility in creating an object oriented classes that
use abstractions and polymorphism
– Beautiful code

 Drawbacks
– Learning curve – understanding the model
– Requires skills
– Doesn’t map easily to relational database
Domain Layer
 Table Module
– Works well for data driven applications
– Fits well with relational databases
– Requires Record Set functionality

 Drawbacks
– Structured around the database
– Needs tooling support, for example Record Set
– Can become dependent on the environment
Data Source Layer
 Data Source for Transaction Script
–
–
–
–

Fits well to use the Gateway patterns
Row Data Gateway or Table Data Gateway
Depends on the applications
If the transactions are dealing with each row per
transactions, then Row Data Gateway works
– If working with tables, Table Data Gateway works
Data Source Layer
 Data Source for Table Module
– Table Module requires good support from Record
Set
– Table Data Gateway fits this well
Data Source Layer
 Data Source for Domain Model
– If the Domain Model is fairly simple, and maps the
database, Active Record works well
– If you want to provide abstraction the gateway
patterns become better choice, Row Data Gateway
and Table Data Gateway
– If things get more complication and there is need to
keep the model independent from the data
source, Data Mapper should be considered
Model View Controller
 For all types MVC architectural patterns applies
 Web Frameworks are usually implemented
using the Front Controller pattern
 Each request has an Action or a Controller
 Views are handle by Template View
The Big Picture
Domain Layer
Presentation
Layer

Service
Layer

Data Source

DB
Domain
QUIZ
We have a relatively simple domain logic that maps nicely to
the data schema, and we have good tools for Record Set
handling. What Domain Layer pattern would make sense?
A)
B)
C)
✔ D)

Service Layer
Domain Model
Transaction Script
Table Module
Play! Framework

34
Exercise
 Design Web Application RuNews
– Front page displays RSS news items
– Content read with ImportContentProcess
– User can sign up and login
Overivew
Controller

Service Layer

Table Data
Gateway

Domain Model
users

View

routes

ApplicationConext.xml
Signup
 As a user, I want to be able to sign up
Registration
Fields: name, username, password, email

Validtaion:
all fields are required
username must be at least 4 characters
password must be confirmed (typed in twice)
Play setup
 Project is created: RuNews
 Structure
controllers
is.ru.honn.news
views

39
The Database
 Table users
CREATE TABLE users
(
id int Identity (1, 1) primary key NOT NULL,
name varchar(128),
username varchar(128) unique,
password varchar(128),
email varchar(128),
)

40
Application.java
package controllers;
import play.*;
import play.mvc.*;

import views.html.*;
public class Application extends Controller
{
public static Result index()
{
return ok(index.render());
}
}

41
index
 View is views/index.scala.html
@main(Html("RuNews")) {

<h2>Registration</h2>
<p>
Here you can sign up: <a class="btn”
href="@routes.SignUp.blank">Sign up</a>
</p>
}

 Compiled: views/html/index
42
Routing
 conf/routes contains the routing information
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET
/

controllers.Application.index()

# Sign Up
GET
/signup
POST
/signup

controllers.SignUp.blank()
controllers.SignUp.submit()

# Map static resources from the /public folder to the /assets URL path
GET
/assets/*file
controllers.Assets.at(path="/public", file)

43
RuNews Example
 User
public class User
{
protected int id;
protected String name;
protected String username;
protected String password;
protected String email;

public User()
{
}
public User(int id, String name, String username, String password,
String email)
{
this.id = id;
this.name = name;

44
RuNews Example
 UserService is a Service Layer interface
public interface UserService
{
public int signup(User user);
public User login(String username, String password);
public void setUserDataGateway(UserDataGateway userDataGateway);
}

 UserServiceData contains the implementation

45
Adding Domain and Data Layers
 Implementation of Service
Layer, Domain and Data
Source Layers added
– Added as is
– Should be in model

46
Adding Domain and Data Layers
 ApplicationContext.xml added to conf
– Drop data.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="userService" class="is.ru.honn.news.service.UserServiceData">
<property name="userDataGateway" ref="userDataGateway"/>
</bean>
<bean id="userDataGateway" class="is.ru.honn.news.data.UserData">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/>
<property name="url" value="jdbc:jtds:sqlserver://hrnem.ru.is:1433"/>

47
Adding Domain and Data Layers
 Table Data Gateway injected into service
public class UserServiceData implements UserService
{
RuDataAccessFactory factory;
UserDataGateway userDataGateway;
public UserServiceData()
{
}

public void setUserDataGateway(UserDataGateway UserDataGateway)
{
this.userDataGateway = UserDataGateway;
}

48
RuNews Example
 Signup is a Controller

import views.html.signup.*;
import is.ru.honn.news.domain.UserRegistration;

public class SignUp extends Controller
{
final static Form<UserRegistration> signupForm
= Form.form(UserRegistration.class);
public static Result blank()
{
return ok(form.render(signupForm));
}

49
RuNews Example
 Signup is a Controller

public static Result submit()
{
Form<UserRegistration> filledForm = signupForm.bindFromRequest();
...
if (filledForm.hasErrors()) {
return badRequest(form.render(filledForm));
}
else {
User created = filledForm.get();
ApplicationContext ctx = new FileSystemXmlApplicationContext
("/conf/ApplicationContext.xml");
UserDataGateway userDataGateway =
(UserDataGateway)ctx.getBean("userDataGateway");
userDataGateway.addUser((User)created);
return ok(summary.render(created));
}
}
}

50
RuNews Example
 form.scala.html is the view
@(signupForm: Form[is.ru.honn.news.domain.UserRegistration])
@import helper._
@import helper.twitterBootstrap._
@title = {
Sign Up
}
@main(title, nav = "signup") {
@helper.form(action = routes.SignUp.submit) {
<fieldset>
<legend>Account informations</legend>
@inputText(
signupForm("name"),
'_label -> "Name",
'_help -> "Please enter your name.",
'_error -> signupForm.globalError
)
51
RuNews Example
 form.scala.html is the view
@inputText(
signupForm("username"),
'_label -> "Username",
'_help -> "Please choose a valid username.",
'_error -> signupForm.globalError
)
@inputText(
signupForm("email"), '_label -> "Email",
'_help -> "Enter a valid email address."
)
@inputPassword(
signupForm("password"),
'_label -> "Password",
'_help -> "A password must be at least 6 characters. "
)...
</fieldset>
52
RuNews Example
 forms.scala.html is the view
<fieldset>
@checkbox(
signupForm("accept"),
'_label -> None, '_text -> "You agree the Terms and conditions",
'_showConstraints -> false
)
</fieldset>
<div class="actions">
<input type="submit" class="btn primary" value="Sign Up">
<a href="@routes.Application.index" class="btn">Cancel</a>
</div>

}
}

53
RuNews Example
 summary.scala.html displayes the user
@(user: is.ru.honn.news.domain.User)
@main(Html("Account created!"), nav = "signup") {
<h2>Your account:</h2>
<p>Name: @user.getName()</p>
<p>Username: @user.getUsername()</p>
<p>Email: @user.getEmail()</p>

}

54
55
L11 Application Architecture
L11 Application Architecture
L11 Application Architecture
L11 Application Architecture
L11 Application Architecture

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise EditionAbdalla Mahmoud
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOASperasoft
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architectureTanmoy Barman
 
An Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context ReasoningAn Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context ReasoningAitor Almeida
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code firstConfiz
 
N-tier and oop - moving across technologies
N-tier and oop - moving across technologiesN-tier and oop - moving across technologies
N-tier and oop - moving across technologiesJacinto Limjap
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
 
Basics of matlab i
Basics of matlab iBasics of matlab i
Basics of matlab issusera9e62b
 
Presentazione jrc 24 ottobre
Presentazione jrc 24 ottobrePresentazione jrc 24 ottobre
Presentazione jrc 24 ottobresmespire
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types pptkamal kotecha
 
Cara v3 8 major new features
Cara v3 8 major new featuresCara v3 8 major new features
Cara v3 8 major new featuresGeneris
 

Was ist angesagt? (20)

Day4
Day4Day4
Day4
 
Day7
Day7Day7
Day7
 
Day3
Day3Day3
Day3
 
Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise Edition
 
Xml
XmlXml
Xml
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOA
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architecture
 
An Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context ReasoningAn Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context Reasoning
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
N-tier and oop - moving across technologies
N-tier and oop - moving across technologiesN-tier and oop - moving across technologies
N-tier and oop - moving across technologies
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
Basics of matlab i
Basics of matlab iBasics of matlab i
Basics of matlab i
 
Spring
SpringSpring
Spring
 
Ef code first
Ef code firstEf code first
Ef code first
 
Webapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh guptaWebapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh gupta
 
Presentazione jrc 24 ottobre
Presentazione jrc 24 ottobrePresentazione jrc 24 ottobre
Presentazione jrc 24 ottobre
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
Chap3 3 12
Chap3 3 12Chap3 3 12
Chap3 3 12
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
Cara v3 8 major new features
Cara v3 8 major new featuresCara v3 8 major new features
Cara v3 8 major new features
 

Andere mochten auch

The Evolution Of Enterprise Application Architecture
The Evolution Of Enterprise Application ArchitectureThe Evolution Of Enterprise Application Architecture
The Evolution Of Enterprise Application ArchitectureOziel Moreira Neto
 
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...Denim Group
 
Distributed Design and Architecture of Cloud Foundry
Distributed Design and Architecture of Cloud FoundryDistributed Design and Architecture of Cloud Foundry
Distributed Design and Architecture of Cloud FoundryDerek Collison
 
Cloud strategy briefing 101
Cloud strategy briefing 101 Cloud strategy briefing 101
Cloud strategy briefing 101 Predrag Mitrovic
 
New Technology 2017 L02 Evolution of Technology
New Technology 2017 L02 Evolution of TechnologyNew Technology 2017 L02 Evolution of Technology
New Technology 2017 L02 Evolution of TechnologyÓlafur Andri Ragnarsson
 
The App Evolution
The App EvolutionThe App Evolution
The App EvolutionDev_Events
 
L01 New Technology 2017 Course Description
L01 New Technology 2017 Course DescriptionL01 New Technology 2017 Course Description
L01 New Technology 2017 Course DescriptionÓlafur Andri Ragnarsson
 
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016Arthur Doler
 
Monitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance AnalysisMonitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance AnalysisBrendan Gregg
 

Andere mochten auch (14)

The Evolution Of Enterprise Application Architecture
The Evolution Of Enterprise Application ArchitectureThe Evolution Of Enterprise Application Architecture
The Evolution Of Enterprise Application Architecture
 
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...
The Self Healing Cloud: Protecting Applications and Infrastructure with Autom...
 
Performance Engineering Basics
Performance Engineering BasicsPerformance Engineering Basics
Performance Engineering Basics
 
L04 Adjacent Possible
L04 Adjacent PossibleL04 Adjacent Possible
L04 Adjacent Possible
 
Distributed Design and Architecture of Cloud Foundry
Distributed Design and Architecture of Cloud FoundryDistributed Design and Architecture of Cloud Foundry
Distributed Design and Architecture of Cloud Foundry
 
Cloud strategy briefing 101
Cloud strategy briefing 101 Cloud strategy briefing 101
Cloud strategy briefing 101
 
New Technology 2017 L02 Evolution of Technology
New Technology 2017 L02 Evolution of TechnologyNew Technology 2017 L02 Evolution of Technology
New Technology 2017 L02 Evolution of Technology
 
Cloud Migration: Moving to the Cloud
Cloud Migration: Moving to the CloudCloud Migration: Moving to the Cloud
Cloud Migration: Moving to the Cloud
 
The App Evolution
The App EvolutionThe App Evolution
The App Evolution
 
New Technology 2017 L04 Exponential World
New Technology 2017 L04 Exponential WorldNew Technology 2017 L04 Exponential World
New Technology 2017 L04 Exponential World
 
L01 New Technology 2017 Course Description
L01 New Technology 2017 Course DescriptionL01 New Technology 2017 Course Description
L01 New Technology 2017 Course Description
 
New Technology 2017 L01 introduction
New Technology 2017 L01 introductionNew Technology 2017 L01 introduction
New Technology 2017 L01 introduction
 
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016
What Makes You DO Stuff? - The Psychology of Motivation @ Prairie.Code() 2016
 
Monitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance AnalysisMonitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance Analysis
 

Ähnlich wie L11 Application Architecture

3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step ExercisesMiranda Anderson
 
Introduction and Basics to web technology .pptx
Introduction and Basics to web technology .pptxIntroduction and Basics to web technology .pptx
Introduction and Basics to web technology .pptxLEENASAHU42
 
1588487811-chp-11-c-enterprise-application-integration.ppt
1588487811-chp-11-c-enterprise-application-integration.ppt1588487811-chp-11-c-enterprise-application-integration.ppt
1588487811-chp-11-c-enterprise-application-integration.pptKalsoomTahir2
 
--Enterprise-Application-Integration.ppt
--Enterprise-Application-Integration.ppt--Enterprise-Application-Integration.ppt
--Enterprise-Application-Integration.ppteddielyndacanay0
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architectureAmit rai Raaz
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecturerahmed_sct
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Serverswebhostingguy
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudMicrosoft ArcReady
 
Usda ocio-its itsm7-integration_architecturediagram_v1_100109
Usda ocio-its itsm7-integration_architecturediagram_v1_100109Usda ocio-its itsm7-integration_architecturediagram_v1_100109
Usda ocio-its itsm7-integration_architecturediagram_v1_100109Accenture
 

Ähnlich wie L11 Application Architecture (20)

L19 Application Architecture
L19 Application ArchitectureL19 Application Architecture
L19 Application Architecture
 
L19 Application Architecture
L19 Application ArchitectureL19 Application Architecture
L19 Application Architecture
 
L15 Organising Domain Layer
L15 Organising Domain LayerL15 Organising Domain Layer
L15 Organising Domain Layer
 
L07 Oranizing Domain Logic
L07 Oranizing Domain LogicL07 Oranizing Domain Logic
L07 Oranizing Domain Logic
 
3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises3-Tier Architecture Step By Step Exercises
3-Tier Architecture Step By Step Exercises
 
L15 Data Source Layer
L15 Data Source LayerL15 Data Source Layer
L15 Data Source Layer
 
Introduction and Basics to web technology .pptx
Introduction and Basics to web technology .pptxIntroduction and Basics to web technology .pptx
Introduction and Basics to web technology .pptx
 
1588487811-chp-11-c-enterprise-application-integration.ppt
1588487811-chp-11-c-enterprise-application-integration.ppt1588487811-chp-11-c-enterprise-application-integration.ppt
1588487811-chp-11-c-enterprise-application-integration.ppt
 
--Enterprise-Application-Integration.ppt
--Enterprise-Application-Integration.ppt--Enterprise-Application-Integration.ppt
--Enterprise-Application-Integration.ppt
 
SharePoint 2013 - What's New
SharePoint 2013 - What's NewSharePoint 2013 - What's New
SharePoint 2013 - What's New
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architecture
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 
Ra framework 0.1
Ra framework 0.1Ra framework 0.1
Ra framework 0.1
 
Introduction To Cloud Computing
Introduction To Cloud ComputingIntroduction To Cloud Computing
Introduction To Cloud Computing
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecture
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
 
Ikenstudiolive
IkenstudioliveIkenstudiolive
Ikenstudiolive
 
Usda ocio-its itsm7-integration_architecturediagram_v1_100109
Usda ocio-its itsm7-integration_architecturediagram_v1_100109Usda ocio-its itsm7-integration_architecturediagram_v1_100109
Usda ocio-its itsm7-integration_architecturediagram_v1_100109
 
lec-01-WP.pdf
lec-01-WP.pdflec-01-WP.pdf
lec-01-WP.pdf
 

Mehr von Ólafur Andri Ragnarsson

New Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionNew Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionÓlafur Andri Ragnarsson
 
New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine Ólafur Andri Ragnarsson
 

Mehr von Ólafur Andri Ragnarsson (20)

Nýsköpun - Leiðin til framfara
Nýsköpun - Leiðin til framfaraNýsköpun - Leiðin til framfara
Nýsköpun - Leiðin til framfara
 
Nýjast tækni og framtíðin
Nýjast tækni og framtíðinNýjast tækni og framtíðin
Nýjast tækni og framtíðin
 
New Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course IntroductionNew Technology Summer 2020 Course Introduction
New Technology Summer 2020 Course Introduction
 
L01 Introduction
L01 IntroductionL01 Introduction
L01 Introduction
 
L23 Robotics and Drones
L23 Robotics and Drones L23 Robotics and Drones
L23 Robotics and Drones
 
L22 Augmented and Virtual Reality
L22 Augmented and Virtual RealityL22 Augmented and Virtual Reality
L22 Augmented and Virtual Reality
 
L20 Personalised World
L20 Personalised WorldL20 Personalised World
L20 Personalised World
 
L19 Network Platforms
L19 Network PlatformsL19 Network Platforms
L19 Network Platforms
 
L18 Big Data and Analytics
L18 Big Data and AnalyticsL18 Big Data and Analytics
L18 Big Data and Analytics
 
L17 Algorithms and AI
L17 Algorithms and AIL17 Algorithms and AI
L17 Algorithms and AI
 
L16 Internet of Things
L16 Internet of ThingsL16 Internet of Things
L16 Internet of Things
 
L14 From the Internet to Blockchain
L14 From the Internet to BlockchainL14 From the Internet to Blockchain
L14 From the Internet to Blockchain
 
L14 The Mobile Revolution
L14 The Mobile RevolutionL14 The Mobile Revolution
L14 The Mobile Revolution
 
New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine New Technology 2019 L13 Rise of the Machine
New Technology 2019 L13 Rise of the Machine
 
L12 digital transformation
L12 digital transformationL12 digital transformation
L12 digital transformation
 
L10 The Innovator's Dilemma
L10 The Innovator's DilemmaL10 The Innovator's Dilemma
L10 The Innovator's Dilemma
 
L09 Disruptive Technology
L09 Disruptive TechnologyL09 Disruptive Technology
L09 Disruptive Technology
 
L09 Technological Revolutions
L09 Technological RevolutionsL09 Technological Revolutions
L09 Technological Revolutions
 
L07 Becoming Invisible
L07 Becoming InvisibleL07 Becoming Invisible
L07 Becoming Invisible
 
L06 Diffusion of Innovation
L06 Diffusion of InnovationL06 Diffusion of Innovation
L06 Diffusion of Innovation
 

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

L11 Application Architecture

  • 2. Reading  Fowler 2, 3, 4, 9, 10 , 11, 14, 15  Fowler 8
  • 5. Layering  Software systems can get complicated – Abstractions are needed  Provides abstraction by separating computer systems in layers – Higher layers use services from lower layers – Each layer has dedicated task and hides complexity from upper layers
  • 6. Three Layers  Presentation Layer for the User Interface  Domain Layer for the domain logic  Data Source Layer for the data access Client Domain Client – Separation of concern Data Source
  • 7. Presentation Layer  Consideration – Separating the Presentation Logic from the Domain Logic – Simple vs. Rich user interface – Should content be editable frequently
  • 8. User Interfaces  Clear separation of concerns is important – Define the Presentation Logic – Design the domain layer so the presentation can get the information needed – Semantics – or the meaning of things is important – Presentation logic must avoid making assumptions on the domain – the semantics should be a part of the domain • Use Data Transfer Objects to store semantics
  • 9. Client Types  Native OS Applications – Windows, iOS, Android, Linux  Embedded – Run inside Web Browsers – Flash, Java Applets  Interactive Web Applications – HTML with JavaScript  HTML Presentation in Browsers – Simple HTML
  • 10. Content Delivery  Native, Embedded and Interactive Web Apps – Require HTTP API call for dynamic content – For example SOAP, REST with Json or XML  HTML Presentation in Browsers – Server side generated
  • 11. Content Type  Static Content such as graphic assets, doesn’t change frequently  Editable Content such as text, layout, mashedup content, editable by content owners, frequently  Dynamic Content stored in database and manipulated by the domain logic
  • 12. Content Management Systems  Content is separated form the Enterprise system – Managed by CMS software with its own database – HTTP API calls for dynamic content from the enterprise system CLIENT Web Browser HTML JavaScript HTTP/REST/Json Enterprise Application CMS Editable content OPERATOR Dynamic content Static content Static content
  • 13. Domain Layer  Where is the domain logic? – Application Servers – Lightweight Containers
  • 14. Application Servers  Domain Components are deployed on Application Servers – Distributed Multi-tiered Applications – Example: • Web Servers, EJB Servers
  • 15. Lightweight Containers  Assemble components from different projects into a cohesive application – Wiring is done with “Inversion of Control” - config – Provide life-cycle management of objects – Provide context Web Server Lightweight Container Web Browser (User Interface) Web Layer Web Browser (User Interface) Domain Layer Data Source Layer Database
  • 16. Data Source Layer  How to create the mapping from the domain to the Data Source Layer – Gateways with no domain logic – Records managed with some domain logic – Data Mappers
  • 17. Data Source Layer  Domain Model uses gateway Domain Layer Data Source Layer
  • 18. Object Relational Mapping (ORM)  Use a mapping layer to map between objects and tables – Mapping a data representation from an object model to a relational data model with a SQL-based schema  Mapping requires metadata – XML  Authoring and maintaining metadata is less work than maintaining SQL
  • 20. The Big Picture in SOA CMS Frameworks Frameworks Client Web Server REST Web Server REST SERVICE Data Source DB SERVICE Data Source DB Domain Domain
  • 22.  Advice is a dangerous gift – There are no right answers – “Use the advice to prod your thinking, but don’t use it as a replacement for your thinking”
  • 23. Three Layers  Presentation Layer for the User Interface  Domain Layer for the domain logic  Data Source Layer for the data access Presentation Layer Domain – What patterns to use? Data Source
  • 24. Domain Layer  Transaction Script  Domain Model  Table Module
  • 25. Domain Layer  Transaction Script – Procedural – Encapsulates the logic of each transaction – Works well for systems that are transactional in nature  Drawbacks – Does not handle complexity of logic – Code duplications
  • 26. Domain Layer  Domain Model – Works nicely for any type of domain logic – Flexibility in creating an object oriented classes that use abstractions and polymorphism – Beautiful code  Drawbacks – Learning curve – understanding the model – Requires skills – Doesn’t map easily to relational database
  • 27. Domain Layer  Table Module – Works well for data driven applications – Fits well with relational databases – Requires Record Set functionality  Drawbacks – Structured around the database – Needs tooling support, for example Record Set – Can become dependent on the environment
  • 28. Data Source Layer  Data Source for Transaction Script – – – – Fits well to use the Gateway patterns Row Data Gateway or Table Data Gateway Depends on the applications If the transactions are dealing with each row per transactions, then Row Data Gateway works – If working with tables, Table Data Gateway works
  • 29. Data Source Layer  Data Source for Table Module – Table Module requires good support from Record Set – Table Data Gateway fits this well
  • 30. Data Source Layer  Data Source for Domain Model – If the Domain Model is fairly simple, and maps the database, Active Record works well – If you want to provide abstraction the gateway patterns become better choice, Row Data Gateway and Table Data Gateway – If things get more complication and there is need to keep the model independent from the data source, Data Mapper should be considered
  • 31. Model View Controller  For all types MVC architectural patterns applies  Web Frameworks are usually implemented using the Front Controller pattern  Each request has an Action or a Controller  Views are handle by Template View
  • 32. The Big Picture Domain Layer Presentation Layer Service Layer Data Source DB Domain
  • 33. QUIZ We have a relatively simple domain logic that maps nicely to the data schema, and we have good tools for Record Set handling. What Domain Layer pattern would make sense? A) B) C) ✔ D) Service Layer Domain Model Transaction Script Table Module
  • 35. Exercise  Design Web Application RuNews – Front page displays RSS news items – Content read with ImportContentProcess – User can sign up and login
  • 36. Overivew Controller Service Layer Table Data Gateway Domain Model users View routes ApplicationConext.xml
  • 37. Signup  As a user, I want to be able to sign up Registration Fields: name, username, password, email Validtaion: all fields are required username must be at least 4 characters password must be confirmed (typed in twice)
  • 38.
  • 39. Play setup  Project is created: RuNews  Structure controllers is.ru.honn.news views 39
  • 40. The Database  Table users CREATE TABLE users ( id int Identity (1, 1) primary key NOT NULL, name varchar(128), username varchar(128) unique, password varchar(128), email varchar(128), ) 40
  • 41. Application.java package controllers; import play.*; import play.mvc.*; import views.html.*; public class Application extends Controller { public static Result index() { return ok(index.render()); } } 41
  • 42. index  View is views/index.scala.html @main(Html("RuNews")) { <h2>Registration</h2> <p> Here you can sign up: <a class="btn” href="@routes.SignUp.blank">Sign up</a> </p> }  Compiled: views/html/index 42
  • 43. Routing  conf/routes contains the routing information # Routes # This file defines all application routes (Higher priority routes first) # ~~~~ # Home page GET / controllers.Application.index() # Sign Up GET /signup POST /signup controllers.SignUp.blank() controllers.SignUp.submit() # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(path="/public", file) 43
  • 44. RuNews Example  User public class User { protected int id; protected String name; protected String username; protected String password; protected String email; public User() { } public User(int id, String name, String username, String password, String email) { this.id = id; this.name = name; 44
  • 45. RuNews Example  UserService is a Service Layer interface public interface UserService { public int signup(User user); public User login(String username, String password); public void setUserDataGateway(UserDataGateway userDataGateway); }  UserServiceData contains the implementation 45
  • 46. Adding Domain and Data Layers  Implementation of Service Layer, Domain and Data Source Layers added – Added as is – Should be in model 46
  • 47. Adding Domain and Data Layers  ApplicationContext.xml added to conf – Drop data.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="userService" class="is.ru.honn.news.service.UserServiceData"> <property name="userDataGateway" ref="userDataGateway"/> </bean> <bean id="userDataGateway" class="is.ru.honn.news.data.UserData"> <property name="dataSource" ref="dataSource"/> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver"/> <property name="url" value="jdbc:jtds:sqlserver://hrnem.ru.is:1433"/> 47
  • 48. Adding Domain and Data Layers  Table Data Gateway injected into service public class UserServiceData implements UserService { RuDataAccessFactory factory; UserDataGateway userDataGateway; public UserServiceData() { } public void setUserDataGateway(UserDataGateway UserDataGateway) { this.userDataGateway = UserDataGateway; } 48
  • 49. RuNews Example  Signup is a Controller import views.html.signup.*; import is.ru.honn.news.domain.UserRegistration; public class SignUp extends Controller { final static Form<UserRegistration> signupForm = Form.form(UserRegistration.class); public static Result blank() { return ok(form.render(signupForm)); } 49
  • 50. RuNews Example  Signup is a Controller public static Result submit() { Form<UserRegistration> filledForm = signupForm.bindFromRequest(); ... if (filledForm.hasErrors()) { return badRequest(form.render(filledForm)); } else { User created = filledForm.get(); ApplicationContext ctx = new FileSystemXmlApplicationContext ("/conf/ApplicationContext.xml"); UserDataGateway userDataGateway = (UserDataGateway)ctx.getBean("userDataGateway"); userDataGateway.addUser((User)created); return ok(summary.render(created)); } } } 50
  • 51. RuNews Example  form.scala.html is the view @(signupForm: Form[is.ru.honn.news.domain.UserRegistration]) @import helper._ @import helper.twitterBootstrap._ @title = { Sign Up } @main(title, nav = "signup") { @helper.form(action = routes.SignUp.submit) { <fieldset> <legend>Account informations</legend> @inputText( signupForm("name"), '_label -> "Name", '_help -> "Please enter your name.", '_error -> signupForm.globalError ) 51
  • 52. RuNews Example  form.scala.html is the view @inputText( signupForm("username"), '_label -> "Username", '_help -> "Please choose a valid username.", '_error -> signupForm.globalError ) @inputText( signupForm("email"), '_label -> "Email", '_help -> "Enter a valid email address." ) @inputPassword( signupForm("password"), '_label -> "Password", '_help -> "A password must be at least 6 characters. " )... </fieldset> 52
  • 53. RuNews Example  forms.scala.html is the view <fieldset> @checkbox( signupForm("accept"), '_label -> None, '_text -> "You agree the Terms and conditions", '_showConstraints -> false ) </fieldset> <div class="actions"> <input type="submit" class="btn primary" value="Sign Up"> <a href="@routes.Application.index" class="btn">Cancel</a> </div> } } 53
  • 54. RuNews Example  summary.scala.html displayes the user @(user: is.ru.honn.news.domain.User) @main(Html("Account created!"), nav = "signup") { <h2>Your account:</h2> <p>Name: @user.getName()</p> <p>Username: @user.getUsername()</p> <p>Email: @user.getEmail()</p> } 54
  • 55. 55