From e89607929e56988040d1b31e62362c16a9b75147 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 18 Jul 2009 13:46:22 -0400 Subject: New command-line options; describe simple SQLite build in demo intro --- demo/prose | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'demo') diff --git a/demo/prose b/demo/prose index 37b49a90..df0ed0a9 100644 --- a/demo/prose +++ b/demo/prose @@ -1,6 +1,6 @@

Ur/Web is a domain-specific language for programming web applications backed by SQL databases. It is (strongly) statically-typed (like ML and Haskell) and purely functional (like Haskell). Ur is the base language, and the web-specific features of Ur/Web (mostly) come only in the form of special rules for parsing and optimization. The Ur core looks a lot like Standard ML, with a few Haskell-isms added, and kinder, gentler versions added of many features from dependently-typed languages like the logic behind Coq. The type system is much more expressive than in ML and Haskell, such that well-typed web applications cannot "go wrong," not just in handling single HTTP requests, but across their entire lifetimes of interacting with HTTP clients. Beyond that, Ur is unusual in using ideas from dependent typing to enable very effective metaprogramming, or programming with explicit analysis of type structure. Many common web application components can be built by Ur/Web functions that operate on types, where it seems impossible to achieve similar code re-use in more established statically-typed languages.

-

This demo is built automatically from Ur/Web sources and supporting files. If you unpack the Ur/Web source distribution, then the following steps will build you a local version of this demo: +

This demo is built automatically from Ur/Web sources and supporting files. If you unpack the Ur/Web source distribution, then the following steps will (if you're lucky) build you a local version of this demo. If you're not lucky, you can consult the beginning of the manual for more detailed instructions.

./configure
 make
@@ -24,6 +24,14 @@ ProxyPassReverse /Demo/ http://localhost:8080/Demo/

Building the demo also generates a demo.sql file, giving the SQL commands to run to define all of the tables and sequences that the applications expect to see. The file demo.urp contains a database line with the PostgreSQL database that the demo web server will try to connect to.

+

The easiest way to get a demo running locally is probably with this alternate command sequence: + +

urweb -dbms sqlite -db /path/to/database/file -demo /Demo demo
+sqlite3 /path/to/database/file <demo/demo.sql
+demo/demo.exe

+ +

Then you can skip the static content and connect directly to the demo server at http://localhost:8080/Demo/Demo/main, which contains links to the individual demos.

+

The rest of the demo focuses on the individual applications. Follow the links in the lefthand frame to visit the applications, commentary, and syntax-highlighted source code. (An Emacs mode is behind the syntax highlighting.) I recommend visiting the applications in the order listed, since that is the order in which new concepts are introduced.

hello.urp -- cgit v1.2.3