Revision 101 - 2011-05-09 at 20:46:10

Reaction

Reaction is a set of modules on top of Catalyst that provides a full component UI system.

Reaction is similar to Apache Wicket. Albeit not as mature, it aspires to be, and to do so with the elegance of Perl.

Get excited

[FormFu](http://dev.catalyst.perl.org/wiki/FormFu_FAQ) and [Rose::HTML::Objects](http://search.cpan.org/dist/Rose-HTML-Objects/) are "local maxima" of particular solutions to the form-based data input and Object-Relational-Mapper problems. They are very good implementations, but of limited [Apache Wicket](http://wicket.apache.org/)ideas. Reaction aims to be a very good implementation of MVC vs. the Component model and bare Catalyst vs. Wicket: [FormFu](http://dev.catalyst.perl.org/wiki/FormFu_FAQ) and [Rose::HTML::Objects](http://search.cpan.org/dist/Rose-HTML-Objects/) are "local maxima" of particular solutions to the form-based data input and Object-Relational-Mapper problems. They are very good implementations, but of limited ideas. Reaction aims to be a very good implementation of MVC vs. the Component model and bare Catalyst vs. Wicket:

Testimonials

I actually prefer the event/component way of dealing with things over MVC. For simple REST based applications I would go with Catalyst. For large and complex applications I would pick Wicket. add(new Link("foo") { onClick() { ... do stuff... }); instead of forwarding to a controller action. Event based. Then components are self aware, they know how to handle them selves, so I can drop an "invite a friend" component any where on the site and it just works. I don't need to know anything about the implementation/flow of it. Catalyst is a lot easier to work with. Wicket/hibernate/spring requires a lot of up front investment. Wicket and hibernate are both really complex abstractions. -- Oleg

Concepts

From the data to the rendered page, these are the concepts used by Reaction:

  • DM = Data (or Domain) Model. DBIC::Schema is an example
  • IM = Interface Model - the facade which lies above the DM, which would contain business logic
  • VP = ViewPort - an abstract UI state and interface that talks to the Interface Model. For example, a "virtual" grid with many rows, and a state which says which page we're currently viewing, would contain user interface logic
  • Widget - uses the ViewPort data to define fragments which are rendered into a web page
  • Layout
  • Catalyst controller
  • Catalyst action
  • Rendered Page

See also the Reaction tutorial by mateus.

FAQ

Do I need this many layers for a simple Hello World app?

A: Reaction does not aim at trivial applications; instead, it enforces structured programming practices to build complex and flexible real-world web applications. There is an upfront cost paid to build this structure, but gains will become apparent as the application grows.

Get started

  • cpan Module::Install # make sure you use v0.76 or later
  • svn co http://code2.0beta.co.uk/reaction/svn/Reaction
  • perl Makefile.PL; make installdeps; make install # tests may fail at the moment

Look through the source code

With what Modules should I be familiar?

Examples

Resources

My tags:
 
Popular tags:
  Reaction News component Online Bachelor Degree
Powered by Catalyst
Powered by MojoMojo Hosted by Shadowcat - Managed by Nordaaker