name: MFlow version: 0.4.5.3 cabal-version: >=1.8 build-type: Simple license: BSD3 license-file: LICENSE maintainer: agocorona@gmail.com stability: experimental bug-reports: https://github.com/agocorona/MFlow/issues synopsis: stateful, RESTful web framework description: MFlow is a Web Framework that turns Web programing back into just ordinary programming by automating all the extra complexities. . The goals of MFlow are: . -To invert back the inversion of control of web applications and turn web programming into ordinary, intuitive, imperative-like, programming as seen by the programmer. . -At the same time, to maintain, for the user, all the freedom that it has in web applications. -For scalability-sensitive applications, to avoid the fat state snapshots that continuation based frameworks need to cope with these two previous requirements. State replication and Horizontal scalability must be possible. . -For REST advocates, to maintain the elegant notation of REST urls and the statelessness of GET requests. . -For expert haskell programmers, to reuse the already existent web libraries and techniques. . -For beginner programmers and for Software Enginners, to provide with a high level DSL of reusable, self contained widgets for the user interface, and multipage procedures that can work together provided that they statically typecheck, with zero configuration. . -For highly interactive applications, to give dynamic widgets that have their own dynamic behaviors in the page, and communicate themselves without the need of explicit JavaScript programming. . -No deployment, in order to speed up the development process. see . MFlow try to solve the first requirements using a different approach. The routes are expressed as normal, monadic haskell code in the FlowM monad. Local links point to alternative routes within this monadic computation just like a textual menu in a console application. Any GET page is directly reachable by means of a RESTful URL. . At any moment the flow can respond to the back button or to any RESTful path that the user may paste in the navigation bar. If the procedure is waiting for another different page, the FlowM monad backtrack until the path partially match. From this position on, the execution goes forward until the rest of the path match. Thus, no matter the previous state of the server process, it recover the state of execution appropriate for the request. This way the server process is virtually stateless for any GET request. However, it is possible to store a session state, which may backtrack or not when the navigation goes back and forth. It is up to the programmer. Synchronization between server state and web browser state is supported out-of-the-box. . When the state matters, and user interactions can last for long, such are shopping carts etc. It uses a log for thread state persistence. The server process shut itself down after a programmer defined timeout. Once a new request of the same user arrive, the log is used to recover the process state. There is no need to store a snapshot of every continuation, just the result of each step. . State consistence and transactions are given by the TCache package. It is data cache within the STM monad (Software Transactional Memory). Serialization and deserialization of data is programmer defined, so it can adapt it to any database, although any other database interface can be used. Default persistence in files comes out of the box for rapid development purposes. . The processes interact trough widgets, that are an extension of formlets with additional applicative combinators , formatting, link management, callbacks, modifiers, caching and AJAX. All is coded in pure haskell. Each widget return statically typed data. They can dynamically modify themselves using AJAX internally (ust prefix it with autorefresh). They are auto-contained: they may include their own JavaScript code, server code and client code in a single pure Haskell procedure that can be combined with other widgets with no other configuration. . To combine widgets, applicative combinators are used. Widgets with dynamic behaviours can use the monadic syntax and callbacks. . The interfaces and communications are abstract, but there are bindings for blaze-html, HSP, Text.XHtml and byteString, Hack and WAI but it can be extended to non Web based architectures. . Bindings for hack, and hsp >= 0.8, are not compiled by Hackage, and do not appear, but are included in the package files. To use them, add then to the exported modules and execute cabal install . NOTE: compatibility with GHC 7.8: you will have compilation errors related with Typeable. Follow the instruction in the open issues in the git repository. . The version 0.4.5 composable HTTP caching, lazy load, caching datasets in the browser HTTP cache . The version 0.4.0 add encrypted cookies, secure sessions, add REST web services, fixes UTF8 errors, pageFlow fixes, add onBacktrack, compensate . Thes version 0.3.3 run with wai 2.0 . The version 0.3.2 add runtime templates. It also add witerate and dField, two modifiers for single page development. dField creates a placeholder for a widget that is updated via implicit AJAX by witerate. http://haskell-web.blogspot.com.es/2013/11/more-composable-elements-for-single.html . The version 0.3.1 included: . - Push widgets: 'http://haskell-web.blogspot.com.es/2013/07/maxwell-smart-push-counter.html' . - Complete execution traces for errors: 'http://haskell-web.blogspot.com.es/2013/07/automatic-error-trace-generation-in.html' . The version 0.3 added: - RESTful URLs: 'http://haskell-web.blogspot.com.es/2013/07/the-web-navigation-monad.html' . - Automatic independent refreshing of widgets via Ajax. (see 'http://haskell-web.blogspot.com.es/2013/06/and-finally-widget-auto-refreshing.html') . - Page flows: Monadic widgets that can express his own behaviour and can run its own independent page flow. (see http://haskell-web.blogspot.com.es/2013/06/the-promising-land-of-monadic-formlets.html) . - Widget callbacks, used in page flows, that change the rendering of the widget (see http://haskell-web.blogspot.com.es/2013/06/callbacks-in-mflow.html) . - Widgets in modal and non modal dialogs (using jQuery dialog) . - Other jQuery widgets as MFlow widgets . The version 0.2 added better WAI integration, higher level dynamic Widgets, content management, multilanguage, blaze-html support, stateful ajax for server-side control, user-defined data in sessions and widget requirements for automatic installation of scripts, CSS and server flows. . The version 0.1 had transparent back button management, cached widgets, callbacks, modifiers, heterogeneous formatting, AJAX, and WAI integration. . . See "MFlow.Forms" for details . To do: . -Clustering . category: Web, Application Server author: Alberto Gómez Corona data-dir: "" extra-source-files: src/MFlow/Hack.hs src/MFlow/Hack/Response.hs src/MFlow/Hack/XHtml.hs src/MFlow/Hack/XHtml/All.hs src/MFlow/Forms/HSP.hs src/MFlow/Forms/XHtml.hs src/MFlow/Wai/XHtml/All.hs source-repository head type: git location: http://github.com/agocorona/MFlow library build-depends: Workflow , transformers , mtl , extensible-exceptions , base >4.0 && <5, bytestring , containers , RefSerialize , TCache , stm >2, time, old-time , vector , directory , utf8-string , wai , case-insensitive , http-types , conduit ,conduit-extra, text , parsec , warp , warp-tls , random , blaze-html , blaze-markup , monadloc, clientsession exposed-modules: MFlow MFlow.Wai.Blaze.Html.All MFlow.Forms MFlow.Forms.Admin MFlow.Cookies MFlow.Wai MFlow.Forms.Blaze.Html MFlow.Forms.Test MFlow.Forms.Widgets MFlow.Forms.Internals MFlow.Forms.WebApi MFlow.Forms.Cache exposed: True buildable: True hs-source-dirs: src . other-modules: MFlow.Wai.Response --executable demos-blaze -- build-depends: MFlow , RefSerialize , TCache , -- tcache-AWS , directory , Workflow , base , -- blaze-html , bytestring , containers , mtl , -- old-time , stm , text , transformers , vector , -- hamlet , shakespeare, monadloc , aws , network , hscolour , -- persistent-template , persistent-sqlite , persistent , -- conduit , http-conduit , monad-logger , safecopy , -- time, monadloc-pp -- main-is: demos-blaze.hs -- buildable: True -- hs-source-dirs: Demos -- other-modules: TestREST ShopCart AjaxSample TraceSample IncreaseString IncreaseInt -- AutoCompList ListEdit AutoComplete Menu RuntimeTemplates -- LoginSample CheckBoxes Multicounter MFlowPersistent -- Combination Options ContentManagement Database -- PreventGoingBack Counter MCounter PushDecrease -- Dialog PushSample Grid Radio Actions -- SumView AcidState SearchCart -- InitialConfig GenerateForm GenerateFormUndo GenerateFormUndoMsg WebService -- LazyLoad -- ghc-options: -iDemos -threaded -rtsopts --