If you can't read please download the document
Upload
chris-chubb
View
1.172
Download
0
Embed Size (px)
DESCRIPTION
An overview of the RedBean ORM for PHP
Citation preview
2. RedBean ORM
3. The Easiest ORM 4. Simple to
5. Use 6. Grow 7. Live with 8. Are you living in the real world?
9. Ever heard this?
10. We'll fix it tomorrow 11.
12. 1 connect line 13. Start coding 14. include_once('rb.php'); $book = $redbean->dispense("book"); //Make a new book $book->author = "Santa Claus"; //Give it some properties $book->title = "Secrets of Christmas"; $id = $redbean->store( $book ); //Persist it $book = $redbean->load( "book", $id ); //Find a book $books = Finder::where("book", "author = :str", array(":str"=>'Santa Claus')); $redbean->trash( $book ); //Throw it away 15. Got Code?
16. What Else?
Hierarchies
17. Write your own models
18. Data Normalization class Model_Book extends RedBean_SimpleModel {public function update() { if (!preg_match( $somePattern, $this->title )) { throw new Exception("Illegal title!"); }} } 19. Advanced Stuff
20. Caching Unit of Work For Transactions 21. Framework Integration
22. Zend 23. Code Igniter 24. Good/Bad/Fugly
25. Easy to understand(5 methods on one class) 26. No new languages (uses SQL for queries) Bad
Fugly