Ado
view release on metacpan or search on metacpan
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
outlined in Mojolicious::Guides::Contributing apply for Ado too. For
specific to Ado rules see Ado::Manual::Contributing.
We expect that you know how Internet works, how to write Perl modules and
are familiar with Mojolicious.
To ease discussions on Ado further development, a forum was created.
<https://groups.google.com/d/forum/ado-dev>.
REST API
Ado strives for strict separation of concerns. The best way to achieve
this is to fully separate the client code from the server code. Ado is
ideally suited for the purpose thanks to Mojolicious. Every
resource(route) is accessible via a browser as "/path/to/resourse" an
returns HTML or using "/path/to/resourse.json" and returns JSON. We follow
closely and elaborate on the recommendations in "RESTful Service Best
Practices" at <http://www.RestApiTutorial.com>. See Ado::Manual::RESTAPI.
PLUGINS
Business-specific applications for an Ado-based system are usually
implemented as plugins. One way to contribute to Ado is by writing
rules see [Ado::Manual::Contributing](https://metacpan.org/pod/Ado::Manual::Contributing).
We expect that you know how Internet works, how to write Perl modules and are
familiar with [Mojolicious](https://metacpan.org/pod/Mojolicious).
To ease discussions on Ado further development, a forum was created.
[https://groups.google.com/d/forum/ado-dev](https://groups.google.com/d/forum/ado-dev).
# REST API
Ado strives for strict separation of concerns. The best way to achieve this
is to fully separate the client code from the server code. Ado is ideally
suited for the purpose thanks to [Mojolicious](https://metacpan.org/pod/Mojolicious). Every resource(route) is
accessible via a browser as `/path/to/resourse` an returns HTML or using
`/path/to/resourse.json` and returns JSON. We follow closely and elaborate
on the recommendations in "RESTful Service Best Practices" at
[http://www.RestApiTutorial.com](http://www.RestApiTutorial.com). See [Ado::Manual::RESTAPI](https://metacpan.org/pod/Ado::Manual::RESTAPI).
# PLUGINS
Business-specific applications for an Ado-based system are usually implemented
lib/Ado/Manual.pod view on Meta::CPAN
rules see L<Ado::Manual::Contributing>.
We expect that you know how Internet works, how to write Perl modules and are
familiar with L<Mojolicious>.
To ease discussions on Ado further development, a forum was created.
L<https://groups.google.com/d/forum/ado-dev>.
=head1 REST API
Ado strives for strict separation of concerns. The best way to achieve this
is to fully separate the client code from the server code. Ado is ideally
suited for the purpose thanks to L<Mojolicious>. Every resource(route) is
accessible via a browser as C</path/to/resourse> an returns HTML or using
C</path/to/resourse.json> and returns JSON. We follow closely and elaborate
on the recommendations in "RESTful Service Best Practices" at
L<http://www.RestApiTutorial.com>. See L<Ado::Manual::RESTAPI>.
=head1 PLUGINS
Business-specific applications for an Ado-based system are usually implemented
lib/Ado/Manual/Contributing.pod view on Meta::CPAN
L<QUnit|http://qunitjs.com/>. Use exclusively L<Test::Mojo> for REST API tests.
Looking at your tests, one should easily conclude how your code should be used.
=head2 REST AND CORS
Ado is a system that will provide REST services out of the box.
Separation of concerns must be to its maximum. Your REST API must be
self describing. Elaborate on the recommendations in
"RESTful Service Best Practices" at L<www.RestApiTutorial.com>.
You must have a reference implementation of a browser-based user-agent(yourpluginroute.html) residing in
C<Ado/public/>. It would be best if your code is CORS-ready this
should be easy if your code depends on Ado::Plugin::CORS(TODO).
See L<Ado::Manual::RESTAPI>(TODO). Feel free to propose additional best
practices. Be ready to explain well your proposal.
=head2 TEMPLATES
We have a minimal set of templates residing in the C<templates> directory.
Separation of concerns must be to its maximum. Strive for minimal logic in
your templates if you have such.
=head2 MODEL
lib/Ado/Manual/Installation.pod view on Meta::CPAN
carton exec local/bin/ado daemon
=head2 local::lib
Be warned that L<local::lib>, installed on some shared hosting providers'
machines, sets the environment variables C<$PERL5LIB, $PERL_LOCAL_LIB_ROOT,
$PERL_MB_OPT, $PERL_MM_OPT>. If you are aware and expect Ado to be installed in
C<$PERL_LOCAL_LIB_ROOT> (usually C<~/perl5>) then fine. If you are using your
own Perl and not the provided on the machine, you have to reset those variables
while installing Ado. Otherwise you may be unpleasantly surprised. For
ActivePerl it may be best to install Ado dependencies using L<PPM>. Ado is
available as L<PPM> package too.
export PERL_MB_OPT='--install_base /home/you/example.com'
#your own perl is already in $PATH and dependencies are installed
perl Build.PL
./Build install
=head2 DUMMY
May be you want to just unwrap and run it...
lib/Ado/Manual/Plugins.pod view on Meta::CPAN
INSERT INTO blog(title,body,user_id,group_id)
VALUES('Hey You','Hello Universe',3,3);
=item * Generate the files for the plugin. These are the files which you will edit :).
$ cd ~/opt/public_dev
$ ado generate adoplugin -n Blog --crud -t blog
The above command will generate the needed files for an ado plugin which can
even be uploaded to and subsequently downloaded from
L<CPAN|http://www.cpan.org/>. L<CPAN> is the best open source dependency
management system. You can also use L<Stratopan|https://stratopan.com/> if you
wish.
=back
Ado uses L<Ado::Build> and L<Ado::BuildPlugin> which extend L<Module::Build>.
They were created to add some custom actions and handle the additional
C<templates>,C<log> and C<public> directories in Ado root folder.
The file tree looks like the following:
lib/Ado/Manual/RESTAPI.pod view on Meta::CPAN
=encoding utf8
=head1 NAME
Ado::Manual::RESTAPI - all resources provided by Ado.
=head1 RESOURCES
This REST API was developed in an essay to get the best from the following ressources.
L<Web Linking|http://tools.ietf.org/html/rfc5988>,
L<Link Relations|http://www.iana.org/assignments/link-relations/link-relations.xhtml>,
L<http://www.restapitutorial.com/>
=cut
lib/Ado/Plugin/I18n.pm view on Meta::CPAN
#Override the current language.
#you need to do this only in rare cases (like in an Ado::Command)
$c->language('bg');
#what is my language?
my $current_language = $c->language;
=head1 DESCRIPTION
L<Ado::Plugin::I18n> localizes your application and site.
It automatically detects the current UserAgent language preferences
and selects the best fit from the supported by the application languages.
The current language is detected and set in L<Mojolicious/around_action> hook.
Various methods for setting the language are supported.
=head1 OPTIONS
The following options can be set in C<etc/ado.conf> or in C<etc/plugins/i18n.conf>.
You have to create first C<etc/plugins/i18n.conf> so Ado can pick it up.
You can enable all supported methods to detect the language in your application.
The methods which will be used to detect and set the current
lib/Ado/Plugin/I18n.pm view on Meta::CPAN
language_from_headers => 1
language_from_cookie => 1,
language_from_param => 1,
language_from_host => 0,
language_from_route => 0,
...
}
This is the fifth option that will be checked if enabled and if the language is
not yet detected using some of the previous methods.
It is best to keep this option enabled.
Default value is 1.
=head2 language_param
#language_param=> 'l'
current language is <%= $l %>
Cookie: l=bg;
#language_param=> 'lang'
current language is <%= $lang %>
Cookie: lang=bg;
public/doc/en/intro.md view on Meta::CPAN
The most flexible way to install Ado is manually on the command line.
It is highly recommended to have a separate Perl distribution (not the one that comes with your OS).
ActivePerl or perlbrew are both fine.
All deployment scenarios described at [Mojolicious/Guides/Cookbook#DEPLOYMENT](http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#DEPLOYMENT)
are possible and specific custom deployments can be done.
Ado is not actively tested under Windows, but there is an [Ado PPM package](http://code.activestate.com/ppm/Ado/) for Mac OSX, Linux and Windows maintained by Active State.
##REST API[^rest]
Ado strives for strict separation of concerns (MVC[^2]). The best way to achieve this is to fully separate the client code from the server code. Ado is ideally suited for the purpose thanks to Mojolicious. Every resource is accessible via the REST AP...
##Roadmap
Below are the main activities considered mandatory for implementation to reach version 1.00.
1. Implement Ado::Plugin::I18N with messages loaded from the database (bundled with Ado).
2. Implement Ado::Plugin::Vest â a chat application.
3. Implement Ado::Plugin::CORS â allow Ado UI pieces to be embedded into other sites.
4. Implement Ado::Plugin::Site â end-users front-end.
1. Implement Ado::Plugin::Signup â user registration.
2. Implement Ado::Plugin::Profile â managing users' own profiles.
( run in 0.699 second using v1.01-cache-2.11-cpan-4e96b696675 )