PS. Besides Seaside, Racket is playing with the same ideas. They (Jay McCarthy) have something to say about performance but I didn't quite understand it.Adrian.To me that's a real technological step over and above the usual servlets paradigm and I'd love to see more people getting involved. It seems like Yesod and Happstack have a lot more manpower behind them, but unless I've missed something, MFlow is going somewhere new and should be helped along.Oh how nice!I have been looking at MFlow a lot lately and I think it's got something quite special that Yesod, Happstack, etc don't seem to have, at least, not as far as I know. I mean, look at this:
Is that pretty or what? That's the code for this:sumWidget= pageFlow "sum" $ don1 <- p << "Enter first number" ++> getInt Nothing <** submitButton "enter" <++ brn2 <- p << "Enter second number" ++> getInt Nothing <** submitButton "enter" <++ brn3 <- p << "Enter third number" ++> getInt Nothing <** submitButton "enter" <++ brp << ("The result is: "++show (n1 + n2 + n3)) ++> wlink () << b << " menu"<++ p << "you can change the numbers in the boxes to see how the result changes"
http://mflowdemo.herokuapp.com/noscript/fviewmonad
On 10 July 2013 06:41, Alberto G. Corona <agocorona@gmail.com> wrote:_______________________________________________The third version of MFlow is out.MFlow is an all-heterodox web application framework, but very haskellish.Now MFlow support restful URLs. It is the first stateful web framework to my knowledge that supports it. The type safe routes are implicitly expressed as normal monadic code within a navigation monad. The application look as a normal imperative console application, but the navigation monad goes back and forth to match the path of the URL. The user has control of the state, that can roll-back or not when the navigation goes back depending on the application needs. The state is in the form of normal Haskell variables In a monadic computation, with the weird addition of backtracking.The menu of the application below is implemented as an imperative-like syntax, but the application navigate forward and backward to synchronize with the requests of the web browser:This version support in-page flows.What is that? look at this example:These flows are implemented as formlets with a monad instance, and callbacks which change the look. I call them "widgets":Each page may have many of these active widgets, each one running their own flow. These widgets refresh themselves trough Ajax if they are enclosed in the primitive "autoRefresh". If there is no Ajax or JavaScript available, they gracefully degrade by refreshing the entire page:The page flows and the multiflow idea was inspired in Seaside, a great Smalltalk web framework and adapted to the pure recursive nature of Haskell and the formlets.It also support some JQuery widgets integrated: modal and not modal dialogs, datePicker and other active widgets that handle other widgets.It also support the older features: persistent state, WAI, blaze-html and others integration, server process timeouts, Ajax, requirements,content management, caching of widget rendering and all the other previous stuff.I wish to thank some people for their feedback. Specially Adrian May for his feedback and interest
--
Alberto.
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe