+ All Categories
Home > Education > Model-Driven Software Development - Web Abstractions 1

Model-Driven Software Development - Web Abstractions 1

Date post: 15-Jan-2015
Category:
Upload: eelco-visser
View: 1,076 times
Download: 1 times
Share this document with a friend
Description:
Third lecture in course "Model-Driven Software Development" at Delft University of Technology
Popular Tags:
59
Web Abstractions 1 data models, user interface templates, access control Course IN4308 Master Computer Science Delft University of Technology Eelco Visser http://eelcovisser.org Lecture 3 Wednesday, March 10, 2010
Transcript
Page 1: Model-Driven Software Development - Web Abstractions 1

Web Abstractions 1data models, user interface templates, access control

Course IN4308Master Computer Science

Delft University of Technology

Eelco Visserhttp://eelcovisser.org

Lecture 3

Wednesday, March 10, 2010

Page 2: Model-Driven Software Development - Web Abstractions 1

Application Model = Domain Model + Interaction Design

System

Domain Model = State?Interaction Design = Behaviour?

Wednesday, March 10, 2010

Page 3: Model-Driven Software Development - Web Abstractions 1

From high-level declarative model

System

automatically generate

Model

efficient & complete implementation

Wednesday, March 10, 2010

Page 4: Model-Driven Software Development - Web Abstractions 1

How to model applications?

Wednesday, March 10, 2010

Page 5: Model-Driven Software Development - Web Abstractions 1

Wat makes a blog?

Wednesday, March 10, 2010

Page 6: Model-Driven Software Development - Web Abstractions 1

Wat makes a webshop?

Wednesday, March 10, 2010

Page 7: Model-Driven Software Development - Web Abstractions 1

Wat makes a chair?

Wednesday, March 10, 2010

Page 8: Model-Driven Software Development - Web Abstractions 1

Wat makes a chair?

Wednesday, March 10, 2010

Page 9: Model-Driven Software Development - Web Abstractions 1

Purpose=>

Features

?

Wednesday, March 10, 2010

Page 10: Model-Driven Software Development - Web Abstractions 1

Application Model = Collection of UML Diagrams

generate implementation from model

Wednesday, March 10, 2010

Page 11: Model-Driven Software Development - Web Abstractions 1

- Consider

★ interaction styles

★ layout

★ color schemes

★ fonts

★ personalization

★ ...

- Parameters of the modeling language?

★ generic, orthogonal definition?

Details make the difference

Wednesday, March 10, 2010

Page 12: Model-Driven Software Development - Web Abstractions 1

UI programming is like assembly programming

concerned with screen components

not with interaction styles & concepts

want: declaration of user interaction

Wednesday, March 10, 2010

Page 13: Model-Driven Software Development - Web Abstractions 1

Problem: ‘UI tweaking’

- code generation produces standardized/limited UI

Alternative: extra ‘hand coding’ e.g. UI templates not part of model

Conclusion: - modeling not adequate for interaction design

- user interface programming is low-level

Wednesday, March 10, 2010

Page 14: Model-Driven Software Development - Web Abstractions 1

instead of a general purpose solution (UML)

address specific class of software systems

Wednesday, March 10, 2010

Page 15: Model-Driven Software Development - Web Abstractions 1

Intermediate Goal for MDSD

develop better programming abstractions

for horizontal domains

before tackling vertical domains

‘let’s first make it easier to build web apps’

Wednesday, March 10, 2010

Page 16: Model-Driven Software Development - Web Abstractions 1

horizontal (technical) domains

vertical (‘business’) domains

DB

DM

UI

accounting

Wednesday, March 10, 2010

Page 17: Model-Driven Software Development - Web Abstractions 1

Properties of Domain-Specific Languages

DSL design requires tradeoff between

- Expressivity

- Coverage

- Portability

- Interoperability

- Completeness

- Maintainability

Extensive discussion in Quarter 4

Wednesday, March 10, 2010

Page 18: Model-Driven Software Development - Web Abstractions 1

The Web Domain

Wednesday, March 10, 2010

Page 19: Model-Driven Software Development - Web Abstractions 1

browser server database

app.war

a web application lives on the server

Wednesday, March 10, 2010

Page 20: Model-Driven Software Development - Web Abstractions 1

Concerns in Web Programming

- Persistent data

★ data integrity

★ search

- User interface

★ data validation

★ styling, layout

★ navigation

★ actions

- Workflow

- Access control and more ...

Wednesday, March 10, 2010

Page 21: Model-Driven Software Development - Web Abstractions 1

Problems in Web Programming

- Separate language for separate concerns

★ (that’s good)

- Lack of integration

★ no consistency checking

★ different language styles

- Low-level configuration

★ boilerplate code

Wednesday, March 10, 2010

Page 22: Model-Driven Software Development - Web Abstractions 1

WebDSL

a domain-specific language for web applications

separation of concerns & linguistic integration

Wednesday, March 10, 2010

Page 23: Model-Driven Software Development - Web Abstractions 1

<screenshot webdsl.org>

Wednesday, March 10, 2010

Page 24: Model-Driven Software Development - Web Abstractions 1

<screenshot researchr>

Wednesday, March 10, 2010

Page 25: Model-Driven Software Development - Web Abstractions 1

<screenshot tweetview>

Wednesday, March 10, 2010

Page 26: Model-Driven Software Development - Web Abstractions 1

<screenshot yellowgrass>

