Where to start about writing web/HTTP apps ?

Hi, I just start learning haskell and have to say that it is stunning in how precise it can be(coming from a background of C then python/perl/js). I want to write apps for WEB and have briefly read WASH. However, that seems to be a CGI based solution. What I want is a native HTTP server(written in haskell), like Twisted/Cherrypy in Python. Are there any boilerplate(I know I should scrap the boilerplate but I need to have something to get start) for reference ? In addition, during my learning process, I keep on using my old experience as reference such as writing simple programs that needs functions like ltrim/rtrim/substr etc. that is in almost any language I have used. But it seems that haskell doesn't have it. I know that a haskell expert can write them in no time with things like dropWhile and reverse, it is a bit frustrating for new comers from a imperative background. Oh, while I am still here, I am reading "The Evolution of a Haskell Programmer" http://www.willamette.edu/~fruehr/haskell/evolution.html and learning the various way to tackle the same problem. Obviously, there are lots of things I don't know what it is about and I would tackle them as time go by. But I have problem even with the seems to be simple one like this : fac n = foldr (\x g n -> g (x*n)) id [1..n] 1 I can understand a foldl or foldr version but have problem with this, especially the "id" and the trailing "1" and the function being folded takes 3 parameters instead of 2(as in standard foldr/foldl solution). Would appreciate if someone can knock on my head and tell me what is going on in it. thanks for help in advance. regards, gary ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/

From: gary ng
To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Where to start about writing web/HTTP apps ? Date: Sat, 10 Sep 2005 04:15:45 -0700 (PDT) Hi, Hi,
I just start learning haskell and have to say that it is stunning in how precise it can be(coming from a background of C then python/perl/js).
I want to write apps for WEB and have briefly read WASH. However, that seems to be a CGI based solution. What I want is a native HTTP server(written in haskell), like Twisted/Cherrypy in Python. Are there any boilerplate(I know I should scrap the boilerplate but I need to have something to get start) for reference ?
In addition, during my learning process, I keep on using my old experience as reference such as writing simple programs that needs functions like ltrim/rtrim/substr etc. that is in almost any language I have used. But it seems that haskell doesn't have it. I know that a haskell expert can write them in no time with things like dropWhile and reverse, it is a bit frustrating for new comers from a imperative background.
Oh, while I am still here, I am reading "The Evolution of a Haskell Programmer" http://www.willamette.edu/~fruehr/haskell/evolution.html
and learning the various way to tackle the same problem. Obviously, there are lots of things I don't know what it is about and I would tackle them as time go by. But I have problem even with the seems to be simple one like this : I don't think its that simple.
fac n = foldr (\x g n -> g (x*n)) id [1..n] 1
I can understand a foldl or foldr version but have problem with this, especially the "id" and the The id is the identity function defined id x = x trailing "1" and the function being folded takes 3 parameters instead of 2(as in standard foldr/foldl solution).
For a start the previous standard fold solutions take 3 parameters not 2. Its just the "fac n = foldr (\x g n -> g (x*n)) id [1..n] 1" example appears to take 4. However it doesn't, foldr always takes 3 arguments. foldr :: (a -> b -> b) -> b -> [a] -> b (from zvon reference) In fact the foldr function actually returns a function in this case. It could be rewritten as fac n = (foldr (\x g n -> g (x*n)) id [1..n]) 1 with the additional brackets added for clarity.
Would appreciate if someone can knock on my head and tell me what is going on in it. Well, here goes. The way the lambda function/foldr thing evaluates, the resulting foldl like function needs a new identity parameter hence the additional "1". To demonstrate something like how this is evaluated for a low number eg 3: (Please would someone correct me if I have made a mistake in this) fac 3 = (foldr (\x g n -> g (x*n)) id [1..3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) id [1,2,3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> id (3*n)) [1,2])) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> id (3*n)) (2*n)) [1]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) []) 1 fac 3 = (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) 1 fac 3 = (\n -> (\n -> id (3*n)) (2*n)) (1*1) fac 3 = (\n -> (\n -> id (3*n)) (2*n)) 1 fac 3 = (\n -> id (3*n)) (2*1) fac 3 = (\n -> id (3*n)) 2 fac 3 = id (3*2) fac 3 = id 6 fac 3 = 6 I would suggest that you use something other than the "evolution of a haskell programmer" to learn haskell as the versions of factorial get complicated very quickly and its largely use less as you should probably just use: fac n = product [1..n] anyway. A better introduction would be something like http://www.cse.unsw.edu.au/~cs1011/05s2/ and use http://zvon.org/other/haskell/Outputglobal/index.html and http://www.haskell.org/tutorial/ if you want to learn something in specific or are strugling. All links from http://www.haskell.org/learning.html of course.
thanks for help in advance. You're welcome.
regards,
gary
______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ _______________________________________________ Haskell-Cafe mailing list askell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Well good luck furthering your knowledge of haskell, Thomas _________________________________________________________________ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters

