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
Application Model = Domain Model + Interaction Design
System
Domain Model = State?Interaction Design = Behaviour?
Wednesday, March 10, 2010
From high-level declarative model
System
automatically generate
Model
efficient & complete implementation
Wednesday, March 10, 2010
How to model applications?
Wednesday, March 10, 2010
Wat makes a blog?
Wednesday, March 10, 2010
Wat makes a webshop?
Wednesday, March 10, 2010
Wat makes a chair?
Wednesday, March 10, 2010
Wat makes a chair?
Wednesday, March 10, 2010
Purpose=>
Features
?
Wednesday, March 10, 2010
Application Model = Collection of UML Diagrams
generate implementation from model
Wednesday, March 10, 2010
- Consider
★ interaction styles
★ layout
★ color schemes
★ fonts
★ personalization
★ ...
- Parameters of the modeling language?
★ generic, orthogonal definition?
Details make the difference
Wednesday, March 10, 2010
UI programming is like assembly programming
concerned with screen components
not with interaction styles & concepts
want: declaration of user interaction
Wednesday, March 10, 2010
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
instead of a general purpose solution (UML)
address specific class of software systems
Wednesday, March 10, 2010
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
horizontal (technical) domains
vertical (‘business’) domains
DB
DM
UI
accounting
Wednesday, March 10, 2010
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
The Web Domain
Wednesday, March 10, 2010
browser server database
app.war
a web application lives on the server
Wednesday, March 10, 2010
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
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
WebDSL
a domain-specific language for web applications
separation of concerns & linguistic integration
Wednesday, March 10, 2010
<screenshot webdsl.org>
Wednesday, March 10, 2010
<screenshot researchr>
Wednesday, March 10, 2010
<screenshot tweetview>
Wednesday, March 10, 2010
<screenshot yellowgrass>
Wednesday, March 10, 2010
<screenshot department>
Wednesday, March 10, 2010
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
Data Model Definition
entity declarationproperty
Wednesday, March 10, 2010
object identifier
domain-specific type
Data Model for Wiki
Wednesday, March 10, 2010
page definition
page navigation (page call)
Page Definition & Navigation
Wednesday, March 10, 2010
Displaying Data
markup
rendering values
Wednesday, March 10, 2010
parameter
template definition
template call
Templates (Page Fragments)
Wednesday, March 10, 2010
wiki.css
Wednesday, March 10, 2010
data binding
pageflow
Modifying Data
submit
Wednesday, March 10, 2010
Core Wiki
navigate
actionWednesday, March 10, 2010
Core Wiki
navigate
actionWednesday, March 10, 2010
Creating Objects
find/create object by id
Wednesday, March 10, 2010
pass string
Modifying Data
Wednesday, March 10, 2010
Core Wiki
action
navigate creates page
Wednesday, March 10, 2010
Page Index
Wednesday, March 10, 2010
Output Object = Navigation
Wednesday, March 10, 2010
Output Object = Navigation
default definitioncustom definition
Wednesday, March 10, 2010
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
Principal
turn on access control
representation of principal
Wednesday, March 10, 2010
Principal
turn on access control
representation of principal
Wednesday, March 10, 2010
Authentication
Wednesday, March 10, 2010
Authentication
Wednesday, March 10, 2010
Authentication
Wednesday, March 10, 2010
Registration
Wednesday, March 10, 2010
Access Control Rules
‘may access page f with argument x if boolean expression e is true’
Wednesday, March 10, 2010
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
Wiki Access Control Rules
Wednesday, March 10, 2010
Wiki Access Control Rules
Wednesday, March 10, 2010
Wiki Access Control Rules
Wednesday, March 10, 2010
Wiki Access Control Rules
Wednesday, March 10, 2010
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
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
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