packages feed

MFlow 0.0.5.1 → 0.0.5.2

raw patch · 3 files changed

+24/−23 lines, 3 files

Files

MFlow.cabal view
@@ -1,5 +1,5 @@ name: MFlow-version: 0.0.5.1+version: 0.0.5.2 cabal-version: >= 1.6 build-type: Simple license: BSD3
src/MFlow/FileServer.hs view
@@ -1,4 +1,4 @@-{- | An file server for frequently accessed files, such are static web pages and image decorations, icons etc+{- | A file server for frequently accessed files, such are static web pages and image decorations, icons etc that are cached (memoized) in the program space, for enhanced performance. It uses 'Data.TCache.Memoization'. The caching-uncaching follows the `setPersist` criteria.@@ -40,7 +40,7 @@  rfilesPath= unsafePerformIO $ newIORef "files/" --- | Set the path of the files in the web server. the links to files are relative to it+-- | Set the path of the files in the web server. The links to the files are relative to it setFilesPath :: String -> IO () setFilesPath path= writeIORef rfilesPath path 
src/MFlow/Forms.hs view
@@ -14,8 +14,8 @@              -XOverloadedStrings
 #-}
 
-{- | This module implement  stateful processes (flows) that are optionally persistent,-that is they may store and retrieve his execution state. They are executed by the MFlow app server.+{- | This module implement  stateful processes (flows) that are optionally persistent.+This means that they automatically store and recover his execution state. They are executed by the MFlow app server. defined in the "MFlow" module.  These processses interact with the user trough user interfaces made of widgets (see below) that return back statically typed responses to@@ -27,26 +27,26 @@ instantiation for "Text.XHtml"  import "MFlow.Forms.XHtml", "MFlow.Hack.XHtml.All"  or "MFlow.Wai.XHtml.All" . To use Haskell Server Pages import "MFlow.Forms.HSP". However the functionalities are documented here. -`ask` is the only method for user interaction it runs in the @MFlow view m@ monad, with m the one chosen by the user, usually IO.+`ask` is the only method for user interaction. It run in the @MFlow view m@ monad, with @m@ the monad chosen by the user, usually IO. It send user interfaces (in the @View view m@ monad) and return statically
 typed responses. The user interface definitions are  based on a extension of formLets (<http://www.haskell.org/haskellwiki/Formlets>) with the addition of caching, links, formatting, attributes,  extra combinators, callbaks and modifiers. The interaction with the user is  stateful. In the same computation there may be  many-request-response interactions, in the same way that in a console applications. 
+request-response interactions, in the same way than in the case of a console applications. 
  * APPLICATION SERVER  Therefore, session and state management is simple and transparent: it is in the haskell structures in the scope of the computation. `transient` (normal) procedures have no persistent session state-and `stateless` procedures accept a single request and return the response.+and `stateless` procedures accept a single request and return a single response. -However `MFlow.Forms.step` is a lifting monad transformer that permit persistent server procedures that+`MFlow.Forms.step` is a lifting monad transformer that permit persistent server procedures that remember the execution state even after system shutdowns by using the package workflow (<http://hackage.haskell.org/package/Workflow>) internally.-This is transparent. There is no programmer interface for session management.+This state management is transparent. There is no programer interface for session management. -The programmer set the process timeout and the session timeout with `setTimeouts`
-whether the procedure has been stopped due to the process timeout or due to a system shutdowm,+The programmer set the process timeout and the session timeout with `setTimeouts`.
+If the procedure has been stopped due to the process timeout or due to a system shutdowm, the procedure restart in the last state when a request for this procedure arrives (if the procedure uses the `step` monad transformer) @@ -61,11 +61,12 @@ There are instances for Text.XHtml ("MFlow.Forms.XHtml"), Haskell Server Pages ("MFlow.Forms.HSP") and ByteString. So widgets can use any formatting that is instance of FormInput.-It is possible to use more than one in the same widget.+It is possible to use more than one format in the same widget. -Links defined with `wlink` are treated the same way than forms. They are type safe and return to the same flow of execution.-It is posssible to combine links and forms in the same widget with applicative combinators  but also-additional applicative combinators like `<+>` `!*>` , `|*|`.+Links defined with `wlink` are treated the same way than forms. They are type safe and return values+ to the same flow of execution.+It is posssible to combine links and forms in the same widget by using applicative combinators  but also+additional applicative combinators like  \<+> !*> , |*|.  * NEW IN THIS RELEASE: @@ -79,9 +80,9 @@ [@Callbacks@] `waction` add a callback to a widget. It is executed when its input is validated. The callback may initate a flow of interactions with the user or simply execute an internal computation. Callbacks are necessary for the creation of abstract container-widgets that may not know the behaviour of its content. The widget manages himself as a black box+widgets that may not know the behaviour of its content. The widget manages its content as  black boxes. -[@Modifiers@] `wmodify` add a modifier of the visualization and result returned by the widget. For example it may hide a+[@Modifiers@] `wmodify` change the visualization and result returned by the widget. For example it may hide a login form and substitute it by the username if already logged.  Example:@@ -101,15 +102,15 @@              \<*  submitButton "register" @ -[@ByteString normalization and hetereogeneous formatting@] for caching widget rendering at the ByteString level, and to permit many formatring styles+[@ByteString normalization and hetereogeneous formatting@] For caching widget rendering at the ByteString level, and to permit many formatring styles in the same page, there are new operators that combine different renderings which are converted to ByteStrings.-For example the header and footer may be created in XML, and the formlets may be formatted using Text.XHtml.+For example the header and footer may be coded in XML, while the formlets may be formatted using Text.XHtml. -[@AJAX@] see "MFlow.Forms.Ajax"+[@AJAX@] See "MFlow.Forms.Ajax" -[@File Server@] see "MFlow.FileServer"+[@File Server@] With file caching. See "MFlow.FileServer" -This is a complete example runnable with runghc, which show some of these features:+This is a complete example, that can be run with runghc, which show some of these features:  > {-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-} > module Main where