I emailed the WASH guy the other day and he is currently working on
integrating it with a web server. There is talk about Haskell server
pages. It sounds quite interesting. I'm impressed with WASH as it
is, though. I too am hoping to see it when it moves from a plain CGI
model to the something that's built right into the server. There are
some very useful and intersting features such as the way you program
as if it were a resident server, rather than a remote, swtateless exec
and restart CGI. I like the way handlers for the input fields are
integrated with the definition of the field, as well as with the error
handling for the field. I saw something about caching of the static
portion of the pages too.
I'd like to see some means of integrating the new, and quite awesome
AJAX techniques too.
Brian McQueen
On 9/10/05, Thomas Spriggs
From: gary ng
To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Where to start about writing web/HTTP apps ? Date: Sat, 10 Sep 2005 04:15:45 -0700 (PDT) Hi, Hi,
I just start learning haskell and have to say that it is stunning in how precise it can be(coming from a background of C then python/perl/js).
I want to write apps for WEB and have briefly read WASH. However, that seems to be a CGI based solution. What I want is a native HTTP server(written in haskell), like Twisted/Cherrypy in Python. Are there any boilerplate(I know I should scrap the boilerplate but I need to have something to get start) for reference ?
In addition, during my learning process, I keep on using my old experience as reference such as writing simple programs that needs functions like ltrim/rtrim/substr etc. that is in almost any language I have used. But it seems that haskell doesn't have it. I know that a haskell expert can write them in no time with things like dropWhile and reverse, it is a bit frustrating for new comers from a imperative background.
Oh, while I am still here, I am reading "The Evolution of a Haskell Programmer" http://www.willamette.edu/~fruehr/haskell/evolution.html
and learning the various way to tackle the same problem. Obviously, there are lots of things I don't know what it is about and I would tackle them as time go by. But I have problem even with the seems to be simple one like this : I don't think its that simple.
fac n = foldr (\x g n -> g (x*n)) id [1..n] 1
I can understand a foldl or foldr version but have problem with this, especially the "id" and the The id is the identity function defined id x = x trailing "1" and the function being folded takes 3 parameters instead of 2(as in standard foldr/foldl solution).
For a start the previous standard fold solutions take 3 parameters not 2. Its just the "fac n = foldr (\x g n -> g (x*n)) id [1..n] 1" example appears to take 4. However it doesn't, foldr always takes 3 arguments. foldr :: (a -> b -> b) -> b -> [a] -> b (from zvon reference) In fact the foldr function actually returns a function in this case. It could be rewritten as fac n = (foldr (\x g n -> g (x*n)) id [1..n]) 1 with the additional brackets added for clarity.
Would appreciate if someone can knock on my head and tell me what is going on in it. Well, here goes. The way the lambda function/foldr thing evaluates, the resulting foldl like function needs a new identity parameter hence the additional "1". To demonstrate something like how this is evaluated for a low number eg 3: (Please would someone correct me if I have made a mistake in this) fac 3 = (foldr (\x g n -> g (x*n)) id [1..3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) id [1,2,3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> id (3*n)) [1,2])) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> id (3*n)) (2*n)) [1]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) []) 1 fac 3 = (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) 1 fac 3 = (\n -> (\n -> id (3*n)) (2*n)) (1*1) fac 3 = (\n -> (\n -> id (3*n)) (2*n)) 1 fac 3 = (\n -> id (3*n)) (2*1) fac 3 = (\n -> id (3*n)) 2 fac 3 = id (3*2) fac 3 = id 6 fac 3 = 6 I would suggest that you use something other than the "evolution of a haskell programmer" to learn haskell as the versions of factorial get complicated very quickly and its largely use less as you should probably just use: fac n = product [1..n] anyway. A better introduction would be something like http://www.cse.unsw.edu.au/~cs1011/05s2/ and use http://zvon.org/other/haskell/Outputglobal/index.html and http://www.haskell.org/tutorial/ if you want to learn something in specific or are strugling. All links from http://www.haskell.org/learning.html of course.
thanks for help in advance. You're welcome.
regards,
gary
______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ _______________________________________________ Haskell-Cafe mailing list askell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Well good luck furthering your knowledge of haskell,
Thomas
_________________________________________________________________ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks for the info. Looking forward to see it. What I
would like to see is also some form of templating
system like HTMLTemplate in Python, that is reading in
HTML then merge in data using the DOM model, on the
server(may be the XML package in haskell already does
it). As for AJAX, I would assume that once there is
built-in support for HTTP, it is just a matter of
handling XMLRPC/JSONRPC calls from the client, instead
of HTTP calls, that should be solved automatically by
then, given the extremely strong parser support in
haskell.
--- Brian McQueen
I emailed the WASH guy the other day and he is currently working on integrating it with a web server. There is talk about Haskell server pages. It sounds quite interesting. I'm impressed with WASH as it is, though. I too am hoping to see it when it moves from a plain CGI model to the something that's built right into the server. There are some very useful and intersting features such as the way you program as if it were a resident server, rather than a remote, swtateless exec and restart CGI. I like the way handlers for the input fields are integrated with the definition of the field, as well as with the error handling for the field. I saw something about caching of the static portion of the pages too.
I'd like to see some means of integrating the new, and quite awesome AJAX techniques too.
Brian McQueen
From: gary ng
To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Where to start about writing web/HTTP apps ? Date: Sat, 10 Sep 2005 04:15:45 -0700 (PDT) Hi, Hi,
I just start learning haskell and have to say
is stunning in how precise it can be(coming from a background of C then python/perl/js).
I want to write apps for WEB and have briefly read WASH. However, that seems to be a CGI based solution. What I want is a native HTTP server(written in haskell), like Twisted/Cherrypy in Python. Are
On 9/10/05, Thomas Spriggs
wrote: that it there any boilerplate(I know I should scrap the boilerplate but I need to have something to get start) for reference ?
In addition, during my learning process, I keep on using my old experience as reference such as writing simple programs that needs functions like ltrim/rtrim/substr etc. that is in almost any language I have used. But it seems that haskell doesn't have it. I know that a haskell expert can write them in no time with things like dropWhile and reverse, it is a bit frustrating for new comers from a imperative background.
Oh, while I am still here, I am reading "The Evolution of a Haskell Programmer"
and learning the various way to tackle the same problem. Obviously, there are lots of things I
don't
know what it is about and I would tackle them as time go by. But I have problem even with the seems to be simple one like this : I don't think its that simple.
fac n = foldr (\x g n -> g (x*n)) id [1..n] 1
I can understand a foldl or foldr version but have problem with this, especially the "id" and the The id is the identity function defined id x = x trailing "1" and the function being folded takes 3 parameters instead of 2(as in standard foldr/foldl solution).
For a start the previous standard fold solutions take 3 parameters not 2. Its just the "fac n = foldr (\x g n -> g (x*n)) id [1..n] 1" example appears to take 4. However it doesn't, foldr always takes 3 arguments. foldr :: (a -> b -> b) -> b -> [a] -> b (from zvon reference) In fact the foldr function actually returns a function in this case. It could be rewritten as fac n = (foldr (\x g n -> g (x*n)) id [1..n]) 1 with the additional brackets added for clarity.
Would appreciate if someone can knock on my head and tell me what is going on in it. Well, here goes. The way the lambda function/foldr
resulting foldl like function needs a new identity
additional "1". To demonstrate something like how
low number eg 3: (Please would someone correct me if I have made a mistake in this) fac 3 = (foldr (\x g n -> g (x*n)) id [1..3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) id [1,2,3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> id (3*n)) [1,2])) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> id (3*n)) (2*n)) [1]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) []) 1 fac 3 = (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) 1 fac 3 = (\n -> (\n -> id (3*n)) (2*n)) (1*1) fac 3 = (\n -> (\n -> id (3*n)) (2*n)) 1 fac 3 = (\n -> id (3*n)) (2*1) fac 3 = (\n -> id (3*n)) 2 fac 3 = id (3*2) fac 3 = id 6 fac 3 = 6 I would suggest that you use something other than
haskell programmer" to learn haskell as the versions of factorial get complicated very quickly and its largely use less as you should probably just use: fac n = product [1..n] anyway. A better introduction would be something
http://www.willamette.edu/~fruehr/haskell/evolution.html thing evaluates, the parameter hence the this is evaluated for a the "evolution of a like
http://zvon.org/other/haskell/Outputglobal/index.html
and
http://www.haskell.org/tutorial/ if you want to learn something in specific or are strugling. All links from http://www.haskell.org/learning.html of course.
thanks for help in advance.
You're welcome.
regards,
gary
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ _______________________________________________ Haskell-Cafe mailing list askell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Well good luck furthering your knowledge of
haskell,
Thomas
_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org
=== message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Ah, lambda, function as first order object and curry.
A million thanks, that clears my mind. It is very hard
for me to shake away the things that I have learnt for
over 20 years. I still think from time to time that
the "accumulator" in foldr/foldl as a constant being
folded and forget that it can be anything. In this
case, because 'n' is not binded during the fold, it(g
(x*n)) becomes a function needing one more parameter
and keeps getting folded. The '1' at the end becomes
this final parameter that makes all these stacked
function in function all being evaluated back to
value.
Your explanation really taught me about these concepts
as I can understand simple tutorials(I used them in my
python programs) about them but only this kind deep
recursive I can see the advantage of curry.
I have already gone through the links you suggested
before I tried to see the various factorial
implementation, but I am sure I need to go back to
them again and again as haskell(and the idea behind it
in programming) is not something I can understand in
one go.
IMO, every CS course should teach haskell, as one can
easily pick up C/Pascal etc. without any help but
haskell is all too different.
--- Thomas Spriggs
Well, here goes. The way the lambda function/foldr thing evaluates, the resulting foldl like function needs a new identity parameter hence the additional "1". To demonstrate something like how this is evaluated for a low number eg 3: (Please would someone correct me if I have made a mistake in this) fac 3 = (foldr (\x g n -> g (x*n)) id [1..3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) id [1,2,3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> id (3*n)) [1,2])) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> id (3*n)) (2*n)) [1]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) []) 1 fac 3 = (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) 1 fac 3 = (\n -> (\n -> id (3*n)) (2*n)) (1*1) fac 3 = (\n -> (\n -> id (3*n)) (2*n)) 1 fac 3 = (\n -> id (3*n)) (2*1) fac 3 = (\n -> id (3*n)) 2 fac 3 = id (3*2) fac 3 = id 6 fac 3 = 6 I would suggest that you use something other than the "evolution of a haskell programmer" to learn haskell as the versions of factorial get complicated very quickly and its largely use less as you should probably just use: fac n = product [1..n] anyway. A better introduction would be something like http://www.cse.unsw.edu.au/~cs1011/05s2/ and use
http://zvon.org/other/haskell/Outputglobal/index.html
and http://www.haskell.org/tutorial/ if you want to learn something in specific or are strugling. All links from http://www.haskell.org/learning.html of course.
thanks for help in advance.
You're welcome.
regards,
gary
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ _______________________________________________ Haskell-Cafe mailing list askell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Well good luck furthering your knowledge of haskell,
Thomas
_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

