^, 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. (...
^ is a simplified model of modern web practices written for basic PHP (with no OOP). (basically is pure PHP with special h...
Introducing the “Topology Compiler”
page.user.php <?php /*:[url1=users]:*/ /*:[url2=users/%id]:*/ /*:[url3=users/%id/%mode]:*/ /*:[url4=user-profile/%id/%firs...
Linking <a href=”<? HrefGo(“page.user.php”,array('id' => '1')); ?> View User 1</a> <a href=”<? HrefGo(“page.user.php”,arra...
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 ...
Development: RewriteEngine on RewriteRule ^[a-zA-Z](.*) ^c.php/$0 RewriteRule ^$ ^c.php/ Production: RewriteEngine on Rewr...
Upcoming SlideShare
Loading in …5
×

Caret Introduction

649 views
567 views

Published on

A ultra-minimal introduction to caret, my new web framework. http://www.jeffology.net/go/^caret

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
649
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Caret Introduction

  1. 1. ^, a self compiling PHP framework
  2. 2. Intro. jeff = meta programmer
  3. 3. 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)
  4. 4. ^ is a simplified model of modern web practices written for basic PHP (with no OOP). (basically is pure PHP with special hokey-pokey comments)
  5. 5. Introducing the “Topology Compiler”
  6. 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. 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. 8. Poof! SEO urls that will make your marketing guru swoon!!!!
  9. 9. How it works? http://code.google.com/p/caret/ It's open source!
  10. 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. 11. 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/

×