1 / 38

CodeIgniter

CodeIgniter. ROSDEV, 12 Aprilie 2008. Bodi Zsolt. eu. Ma numesc Bodi Zsolt Tg. Mures student(part-time) la UPM Lead Developer @ MedeeaWeb Works (medeaaweb.com) CTO Off/On Studio (www.offonstudio.com) folosesc CI de 5 luni. Cum faceam site-uri?. (the “good” old times). asa?.

zazu
Download Presentation

CodeIgniter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CodeIgniter ROSDEV, 12 Aprilie 2008 Bodi Zsolt

  2. eu Ma numesc Bodi Zsolt • Tg. Mures • student(part-time) la UPM • Lead Developer @ MedeeaWeb Works (medeaaweb.com) • CTO Off/On Studio (www.offonstudio.com) • folosesc CI de 5 luni

  3. Cum faceam site-uri? (the “good” old times)

  4. asa?

  5. sau poate asa?

  6. E timpul pentru altceva http://codeigniter.com/

  7. CodeIgniter to the rescue • Ce este? • CI este un toolkit pentru oamenii care vor sa faca aplicatii web folosind PHP • este mic • este rapid • creatorii lui va provoaca sa gasiti un framework mai rapid • MVC

  8. Sa vorbim un pic despre MVC ¿Dónde está el baño?

  9. MV si mai cum?

  10. MVC View • View (views/frog_count.php) • <html> • <body> • <h1> You’ve <?=$froggies;?> items in list</h1> • </body> • </html> • Controller (controllers/my_controller.php) • function total_frogs () { • $this->load->model(“frogs”); • $number_of_frogs = $this->frogs->count_frogs(); • $data[‘froggies’] = $number_of_frogs; • $this->load->view(“frog_view”, $data); • } Controller • Model (models/frogs.php) • function count_frogs() { • $this->db->where(“type”,”frog”); • $this->db->from(“animals”); • $query = $this->db->get(); • return $query->num_rows(); • } Model

  11. Cum se apeleaza? Serverul unde e instalat CI controllerul: System/application/controllers/my_controller.php Numele metodei din acel controller http://www.my_server.com/index.php/my_controller/my_frogs

  12. Demo (Un demo valoreaza cat 1000 de slide-uri)

  13. Classes Benchmarking Calendaring Database Email Encryption File Uploading FTP HTML Table Image Manipulation Input and Security Pagination Session Trackback Template Parser Unit Testing URI User Agent Validation

  14. Helpers Array Cookie Date Download File Form HTML Security Smiley String Text Typography URL XML

  15. Link-uri utile • www.codeigniter.com • www.kohanaphp.com(PHP5) • codeigniter.com/wiki/ • www.rapyd.com(toolkit ptr toolkit)

  16. Are cineva un foc? • slide-urile si demo pe: • http://www.widgetdev.org/ci/

  17. Pagina de bun-venit

  18. Baza de Date

  19. Configuram CI

  20. Mai configuram un pic...

  21. Cream controllerul

  22. Si un view

  23. un F5 sa vedem cum stam

  24. Trimitem variabile catre view VIEW CONTROLLER

  25. si…

  26. Model: Get item Folosim ActiveRecord

  27. Model: Put Item

  28. Model: Get all

  29. Model: Delete Item

  30. Controller: Add

  31. View: Add/Edit

  32. User Interface: Add

  33. Controller: Save

  34. Controller: Edit

  35. User Interface: Edit

  36. Controller: List all

  37. Views: List Putem sa folosim cod PHP in view-uri, nu trebuie sa invatam nici un limbaj de templateing

  38. User Interface: List

More Related