.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Jifty 3pm" .TH Jifty 3pm "2011-05-18" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Jifty \- an application framework .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& # Object containing lots of web related goodies... \& my $web = Jifty\->web; \& my $request = Jifty\->web\->request; \& my $response = Jifty\->web\->response; \& my $link = Jifty\->web\->link( label => _(\*(AqW00t\*(Aq), url => \*(Aq/whatsit\*(Aq ); \& \& # Retrieve information from your application\*(Aqs etc/config.yml file. \& my $config = Jifty\->config; \& \& # Retrieve the Jifty::DBI handle \& my $handle = Jifty\->handle; \& \& # Load an application class, very handy in plugins \& my $class = Jifty\->app_class(\*(AqModel\*(Aq, \*(AqFoo\*(Aq); \& my $foo = $class\->new; \& $foo\->create( frobnicate => 42 ); \& \& # Configure information related to your application\*(Aqs actions \& my $api = Jifty\->api; \& \& # Make parts of your page "subscribe" to information in a fragment \& my $subs = Jifty\->subs; \& \& # Share information via IPC::PubSub in your application \& my $bus = Jifty\->bus; \& \& # Retrieve general information about Mason \& my $handler = Jifty\->handler; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Yet another web framework. .SS "What's cool about Jifty? (Buzzwords)" .IX Subsection "What's cool about Jifty? (Buzzwords)" .IP "\s-1DRY\s0 (Don't Repeat Yourself)" 4 .IX Item "DRY (Don't Repeat Yourself)" Jifty tries not to make you say things more than once. .IP "Full-stack" 4 .IX Item "Full-stack" Out of the proverbial box, Jifty comes with one way to do everything you should need to do: One database mapper, one templating system, one web services layer, one \s-1AJAX\s0 toolkit, one set of handlers for standalone or FastCGI servers. We work hard to make all the bits play well together, so you don't have to. .IP "Continuations" 4 .IX Item "Continuations" With Jifty, it's easy to let the user go off and do something else, like fill out a wizard, look something up in the help system or go twiddle their preferences and come right back to where they were. .IP "Form-based dispatch" 4 .IX Item "Form-based dispatch" This is one of the things that Jifty does that we've not seen anywhere else. Jifty owns your form rendering and processing. This means you never need to write form handling logic. All you say is \*(L"I want an input for this argument here\*(R" and Jifty takes care of the rest. (Even autocomplete and validation) .IP "A Pony" 4 .IX Item "A Pony" Jifty is the only web application framework that comes with a pony. .SS "Introduction" .IX Subsection "Introduction" If this is your first time using Jifty, Jifty::Manual::Tutorial is probably a better place to start. .SH "METHODS" .IX Header "METHODS" .SS "new \s-1PARAMHASH\s0" .IX Subsection "new PARAMHASH" This class method instantiates a new \f(CW\*(C`Jifty\*(C'\fR object. This object deals with configuration files, logging and database handles for the system. Before this method returns, it calls the application's \f(CW\*(C`start\*(C'\fR method (i.e. \f(CW\*(C`MyApp\->start\*(C'\fR) to handle any application-specific startup. .PP Most of the time, the server will call this for you to set up your \f(CW\*(C`Jifty\*(C'\fR object. If you are writing command-line programs that want to use your libraries (as opposed to web services) you will need to call this yourself. .PP See Jifty::Config for details on how to configure your Jifty application. .PP \fIArguments\fR .IX Subsection "Arguments" .IP "no_handle" 4 .IX Item "no_handle" If this is set to true, Jifty will not create a Jifty::Handle and connect to a database. Only use this if you're about to drop the database or do something extreme like that; most of Jifty expects the handle to exist. Defaults to false. .IP "logger_component" 4 .IX Item "logger_component" The name that Jifty::Logger will log under. If you don't specify anything Jifty::Logger will log under the empty string. See Jifty::Logger for more information. .SS "config" .IX Subsection "config" An accessor for the Jifty::Config object that stores the configuration for the Jifty application. .SS "logger" .IX Subsection "logger" An accessor for our Jifty::Logger object for the application. .PP You probably aren't interested in this. See \*(L"log\*(R" for information on how to make log messages. .SS "handler" .IX Subsection "handler" An accessor for our Jifty::Handler object. .PP This is another method that you usually don't want to mess with too much. Most of the interesting web bits are handled by \*(L"web\*(R". .SS "handle" .IX Subsection "handle" An accessor for the Jifty::Handle object that stores the database handle for the application. .SS "api" .IX Subsection "api" An accessor for the Jifty::API object that publishes and controls information about the application's Jifty::Actions. .SS "app_class(@names)" .IX Subsection "app_class(@names)" Return Class in application space. For example \f(CW\*(C`app_class(\*(AqModel\*(Aq, \*(AqFoo\*(Aq)\*(C'\fR returns YourApp::Model::Foo. .PP By the time you get it back, the class will have already been required .PP Is you pass a hashref as the first argument, it will be treated as configuration parameters. The only existing parameter is \f(CW\*(C`require\*(C'\fR, which defaults to true. .SS "web" .IX Subsection "web" An accessor for the Jifty::Web object that the web interface uses. .SS "subs" .IX Subsection "subs" An accessor for the Jifty::Subs object that the subscription uses. .SS "bus" .IX Subsection "bus" Returns an IPC::PubSub object for the current application. .SS "plugins" .IX Subsection "plugins" Returns a list of Jifty::Plugin objects for this Jifty application. .SS "find_plugin" .IX Subsection "find_plugin" Find plugins by name. .SS "class_loader" .IX Subsection "class_loader" An accessor for the Jifty::ClassLoader object that stores the loaded classes for the application. .SS "setup_database_connection" .IX Subsection "setup_database_connection" Set up our database connection. Optionally takes a paramhash with a single argument. This method is automatically called by \*(L"new\*(R". .IP "no_handle" 4 .IX Item "no_handle" Defaults to false. If true, Jifty won't try to set up a database handle .IP "pre_init" 4 .IX Item "pre_init" Defaults to false. If true, plugins are notified that this is a pre-init, any trigger registration in \f(CW\*(C`init()\*(C'\fR should not happen during this stage. Note that model mixins' \f(CW\*(C`register_triggers\*(C'\fR is unrelated to this. .PP If \f(CW\*(C`no_handle\*(C'\fR is set or our application's config file is missing a \f(CW\*(C`Database\*(C'\fR configuration section or \fIhas\fR a \f(CW\*(C`SkipDatabase: 1\*(C'\fR directive in its framework configuration, does nothing. .SS "app_instance_id" .IX Subsection "app_instance_id" Returns a globally unique id for this instance of this jifty application. This value is generated the first time it's accessed .SS "background \s-1SUB\s0" .IX Subsection "background SUB" Forks a background process, and ensures that database connections and sockets are not shared with the parent process. .SS "admin_mode" .IX Subsection "admin_mode" Returns true if the application is in admin mode. This should be used instead of \f(CW\*(C`Jifty\->config\->framework(\*(AqAdminMode\*(Aq)\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" , Jifty::Manual::Tutorial, Jifty::Everything, Jifty::Config, Jifty::Handle, Jifty::Logger, Jifty::Handler, Jifty::Web, Jifty::API, Jifty::Subs, IPC::PubSub, Jifty::Plugin, Jifty::ClassLoader .SH "AUTHORS" .IX Header "AUTHORS" Jesse Vincent, Alex Vandiver and David Glasser. .SH "LICENSE" .IX Header "LICENSE" Jifty is Copyright 2005\-2010 Best Practical Solutions, \s-1LLC\s0. Jifty is distributed under the same terms as Perl itself.