--- trunk/lib/Frey/Manual.pod 2008/12/09 20:31:39 778 +++ trunk/lib/Frey/Manual.pod 2009/01/10 23:29:38 991 @@ -2,10 +2,49 @@ This page describes how to use and develop with L +=head1 Developer parts + +=head2 Moose classes + +All Moose classes have simple introspection API which use +L to show class and it's pod (using L). + +Example of valid REST URL is + + http://localhost:16001/Frey + +which will show L class introspection. + +You can also add method invocation and optional parameters to C +constructor like this: + + http://localhost:16001/Frey::Pod/as_markup?class=Frey + +this is same using L from perl as + + Frey::Pod->new( class => 'Frey' )->as_markup; + +Forms to enter required parameters will be generated automatically, +allowing you to explore your data while you are making interface for it. + +=head2 Database + +FIXME broken if not noted in C + +For database objects we support L and when your objects are created +C<< with 'Frey::ORM::Collection' >> they will have basic CRUD functionality +implemented by L. + +=head1 User parts + +=head2 Pipes + +See L for now. + =head1 Designing user interaction flows Frey is all about creating Moose classes as your interaction with pages. -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 get request. If you want to access those parameters in your object, you have to define @@ -45,27 +84,30 @@ You don't even have to create initial entry form as L, which will start your L classes, will call L -for help and generate initial form for you. +for help and generate initial form for you. If this magic is wrong, +just define C<< sub render_pipe { 'radio' } >> to force rending of +C attribute as radio buttons. + +=head2 Easy skeletons Creating files is mess, so L will create class and test skeleton for you. -If I did it right, it should read similar to human language, like SmallTalk. - -To make things simple, there are few convertions (with nod to Ruby on Rails) -which will help you get started: - +If I did it right, it should read similar to human language, like Smalltalk. -=head2 default parametars +L is careful to provide enough magic to build skeletons just of files +which contain some specific logic to your aplication, so it's not massive code +generation as in Java... -Default values for +To make things simple, there are few conventions (with nod to Ruby on Rails) +which will help you get started: -=head2 html markup +=head2 HTML markup convetion HTML markup should be enclosed in C< qq| > and C< | > quotes. There is also funny but very readable convention of multi line html when you have to -intermix confitions: +intermix conditions: my $html = qq|

First

| @@ -85,16 +127,29 @@ which is valid perl syntax but doesn't work as expected. -=head2 SmallTalk like refactoring +=head2 Smalltalk like refactoring -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 Frey code should be like playing with L. And you might end up with result which might surprise you. -Refactoring tools are not new in perl. However, +Refactoring tools are not new in perl. We have L, L and C +so what more do we want? + +If you look closely into Smalltalk development work-flow, you really need +ability to rename class or method without any additional effort. For that, +we use L which allows code modifications at source +level with just few clicks. + +=head2 Default values +When L tries to create instance of class (usually because of web +request) it tried to read default values from C files in C and +if it doesn't find all of required values it will invoke L to +create end-user html form with missing fields. -=head2 examples + +=head1 Examples To help you get started, here are few implemented flows in Frey: @@ -118,7 +173,7 @@ =head1 Command-line integration One of key points is that L runs under your user. This means it has -access to your termnial, and ssh keys, so beware! +access to your terminal, and ssh keys, so beware! =head1 Install @@ -155,7 +210,7 @@ =head2 bin/dev.sh -Recommeded way to start development L server since it will restart it +Recommended way to start development L server since it will restart it automatically and kill running instance if existing. =head2 bin/check-syntax.sh @@ -164,7 +219,12 @@ =head2 bin/grep-iselect.sh -Helper using C to quickly grep, select result and jump to C +Helper using C to quickly grep, select result and jump to C. + +You can also pass grep params for context etc, like this: + + ./bin/grep-iselect.sh something -C 3 + ./bin/grep-iselect.sh something -A 10 -B 3 =head2 bin/log.sh @@ -178,7 +238,7 @@ =head2 bin/clean-var.sh Cleanup C directory which gets a lot of dumps. Most of useful data -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 look at data. =cut