At 11:44 PM +0000 9/10/05, Thomas Spriggs wrote:
From: gary ng
fac n = foldr (\x g n -> g (x*n)) id [1..n] 1
Would appreciate if someone can knock on my head and tell me what is going on in it. Well, here goes. The way the lambda function/foldr thing evaluates, the resulting foldl like function needs a new identity parameter hence the additional "1". To demonstrate something like how this is evaluated for a low number eg 3: (Please would someone correct me if I have made a mistake in this) fac 3 = (foldr (\x g n -> g (x*n)) id [1..3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) id [1,2,3]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> id (3*n)) [1,2])) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> id (3*n)) (2*n)) [1]) 1 fac 3 = (foldr (\x g n -> g (x*n)) (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) []) 1 fac 3 = (\n -> (\n -> (\n -> id (3*n)) (2*n)) (1*n)) 1 fac 3 = (\n -> (\n -> id (3*n)) (2*n)) (1*1) fac 3 = (\n -> (\n -> id (3*n)) (2*n)) 1 fac 3 = (\n -> id (3*n)) (2*1) fac 3 = (\n -> id (3*n)) 2 fac 3 = id (3*2) fac 3 = id 6 fac 3 = 6
Your equations are correct, but I find the (first part of the) sequence a bit confusing because it doesn't follow directly from the definition of foldr. Here's how I would explain it: From the prelude definition: foldr f z [] = z foldr f z (x:xs) = f x (foldr f z xs) Rewriting for conciseness: fac n = (ffz [1..n]) 1 where ffz = foldr (\x g n -> g (x*n)) id fac 3 = (ffz [1,2,3]) 1 = (\n1 -> (ffz [2,3]) (1*n1)) 1 = (\n1 -> (\n2 -> (ffz [3]) (2*n2)) (1*n1)) 1 = (\n1 -> (\n2 -> (\n3 -> (ffz []) (3*n3)) (2*n2)) (1*n1)) 1 = (\n1 -> (\n2 -> (\n3 -> id (3*n3)) (2*n2)) (1*n1)) 1 = (\n2 -> (\n3 -> id (3*n3)) (2*n2)) (1*1) = (\n3 -> id (3*n3)) (2*(1*1)) = id (3*(2*(1*1))) = (3*(2*(1*1))) = 6

