first part of fix for attributes and roles mess. metclass coompat bug still lurks
[catagits/Reaction.git] / lib / Reaction / Manual / Intro.pod
CommitLineData
df2804f5 1=head1 NAME
2
3Reaction::Manual::Intro - Introduction to Reaction
4
cc4f29bf 5=head1 SYNOPSIS
df2804f5 6
cc4f29bf 7 Moose + Catalyst + Layered Models = eternal happiness
df2804f5 8
cc4f29bf 9=head1 MOTIVATION
df2804f5 10
cc4f29bf 11While L<Catalyst> is a very powerful and flexible web app
12framework, many pieces end up being recoded for each
13new application: user interfaces, in particular.
df2804f5 14
cc4f29bf 15Meanwhile, advances in Perl metaprogramming (especially L<Moose>)
16have opened up new possibilities in terms of introspection.
17Why not build user interfaces based on class metadata?
18This would allow the user interface templates to be very general
19where possible.
df2804f5 20
cc4f29bf 21Thus, Reaction is basically an extended MVC framework, which
22leverages class metadata to reduce or eliminate UI coding.
df2804f5 23
cc4f29bf 24But it's much more....
df2804f5 25
cc4f29bf 26=head1 DOMAIN MODELS AND INTERFACE MODELS
df2804f5 27
cc4f29bf 28Many programmers are now comfortable using ORMs of one sort or
29another - L<DBIx::Class>, L<Class::DBI>, Hibernate, etc. These systems
30are wonderful for bridging from the world of OO into the world of relational
31databases (or other datastores). This model is sometimes called a
32"domain model", because it models the "nouns" of a problem domain in
33the real world. Domain models are easily shared accross applications,
34and can enforce validation and other integrity constraints.
df2804f5 35
cc4f29bf 36However, over time, many application developers find themselves adding
37business logic to the domain model. This business logic is often
38application-specific, and reduces the reusability of the domain model.
39Worse, business logic becomes spread between the model and the contoller.
df2804f5 40
cc4f29bf 41Reaction adds another layer, the Interface Model. Interface models provide an
42adaptor to the domain model, customized for a particular application (or group
43of use cases). This decouples the domain model from the application,
44allowing it to be reused more freely. Additionally, the Interface Model
45becomes the natural location for business logic.
df2804f5 46
cc4f29bf 47Happily, Reaction again uses reflection to make the degenerate case easy - when your
48IM has no customized functionality, it can simply delegate all work to the DM. When
49you need to add custom business logic, you can add or replace functionality as needed.
df2804f5 50
63bb30b4 51The DM/IM split is sometimes referred to as a FacadeModel - see
52L<http://www.twinforces.com/tf/docs/MFCV.html>, for example.
df2804f5 53
cc4f29bf 54=head1 WHAT YOU'LL NEED TO KNOW
df2804f5 55
cc4f29bf 56Reaction is based on the L<Catalyst> web application framework. You'll certainly
57need to be familiar with L<Catalyst::Manual::Intro>.
df2804f5 58
cc4f29bf 59Currently, only L<DBIx::Class> is supported as a domain model. At least basic
60familiarity will be needed. L<DBIx::Class::Manual::Intro> is a good starting point.
888532d3 61
cc4f29bf 62The default view renderer is L<Template::Toolkit>. To edit your views, you'll
63need to know something about it.
888532d3 64
cc4f29bf 65While you don't need to know L<Moose> directly, a lot of the concepts of
66metaprogramming will keep coming up as you work with Reaction.
67Thus, getting to know L<Moose> will serve you well.
888532d3 68
cc4f29bf 69=head1 NEXT STEPS
888532d3 70
63bb30b4 71The L<Reaction::Manual::Overview> document tries to tie the parts of reaction
72together to form a big picture.
73
cc4f29bf 74If you'd like an example, see L<Reaction::Manual::Example>.
888532d3 75
63bb30b4 76If you're ready to dive in and start learning step by step, see
77L<Reaction::Manual::Tutorial>.
888532d3 78
63bb30b4 79As you encounter unfamiliar terms, or want to see how a particular term is used in the
80context of the Reaction project, refer to the L<Reaction::Manual::Glossary>.
df2804f5 81
82=head1 SEE ALSO
83
84=over
85
86=item * L<Reaction::Manual::Cookbook>
87
88=item * L<Reaction::Manual::FAQ>
89
90=back
91
92=head1 AUTHORS
93
94See L<Reaction::Class> for authors.
95
96=head1 LICENSE
97
98See L<Reaction::Class> for the license.
99
100=cut