New RIFERS blogs entries from Geert Bevin in category rifehttp://rifers.org/blogs
The feeds of the Rifers community blogsenCopyright of the content contained is attributed to the original authorsFri, 18 Aug 2017 06:43:30 +0200Rifers Blogs: https://rifers.org/blogsReviving RIFE, starting work on version 2http://rifers.org/blogs/gbevin/2013/6/23/reviving_rife_starting_version2
<p>Hi everyone, </p>
<p>I'm not sure at all who's still active in the server-side web development world, but it seemed best to reach out through the old channels in case some people are interested in reviving RIFE. </p>
<p>I've personally been busy with a lot of other projects during the last 7 years, ranging for high-performance clustered data tools to real-time musical instruments. </p>
<p>I'm now working at ZeroTurnaround on the LiveRebel product and am being confronted with the state of web development nowadays. To my surprise, in many ways the approaches in RIFE are still relevant and even the Play framework is lacking quite a lot of RIFE's simplicity and power. </p>
<p>So, a few months ago I started work to analyze what I want to keep from RIFE version 1 to build a fresh version 2: <a href="https://github.com/gbevin/rife">https://github.com/gbevin/rife</a>. I took a little break to work on another quick pet-project in the meantime (<a href="http://uwyn.com/geco">http://uwyn.com/geco</a>) but that's now all ready for launch. </p>
<p>The idea is to basically put a lot of things in question about RIFE and trim it down, throw away a lot of the junk that was accumulated and make the features very opinionated and targeted. </p>
<p>My initial plan of action is this: </p>
<ul>
<li>focus on pure Java and byte-code instrumentation, no scripting languages </li>
<li>leverage the upcoming features of Java 8 </li>
<li>rebuild the template engine with largely the same ideas in place, but clearer and more focused </li>
<li>properly finish the isolation of the continuations engine and bring it up to date </li>
<li>rethink the infrastructure with IoC as a starting point, instead of having it as an afterthought </li>
<li>totally rewrite the web engine, with similar principles but much more conventions and less configuration </li>
<li>trim out the database abstraction layer for only certain relevant databases </li>
</ul>
<p>I've started mocking up the new version of the template engine and took an initial stab at creating an Antlr 4 grammar. That sadly is really not working out so I've started work on a new custom parser. </p>
<p>One of my mistakes with RIFE v1 was that I didn't involve the community much during the development process, so I want to change that. </p>
<p>If you're interested in shaping what RIFE version 2 is going to become, please hop on the developers mailing list and say hi: <a href="https://groups.google.com/forum/#!forum/rife-dev">https://groups.google.com/forum/#!forum/rife-dev</a> </p>
<p>Hope to hear from some of you! </p>Sun, 23 Jun 2013 21:32:38 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2013/6/23/reviving_rife_starting_version2Gotcha: using RIFE's bean-centric validation with Terracotta (or any entity container/cache)http://rifers.org/blogs/gbevin/2008/7/16/gotcha_rife_terracotta_validatio
<p>RIFE has a unique approach towards validation which is centralized around bean instances and not bean classes.</p>
<p>Instead of having an external validation service, each bean instance publishes meta data about its constraints. Every part of the system (validation, form generation, database structure creation, ...) will inspect the meta data and peruse it. Validation is an exception in that after inspecting the meta data, the results of the validation are contributed back for each specific bean instance as <code>ValidationError</code>s. This again allows every part of the system to easily access the validation results and act accordingly.</p>
<p>Instead of implementing a container that keeps track of all the mappings between bean instances, their meta data and the validation errors, I decided that each bean instance will actually hold this data into fields. However, since people generally dont want to pollute their bean classes with framework-specific constructs, I created the <a href="http://rifers.org/wiki/display/RIFE/Meta+data+merging">meta-data merging facility</a>. This automatically looks for a class with the <code>MetaData</code> suffix when a bean class is loaded. Through byte code instrumentation, the capabilities of the <code>MetaData</code> class are merged into the original class and you can safely cast each instance of the original class to any of the interfaces that the <code>MetaData</code> class implements. (you can find more details about this feature in the <a href="http://rifers.org/wiki/display/RIFE/Meta+data+merging">RIFE wiki</a>)</p>
<p>All this is very intuitive when you use it in practice and develop a database-backed website. RIFE's database layer doesn't use an entity container either but rather creates and populates new bean instances each time an entity is fetched from the database. This has the benefit of each thread having a dedicated version of the entity which can be manipulated without risking data races. Only when all the operations are finished, the entity is stored back into the database through an explicit save call.</p>
<p>The code could be like this when editing an existing <code>User</code> entity:</p>
<div class="paste">
<div><code>
<span class="java_type">User</span><span class="java_plain">&nbsp;user&nbsp;</span><span class="java_operator">=</span><span class="java_plain">&nbsp;database</span><span class="java_separator">.</span><span class="java_plain">restore</span><span class="java_separator">(</span><span class="java_plain">userId</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">fillSubmissionBean</span><span class="java_separator">(</span><span class="java_plain">user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_keyword">if</span><span class="java_plain">&nbsp;</span><span class="java_separator">(((</span><span class="java_type">Validated</span><span class="java_separator">)</span><span class="java_plain">user</span><span class="java_separator">).</span><span class="java_plain">validate</span><span class="java_separator">())</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;database</span><span class="java_separator">.</span><span class="java_plain">save</span><span class="java_separator">(</span><span class="java_plain">user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;template</span><span class="java_separator">.</span><span class="java_plain">setBlock</span><span class="java_separator">(</span><span class="java_literal">"content"</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">"success"</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain">&nbsp;</span><span class="java_keyword">else</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;generateForm</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">,</span><span class="java_plain">&nbsp;user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">print</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
</div>
<p>However, when using Terracotta (or something else, like a cache), you typically don't want every entity to go back to the database. Instead, you want to keep them in memory and only store certain parts into the database. So instead of having a database manager, you have some kind of in-memory service that is able to find and store entities.</p>
<p>Intuitively and naively you would replace the code above with the following <span style="color: red; font-weight: bold;">broken code</span>:</p>
<div class="paste" style="border: 1px solid red">
<div><code><span style="background-color: rgb(255,200,200); color: red; font-weight: bold;">// this code is broken, read below to know why</span></code></div>
<div style="background-color: rgb(255,200,200);"><code>
<span class="java_type">User</span><span class="java_plain">&nbsp;user&nbsp;</span><span class="java_operator">=</span><span class="java_plain">&nbsp;service</span><span class="java_separator">.</span><span class="java_plain">findById</span><span class="java_separator">(</span><span class="java_plain">userId</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div style="background-color: rgb(255,200,200);"><code>
<span class="java_plain">fillSubmissionBean</span><span class="java_separator">(</span><span class="java_plain">user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_keyword">if</span><span class="java_plain">&nbsp;</span><span class="java_separator">(((</span><span class="java_type">Validated</span><span class="java_separator">)</span><span class="java_plain">user</span><span class="java_separator">).</span><span class="java_plain">validate</span><span class="java_separator">())</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div style="background-color: rgb(255,200,200);"><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;service</span><span class="java_separator">.</span><span class="java_plain">store</span><span class="java_separator">(</span><span class="java_plain">user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;template</span><span class="java_separator">.</span><span class="java_plain">setBlock</span><span class="java_separator">(</span><span class="java_literal">"content"</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">"success"</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain">&nbsp;</span><span class="java_keyword">else</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;generateForm</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">,</span><span class="java_plain">&nbsp;user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">print</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
</div>
<p>The problem relies in the fact that each and every thread will be working with the same instance of the <code>User</code>. Your initial reaction might be to just synchronize the accesses to this instance, but hang on, think about what's happening. You actually <b>don't want</b> every thread to have the same instance. You want the instances to be different and isolated, they all have to contain the data that was submitted through their respective web forms, and you all want them to have their own validation errors. This is <b>exactly the same</b> as what happens when you get a new instance from the database.</p>
<p>So, instead of retrieving the user from the service to modify it with possibly invalid data, you want to create a new instance of the entity that will be in local scope until the validation has succeeded. Only then you want to store it back into the service. This guarantees that your data is always correct and also allows perfectly concurrent access on users with the same identifier.</p>
<p>The correct code would thus be:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_type">User</span><span class="java_plain">&nbsp;user&nbsp;</span><span class="java_operator">=</span><span class="java_plain">&nbsp;getSubmissionBean</span><span class="java_separator">(</span><span class="java_type">User</span><span class="java_separator">.</span><span class="java_keyword">class</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">user</span><span class="java_separator">.</span><span class="java_plain">setId</span><span class="java_separator">(</span><span class="java_plain">userId</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_keyword">if</span><span class="java_plain">&nbsp;</span><span class="java_separator">(((</span><span class="java_type">Validated</span><span class="java_separator">)</span><span class="java_plain">user</span><span class="java_separator">).</span><span class="java_plain">validate</span><span class="java_separator">())</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;service</span><span class="java_separator">.</span><span class="java_plain">store</span><span class="java_separator">(</span><span class="java_plain">user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;template</span><span class="java_separator">.</span><span class="java_plain">setBlock</span><span class="java_separator">(</span><span class="java_literal">"content"</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">"success"</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain">&nbsp;</span><span class="java_keyword">else</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;generateForm</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">,</span><span class="java_plain">&nbsp;user</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">print</span><span class="java_separator">(</span><span class="java_plain">template</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
</div>
<p>This had me scratching my head when I was bitten by the broken code above. However, if you think about it, it's perfectly logical. Working with in-memory containers is fundamentally different from working with relational database, where your data is stored independently from the actual objects that you're using. You have to remember that an in-memory container is a store too, and you don't want invalid or intermediate results to end up in there. However, this is what you risk to happen when you directly manipulate the fields of the instances that are already in the in-memory container ... but it's oh so tempting to do!</p>Wed, 16 Jul 2008 09:37:30 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/16/gotcha_rife_terracotta_validatioCustom constraints and validation in RIFEhttp://rifers.org/blogs/gbevin/2008/1/29/custom_constraints_validation
<p>Joshua Hansen wrote a nice example of how to create custom meta data constraints and display dedicated validation error messages with RIFE. He also shows how easy it is to make RIFE/Crud display your validation errors for beans that use your custom constraints.</p>
<p><a href="http://rifers.org/wiki/display/RIFE/Custom+constraints+and+validation+cheatsheet">Read the article in the RIFE wiki.</a></p>Tue, 29 Jan 2008 17:52:51 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2008/1/29/custom_constraints_validationRIFE BOF tonight at QCon conference in San-Franciscohttp://rifers.org/blogs/gbevin/2007/11/8/rife_bof_tonight_at_qcon
In case you want to learn more about RIFE, ask questions, chat a bit about what you've done, share experiences, etc., feel free to come the the BOF tonight that I'm organizing during the QCon conference in San Francisco. You can find all the details here:<br />
<br />
<a href="http://qcon.infoq.com/sanfrancisco/conference/" target="_blank">http://qcon.infoq.com/sanfrancisco/conference/</a><br />
<br />
The address is:<br />
Westin San Francisco Market Street<br />
50 Third Street<br />
San Francisco<br />
California 94103<br />
<br />
The BOF will be from 8:30pm - 9:30pm in the 'City' room.<br />
<br />
We are also organizing a Terracotta BOF right before it, so if you're interested in that, you can come from 7:30pm - 8:30pm to the 'Stanford' room.<br />
<br />
See you there!Thu, 08 Nov 2007 22:40:24 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2007/11/8/rife_bof_tonight_at_qconSpeaking at NFJS Europe : "Cutting-edge productivity with RIFE and Web Continuations"http://rifers.org/blogs/gbevin/2007/8/9/nfjs_europe_rife
<script language="JavaScript" type="text/javascript">
<!--
document.write('<div style="float: right; width: 125px; margin-left: 10px; margin-bottom: 10px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="125" height="125"><param name="movie" value="http://nfjs-exchange.com/images/banners/125x125_nfjs-rif660_offer_wii.swf" /><param name="quality" value="high" /><embed src="http://nfjs-exchange.com/images/banners/125x125_nfjs-rif660_offer_wii.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="125" height="125"></embed></object></div>');
//-->
</script>
<p>I'm speaking at NFJS in London at the end of this month about <a href="http://rifers.org">RIFE</a> and <a href="http://terracotta.org">Terracotta</a>. You can find the abstract of my session quoted below. The <a href="http://www.nofluffjuststuff.com/show_agenda.jsp?showId=93">schedule looks very interesting</a> and I'm excited that NFJS is finally taking place in Europe too.</p>
<p>If you're interested in going, you might want to click on the banner to the right or to use the promotion code <b>NFJS-RIF660</b>. This will give you a free Nintendo Wii with your registration (woohooo, I love my Wii!).</p>
<p>See you at NFJS Europe.</p>
<p><i>I also have <a href="http://rifers.org/blogs/gbevin/2007/8/9/nfjs_europe_terracotta">another session about Terracotta</a> in the real-world.</i></p>
<blockquote style="border: 1px gray solid; text-color: #333333; padding: 1em;">
<div style="margin: 0 0.5em;">
<p><b>Cutting-edge productivity with RIFE and Web Continuations</b></p>
<p>RIFE is a full-stack, open-source Java web application framework, offering fast results with the promise of maintainability and code clarity. This session will review the novel ideas in Java web application development that RIFE has introduced to the development community.</p>
<p>Through a real-world demonstration of the development process with RIFE, learn how RIFE makes developing easier with features such as: instant reloads and centralized declarations, meta programming through constraints and meta data merging, run-time POJO-driven CRUD generation, bi-directional logic-less templates, automatic context-aware components, and the integration of a content management framework. </p>
<p>The second part will focus on state management, which has always been a complex and tricky part of web application development. Native Java web continuations simplify this and automatically allow you to create a one-to-one conversation between users and a web application. State preservation and flow control no longer need to be handled manually, bringing you back to the simplicity of single user console applications. Remember 'scanf()'? </p>
<p>Continuations will be introduced from general principles, followed by practical examples that explain how they benefit web application development and their frequent usage patterns. Finally, automatic and non-intrusive fail-over and scalability will be demonstrated through the integration with Terracotta.</p>
</div>
</blockquote>Thu, 09 Aug 2007 20:46:53 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/8/9/nfjs_europe_rifeArtima article : Distributed Web Continuations with RIFE and Terracottahttp://rifers.org/blogs/gbevin/2007/8/8/distributed_continuations_terrac
<p><a href="http://www.artima.com/lejava/articles/distributed_continuations.html">In this article</a>, Jonas Bon&eacute;r and me discuss how the RIFE Web framework helps you become productive and efficient in building conversational Web applications. Productivity with RIFE is in large part due to RIFE's unique approach to Web development&mdash;its use of continuations for conversational logic, and complete integration of meta-programming to minimize boilerplate code.</p>
<p>We also introduce you to Terracotta and it's JVM-level clustering technology, and show you how Terracotta and RIFE can work together to create an application stack that allows you to scale out and ensure high-availability for your applications, but without sacrificing simplicity and productivity. This means working with POJOs, and minimal boilerplate and infrastructure code.</p>
<p>You can read it at <a href="http://www.artima.com/lejava/articles/distributed_continuations.html">Artima</a>.</p>Wed, 08 Aug 2007 20:23:11 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/8/8/distributed_continuations_terracFrank Sommers : What Do You Look For in a Template Engine?http://rifers.org/blogs/gbevin/2007/7/21/artima_template_engine_discuss
<p>Frank Sommers of Artima has <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=210724">started a discussion about template engines</a> and asks what you find important in them.</p>
<p>Template engines seem to be one of the most stagnant technologies in Java, many adopt the design that mixes content and logic but implement it differently (PHP, JSP, Velocity, Freemarker, ...). It's a good thing that Terrence Parr (of ANTLR fame) created <a href="http://www.stringtemplate.org/">StringTemplate</a> which seems to move in a similar direction as what we've been doing with our template engine in RIFE. He acknowledges the push model that injects values and text into a template instance instead of pulling them in with an expression language. While I prefer <a href="http://rifers.org/wiki/display/RIFE/Templates">our approach</a> where there really is no logic in the template at all, I really appreciates what Terrence says in his docs:</p>
<div class="quotebody">
<p>Language theory supports my premise that even a minimal StringTemplate engine with only these features is very powerful--such an engine can generate the context-free languages (see Enforcing Strict Model-View Separation in Template Engines); e.g., most programming languages are context-free as are any XML pages whose form can be expressed with a DTD.</p>
</div>
<p>This goes back to a less-is-more philosophy where you build what is needed to comfortably use a technology in trivial and advanced situations, and nothing more. RIFE's template engine does the same. Instead of including a whole collection of additional features, we rely on you making a mental shift to adapt your development habits towards the new capabilities and characteristics of our template engine. In my case its not language theory, but rather lots of very complex HTML layouts and other uses of our template engine that gets me to say that our template engine is powerful enough to allow you to comfortably build anything you want, without compromising on context separation and reusability.</p>
<p>Have you ever tried out another template engine besides the classic pull model in anger? What did you think of it?</p>Sat, 21 Jul 2007 10:41:29 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/7/21/artima_template_engine_discussRIFE 1.6.1 releasedhttp://rifers.org/blogs/gbevin/2007/7/14/rife_1_6_1_released
<p>There are no new features since <a href="http://rifers.org/blogs/gbevin/2007/7/2/rife_1_6_released">release 1.6</a>, this is a bugfix release.</p>
<p><b>Everyone using continuations is urged to upgrade to 1.6.1</b> due to performance regressions that crept into the previous release.</p>
<p>You can read the <a href="http://svn.rifers.org/rife/tags/release-1.6.1/ChangeLog">full changelog</a> for more
details.</p>
<p>This release can be downloaded from the <a href="http://rifers.org/downloads">downloads section</a>, as usual.</p>
Sat, 14 Jul 2007 23:40:41 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/7/14/rife_1_6_1_releasedRIFE 1.6 releasedhttp://rifers.org/blogs/gbevin/2007/7/2/rife_1_6_released
<p>Below are the highlights:</p>
<ul>
<li>Isolated continuations package with <a href="http://rifers.org/docs/api/com/uwyn/rife/continuations/package-summary.html">proper public API</a> and <a href="http://rifers.org/downloads/#rifecontinuations">separately downloadable jars</a> </li>
<li>Byte-code instrumentation agent that can replace the classloader</li>
<li>Integration with <a href="http://www.terracotta.org">Terracotta</a> for continuations fail-over and scalability</li>
<li>ManyToOne and ManyToMany relationships in the GenericQueryManager with lazy-loading</li>
<li>Refactored authentication package for optimal pluggability</li>
<li>New template tags BA and C</li>
<li>Template tag syntaxes don't require quotes anymore</li>
<li>MVEL as blockvalue scripting language</li>
<li>JRuby support for implementing elements</li>
<li>Support for the H2 database</li>
<li>Support for Java 5.0 enum types</li>
<li>ReadQueryString and ReadQueryTemplate query builders</li>
<li>EXIT:PARAMSJS:name and SUBMISSION:PARAMSJS:name for increased spammer protection</li>
</ul>
<p>Full documentation for the new features is being written and will be published in the RIFE <a href="http://rifers.org/wiki/display/RIFE/Cook+Book">wiki cookbook</a>.</p>
<p>You can read the <a href="http://svn.rifers.org/rife/tags/release-1.6/ChangeLog">full changelog</a> for more
details.</p>
<p>This release can be downloaded from the <a href="http://rifers.org/downloads">downloads section</a>, as usual.</p>
Mon, 02 Jul 2007 15:25:32 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/7/2/rife_1_6_releasedJavaOne Podcast : Web continuations with RIFE and Terracottahttp://rifers.org/blogs/gbevin/2007/6/7/podcast_continuations_rife_tc
<p>The podcast of my mini-talk at JavaOne 2007 has been published on java.net, this is the abstract:</p>
<div class="quotebody">
<p>
State management has always been a complex and tricky part of web application development. Continuations simplify this and automatically allow you to create a one-to-one conversation between users and a web application. State preservation and flow control no longer need to be handled manually, bringing you back to the simplicity of single user console applications. Remember 'scanf()'?
</p>
<p>
This presentation will introduce continuations from general principles, followed by practical examples that explain how they benefit web application development and their frequent usage patterns. Finally, automatic fail-over and scalability will be demonstrated through the integration with Open Terracotta.
</p>
</div>
<p>You can <a href="http://today.java.net/pub/a/today/2007/05/25/j1-2k7-mT03.html">listen to it here</a>.</p>
<p>The corresponding <a href="https://rife.dev.java.net/servlets/ProjectDocumentList?folderID=7407">slides and examples</a> can also be downloaded.</p>Thu, 07 Jun 2007 19:44:01 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/6/7/podcast_continuations_rife_tcRIFE and OpenLaszlo users get together at JavaOne 2007http://rifers.org/blogs/gbevin/2007/5/9/rife_openlaszlo_get_together
<p>I already bumped into some RIFE users on the conference floor and I thought it would be nice to at least set a time apart to have some drinks together and exchange war stories <img src="http://rifers.org/images/blog/emoticon-wink.gif" width="16" height="16" alt=";)" />.</p>
<p>I propose that we meet today, <b>May 9th at 17h30</b>, at the <a href="http://www.thirstybear.com"><b>Thirsty Bear</b></a>. This is right before the <a href="http://weblogs.java.net/blog/webmink/archive/2007/05/javaone_blogger_1.html">JavaOne bloggers party</a>, so you don't have to miss that. Maybe we can even spread the word about our favorite projects!</p>
<p>Even if you don't know open any of the projects in detail but are interested cutting-edge web development, native Java continuations, Rich Internet Applications, ... you're welcome to stop by for a chat.</p>
<p>If you don't know what I look like, here's a recent picture: <img src="http://rifers.org/images/blog/emoticon-bigsmile.gif" width="16" height="16" alt=":D" /></p>
<p><a href="http://picasaweb.google.com/gbevin/ForumUploadImages/photo?authkey=5JDd9iUD5qc#5062593565100070130"><img src="http://lh3.google.com/image/gbevin/RkHyBlH31PI/AAAAAAAAAL4/wNERO4PkAyU/s144/Photo%2030.jpg" alt="My head" /></a></p>Wed, 09 May 2007 18:09:24 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/5/9/rife_openlaszlo_get_togetherRe: Impressions of the RIFE frameworkhttp://rifers.org/blogs/gbevin/2007/4/10/re_impressions_of_rife
<p><a href="http://www.khanspot.com/2007/04/10/impression-of-rife-web-framework/">Atif Khan wrote a blog entry</a> about his experience with RIFE. Sadly, the comment system on his blog seems to be broken, so I can't post a reply there. I'm thus posting it on my own blog.</p>
<hr />
<p>Hi Atif,</p>
<p>thanks a lot for writing down your impressions, and you see that I did get to your blog entry <img src="http://rifers.org/images/blog/emoticon-normal.gif" width="16" height="16" alt=":)" /></p>
<p>Here are my reactions to your 'cons':</p>
<div class="quotebody"><b>Atif Khan:</b><br />Templates are really weird to work with. The syntax for the templates really did me. It is not really designer friendly like Tapestry or Wicket</div>
<p>Which template syntax did you use? If you want the designer-friendly version, you have several to choose from, like the comment based syntax and the real XML syntax. I suppose that this is a matter of being aware of them, which is not easily solved (there's a <a href="http://rifers.org/wiki/display/RIFE/Alternative+tag+syntax">wiki page</a> about them though).</p>
<div class="quotebody"><b>Atif Khan:</b><br />The concept of flowlink and datalink is just too verbose and not clear</div>
<p>The flowlinks and datalinks verbosity are easily solved through different manners. They're like the finest grained possibility. For a lot of people, globalvars and globalexits are totally sufficient and only require one declaration. Another good solution is just to use <a href="http://rifers.org/wiki/display/RIFE/Autolink+declaration+to+simplify+datalink+and+flowlink+declarations">autolinks</a>, if you combine these with annotations, there's very little setup to do for the logic flow and data flow to work.</p>
<p>Also, if you think they're not clear, this page in the users guide might make it easier to understand: <a href="http://rifers.org/wiki/display/RIFE/GuideNumberguess">http://rifers.org/wiki/display/RIFE/GuideNumberguess</a>.</p>
<div class="quotebody"><b>Atif Khan:</b><br />Using annotation didn&rsquo;t do me any good as well for defining the flow and data links. There isn&rsquo;t enough documentation for annotations.</div>
<p>I agree that the documentation here is lacking, but annotations are a recent addition, so in time it will get better. The best thing usually is to try to combine what's on the wiki with the javadocs and the examples. For the annotations, there's some kind of overview here: <a href="http://rifers.org/wiki/display/RIFE/Best+Practices">http://rifers.org/wiki/display/RIFE/Best+Practices</a>. You can also have a look at <a href="http://rifers.org/docs/api/com/uwyn/rife/engine/annotations/package-summary.html">the javadocs for them</a>. </p>
<div class="quotebody"><b>Atif Khan:</b><br />The only way for form validations I could find was to define the a <code>MetaData</code> class equivalent to the domain object representing the form and define the validations in there. This just seems like way too much of work for simple validations.</div>
<div class="quotebody"><b>Atif Khan:</b><br />I could not figure out how to customize the error messages for form validations</div>
<p>It's a pity that you didn't see the real value of the validation framework, the <code>MetaData</code> classes actually generate the statements for the real validation framework underneath, which is totally customizable. Several times I've heard users say that they found RIFE's validation framework to be the most flexible and powerful one that they've come across. Information about that can be found here: <a href="http://rifers.org/wiki/display/RIFE/Validation">http://rifers.org/wiki/display/RIFE/Validation</a>, this also contains instructions about how to customize the error messages in many ways. The javadoc for the <a href="http://rifers.org/docs/api/com/uwyn/rife/site/Validated.html"><code>Validated</code> interface</a> might be helpful too. You can basically create any <code>ValidationRule</code> or <code>ValidationError</code> that you want, using <code>MetaData</code> just automates it all.</p>
<p>Please don't hesitate to tell me where you find holes in the documentation. I think that a lot of it is documented, it's mainly an issue of finding the right content. Shooting of a message to the mailing list will often get me or someone to point you in the right direction. There were some books in the writing, but sadly I had to cancel them due to time constraints. There might still be some coming up in half a year or so, but it really is very bound to my availability.</p>
<p>Again, thanks a lot for making the effort to look at RIFE, I know that it's a lot to digest.</p>Tue, 10 Apr 2007 22:49:07 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2007/4/10/re_impressions_of_rifeJavaPolis Podcast : Web continuationshttp://rifers.org/blogs/gbevin/2007/3/5/javapolispodcastwebcontinuations
<p>The recording of my talk at JavaPolis 2006 about Web Continuations has been made available as a podcast.</p>
<p>You can listen to it on <a href="http://parleys.libsyn.com/index.php?post_id=188983#">Parleys.com</a> or subscribe to <a href="http://parleys.libsyn.com/rss">their feed</a> to have all the JavaPolis audio content delivered to you.</p>
<p><i>Note: please, each time I say 'Josh' mentally substitute it for 'Neil' ... I made a horrible mistake and people only pointed this out to me after the talk, I sank into the ground from shame <img src="http://rifers.org/images/blog/emoticon-sad.gif" width="16" height="16" alt=":(" /></i></p>Mon, 05 Mar 2007 17:59:40 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2007/3/5/javapolispodcastwebcontinuationsWhy consider the RIFE framework - excellent testimonial on TechRepublichttp://rifers.org/blogs/gbevin/2007/3/2/rife_on_techrepublic
<p>David Spector wrote an <a href="http://blogs.techrepublic.com.com/opensource/?p=44">extensive blog entry</a> on CNET TechRepublic about why he selected <a href="http://rifers.org">RIFE</a> to develop his web-based business applications.</p>
<p>If you've been wondering why you should bother to look at RIFE, this is a nice overview.</p>
<p>The part where he talks about the 'UNlearning curve' is very true ... I've witnessed it many times.</p>
<p><a href="http://blogs.techrepublic.com.com/opensource/?p=44">Read it here.</a></p>Fri, 02 Mar 2007 19:46:51 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2007/3/2/rife_on_techrepublicContinuations interview on Artima Developerhttp://rifers.org/blogs/gbevin/2007/3/2/continuations_interview_artima
<p>Bill Venner from Artima Developer has interviewed me at JavaPolis 2006.</p>
<p>Originally this was intended to be posted as an MP3 together with the other interviews (<a href="http://www.artima.com/lejava/articles/javapolis_2006_wed_idols.html">day 1</a>, <a href="http://www.artima.com/lejava/articles/javapolis_2006_thu_idols.html">day 2</a>, <a href="http://www.artima.com/lejava/articles/javapolis_2006_fri_idols.html">day 3</a>), however we went on for almost an hour instead of 15 minutes. Frank Sommers took the trouble of transcribing and editing the interview and <a href="http://www.artima.com/lejava/articles/continuations.html">posted it today</a> on Artima Developer.</p>
<p>If you're still wondering what continuations are about or want more in-depth information, <a href="http://www.artima.com/lejava/articles/continuations.html">head over to the article</a>.</p>Fri, 02 Mar 2007 09:37:25 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2007/3/2/continuations_interview_artima