caret introduction
TRANSCRIPT
^, a self compiling PHP framework
Intro.
jeff = meta programmer
I want my life (and the lives of my coworkers) to be … nice.
So I search for the silver bullet.
^ is my latest creation.
(yet another PHP web framework)
^ is a simplified model of modern web practices written for basic PHP (with no OOP).
(basically is pure PHP with special hokey-pokey comments)
Introducing the “Topology Compiler”
page.user.php
<?php/*:[url1=users]:*//*:[url2=users/%id]:*//*:[url3=users/%id/%mode]:*//*:[url4=user-profile/%id/%first/%last]:*/?><html>...do stuff with $_REQUEST...</html>
/users?id=123&mode=edit = /users/123/edit
/users?id=123&first=Jeffrey&last=Barber = /uses-profile/123/Jeffrey/Barber
Linking
<a href=”<? HrefGo(“page.user.php”,array('id' => '1')); ?> View User 1</a>
<a href=”<? HrefGo(“page.user.php”,array('id' => '1','mode' => 'edit')); ?> Edit User 1</a>
<a href=”<? HrefGo(“page.user.php”,array('mode' => 'edit') + $_REQUEST); ?> Edit Current User </a>
Poof!SEO urls that will make your marketing guru
swoon!!!!
if(!isset($_GET['_do_not_compile'])){ // Compile exec("./^compiler/step.1.sh > ^obj/__temp.js"); exec("js ^obj/__temp.js > ^obj/sitemap.php"); exec("./^compiler/step.2.sh > ^obj/__temp.js"); exec("js ^obj/__temp.js > ^obj/router.php"); exec("cat ^src/web.model.php ^compiler/engine.php ^obj/router.php > ^e.php");}
include("^e.php");
// did you just vomit a little on the inside? I did
Development:RewriteEngine onRewriteRule ^[a-zA-Z](.*) \^c.php/$0RewriteRule ^$ \^c.php/
Production:RewriteEngine onRewriteRule ^[a-zA-Z](.*) \^e.php/$0RewriteRule ^$ \^e.php/