Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 189 lines (142 sloc) 6.884 kB
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
1 NAME
be1da76 @sartak Update README
sartak authored
2 Jifty - an application framework
3
4 SYNOPSIS
5 # Object containing lots of web related goodies...
6 my $web = Jifty->web;
7 my $request = Jifty->web->request;
8 my $response = Jifty->web->response;
9 my $link = Jifty->web->link( label => _('W00t'), url => '/whatsit' );
10
11 # Retrieve information from your application's etc/config.yml file.
12 my $config = Jifty->config;
13
14 # Retrieve the Jifty::DBI handle
15 my $handle = Jifty->handle;
16
17 # Load an application class, very handy in plugins
18 my $class = Jifty->app_class('Model', 'Foo');
19 my $foo = $class->new;
20 $foo->create( frobnicate => 42 );
21
22 # Configure information related to your application's actions
23 my $api = Jifty->api;
24
25 # Make parts of your page "subscribe" to information in a fragment
26 my $subs = Jifty->subs;
27
28 # Share information via IPC::PubSub in your application
29 my $bus = Jifty->bus;
30
31 # Retrieve general information about Mason
32 my $handler = Jifty->handler;
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
33
34 DESCRIPTION
35 Yet another web framework.
36
37 What's cool about Jifty? (Buzzwords)
38 DRY (Don't Repeat Yourself)
39 Jifty tries not to make you say things more than once.
40
41 Full-stack
42 Out of the proverbial box, Jifty comes with one way to do everything
43 you should need to do: One database mapper, one templating system,
44 one web services layer, one AJAX toolkit, one set of handlers for
45 standalone or FastCGI servers. We work hard to make all the bits
46 play well together, so you don't have to.
47
48 Continuations
49 With Jifty, it's easy to let the user go off and do something else,
50 like fill out a wizard, look something up in the help system or go
51 twiddle their preferences and come right back to where they were.
52
53 Form-based dispatch
54 This is one of the things that Jifty does that we've not seen
55 anywhere else. Jifty owns your form rendering and processing. This
56 means you never need to write form handling logic. All you say is "I
57 want an input for this argument here" and Jifty takes care of the
58 rest. (Even autocomplete and validation)
59
60 A Pony
61 Jifty is the only web application framework that comes with a pony.
62
63 Introduction
64 If this is your first time using Jifty, Jifty::Manual::Tutorial is
65 probably a better place to start.
66
67 METHODS
68 new PARAMHASH
69 This class method instantiates a new "Jifty" object. This object deals
70 with configuration files, logging and database handles for the system.
be1da76 @sartak Update README
sartak authored
71 Before this method returns, it calls the application's "start" method
72 (i.e. "MyApp->start") to handle any application-specific startup.
73
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
74 Most of the time, the server will call this for you to set up your
be1da76 @sartak Update README
sartak authored
75 "Jifty" object. If you are writing command-line programs that want to
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
76 use your libraries (as opposed to web services) you will need to call
77 this yourself.
78
79 See Jifty::Config for details on how to configure your Jifty
80 application.
81
82 Arguments
83 no_handle
84 If this is set to true, Jifty will not create a Jifty::Handle and
85 connect to a database. Only use this if you're about to drop the
86 database or do something extreme like that; most of Jifty expects
87 the handle to exist. Defaults to false.
88
be1da76 @sartak Update README
sartak authored
89 no_views
90 If this is set to true, does not initialize any of the view handling
91 components of Jifty. This is useful if you are running a
92 command-line script, and not want the overhead associated with it.
93 This also prevents the mason cache files from being created, which
94 may be the right thing if your script is running as a privileged
95 user. Defaults to false.
96
97 logger_component
98 The name that Jifty::Logger will log under. If you don't specify
99 anything Jifty::Logger will log under the empty string. See
100 Jifty::Logger for more infomation.
101
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
102 config
103 An accessor for the Jifty::Config object that stores the configuration
104 for the Jifty application.
105
106 logger
107 An accessor for our Jifty::Logger object for the application.
108
be1da76 @sartak Update README
sartak authored
109 You probably aren't interested in this. See "log" for information on how
110 to make log messages.
111
112 handler
113 An accessor for our Jifty::Handler object.
114
115 This is another method that you usually don't want to mess with too
116 much. Most of the interesting web bits are handled by "web".
117
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
118 handle
119 An accessor for the Jifty::Handle object that stores the database handle
120 for the application.
121
be1da76 @sartak Update README
sartak authored
122 api
123 An accessor for the Jifty::API object that publishes and controls
124 information about the application's Jifty::Actions.
125
126 app_class(@names)
127 Return Class in application space. For example "app_class('Model',
128 'Foo')" returns YourApp::Model::Foo.
129
130 By the time you get it back, the class will have already been required
131
132 Is you pass a hashref as the first argument, it will be treated as
133 configuration parameters. The only existing parameter is "require",
134 which defaults to true.
135
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
136 web
137 An accessor for the Jifty::Web object that the web interface uses.
138
be1da76 @sartak Update README
sartak authored
139 subs
140 An accessor for the Jifty::Subs object that the subscription uses.
141
142 bus
143 Returns an IPC::PubSub object for the current application.
144
145 plugins
146 Returns a list of Jifty::Plugin objects for this Jifty application.
147
148 find_plugin
149 Find plugins by name.
150
151 class_loader
152 An accessor for the Jifty::ClassLoader object that stores the loaded
153 classes for the application.
154
155 setup_database_connection
156 Set up our database connection. Optionally takes a param hash with a
157 single argument. This method is automatically called by "new".
158
159 no_handle
160 Defaults to false. If true, Jifty won't try to set up a database
161 handle
162
163 pre_init
164 Defaults to false. If true, plugins are notificed that this is a
165 pre-init, any trigger registration in "init()" should not happen
166 during this stage. Note that model mixins's register_triggers is
167 unrelated to this.
168
169 If "no_handle" is set or our application's config file is missing a
170 "Database" configuration section or *has* a "SkipDatabase: 1" directive
171 in its framework configuration, does nothing.
172
173 app_instance_id
174 Returns a globally unique id for this instance of this jifty
175 application. This value is generated the first time it's accessed
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
176
177 SEE ALSO
be1da76 @sartak Update README
sartak authored
178 <http://jifty.org>, Jifty::Manual::Tutorial, Jifty::Everything,
179 Jifty::Config, Jifty::Handle, Jifty::Logger, Jifty::Handler, Jifty::Web,
180 Jifty::API, Jifty::Subs, IPC::PubSub, Jifty::Plugin, Jifty::ClassLoader
077e9e2 @obra Glasser pointed out that I accitentally nuked the README
obra authored
181
182 AUTHORS
183 Jesse Vincent, Alex Vandiver and David Glasser.
184
be1da76 @sartak Update README
sartak authored
185 LICENSE
186 Jifty is Copyright 2005-2008 Best Practical Solutions, LLC. Jifty is
187 distributed under the same terms as Perl itself.
188
Something went wrong with that request. Please try again.