Subscribe: New RIFERS blogs entries from Geert Bevin in category rife
http://rifers.org/blogs/feeds/atom/entry/gbevin/rife
Added By: Feedage Forager Feedage Grade B rated
Language: Galician
Tags:
continuations  data  database  development  engine  rife  template engine  template  terracotta  user  validation  web application  web 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: New RIFERS blogs entries from Geert Bevin in category rife

New RIFERS blogs entries from Geert Bevin in category rife





Published: 2018-01-18T05:22:04+0100

Modified: 2018-01-18T05:22:04+0100

Copyright: Copyright of the content contained is attributed to the original authors
 



Reviving RIFE, starting work on version 2

2013-06-23T21:32:38+0200

2013-06-23T21:32:38+0200

Hi everyone,

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.

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.

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.

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: https://github.com/gbevin/rife. I took a little break to work on another quick pet-project in the meantime (http://uwyn.com/geco) but that's now all ready for launch.

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.

My initial plan of action is this:

  • focus on pure Java and byte-code instrumentation, no scripting languages
  • leverage the upcoming features of Java 8
  • rebuild the template engine with largely the same ideas in place, but clearer and more focused
  • properly finish the isolation of the continuations engine and bring it up to date
  • rethink the infrastructure with IoC as a starting point, instead of having it as an afterthought
  • totally rewrite the web engine, with similar principles but much more conventions and less configuration
  • trim out the database abstraction layer for only certain relevant databases

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.

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.

If you're interested in shaping what RIFE version 2 is going to become, please hop on the developers mailing list and say hi: https://groups.google.com/forum/#!forum/rife-dev

Hope to hear from some of you!




Gotcha: using RIFE's bean-centric validation with Terracotta (or any entity container/cache)

2008-07-16T09:37:30+0200

2008-07-16T09:37:30+0200

RIFE has a unique approach towards validation which is centralized around bean instances and not bean classes. 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 ValidationErrors. This again allows every part of the system to easily access the validation results and act accordingly. 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 meta-data merging facility. This automatically looks for a class with the MetaData suffix when a bean class is loaded. Through byte code instrumentation, the capabilities of the MetaData 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 MetaData class implements. (you can find more details about this feature in the RIFE wiki) 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. The code could be like this when editing an existing User entity: User user = database.restore(userId); fillSubmissionBean(user); if (((Validated)user).validate()) {     database.save(user);     template.setBlock("content", "success"); } else {     generateForm(template, user); } print(template); 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. Intuitively and naively you would replace the code above with the following broken code: // this code is broken, read below to know why User user = service.findById(userId); fillSubmissionBean(user); if (((Validated)user).validate()) {     service.store(user);     template.setBlock("content", "success"); } else {     generateForm(template, user); } print(template); The problem relies in the fact that each and every thread will be working with the same instance of the User. Your initial reaction might be to just synchronize the accesses to this instance, but hang on, think about what's happening. You actually don't want 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 exactly the same as what happens when you get a new instance from the database. 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 b[...]



Custom constraints and validation in RIFE

2008-01-29T17:52:51+0100

2008-01-29T17:52:51+0100

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.

Read the article in the RIFE wiki.




RIFE BOF tonight at QCon conference in San-Francisco

2007-11-08T22:40:24+0100

2007-11-08T22:40:24+0100

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:

http://qcon.infoq.com/sanfrancisco/conference/

The address is:
Westin San Francisco Market Street
50 Third Street
San Francisco
California 94103

The BOF will be from 8:30pm - 9:30pm in the 'City' room.

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.

See you there!



Speaking at NFJS Europe : "Cutting-edge productivity with RIFE and Web Continuations"

2007-08-09T20:46:53+0200

2007-08-09T20:46:53+0200

I'm speaking at NFJS in London at the end of this month about RIFE and Terracotta. You can find the abstract of my session quoted below. The schedule looks very interesting and I'm excited that NFJS is finally taking place in Europe too.

If you're interested in going, you might want to click on the banner to the right or to use the promotion code NFJS-RIF660. This will give you a free Nintendo Wii with your registration (woohooo, I love my Wii!).

See you at NFJS Europe.

I also have another session about Terracotta in the real-world.

Cutting-edge productivity with RIFE and Web Continuations

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.

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.

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()'?

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.




Artima article : Distributed Web Continuations with RIFE and Terracotta

2007-08-08T20:23:11+0200

2007-08-08T20:23:11+0200

In this article, Jonas Boné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—its use of continuations for conversational logic, and complete integration of meta-programming to minimize boilerplate code.

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.

You can read it at Artima.




Frank Sommers : What Do You Look For in a Template Engine?

2007-07-21T10:41:29+0200

2007-07-21T10:41:29+0200

Frank Sommers of Artima has started a discussion about template engines and asks what you find important in them.

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 StringTemplate 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 our approach where there really is no logic in the template at all, I really appreciates what Terrence says in his docs:

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.

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.