Wednesday, March 10, 2010

Page 27: Model-Driven Software Development - Web Abstractions 1

<screenshot department>

Wednesday, March 10, 2010

Page 28: Model-Driven Software Development - Web Abstractions 1

Web Abstractions

from a declarative point of view(we’ll investigate underlying mechanisms later)

Eelco Visser. WebDSL: A Case Study in Domain-Specific Language Engineering. GTTSE 2008: 291-373

Wednesday, March 10, 2010

Page 29: Model-Driven Software Development - Web Abstractions 1

Data Model Definition

entity declarationproperty

Wednesday, March 10, 2010

Page 30: Model-Driven Software Development - Web Abstractions 1

object identifier

domain-specific type

Data Model for Wiki

Wednesday, March 10, 2010

Page 31: Model-Driven Software Development - Web Abstractions 1

page definition

page navigation (page call)

Page Definition & Navigation

Wednesday, March 10, 2010

Page 32: Model-Driven Software Development - Web Abstractions 1

Displaying Data

markup

rendering values

Wednesday, March 10, 2010

Page 33: Model-Driven Software Development - Web Abstractions 1

parameter

template definition

template call

Templates (Page Fragments)

Wednesday, March 10, 2010

Page 34: Model-Driven Software Development - Web Abstractions 1

wiki.css

Wednesday, March 10, 2010

Page 35: Model-Driven Software Development - Web Abstractions 1

data binding

pageflow

Modifying Data

submit

Wednesday, March 10, 2010

Page 36: Model-Driven Software Development - Web Abstractions 1

Core Wiki

navigate

actionWednesday, March 10, 2010

Page 37: Model-Driven Software Development - Web Abstractions 1

Core Wiki

navigate

actionWednesday, March 10, 2010

Page 38: Model-Driven Software Development - Web Abstractions 1

Creating Objects

find/create object by id

Wednesday, March 10, 2010

Page 39: Model-Driven Software Development - Web Abstractions 1

pass string

Modifying Data

Wednesday, March 10, 2010

Page 40: Model-Driven Software Development - Web Abstractions 1

Core Wiki

action

navigate creates page

Wednesday, March 10, 2010

Page 41: Model-Driven Software Development - Web Abstractions 1

Page Index

Wednesday, March 10, 2010

Page 42: Model-Driven Software Development - Web Abstractions 1

Output Object = Navigation

Wednesday, March 10, 2010

Page 43: Model-Driven Software Development - Web Abstractions 1

Output Object = Navigation

default definitioncustom definition

Wednesday, March 10, 2010

Page 44: Model-Driven Software Development - Web Abstractions 1

Access Control

Danny M. Groenewegen, Eelco Visser. Declarative Access Control for WebDSL: Combining Language Integration and Separation of Concerns. ICWE 2008: 175-188

Wednesday, March 10, 2010

Page 45: Model-Driven Software Development - Web Abstractions 1

Principal

turn on access control

representation of principal

Wednesday, March 10, 2010

Page 46: Model-Driven Software Development - Web Abstractions 1

Principal

turn on access control

representation of principal

Wednesday, March 10, 2010

Page 47: Model-Driven Software Development - Web Abstractions 1

Authentication

Wednesday, March 10, 2010

Page 48: Model-Driven Software Development - Web Abstractions 1

Authentication

Wednesday, March 10, 2010

Page 49: Model-Driven Software Development - Web Abstractions 1

Authentication

Wednesday, March 10, 2010

Page 50: Model-Driven Software Development - Web Abstractions 1

Registration

Wednesday, March 10, 2010

Page 51: Model-Driven Software Development - Web Abstractions 1

Access Control Rules

‘may access page f with argument x if boolean expression e is true’

Wednesday, March 10, 2010

Page 52: Model-Driven Software Development - Web Abstractions 1

Wiki Access Control Rules

‘only logged in users may edit pages’

‘anyone can view existing pages, only logged in users can

create pages’

Wednesday, March 10, 2010

Page 53: Model-Driven Software Development - Web Abstractions 1

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 54: Model-Driven Software Development - Web Abstractions 1

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 55: Model-Driven Software Development - Web Abstractions 1

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 56: Model-Driven Software Development - Web Abstractions 1

Wiki Access Control Rules

Wednesday, March 10, 2010

Page 57: Model-Driven Software Development - Web Abstractions 1

More Web Abstractions

- Access control policies

★ constraints over objects

★ role-based AC, discretionary AC

- Data validation

★ form validation

★ data integrity

- Loading/accessing templates (partial pages)

★ (AJAX)

- Search

- Workflow

Wednesday, March 10, 2010

Page 58: Model-Driven Software Development - Web Abstractions 1

The Future of Quarter 3

- Lecture 4

★ More web abstractions

- Lecture 5

★ What does WebDSL abstract from?

★ Or: from DSL to Code

- Lecture 6

★ Language workbenches

★ Grammars

- Lecture 7

★ Language modeling

Wednesday, March 10, 2010

Page 59: Model-Driven Software Development - Web Abstractions 1

Schedule

Lab this week

★ Finish & submit proposal Design 1

★ Entity declarations

★ Basic setup for user interface

Cases

★ Case 1: domain analysis in digital library domain

★ Case 2: web abstractions

Next

★ Week 4 is ‘spring’ break; Week 5: lecture no, lab yes

★ Week 6: access control policies, validation, search, ...

Wednesday, March 10, 2010


Recommended