gary ng wrote:
I want to write apps for WEB and have briefly read WASH.
I'm thinking of doing the same. The approach taken by WASH seems very cool and I'd love to use it. I've only started looking at it, but WASH seems to require that JavaScript be enabled on the user's web browser, even for the simplest forms. e.g. from the authors web page: http://nakalele.informatik.uni-freiburg.de/cgi/WASH/Counter.cgi Also, the error checking doesn't seem to work as I'd expect: if you submit a page without a required field it will complain the first time, then make something up the second time around -- even if you haven't entered anything in the field. Sam

I will be launching (beta) a new commercial chat site written using Haskell and AJAX in the next month. The server is written on top of the HAppS library I made available at http://HappS.org. My general pattern for writing an application in this framework is write the server based on a wire-level spec where the server takes in XML/x-www-form-encoded/multipart-form-data and returns XML. Client side XSLT stylesheets then handle conversion of the XML to HTML. Here are the details if you are interested: 1. Write a web service spec as a reference for both client and server development. I use an informal language for this that relies on a mix of the reader understanding HTTP semantics and RelaxNG XML specs. POST /login ? {username {text},password{text},url{URL},captcha(text}} 200 session {attribute userId{text},attribute href {rel-URL}} Some text here describing other details that don't fit into the syntactic model described above. Server is assumed to handle any of application/x-www-form-urlencoded, multipart/form-data, or application/xml. Client is assumed to receive application/xml. Browser is assumed to handle XSL stylesheet PIs. (All conversion from XML to HTML is handled client side or on proxy using XSLT template) 2. Define Server State and state model data State = State {users::UserData} ...definition of user data... startState = State mzero addStateUser state user = .... 3. Define serialization for server state instance Show State where ... instance Read State where --- 4. Define exposed business logic addUser appCtx regInfo = if regGood then actionOk newState [] newUserInfo else qOk badRegInfo ... 5. define required wire formats for types --convert internal data type to XML instance ToElement NewUserInfo where toElement n = ... --convert posted data to internal data type instance FromMessage RegInfo where fromMessage msg = ... 6. define how busines logic maps to URLs ... a POST _ ["u"] = doXML addUser a GET "myapp.com" ("s":path) = fileServe mimeTypes "static" path myApp appCtx = let ?style=XSL "/s/style.xsl" in simpleHTTP a appCtx 7. define the app to execute run path host = do app <- startApp $ simpleConfig path startState confro serve host app return () main = run "appdir" "localhost:80" 8. put client side stuff (including style.xsl) in the "static" directory 9. install searchpath (see http://searchpath.org) 10 run it! $ searchPath ghc -o MyApp --internet http://searchpath.org/default.map src/MyApp.hs $ MyApp HAppS and the chat applications are still works in progress, but I have this running successfully internally already! -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com On Mon, 12 Sep 2005, Sam Mason wrote:
gary ng wrote:
I want to write apps for WEB and have briefly read WASH.
I'm thinking of doing the same. The approach taken by WASH seems very cool and I'd love to use it. I've only started looking at it, but WASH seems to require that JavaScript be enabled on the user's web browser, even for the simplest forms. e.g. from the authors web page:
http://nakalele.informatik.uni-freiburg.de/cgi/WASH/Counter.cgi
Also, the error checking doesn't seem to work as I'd expect: if you submit a page without a required field it will complain the first time, then make something up the second time around -- even if you haven't entered anything in the field.
Sam _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Why not XML-RPC? On Sep 12, 2005, at 9:54 PM, S. Alexander Jacobson wrote:
6. define how busines logic maps to URLs
... a POST _ ["u"] = doXML addUser a GET "myapp.com" ("s":path) = fileServe mimeTypes "static" path
myApp appCtx = let ?style=XSL "/s/style.xsl" in simpleHTTP a appCtx

