Status: Unfinished
As connection speeds, internet browsers and web technologies have progressed the internet has become richer than ever before. Web 2.0 applications dominate sites and, unlike a few years back, javascript dominates the web.
With the recent addition to the web in the form of HTML5, the new W3C standard, browsers are supporting more page elements than ever before, but as with all technologies, there are gaps which have to be filled with custom widgets.
PAL is a combination of a XML language compatible with HTML and a server library designed for PHP, which allows those custom widgets to be drawn up in XML, embedded right inside the HTML. Because of this developers can worry less about creating the widgets and more about creating the pages, as javascript files, css files and native HTML are ported in with least effort.
Furthermore PAL allows the developer to forget about the HEAD section of the web page, as this is built by the system at the end of the page build. This means that should the website work off a template, the system can still add custom stylesheets within a particular page with minimal effort as the structure of the web page is managed by PAL.
Below is a sample of PAL markup:
<?php
ob_start();
?>
<markup xmlns:pal="http://www.iexpand.co.uk/projects/PAL/ns/pal/">
<pal:include type="javascript" loc="PAL/js/Ajax.js" />
<pal:include type="javascript" loc="PAL/js/AjaxInterface.js" />
<pal:include type="stylesheet" loc="css/core.css" />
<div id="leftbar">
<pal:widget type="Panel" id="pal_panel_top" behaviour="tab" size="small" class="pal_panel_sticky">
<pal:page title="Common" default="default">
<pal:widget type="QuickTask" title="Photos">
<pal:task href="/?page=photos">Search for photo</pal:task>
<pal:task href="#">Download package</pal:task>
<pal:task href="#">Stitch panaramic</pal:task>
<pal:task href="#">Name 3</pal:task>
<pal:task href="#">Name 4</pal:task>
</pal:widget>
</pal:page>
<pal:page colour="yellow" title="Batch">
Test 2
</pal:page>
<pal:page colour="red" title="Pick up">
Test 3
</pal:page>
</pal:widget>
<div class="cleared"></div>
</div>
<div id="main">
<?php
if (!isset($_GET['page']) || strpos($_GET['page'],".") !== false || !file_exists($_GET['page'].".php"))
include "home.php";
else
include $_GET['page'].".php";
?>
</div>
</markup>
<?php
//echo ob_get_clean();
include "PAL/Launcher.php";
$Doc = new PALMarkup(ob_get_clean());
$HTTPDoc = new HTTPDocument($Doc);
$HTTPDoc->Title = "Home Page";
$HTTPDoc->Manifest = "manifest/index.manifest";
$HTTPDoc->Send();
?>
There is still lots of work to do, however work has been done to enable HTML5 compatibility, such as offline data storage.
As there is no particular purpose for this project, the code is being developed at a slow rate, however if other developers wish to continue developing, let me know
Attachments:
| File | Description | File size |
PAL Nightly Pre-alpha | PAL development so far - is working, but needs loads more modules, a better stylesheet system and loads more testing! | 175 Kb |