Feature-Level Modularity in Ur/Web Adam Chlipala WG 2.16 meeting, August 2013.

Slides:



Advertisements
Similar presentations
1 Chapter 12 Working With Access 2000 on the Internet.
Advertisements

B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.
Multiple Tiers in Action
Creating a SharePoint App with Microsoft Access Services
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Server-side Scripting Powering the webs favourite services.
CSS/417 Introduction to Database Management Systems Workshop 5.
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Simple Database.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
RUBRIC IP1 Ruben Botero Web Design III. The different approaches to accessing data in a database through client-side scripting languages. – On the client.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
WEB SERVER SOFTWARE FEATURE SETS
The basics of knowing the difference CLIENT VS. SERVER.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Excel Services Displays all or parts of interactive Excel worksheets in the browser –Excel “publish” feature with optional parameters defined in worksheet.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
1 A Sane Approach to Modern Web Application Development Adam Chlipala February 22, 2010.
Ur/Web: A Simple Model for Programming the Web
Chapter 1 Introduction to JavaScript.  Study the history of the World Wide Web  Work with well-formed Web pages  Learn about Web development  Learn.
Safe Database Abstractions with Type-Level Record Computation Adam Chlipala RADICAL 2010.
Ur/Web, a Domain-Specific Functional Programming Language for Modern Web Applications Adam Chlipala.
Ur/Web: A Statically-Typed Language for Building Web Applications from Components Adam Chlipala Emerging Languages Camp 2010.
Ur: Statically-Typed Metaprogramming with Type-Level Record Computation Adam Chlipala PLDI 2010.
Office 365 Development July 2014.
CS 325 Spring ‘09 Chapter 1 Goals:
The Object-Oriented Thought Process Chapter 13
Introduction to Dynamic Web Programming
Generating Pieces of Web Applications with Type-Level Programming
Database System Concepts and Architecture
Introduction and Principles
Google Web Toolkit Tutorial
Office 365 Development July 2014.
mysql and mysql workbench
Web Software Model CS 4640 Programming Languages for Web Applications
The Client/Server Database Environment
Introduction Web Environments
Haritha Dasari Josue Balandrano Coronel -
PHP / MySQL Introduction
Web App vs Mobile App.
Database Driven Websites
Design and Maintenance of Web Applications in J2EE
CS 174: Server-Side Web Programming February 12 Class Meeting
Populating a Data Warehouse
JavaScript an introduction.
Data, Databases, and DBMSs
Populating a Data Warehouse
Lecture 1: Multi-tier Architecture Overview
Web Application Architectures
Tiers vs. Layers.
ASP.NET Module Subtitle.
JavaServer Faces: The Fundamentals
Web Application Architectures
Client-Server Model: Requesting a Web Page
Web Application Architectures
Presentation transcript:

Feature-Level Modularity in Ur/Web Adam Chlipala WG 2.16 meeting, August 2013

2 Web programming is widely viewed as monkey work, filled with tedious boilerplate where mistakes have serious security consequences. Ur/Web Ur/Web supports modular programming to skip the boilerplate, with a compiler that understands the structure of web apps.

3 Ur/Web Functional Programming Dependent Types Meta- programming Compatibility with Web Standards & Browser Quirks Incorporating feature requests and patches from (quasi-)real- world users since 2008.

4 There are at least several users whom I have never met! The first commercial Ur/Web application: BazQux Reader, by Vladimir Shabanov Feed reader with comments On the order of 1000 active users

5 Web Server SQL Database Server Web Browser Ur/Web source code Tierless language: compile from one language to all tiers Page shown to user Database contents Communication channels with browsers Strongly typed syntax of embedded languages: SQL, HTML, CSS, URLs,... Classic HTTP requests, RPCs, push notification SQL updates, queries, and responses Automatic marshaling and network communication

6 Strong Encapsulation for the Web Private State Subtree of Displayed Document Client-side SQL Table of Recent Uploads RPC Handler Server-side Strong Interface Client render Callbacks: onSuccess, onError,... File Upload Widget Choose

7 Feature-Level Modularity Why stop at GUI widgets? Goal: Allow assembly of entire applications directly by composing modules standing for features that are meaningful to end users. Features could add: ● New columns to shared database tables ● New (private, encapsulated) tables ● New GUI widgets as part of particular views ● Completely new user-accessible operations ●…●… Want to be able to type-check features separately while guaranteeing that any composition has basic type-safety properties.

8 Example: Conference Management System Single- or double-blind reviewing? External review committee? One guardian in charge of each paper? Rebuttal? Rating scale? …. Author web interface Reviewer web interface Offline review form interface Web API for access by other systems …. Customized System

9 Secret Sauce: Type-Level Records First-class status for extensible record types Useful for: ● Modeling SQL table schemas ● Describing the results of a set of GUI widgets ● Representing typing environments of embedded languages Basic language ingredients: ● Record type (row) literals ● Row field name literals ● Concatenation of rows ● Reasoning about disjointness of rows ● Fancier: Computing with rows, using a higher-order map function

10 Row Type Ingredients con r1 = [A = int, B = float] val x1 : $r1 = {A = 1, B = 2.3} con r2 = [C = string] con r = r1 ++ r2 val x : $r = {A = 1, C = "q", B = 2.3}

11 Abstracting over Rows with Modules signature S = sig con r1 :: {Type} con r2 :: {Type} constraint r1 ~ r2 val fl1 : folder r1 val fl2 : folder r2 val r1_showable : $(map show r1) end structure M : S = struct con r1 = [A = int, B = float] con r2 = [C = string] end

12 Abstracting over Rows with Modules II functor Stringify(M : S) : sig val stringify : $(M.r1 ++ M.r2) -> string end = (* fancy dependent types footwork elided *) structure St = Stringify(struct con r1 = [A = int, B = float] con r2 = [C = string] end) val s = St.stringify x

13 Demo

14 Ur/Web Available At: Including online demos with syntax-highlighted source code

15 Backup

16 Dependent Types? Level 1 Expose embedded languages as libraries, with type-checking via Ur/Web's own type checker. Level 2 Assign expressive static types to metaprograms, generic in e.g. database schemas.

17 Secret Sauce (s) ● Client-side GUI management via a variant of functional-reactive programming ● Client-side multithreading with blocking remote procedure calls ● Server push via typed message-passing channels

18 Ur/Web Interface Code type handle (* abstract type *) (* omitted code for claiming handles *) val render : {OnSuccess : handle -> transaction {}, OnError : transaction {} } -> transaction xbody