Non-Framework MVC sites with PHP

5,407 views

Published on

Non-Framework MVC sites with PHP

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

No Downloads
Views
Total views
5,407
On SlideShare
0
From Embeds
0
Number of Embeds
1,513
Actions
Shares
0
Downloads
63
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Non-Framework MVC sites with PHP

  1. 1. Non-framework MVC site Cesar D. Rodas http://crodas.org/ - http://cesar.la/ @crodas http://www.flickr.com/photos/alex_stanoi/2692787831/
  2. 2. http://www.flickr.com/photos/hm2k/3276868036/
  3. 3. PHP? who are using it?
  4. 4. `
  5. 5. OK, OK got it. but why don't you use a framework?
  6. 6. “As much easier for the developer, harder for the computer”
  7. 7. Talk is cheap, show me the code
  8. 8. Let's build a Twitter-clone http://www.flickr.com/photos/powerpig/3614473636/
  9. 9. ● PHP 5 ● Simple-ORM ● MySQL ● MongoDB http://www.flickr.com/photos/powerpig/3614473636/
  10. 10. git clone http://crodas.org/latinoware-2009.git http://www.flickr.com/photos/herr_akx/399196999/
  11. 11. Public domain http://www.flickr.com/photos/herr_akx/399196999/
  12. 12. Coding in layers you can do crazy things. http://www.flickr.com/photos/herr_akx/399196999/
  13. 13. ... such as, let's drop MySQL and use MongoDB http://www.flickr.com/photos/herr_akx/399196999/
  14. 14. git pull origin mongo http://www.flickr.com/photos/herr_akx/399196999/
  15. 15. ● C++'s revenge ● Super simple ● More than just key-value ● Think in documents, no tables ● Sharding ● Pretty fast (at least on my tests) ● JSON-like
  16. 16. MySQL's problems (and RBDMS in general) ● High abstraction at a high price ● Really hard to make it fault tolerant ● Most web-sites (except for those which deals with money) doesn't really need a RDBMS ● Out-of-the-box solution for small/medium web- sites
  17. 17. Scaling up to the sky http://www.flickr.com/photos/lecates/536763868/
  18. 18. ● Fast front end server (Nginx, perbal) ● Avoid re-do the same thing twice (client cache) ● Static files to front end, scripts to back end ● Use MongoDB (or might be CouchDB) ● KISS ● DNS round-robin across many front-ends http://www.flickr.com/photos/lecates/536763868/
  19. 19. Conclusions ● If a framework is enough for you, go for it ● Done by hand is better, and much more efficient ● Small-efforts at long terms are better http://www.flickr.com/photos/lecates/536763868/

×