PAD Showcase
All tags/Diff

Two versions of a paragraph

An edited paragraph word by word - struck what went, marked what came.

1 The data diff/paragraph.php php
<?php

  $draft = 'PAD templates drive the application: a page is a template, and the template asks '
         . 'for its data. There are no controllers and no routing tables - you create a file '
         . 'and it is a page. Most tags are rendered on the server, so they work without JavaScript.';

  $final = 'PAD templates drive the application: every page is a template, and the template '
         . 'asks for the data it needs. There are no controllers, no routes and no glue code - '
         . 'you create a file and it is a page. Every tag is rendered on the server, so it works '
         . 'without JavaScript, in print and in e-mail.';

?>
2 The tag diff/paragraph.pad pad
{diff $draft, $final}
3 The result rendered on the server
PAD templates drive the application: aevery page is a template, and the template asks for itsthe data it needs. There are no controllers, no routes and no routing tablesglue code - you create a file and it is a page. Most tags areEvery tag is rendered on the server, so they workit works without JavaScript, in print and in e-mail.