Have you ever tried out another template engine besides the classic pull model in anger? What did you think of it?




RIFE 1.6.1 released

2007-07-14T23:40:41+0200

2007-07-14T23:40:41+0200

There are no new features since release 1.6, this is a bugfix release.

Everyone using continuations is urged to upgrade to 1.6.1 due to performance regressions that crept into the previous release.

You can read the full changelog for more details.

This release can be downloaded from the downloads section, as usual.




RIFE 1.6 released

2007-07-02T15:25:32+0200

2007-07-02T15:25:32+0200

Below are the highlights:

  • Isolated continuations package with proper public API and separately downloadable jars
  • Byte-code instrumentation agent that can replace the classloader
  • Integration with Terracotta for continuations fail-over and scalability
  • ManyToOne and ManyToMany relationships in the GenericQueryManager with lazy-loading
  • Refactored authentication package for optimal pluggability
  • New template tags BA and C
  • Template tag syntaxes don't require quotes anymore
  • MVEL as blockvalue scripting language
  • JRuby support for implementing elements
  • Support for the H2 database
  • Support for Java 5.0 enum types
  • ReadQueryString and ReadQueryTemplate query builders
  • EXIT:PARAMSJS:name and SUBMISSION:PARAMSJS:name for increased spammer protection

Full documentation for the new features is being written and will be published in the RIFE wiki cookbook.

You can read the full changelog for more details.

This release can be downloaded from the downloads section, as usual.




JavaOne Podcast : Web continuations with RIFE and Terracotta

2007-06-07T19:44:01+0200

2007-06-07T19:44:01+0200

The podcast of my mini-talk at JavaOne 2007 has been published on java.net, this is the abstract:

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()'?

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.

You can listen to it here.

The corresponding slides and examples can also be downloaded.




RIFE and OpenLaszlo users get together at JavaOne 2007

2007-05-09T18:09:24+0200

2007-05-09T18:09:24+0200

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 (image) .

I propose that we meet today, May 9th at 17h30, at the Thirsty Bear. This is right before the JavaOne bloggers party, so you don't have to miss that. Maybe we can even spread the word about our favorite projects!

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.

If you don't know what I look like, here's a recent picture: (image)

(image)




Re: Impressions of the RIFE framework

2007-04-10T22:49:07+0200

2007-04-10T22:49:07+0200

Atif Khan wrote a blog entry 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. Hi Atif, thanks a lot for writing down your impressions, and you see that I did get to your blog entry Here are my reactions to your 'cons': Atif Khan: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 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 wiki page about them though). Atif Khan:The concept of flowlink and datalink is just too verbose and not clear 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 autolinks, if you combine these with annotations, there's very little setup to do for the logic flow and data flow to work. Also, if you think they're not clear, this page in the users guide might make it easier to understand: http://rifers.org/wiki/display/RIFE/GuideNumberguess. Atif Khan:Using annotation didn’t do me any good as well for defining the flow and data links. There isn’t enough documentation for annotations. 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: http://rifers.org/wiki/display/RIFE/Best+Practices. You can also have a look at the javadocs for them. Atif Khan:The only way for form validations I could find was to define the a MetaData 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. Atif Khan:I could not figure out how to customize the error messages for form validations It's a pity that you didn't see the real value of the validation framework, the MetaData 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: http://rifers.org/wiki/display/RIFE/Validation, this also contains instructions about how to customize the error messages in many ways. The javadoc for the Validated interface might be helpful too. You can basically create any ValidationRule or ValidationError that you want, using MetaData just automates it all. 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. Again, thanks a lot for making the effort to look at RIFE, I know that it's a lot to digest.[...]



JavaPolis Podcast : Web continuations

2007-03-05T17:59:40+0100

2007-03-05T17:59:40+0100

The recording of my talk at JavaPolis 2006 about Web Continuations has been made available as a podcast.

You can listen to it on Parleys.com or subscribe to their feed to have all the JavaPolis audio content delivered to you.

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 (image)




Why consider the RIFE framework - excellent testimonial on TechRepublic

2007-03-02T19:46:51+0100

2007-03-02T19:46:51+0100

David Spector wrote an extensive blog entry on CNET TechRepublic about why he selected RIFE to develop his web-based business applications.

If you've been wondering why you should bother to look at RIFE, this is a nice overview.

The part where he talks about the 'UNlearning curve' is very true ... I've witnessed it many times.

Read it here.




Continuations interview on Artima Developer

2007-03-02T09:37:25+0100

2007-03-02T09:37:25+0100

Bill Venner from Artima Developer has interviewed me at JavaPolis 2006.

Originally this was intended to be posted as an MP3 together with the other interviews (day 1, day 2, day 3), however we went on for almost an hour instead of 15 minutes. Frank Sommers took the trouble of transcribing and editing the interview and posted it today on Artima Developer.

If you're still wondering what continuations are about or want more in-depth information, head over to the article.