/[Frey]/branches/no-pager/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

Contents of /branches/no-pager/lib/Frey/Manual.pod

Parent Directory Parent Directory | Revision Log Revision Log


Revision 738 - (show annotations)
Sat Dec 6 15:29:10 2008 UTC (15 years, 4 months ago) by dpavlin
File size: 4454 byte(s)
 r3584@llin (orig r703):  dpavlin | 2008-12-03 22:24:09 +0100
 rename
 r3585@llin (orig r704):  dpavlin | 2008-12-03 22:26:29 +0100
 document bin/log.sh
 r3586@llin (orig r705):  dpavlin | 2008-12-03 22:36:12 +0100
 fix paths for created class
 r3587@llin (orig r706):  dpavlin | 2008-12-03 22:52:49 +0100
 http://upload.wikimedia.org/wikipedia/commons/0/05/WikEd_fix_html.png
 r3588@llin (orig r707):  dpavlin | 2008-12-03 23:20:46 +0100
 last point for 0.24 and forward
 r3589@llin (orig r708):  dpavlin | 2008-12-03 23:23:26 +0100
 dump html content in textarea
 r3590@llin (orig r709):  dpavlin | 2008-12-03 23:24:19 +0100
 Cleanup all attributes from html
 r3591@llin (orig r710):  dpavlin | 2008-12-04 14:26:57 +0100
 added cookie killer described on my blog at
 http://blog.rot13.org/2006/11/clean_all_http_cookies_and_kill_session.html
 r3592@llin (orig r711):  dpavlin | 2008-12-04 17:02:09 +0100
 add created classes to svk by default
 r3593@llin (orig r712):  dpavlin | 2008-12-04 17:02:57 +0100
 convert form to post, so we don't have double action on next submit (one from get, one from post)
 r3594@llin (orig r713):  dpavlin | 2008-12-04 17:17:48 +0100
 add SlideShare favourites url
 r3595@llin (orig r714):  dpavlin | 2008-12-04 17:28:31 +0100
 fix dependency display
 r3596@llin (orig r715):  dpavlin | 2008-12-04 18:33:39 +0100
 hide _private attributes
 r3597@llin (orig r716):  dpavlin | 2008-12-04 18:35:12 +0100
 separate results_as_data from as_markup to make data reusable
 r3598@llin (orig r717):  dpavlin | 2008-12-04 18:55:27 +0100
 Split run to own line
 r3599@llin (orig r718):  dpavlin | 2008-12-04 19:33:25 +0100
 use_ok correct test
 r3600@llin (orig r719):  dpavlin | 2008-12-04 19:39:37 +0100
 wrap File::Slurp into Frey::File
 r3601@llin (orig r720):  dpavlin | 2008-12-04 21:20:45 +0100
 move checkbox to Frey::Web, fix multiple file commit
 r3602@llin (orig r721):  dpavlin | 2008-12-04 23:31:06 +0100
 fix Frey::File
 r3603@llin (orig r722):  dpavlin | 2008-12-04 23:37:26 +0100
 concepts
 r3604@llin (orig r723):  dpavlin | 2008-12-05 00:09:52 +0100
 mode pod
 r3605@llin (orig r724):  dpavlin | 2008-12-05 18:25:05 +0100
 display pod table of content
 r3606@llin (orig r725):  dpavlin | 2008-12-05 18:33:01 +0100
 fix warnings and take title for icon if it's not specified
 r3607@llin (orig r726):  dpavlin | 2008-12-05 18:34:10 +0100
 Fix output wrapping
 r3608@llin (orig r727):  dpavlin | 2008-12-05 18:34:43 +0100
 sort methods and attributes
 r3609@llin (orig r728):  dpavlin | 2008-12-06 01:19:32 +0100
 support check of single file
 r3610@llin (orig r729):  dpavlin | 2008-12-06 01:20:20 +0100
 more documentation, unfinished
 r3611@llin (orig r730):  dpavlin | 2008-12-06 01:21:36 +0100
 version bump [0.24]
 r3612@llin (orig r731):  dpavlin | 2008-12-06 01:25:19 +0100
 implement CSS2 form layout and support for undef (action support is still broken)
 r3613@llin (orig r732):  dpavlin | 2008-12-06 01:26:12 +0100
 simple two step action as still non-working prototype
 r3614@llin (orig r733):  dpavlin | 2008-12-06 01:43:29 +0100
 change yaml dump format, cleanup
 r3615@llin (orig r734):  dpavlin | 2008-12-06 01:57:49 +0100
 turn short lists to radio boxes
 r3616@llin (orig r735):  dpavlin | 2008-12-06 13:22:36 +0100
 css for documentation, always re-create introspect yaml
 r3617@llin (orig r736):  dpavlin | 2008-12-06 15:34:41 +0100
 put documentation in own line
 r3618@llin (orig r737):  dpavlin | 2008-12-06 15:35:15 +0100
 make commit form transparent so we can see diff behind it

