Progressive-Web-Application

 view release on metacpan or  search on metacpan

lib/Progressive/Web/Application.pm  view on Meta::CPAN

		pathpart => 'payments',
		manifest => {
			name => 'Progressive Web Application Demo',
			short_name => 'PWA Demo',
			icons => '/root/static/images/icons',
			start_url => '/',
			display => 'standalone',
			background_color => '#2b3e50',
			theme_color => '#2c3e50'
		},
		params => {
			offline_path => '/offline.html',
			cache_name => 'my-cache-name',
			files_to_cache  => [
				'/manifest.json',
				'/favicon.ico',
				'/static/css/bootstrap.min.css',
				'/static/css/lnation.css',
				...
			],
		}
	});

	$pwa->compile();

	...


=head1 DESCRIPTION

This module is a Utility for aiding you in creating Progressive Web Applications (PWA's). Progressive web apps use modern browser APIs along with traditional progressive enhancement strategy to create cross-platform applications. These apps work ever...

PWAs should be discoverable, installable, linkable, network independent, progressive, re-engageable, responsive, and safe.

=head2 Discoverable

The eventual aim is that web apps should have better representation in search engines, be easier to expose, catalog and rank, and have metadata usable by browsers to give them special capabilities.

=head2 Installable

A core part of the apps experience is for users to have app icons on their home screen, that launch in a native container that feels integrated with the underlying platform.

=head2 Linkable

One of the most powerful features of the Web is to be able to link to an app at a specific URL - no app store needed, no complex installation process. This is how it has always been.

=head2 Network Independent

Can work when the network is unreliable, or even non-existent.

=head2 Progressive

Can be developed to provide a modern experience to fully capable browsers, and an acceptable (although not quite as shiny) experience in less capable browsers.

=head2 Re-engageable

One major advantage of native platforms is the ease with which users can be re-engaged by updates and new content, even when they aren't looking at the app or using their devices. Modern Web APIs allow us to do this too, using new technologies such a...

=head2 Responsive

Responsive web apps use technologies like media queries and viewport to make sure that their UIs will fit any form factor: desktop, mobile, tablet, or whatever comes next.

=head2 Safe

You can verify the true nature of a PWA by confirming that it is at the correct URL, whereas apps in apps stores can often look like one thing, but be another. Example - L<https://twitter.com/andreasbovens/status/926965095296651264>

=cut

=head1 Methods

=cut

=head2 new

Instantiate a new Progressive::Web::Application Object.

	Progressive::Web::Application->new();

=head3 options

=head4 root

The root(/) directory of your application, this is used to validate links and where any output from this module will be compiled/written.
	
	lnation:High lnation$ ls
	MyApp

	.......

	Progressive::Web::Application->new( 
		root => 'MyApp/root'
	);

=cut

=head4 pathpart

Is your application proxied to a path.

	https://localhost/admin/*

	.......

	Progressive::Web::Application->new(
		pathpart => 'admin'
	);

=cut

=head4 manifest 

A Hash reference of params to build the web app manifest. See manifest_schema for more information.

	Progressive::Web::Application->new(
		manifest => {
			name => 'Progressive Web Application Demo',
			short_name => 'PWA Demo',
			icons => '/root/static/images/icons',
			start_url => '/',
			display => 'standalone',
			background_color => '#2b3e50',



( run in 0.460 second using v1.01-cache-2.11-cpan-39bf76dae61 )