/[Frey]/trunk/lib/Frey/Manual.pod
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Manual.pod

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 800 by dpavlin, Tue Dec 9 20:31:39 2008 UTC revision 801 by dpavlin, Wed Dec 10 20:27:56 2008 UTC
# Line 2  Line 2 
2    
3  This page describes how to use and develop with L<Frey>  This page describes how to use and develop with L<Frey>
4    
5    =head1 Developer parts
6    
7    =head2 Moose classes
8    
9    All Moose classes have simple introspection API which use
10    L<Frey::Introspect> to show class and it's pod (using L<Frey::Pod>).
11    
12    Example of valid REST URL is
13    
14      http://localhost:16001/Frey
15    
16    which will show L<Frey> class introspection.
17    
18    You can also add method invocation and optional parameters to C<new>
19    constructor like this:
20    
21      http://localhost:16001/Frey::Pod/as_markup?class=Frey
22    
23    this is same using L<Frey::Pod> from perl as
24    
25      Frey::Pod->new( class => 'Frey' )->as_markup;
26    
27    Forms to enter required parameters will be generated automatically,
28    allowing you to explore your data while you are making interface for it.
29    
30    =head2 Database
31    
32    FIXME broken if not noted in C<TODO>
33    
34    For database objects we support L<Fey> and when your objects are created
35    C<< with 'Frey::Collection' >> they will have basic CRUD functionality
36    implemented by L<Frey::ObjectBrowser>.
37    
38    =head1 User parts
39    
40    =head2 Pipes
41    
42    See L<Frey::Pipe> for now.
43    
44  =head1 Designing user interaction flows  =head1 Designing user interaction flows
45    
46  Frey is all about creating Moose classes as your interaction with pages.  Frey is all about creating Moose classes as your interaction with pages.
47  Each page is instance of class with some parametars received with post or  Each page is instance of class with some parameters received with post or
48  get request.  get request.
49    
50  If you want to access those parameters in your object, you have to define  If you want to access those parameters in your object, you have to define
# Line 50  for help and generate initial form for y Line 89  for help and generate initial form for y
89  Creating files is mess, so L<Frey::Class::Create/create_class_source> will  Creating files is mess, so L<Frey::Class::Create/create_class_source> will
90  create class and test skeleton for you.  create class and test skeleton for you.
91    
92  If I did it right, it should read similar to human language, like SmallTalk.  If I did it right, it should read similar to human language, like Smalltalk.
93    
94  To make things simple, there are few convertions (with nod to Ruby on Rails)  To make things simple, there are few conventions (with nod to Ruby on Rails)
95  which will help you get started:  which will help you get started:
96    
97    
 =head2 default parametars  
   
 Default values for  
   
   
98  =head2 html markup  =head2 html markup
99    
100  HTML markup should be enclosed in C< qq| > and C< | > quotes. There is also  HTML markup should be enclosed in C< qq| > and C< | > quotes. There is also
101  funny but very readable convention of multi line html when you have to  funny but very readable convention of multi line html when you have to
102  intermix confitions:  intermix conditions:
103    
104    my $html    my $html
105      = qq|<h1>First</h1>|      = qq|<h1>First</h1>|
# Line 85  write just Line 119  write just
119  which is valid perl syntax but doesn't work as expected.  which is valid perl syntax but doesn't work as expected.
120    
121    
122  =head2 SmallTalk like refactoring  =head2 Smalltalk like refactoring
123    
124  Frey is heavily influcenced by SmallTalks, up to the point of syntax. Coding  Frey is heavily influenced by Smalltalk, up to the point of syntax. Coding
125  Frey code should be like playing with L<Frey>. And you might end up with  Frey code should be like playing with L<Frey>. And you might end up with
126  result which might surprise you.  result which might surprise you.
127    
128  Refactoring tools are not new in perl. However,  Refactoring tools are not new in perl. We have L<PPI>, L<App::Ack> and C<vim>
129    so what more do we want?
130    
131    If you look closely into Smalltalk development work-flow, you really need
132    ability to rename class or method without any additional effort. For that,
133    we use L<Frey::Class::Refactor> which allows code modifications at source
134    level with just few clicks.
135    
136    =head2 Default values
137    
138    When L<Frey::Run> tries to create instance of class (usually because of web
139    request) it tried to read default values from C<yaml> files in C<etc/> and
140    if it doesn't find all of required values it will invoke L<Frey::Action> to
141    create end-user html form with missing fields.
142    
143  =head2 examples  =head2 examples
144    
# Line 118  Display a huge amount of icons with sing Line 164  Display a huge amount of icons with sing
164  =head1 Command-line integration  =head1 Command-line integration
165    
166  One of key points is that L<Frey> runs under your user. This means it has  One of key points is that L<Frey> runs under your user. This means it has
167  access to your termnial, and ssh keys, so beware!  access to your terminal, and ssh keys, so beware!
168    
169  =head1 Install  =head1 Install
170    
# Line 155  Used for switching focus between browser Line 201  Used for switching focus between browser
201    
202  =head2 bin/dev.sh  =head2 bin/dev.sh
203    
204  Recommeded way to start development L<Frey> server since it will restart it  Recommended way to start development L<Frey> server since it will restart it
205  automatically and kill running instance if existing.  automatically and kill running instance if existing.
206    
207  =head2 bin/check-syntax.sh  =head2 bin/check-syntax.sh
# Line 178  used in Frey and rest is kind of TODO li Line 224  used in Frey and rest is kind of TODO li
224  =head2 bin/clean-var.sh  =head2 bin/clean-var.sh
225    
226  Cleanup C<var/> directory which gets a lot of dumps. Most of useful data  Cleanup C<var/> directory which gets a lot of dumps. Most of useful data
227  is held forever because I belive that trends are most interesting way to  is held forever because I believe that trends are most interesting way to
228  look at data.  look at data.
229    
230  =cut  =cut

Legend:
Removed from v.800  
changed lines
  Added in v.801

  ViewVC Help
Powered by ViewVC 1.1.26