Hi Jake,<div>right, it depends on the identification of the session:</div><div><br></div><div>iAll the tabs share the same state because they share the same cookies. so if in one tab the use continue the interaction then the other tabs are out of sync. If the user goes to these other tabs and press any widget, the application will  synchronize back to this page.</div>

<div><br></div><div><br></div><div>This happens also if the user is logged in different computers.</div><div><br></div><div>Alberto.</div><div><br></div><div><div class="gmail_quote">2012/9/18 Jake McArthur <span dir="ltr">&lt;<a href="mailto:jake.mcarthur@gmail.com" target="_blank">jake.mcarthur@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually, I meant users that spawn multiple tabs from a single root<br>
session. You mentioned that you have some special support for the back<br>
button. What happens if I open a couple new tabs in which I may or may<br>
not go forward and backward. Do they all share the same state?<br>
Different states (how?)? Partially shared states?<br>
<div><div class="h5"><br>
On Tue, Sep 18, 2012 at 12:33 PM, Alberto G. Corona &lt;<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>&gt; wrote:<br>
&gt; Oh,  I´m stupid. You mean web pages with multiple tabs....<br>
&gt;<br>
&gt;  I have not tested it. but each tab can be handled easily by a different<br>
&gt; server process.. or it can be handled in a single server process, like in a<br>
&gt; menu. For example, this code present different options, and the process<br>
&gt; renders different things depending on the response.<br>
&gt;<br>
&gt; The last option is a link to a different process, while the others( wlinks)<br>
&gt; are links that return back to the same process.<br>
&gt; The operator &lt;|&gt; is the applicative operator.  a breakline is prepended to<br>
&gt; each link:<br>
&gt;<br>
&gt; data Ops= Ints | Strings | Actions | Ajax | Opt deriving(Typeable,Read,<br>
&gt; Show)<br>
&gt;<br>
&gt;  mainf=   do<br>
&gt;         r &lt;- ask $   wlink Ints (bold &lt;&lt; &quot;increase an Int&quot;)<br>
&gt;                 &lt;|&gt;  br ++&gt; wlink Strings (bold &lt;&lt; &quot;increase a String&quot;)<br>
&gt;                 &lt;|&gt;  br ++&gt; wlink Actions (bold &lt;&lt; &quot;Example of a string<br>
&gt; widget with an action&quot;)<br>
&gt;                 &lt;|&gt;  br ++&gt; wlink Ajax (bold &lt;&lt; &quot;Simple AJAX example&quot;)<br>
&gt;                 &lt;|&gt;  br ++&gt; wlink Opt (bold &lt;&lt; &quot;select options&quot;)<br>
&gt;                 &lt;++ (br +++ linkShop) -- this is an ordinary XHtml link<br>
&gt;<br>
&gt;         case r of<br>
&gt;           Ints    -&gt;  clickn 0<br>
&gt;           Strings -&gt;  clicks &quot;1&quot;<br>
&gt;           Actions -&gt;  actions 1<br>
&gt;           Ajax    -&gt;  ajaxsample<br>
&gt;           Opt     -&gt;  options<br>
&gt;         mainf<br>
&gt;      where<br>
&gt;      linkShop= toHtml $ hotlink  &quot;shop&quot; &lt;&lt; &quot;shopping&quot;<br>
&gt;<br>
&gt; .<br>
&gt; Alberto<br>
&gt;<br>
&gt; 2012/9/18 Alberto G. Corona &lt;<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;&gt; Hi Jake<br>
&gt;&gt;<br>
&gt;&gt; I don´t know what you mean with multiple tabs. The user management is<br>
&gt;&gt; simple, anonymous clients are identified with  a cookie. if the user<br>
&gt;&gt; is logged (MFlow has widgets for logging-validation) the user is the<br>
&gt;&gt; identifier.<br>
&gt;&gt;<br>
&gt;&gt; The state of a process is associated to the client identifier and to<br>
&gt;&gt; the path invoked in the url requested.<br>
&gt;&gt;<br>
&gt;&gt; I don´t know if this answer your question....<br>
&gt;&gt;<br>
&gt;&gt; Alberto<br>
&gt;&gt;<br>
&gt;&gt; 2012/9/18 Jake McArthur &lt;<a href="mailto:jake.mcarthur@gmail.com">jake.mcarthur@gmail.com</a>&gt;:<br>
&gt;&gt;&gt; This sounds really cool.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; How do you handle users having multiple tabs?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Sep 18, 2012 at 11:26 AM, Alberto G. Corona &lt;<a href="mailto:agocorona@gmail.com">agocorona@gmail.com</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt; Hi haskellers and specially the web developers.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; <a href="http://hackage.haskell.org/package/MFlow-0.1.5.3" target="_blank">http://hackage.haskell.org/package/MFlow-0.1.5.3</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; MFlow is a is a Web framework with some unique, and I mean unique,<br>
&gt;&gt;&gt;&gt; characteristics that I find exciting:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; - It is a Web application server that start and restart on-demand<br>
&gt;&gt;&gt;&gt; stateful web server processes (not request.-response)<br>
&gt;&gt;&gt;&gt;   This means that all the page navigation can be coded in a single<br>
&gt;&gt;&gt;&gt; procedure. This increases readability of the programmer code. I woul<br>
&gt;&gt;&gt;&gt; call it<br>
&gt;&gt;&gt;&gt; a anti-node.js.  Buit usual request-response (stateless) server<br>
&gt;&gt;&gt;&gt; processes are also allowed<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; - When the process is invoqued as result of an URL request, the Web<br>
&gt;&gt;&gt;&gt; app server not only restart the process but also recover its execution<br>
&gt;&gt;&gt;&gt; state. The enclosing Workflow monad provides the thread state<br>
&gt;&gt;&gt;&gt; persistence. There are state timeouts and process timeouts defined by<br>
&gt;&gt;&gt;&gt; the programmer. Processes with no persistent state (transient) are<br>
&gt;&gt;&gt;&gt; possible.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -The user interface is made of widgets. They are  formlets with added<br>
&gt;&gt;&gt;&gt; formatting,   attributes, validations, modifiers and callbacks, that<br>
&gt;&gt;&gt;&gt; are composable, so the pieces are reusable and return type safe<br>
&gt;&gt;&gt;&gt; responses to the calling process. Even the links are part of widgets<br>
&gt;&gt;&gt;&gt; and return back type safe inputs at compile time to the calling server<br>
&gt;&gt;&gt;&gt; process. Tho glue these components, ordinary applicative combinators<br>
&gt;&gt;&gt;&gt; and other extra combinators are used.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; - The widgets and the communication don´t make assumptions about the<br>
&gt;&gt;&gt;&gt; architecture, so it can be adapted to non-web environments. This<br>
&gt;&gt;&gt;&gt; versions has interface for WAI-warp, Hack, Text.XHtml (xhtml) , and<br>
&gt;&gt;&gt;&gt; Haskell Server Pages.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -The widget rendering can be converted to ByteStrings automatically<br>
&gt;&gt;&gt;&gt; with special combinators. A mix of widgets with different formats can<br>
&gt;&gt;&gt;&gt; be combined in the same source file. For example Text.Html and HSP<br>
&gt;&gt;&gt;&gt; (Haskell server pages)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -These widgets can be cached, to avoid widget rendering on every<br>
&gt;&gt;&gt;&gt; interaction.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -To handle the back button, and because the processes are stateful,<br>
&gt;&gt;&gt;&gt; they can run backwards until the response match. This is transparent<br>
&gt;&gt;&gt;&gt; for the programmer, thanks to the embedded FlowM monad.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -All the code is in pure Haskell. No deployment, special scripts,<br>
&gt;&gt;&gt;&gt; formats etc are necessary.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -Besides automatic state persistence, TCache provides transactions and<br>
&gt;&gt;&gt;&gt; user data persistence, that can be configured for SQL databases.<br>
&gt;&gt;&gt;&gt; Default persistence in files permit very rapid prototyping. Just code<br>
&gt;&gt;&gt;&gt; and run it with runghc.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; -Has AJAX support<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; All of this sounds very complicated, but really it is simple!. Most of<br>
&gt;&gt;&gt;&gt; these things are transparent. The resulting code is quite readable and<br>
&gt;&gt;&gt;&gt; has very little plumbing!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; There is a non trivial example that some of these functionalities<br>
&gt;&gt;&gt;&gt; embedded here that you can run:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; <a href="http://hackage.haskell.org/packages/archive/MFlow/0.1.5.3/doc/html/MFlow-Forms.html" target="_blank">http://hackage.haskell.org/packages/archive/MFlow/0.1.5.3/doc/html/MFlow-Forms.html</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Take a look and tell me your opinion.  I hope that you find it as<br>
&gt;&gt;&gt;&gt; exciting as me.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;  I´m looking for people  to collaborate in the development of MFlow.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Although still it is experimental, it is being used in at least one<br>
&gt;&gt;&gt;&gt; future commercial project. So I have te commitment to continue its<br>
&gt;&gt;&gt;&gt; development. There are many examples in the documentation and in the<br>
&gt;&gt;&gt;&gt; package.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Alberto<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; Haskell mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:Haskell@haskell.org">Haskell@haskell.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
</blockquote></div><br></div>