Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/trunk@6621 e84bef0a-9b06-0410-84ba-c4c9edb13aeb
  • Loading branch information
sartak committed Mar 17, 2009
1 parent 88fa024 commit be1da76
Showing 1 changed file with 115 additions and 6 deletions.
121 changes: 115 additions & 6 deletions README
@@ -1,5 +1,35 @@
NAME
Jifty -- Just Do It
Jifty - an application framework

SYNOPSIS
# 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 => _('W00t'), url => '/whatsit' );

# Retrieve information from your application's 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('Model', 'Foo');
my $foo = $class->new;
$foo->create( frobnicate => 42 );

# Configure information related to your application's 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;

DESCRIPTION
Yet another web framework.
Expand Down Expand Up @@ -38,8 +68,11 @@ METHODS
new PARAMHASH
This class method instantiates a new "Jifty" object. This object deals
with configuration files, logging and database handles for the system.
Before this method returns, it calls the application's "start" method
(i.e. "MyApp->start") to handle any application-specific startup.

Most of the time, the server will call this for you to set up your
"Jifty" object. If you are writing command-line programs htat want to
"Jifty" 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.

Expand All @@ -53,27 +86,103 @@ METHODS
database or do something extreme like that; most of Jifty expects
the handle to exist. Defaults to false.

no_views
If this is set to true, does not initialize any of the view handling
components of Jifty. This is useful if you are running a
command-line script, and not want the overhead associated with it.
This also prevents the mason cache files from being created, which
may be the right thing if your script is running as a privileged
user. Defaults to false.

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 infomation.

config
An accessor for the Jifty::Config object that stores the configuration
for the Jifty application.

logger
An accessor for our Jifty::Logger object for the application.

You probably aren't interested in this. See "log" for information on how
to make log messages.

handler
An accessor for our Jifty::Handler object.

This is another method that you usually don't want to mess with too
much. Most of the interesting web bits are handled by "web".

handle
An accessor for the Jifty::Handle object that stores the database handle
for the application.

api
An accessor for the Jifty::API object that publishes and controls
information about the application's Jifty::Actions.

app_class(@names)
Return Class in application space. For example "app_class('Model',
'Foo')" returns YourApp::Model::Foo.

By the time you get it back, the class will have already been required

Is you pass a hashref as the first argument, it will be treated as
configuration parameters. The only existing parameter is "require",
which defaults to true.

web
An accessor for the Jifty::Web object that the web interface uses.

LICENSE
Jifty is Copyright 2005 Best Practical Solutions, LLC. Jifty is
distributed under the same terms as Perl itself.
subs
An accessor for the Jifty::Subs object that the subscription uses.

bus
Returns an IPC::PubSub object for the current application.

plugins
Returns a list of Jifty::Plugin objects for this Jifty application.

find_plugin
Find plugins by name.

class_loader
An accessor for the Jifty::ClassLoader object that stores the loaded
classes for the application.

setup_database_connection
Set up our database connection. Optionally takes a param hash with a
single argument. This method is automatically called by "new".

no_handle
Defaults to false. If true, Jifty won't try to set up a database
handle

pre_init
Defaults to false. If true, plugins are notificed that this is a
pre-init, any trigger registration in "init()" should not happen
during this stage. Note that model mixins's register_triggers is
unrelated to this.

If "no_handle" is set or our application's config file is missing a
"Database" configuration section or *has* a "SkipDatabase: 1" directive
in its framework configuration, does nothing.

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

SEE ALSO
<http://jifty.org>
<http://jifty.org>, 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

AUTHORS
Jesse Vincent, Alex Vandiver and David Glasser.

LICENSE
Jifty is Copyright 2005-2008 Best Practical Solutions, LLC. Jifty is
distributed under the same terms as Perl itself.

0 comments on commit be1da76

Please sign in to comment.