App-MFILE-WWW
view release on metacpan or search on metacpan
lib/App/MFILE/WWW.pm view on Meta::CPAN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# *************************************************************************
# ------------------------
# App::MFILE::WWW top-level module
# ------------------------
package App::MFILE::WWW;
use 5.012;
use strict;
use warnings;
use App::CELL qw( $CELL $log $site $meta );
use Exporter qw( import );
use File::ShareDir;
use File::Spec;
use Log::Any::Adapter;
use Params::Validate qw( :all );
=head1 NAME
App::MFILE::WWW - Web UI development toolkit with prototype demo app
=head1 VERSION
Version 0.176
=cut
our $VERSION = '0.176';
our @EXPORT_OK = ( '$VERSION' );
=head1 LICENSE
This software is distributed under the "BSD 3-Clause" license, the text of
which can be found in the file named C<COPYING> in the top-level distro
directory. The license text is also reprodued at the top of each source file.
=head1 SYNOPSIS
$ man mfile-www
$ mfile-www
$ firefox http://localhost:5001
=head1 DESCRIPTION
This distro contains a foundation/framework/toolkit for developing the "front
end" portion of web applications.
L<App::MFILE::WWW> is a L<Plack> application that provides a HTTP
request-response handler (based on L<Web::Machine>), CSS and HTML source code
for an in-browser "screen", and JavaScript code for displaying various
"widgets" (menus, forms, etc.) in that screen and for processing user input
from within those widgets.
In addition, infrastructure is included (but need not be used) for user
authentication, session management, and communication with a backend server via
AJAX calls.
Front ends built with L<App::MFILE::WWW> will typicaly be menu-driven,
consisting exclusively of fixed-width Unicode text, and capable of being
controlled from the keyboard, without the use of a mouse. The overall
look-and-feel is reminiscent of the text terminal era.
The distro comes with a prototype (demo) application to illustrate how the
various widgets are used.
=head1 QUICK START (DEMO)
L<App::MFILE::WWW> can be run as a standalone "front-end web application" written
in JavaScript with an embedded HTTP server.
Assuming L<App::MFILE::WWW> has been installed properly, this mode of operation
can be started by running C<mfile-www>, as a normal user (even 'nobody'), with
no arguments or options:
$ mfile-www
The start-up script will write information about its state to the standard
output. This includes the location of its log file, the port where the HTTP
server is listening (default is 5001), etc. For a detailed description of what
happens when the start-up script is run, see the POD of C<mfile-www> itself
- e.g. "man mfile-www".
=head1 DERIVED WWW CLIENTS
When you write your own web frontend using this distro, from
L<App::MFILE::WWW>'s perspective it is a "derived client" and will be referred
to as such in this document.
=head2 Derived client operation
In a derived-client scenario, L<App::MFILE::WWW> serves as the foundation
upon which the "real" application is built.
The derived-client handling is triggered by providing the C<--ddist>
command-line option, i.e.
$ mfile-www --ddist=App-Dochazka-WWW
where 'App-Dochazka-WWW' refers to the Perl module L<App::Dochazka::WWW>,
which is assumed to contain the derived client source code.
( run in 0.765 second using v1.01-cache-2.11-cpan-e1769b4cff6 )