SlideShare una empresa de Scribd logo
1 de 11
^, 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/

Más contenido relacionado

La actualidad más candente

jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
benalman
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
Yusuke Wada
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
Yusuke Wada
 
Drupal 7 module development
Drupal 7 module developmentDrupal 7 module development
Drupal 7 module development
Adam Kalsey
 

La actualidad más candente (20)

Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design Patterns
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
jQuery Performance Rules
jQuery Performance RulesjQuery Performance Rules
jQuery Performance Rules
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
Capybara
CapybaraCapybara
Capybara
 
PSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworksPSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworks
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Desenvolvendo APIs em Go usando Middlewares
Desenvolvendo APIs em Go usando MiddlewaresDesenvolvendo APIs em Go usando Middlewares
Desenvolvendo APIs em Go usando Middlewares
 
PerlでWeb API入門
PerlでWeb API入門PerlでWeb API入門
PerlでWeb API入門
 
JavaScript APIs In Focus
JavaScript APIs In FocusJavaScript APIs In Focus
JavaScript APIs In Focus
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
Ch1(introduction to php)
Ch1(introduction to php)Ch1(introduction to php)
Ch1(introduction to php)
 
Php, mysq lpart1
Php, mysq lpart1Php, mysq lpart1
Php, mysq lpart1
 
Php, mysq lpart4(processing html form)
Php, mysq lpart4(processing html form)Php, mysq lpart4(processing html form)
Php, mysq lpart4(processing html form)
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
 
How to actually use promises - Jakob Mattsson, FishBrain
How to actually use promises - Jakob Mattsson, FishBrainHow to actually use promises - Jakob Mattsson, FishBrain
How to actually use promises - Jakob Mattsson, FishBrain
 
Drupal 7 module development
Drupal 7 module developmentDrupal 7 module development
Drupal 7 module development
 

Destacado

Machine Learning with R
Machine Learning with RMachine Learning with R
Machine Learning with R
butest
 
Max Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learningMax Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learning
Vivian S. Zhang
 

Destacado (12)

Caret Package for R
Caret Package for RCaret Package for R
Caret Package for R
 
The caret Package: A Unified Interface for Predictive Models
The caret Package: A Unified Interface for Predictive ModelsThe caret Package: A Unified Interface for Predictive Models
The caret Package: A Unified Interface for Predictive Models
 
Model Automation in R
Model Automation in RModel Automation in R
Model Automation in R
 
Predictive Modeling Workshop
Predictive Modeling WorkshopPredictive Modeling Workshop
Predictive Modeling Workshop
 
Data mining with caret package
Data mining with caret packageData mining with caret package
Data mining with caret package
 
The caret package is a unified interface to a large number of predictive mode...
The caret package is a unified interface to a large number of predictive mode...The caret package is a unified interface to a large number of predictive mode...
The caret package is a unified interface to a large number of predictive mode...
 
Machine Learning with R
Machine Learning with RMachine Learning with R
Machine Learning with R
 
Max Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learningMax Kuhn's talk on R machine learning
Max Kuhn's talk on R machine learning
 
Analytical method validation by manoj ingale(best ppts)
Analytical method validation by manoj ingale(best ppts)Analytical method validation by manoj ingale(best ppts)
Analytical method validation by manoj ingale(best ppts)
 
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorKaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
 
Analytical Method Validation
Analytical Method ValidationAnalytical Method Validation
Analytical Method Validation
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
 

Similar a Caret Introduction

Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2
RORLAB
 
Services web RESTful
Services web RESTfulServices web RESTful
Services web RESTful
goldoraf
 
Article 01 What Is Php
Article 01   What Is PhpArticle 01   What Is Php
Article 01 What Is Php
drperl
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
Nerd Tzanetopoulos
 

Similar a Caret Introduction (20)

Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python Meetup
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
 
Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2
 
Django
DjangoDjango
Django
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)Vancouver League of Drupallers - Remembering the User (August 2008)
Vancouver League of Drupallers - Remembering the User (August 2008)
 
Services web RESTful
Services web RESTfulServices web RESTful
Services web RESTful
 
Article 01 What Is Php
Article 01   What Is PhpArticle 01   What Is Php
Article 01 What Is Php
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Phpbasics
PhpbasicsPhpbasics
Phpbasics
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Caret Introduction

  • 1. ^, a self compiling PHP framework
  • 2. Intro. jeff = meta programmer
  • 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. ^ is a simplified model of modern web practices written for basic PHP (with no OOP). (basically is pure PHP with special hokey-pokey comments)
  • 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 urls that 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 on RewriteRule ^[a-zA-Z](.*) c.php/$0 RewriteRule ^$ c.php/ Production: RewriteEngine on RewriteRule ^[a-zA-Z](.*) e.php/$0 RewriteRule ^$ e.php/