ANNOUNCE MFlow-0.0.3 an Application Server for stateful web apps with statically typed widget combinators

Hi Haskellers I I´m happy to announce the first version of MFlow http://hackage.haskell.org/package/MFlow MFlow permits the execution of web applications in a procedural form, that is, with multiple requests-response interactions in a single procedure. MFlow stores the execution state, manage timeouts, shutdown and restart the procedure on demand at the point of execution, even after server stop. These services are transparent for the programmer. The other aspect of MFlow are combinators for the definition of widgets and formlets that can be mixed freely with HTML formatting and produce statically typed values using the "traditional" formlet/applicative approach. There are bindings for the package XHtml, so no need to learn new paradigms/scripting/formatting.. Console and window oriented apps are possible. Out of te box serialization in files permits very rapid prototyping, but any backend can be used . MFlow (MessageFlow) was created initially as the user interface for the Workflow package . Currently is an alpha version. It has only basic authentication but I plan to inprove it for serious applications. I upload this version just in case anyone wants to play with it.

Here you can take a look at a complete example included in the package:
http://haskell-web.blogspot.com/2012/02/web-application-server-with-stateful...
This snippet is the web page in declarative form:
shopProds :: V.Vector Int -> [Prod]
-> View Html IO (Either Int Prod)shopProds cart products=
br
<++ -- add Html to the first widget
p << "-----Shopping List-----"
<++
widget(Selection{
stitle = bold << "choose an item",
sheader= [ bold << "item" , bold << "price", bold << "times chosen"],
sbody= [([toHtml pname, toHtml $ show pprice, toHtml $ show $
cart V.! i],i )
| (Prod{..},i ) <- zip products [1..]]})
<+> -- operator to mix two wdigets
br
<++ -- add Html to the second widget
p << "---Add a new product---"
<++
table <<< -- <<< encloses a widget in HTML tags
(tr <<< td ! [valign "top"]
<<< widget (Form (Nothing :: Maybe Prod) )
++> -- append Html after the widget
tr << td ! [align "center"]
<< hotlink "hello"
(bold << "Hello World"))
2012/2/7 Alberto G. Corona
Hi Haskellers
I I´m happy to announce the first version of MFlow
http://hackage.haskell.org/package/MFlow
MFlow permits the execution of web applications in a procedural form, that is, with multiple requests-response interactions in a single procedure. MFlow stores the execution state, manage timeouts, shutdown and restart the procedure on demand at the point of execution, even after server stop. These services are transparent for the programmer.
The other aspect of MFlow are combinators for the definition of widgets and formlets that can be mixed freely with HTML formatting and produce statically typed values using the "traditional" formlet/applicative approach. There are bindings for the package XHtml, so no need to learn new paradigms/scripting/formatting..
Console and window oriented apps are possible.
Out of te box serialization in files permits very rapid prototyping, but any backend can be used .
MFlow (MessageFlow) was created initially as the user interface for the Workflow package . Currently is an alpha version. It has only basic authentication but I plan to inprove it for serious applications. I upload this version just in case anyone wants to play with it.
participants (1)
-
Alberto G. Corona