On Mon, 12 Sep 2005, Joel Reymont wrote:
Why not XML-RPC?
REST is more appropriate for the applications on which I work. See http://webservices.xml.com/pub/a/ws/2002/02/20/rest.html -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
On Sep 12, 2005, at 9:54 PM, S. Alexander Jacobson wrote:
6. define how busines logic maps to URLs
... a POST _ ["u"] = doXML addUser a GET "myapp.com" ("s":path) = fileServe mimeTypes "static" path
myApp appCtx = let ?style=XSL "/s/style.xsl" in simpleHTTP a appCtx

a better example http://www.intertwingly.net/blog/2005/07/22/REST-vs-API On Mon, 12 Sep 2005, S. Alexander Jacobson wrote:
On Mon, 12 Sep 2005, Joel Reymont wrote:
Why not XML-RPC?
REST is more appropriate for the applications on which I work.
See http://webservices.xml.com/pub/a/ws/2002/02/20/rest.html
-Alex-
______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
On Sep 12, 2005, at 9:54 PM, S. Alexander Jacobson wrote:
6. define how busines logic maps to URLs
... a POST _ ["u"] = doXML addUser a GET "myapp.com" ("s":path) = fileServe mimeTypes "static" path
myApp appCtx = let ?style=XSL "/s/style.xsl" in simpleHTTP a appCtx
______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
participants (7)
-
Brian McQueen
-
Dean Herington
-
gary ng
-
Joel Reymont
-
S. Alexander Jacobson
-
Sam Mason
-
Thomas Spriggs