1 =head1 Frey Manual
2
3 This page describes how to use and develop with L<Frey>
4
5 =head1 Designing user interaction flows
6
7 Frey is all about creating Moose classes as your interaction with pages.
8 Each page is instance of class with some parametars received with post or
9 get request.
10
11 If you want to access those parameters in your object, you have to define
12 attributes for it using L<Moose/has>
13
14 You can also generate result in three different forms:
15
16
17 =over 20
18
19 =item as_markup
20
21 HTML content
22
23 =item as_sponge
24
25 Tabular output
26
27 FIXME link to description
28
29 =item as_data
30
31 Any perl hash structure
32
33 =back
34
35
36 =head2 No html templates
37
38 Frey doesn't have html templates. Since your methods are part of REST URIs,
39 it doesn't make sense to separate html from object itself, which represent
40 web page. L<Frey::Web> provides role which has a bunch of helpful things
41 when creating html.
42
43 Basically, if html you are generating in readable code semantically correct
44 to you, it the right track.
45
46 You don't even have to create initial entry form as L<Frey::Run>,
47 which will start your L<Moose> classes, will call L<Frey::Action>
48 for help and generate initial form for you.
49
50 Creating files is mess, so L<Frey::ClassCreator/create_class_source> will
51 create class and test skeleton for you.
52
53 If I did it right, it should read similar to human language, like SmallTalk.
54
55 To make things simple, there are few convertions (with nod to Ruby on Rails)
56 which will help you get started:
57
58
59 =head2 default parametars
60
61 Default values for
62
63
64 =head2 html markup
65
66 HTML markup should be enclosed in C< qq| > and C< | > quotes. There is also
67 funny but very readable convention of multi line html when you have to
68 intermix confitions:
69
70 my $html
71 = qq|<h1>First</h1>|
72 . ( $is_second ? qq|<h2>Second</h2>| : '' )
73 . qq|<h3>Third</h3>|
74 ;
75
76 This will be checked and reported at some point. Ideally, I would like to
77 write just
78
79 my $html
80 = qq|<h1>First</h1>|
81 . $is_second ? qq|<h2>Second</h2>| : ''
82 . qq|<h3>Third</h3>|
83 ;
84
85 which is valid perl syntax but doesn't work as expected.
86
87
88 =head2 SmallTalk like refactoring
89
90 Frey is heavily influcenced by SmallTalks, up to the point of syntax. Coding
91 Frey code should be like playing with L<Frey>. And you might end up with
92 result which might surprise you.
93
94 Refactoring tools are not new in perl. However,
95
96
97 =head2 examples
98
99 To help you get started, here are few implemented flows in Frey:
100
101 =over 20
102
103 =item L<Frey::Shell::Grep>
104
105 Simple interaction with C<grep>
106
107 =item L<Frey::SVK>
108
109 Gather data, display selection form with checkboxes
110
111 =item L<Frey::IconBrowser>
112
113 Display a huge amount of icons with single HTTP request
114
115 =back
116
117
118 =head1 Command-line integration
119
120 One of key points is that L<Frey> runs under your user. This means it has
121 access to your termnial, and ssh keys, so beware!
122
123 =head1 Install
124
125 =head2 Firefox
126
127 Frey is designed to provide close integration between your day-to-day data
128 mungling work in console and Firefox.
129
130 You might want to open separate Firefox and terminal for Frey sessions.
131
132 It's also useful to have Firebug extension installed in Firefox to provide
133 quick introspection on html, network traffic and request parameters.
134
135 If nothing else, L<Frey::Bookmarklet> provides Firebug lite bookmarklet.
136
137 It's all Text! Firefox extension at
138 L<https://addons.mozilla.org/en-US/firefox/addon/4125> provides integration
139 between form textarea and your editor, so it's also handy.
140
141 =head2 vim
142
143 Content on page will be linked to vim using L<Frey::Web/html_links>
144
145 You might want to install vim plugin C<prel_synwrite.vim> from
146 L<http://www.vim.org/scripts/script.php?script_id=896>
147 to check syntax on every C<:Write>
148
149
150 =head2 xdotool
151
152 Used for switching focus between browser and terminal
153
154 =head1 Command-line helpers
155
156 =head2 bin/dev.sh
157
158 Recommeded way to start development L<Frey> server since it will restart it
159 automatically and kill running instance if existing.
160
161 =head2 bin/check-syntax.sh
162
163 Check syntax of modified files.
164
165 =head2 bin/grep-iselect.sh
166
167 Helper using C<iselect> to quickly grep, select result and jump to C<vim>
168
169 =head2 bin/log.sh
170
171 Open last 3 logs in vim
172
173 =head2 bin/checkout-js.sh
174
175 Checkout bunch of JavaScript code from all over the net, some of which is
176 used in Frey and rest is kind of TODO list...
177
178 =head2 bin/clean-var.sh
179
180 Cleanup C<var/> directory which gets a lot of dumps. Most of useful data
181 is held forever because I belive that trends are most interesting way to
182 look at data.
183
184 =cut

  ViewVC Help
Powered by ViewVC 1.1.26