^, 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!!!!
How it works? http://code.google.com/p/caret/ It's open source!
if(!isset($_GET['_do_not_compile'])) { // Compile exec(&quot;./^compiler/step.1.sh > ^obj/__temp.js&quot;); exec(&quot;js ^obj/__temp.js > ^obj/sitemap.php&quot;); exec(&quot;./^compiler/step.2.sh > ^obj/__temp.js&quot;); exec(&quot;js ^obj/__temp.js > ^obj/router.php&quot;); exec(&quot;cat ^src/web.model.php ^compiler/engine.php ^obj/router.php > ^e.php&quot;); } include(&quot;^e.php&quot;); // did you just vomit a little on the inside? I did
Development: RewriteEngine on RewriteRule ^[a-zA-Z](.*) \^c.php/$0 RewriteRule ^$ \^c.php/ Production: RewriteEngine on RewriteRule ^[a-zA-Z](.*) \^e.php/$0 RewriteRule ^$ \^e.php/

Caret Introduction

  • 1.
    ^, a selfcompiling PHP framework
  • 2.
    Intro. jeff = meta programmer
  • 3.
    I want mylife (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)
  • 4.
    ^ is asimplified model of modern web practices written for basic PHP (with no OOP). (basically is pure PHP with special hokey-pokey comments)
  • 5.
  • 6.
    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
  • 7.
    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>
  • 8.
    Poof! SEO urlsthat will make your marketing guru swoon!!!!
  • 9.
    How it works?http://code.google.com/p/caret/ It's open source!
  • 10.
    if(!isset($_GET['_do_not_compile'])) { //Compile exec(&quot;./^compiler/step.1.sh > ^obj/__temp.js&quot;); exec(&quot;js ^obj/__temp.js > ^obj/sitemap.php&quot;); exec(&quot;./^compiler/step.2.sh > ^obj/__temp.js&quot;); exec(&quot;js ^obj/__temp.js > ^obj/router.php&quot;); exec(&quot;cat ^src/web.model.php ^compiler/engine.php ^obj/router.php > ^e.php&quot;); } include(&quot;^e.php&quot;); // did you just vomit a little on the inside? I did
  • 11.
    Development: RewriteEngine onRewriteRule ^[a-zA-Z](.*) \^c.php/$0 RewriteRule ^$ \^c.php/ Production: RewriteEngine on RewriteRule ^[a-zA-Z](.*) \^e.php/$0 RewriteRule ^$ \^e.php/