SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
LeoNguyen.com
Outline
- References (http://bit.ly/1fofKSV)
- Lab 01: Introduction CodeIgniter 2.1.3
- Lab 02: HMVC
- Lab 03: Grocery CRUD 1.3.3
- Lab 04: Eden Library 3.1
- Lab 05: Doctrine 2
Github
https://github.com/leonguyen/CILab
Lab 01
Introduction to CodeIgniter
Outline
- Download and config CI
- Write a Hello world program
Exercise 1
Download and config CI
CodeIgniter
Task 1 - Download CI
- Goto CI download site http://ellislab.com/codeigniter/user-
guide/installation/downloads.html
Task 2 - Unzip CI
- Unzip CI zip file.
Task 3 - Download & install Sublime Text
- Goto Sublime Text download site http://www.sublimetext.com
Task 4 - Config autoload.php
- Enter code: https://gist.github.com/leonguyen/5315988
Task 5 - Config config.php
- Enter code: https://gist.github.com/leonguyen/5315997
Task 6 - Config database.php
- Enter code: https://gist.github.com/leonguyen/5316010
Task 7 - Run CI
- Enter the url http://localhost/cilab/ on the browser.
Task 8 - Userguide CI
- Enter the url http://localhost/cilab/user_guide/ on the browser.
Exercise 2
Write a Hello world program
Task 1 - Create Helloworld controller
- Copy Welcome controller, enter the following code then goto http:
//localhost/cilab/index.php/helloworld
Task 2 - Create .htaccess
- Create .htaccess in root source files then enter the following code:
https://gist.github.com/leonguyen/5251416
Task 3 - Config config.php
- Remove 'index.php' of 'index_page'.
- Enter 'QUERY_STRING' of 'uri_protocol'.
Task 4 - Run again
- Goto http://localhost/cilab/helloworld.
Lab 02
HMVC (Hierarchical Model View Controller)
HMVC
HMVC (cont)
- Modularization: Reduction of dependencies between the disparate
parts of the application.
- Organization: Having a folder for each of the relevant triads makes
for a lighter work load.
- Reusability: By nature of the design it is easy to reuse nearly every
piece of code.
- Extendibility: Makes the application more extensible without
sacrificing ease of maintenance.
Outline
- Download and config HMVC modular.
- Create sample 'Foo' modules.
Exercise 1
Download and config HMVC modular
Task 1: Download HMVC Modular
- Goto https://bitbucket.org/wiredesignz and download "codeigniter-
modular-extensions-hmvc"
Task 2: Copy 'MX' third_party
- Copy 'MX' folder to 'third_party' folder of CI.
Task 3: Copy to 'application/core'
- Copy 'MY_Loader.php' and 'MY_Router.php' to 'application/core'.
Exercise 2
Create sample 'Foo' modules
Task 1: Create 'modules' folder
- Create 'modules' folder in 'application' and 'Foo' modules.
Task 2: Create 'Foo' controller
- Create 'Foo' controller extends 'MX_Controller':
https://gist.github.com/leonguyen/5326355
Task 3: Create 'Foo' controller
- Create 'Foo' controller extends 'MX_Controller'.
Lab 03
Grocery CRUD
Intro
- Grocery CRUD is a library that makes a developer's life easier. Just
few lines of code and you can create a full stable CRUD with nice
views. A totally automatic system that even a newbie in PHP can work
with.
Task 1: Download
- Go to www.grocerycrud.com
Task 2: Installation
- Unzip 'grocery_CRUD.zip' and copy all files to your CI project.
Task 3: Installation - MySQL
- Import 'examples_database.sql' to your project mysql.
Task 4: Run
- Enter the url http://localhost/CILab/examples/ on the browser.
Lab 04
Eden Library
Intro
- Eden is a PHP library designed for rapid prototyping, with less code.
Yes, Really.
- Eden simply a set of reusable components, that works with any PHP
framework and CMS. Eden makes code logical and readable with dead
simple syntax.
Task 1: Download
- Go to www.eden-php.com
Task 2: Installation
- Unzip 'eden.zip' and copy all files to 'libraries' folder of your CI project.
Task 3: Create example controller
- Create 'edenhellow.php' controller and enter code: https://gist.github.
com/leonguyen/5915315
Task 4: Run
- Enter the url http://localhost/CILab/edenhello/ on the browser.
Note: You have access to a server with at least PHP 5.3.x
Lab 05
Doctrine 2
Intro
- Doctrine is a very powerful ORM in php and it is possible to easily
integrate and use doctrine with codeigniter as ORM
Task 1: Download
- Go to github.com/doctrine and download
+ ORM: github.com/doctrine/doctrine2
+ Common: github.com/doctrine/common
+ DBAL: github.com/doctrine/dbal
and Cache, Annotations, Lexer
Task 2: Create Doctrine folder
- Create ‘Doctrine’ folder into ‘application/libraries’ and put its files.
Task 3: Create Doctrine bootstrap
- Create ‘Doctrine.php’ into ‘application/libraries’ folder.
- Enter code: https://gist.github.com/leonguyen/6696118
Task 4: Load Doctrine
- Modify the ‘autoload.php’
Task 5: Create YAML mapping files
- Enter code: https://gist.github.com/leonguyen/6701457
https://gist.github.com/leonguyen/6701498
Task 6: Command Line Tool
- Create ‘doctrine-cli.php’ into ‘application’ folder.
- Enter code: https://gist.github.com/leonguyen/6700705
Task 7: Setup Entities, Proxies, and DB Schema
- List of commands: php doctrine-cli.php
(See: youtu.be/yFH5JcH-RtM)
- Entity classes: php doctrine-cli.php orm:generate-entities models
(See: youtu.be/nEMfBno40vE)
- Proxy classes: php doctrine-cli.php orm:generate-proxies
(See: youtu.be/v4J_cI5CJe0)
- Drop tables: php doctrine-cli.php orm:schema-tool:drop --force
(See: youtu.be/lhGWsFmCeoc)
- Create tables: php doctrine-cli.php orm:schema-tool:create
(See: youtu.be/MhLAi4f_mg4)

Más contenido relacionado

La actualidad más candente

Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsJohn Smith
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsNETWAYS
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam Englander
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...Eric Smalling
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Makefile
MakefileMakefile
MakefileIonela
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...Azilen Technologies Pvt. Ltd.
 
Pivotal Cloud Foundry
Pivotal Cloud FoundryPivotal Cloud Foundry
Pivotal Cloud FoundrySufyaan Kazi
 
Jenkins pipeline -- Gentle Introduction
Jenkins pipeline -- Gentle IntroductionJenkins pipeline -- Gentle Introduction
Jenkins pipeline -- Gentle IntroductionRamanathan Muthaiah
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Composer Lightning Talk
Composer Lightning TalkComposer Lightning Talk
Composer Lightning TalkEric Johnson
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Vishal Biyani
 
Console Apps: php artisan forthe:win
Console Apps: php artisan forthe:winConsole Apps: php artisan forthe:win
Console Apps: php artisan forthe:winJoe Ferguson
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerFlorent BENOIT
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 

La actualidad más candente (20)

Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The Basics
 
OSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating JenkinsOSDC 2017 - Julien Pivotto - Automating Jenkins
OSDC 2017 - Julien Pivotto - Automating Jenkins
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Selenium online training
Selenium online trainingSelenium online training
Selenium online training
 
Jenkins remote loader
Jenkins remote loaderJenkins remote loader
Jenkins remote loader
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...So. many. vulnerabilities. Why are containers such a mess and what to do abou...
So. many. vulnerabilities. Why are containers such a mess and what to do abou...
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Makefile
MakefileMakefile
Makefile
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...
 
Jenkins
JenkinsJenkins
Jenkins
 
Pivotal Cloud Foundry
Pivotal Cloud FoundryPivotal Cloud Foundry
Pivotal Cloud Foundry
 
Jenkins pipeline -- Gentle Introduction
Jenkins pipeline -- Gentle IntroductionJenkins pipeline -- Gentle Introduction
Jenkins pipeline -- Gentle Introduction
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Composer Lightning Talk
Composer Lightning TalkComposer Lightning Talk
Composer Lightning Talk
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
 
Console Apps: php artisan forthe:win
Console Apps: php artisan forthe:winConsole Apps: php artisan forthe:win
Console Apps: php artisan forthe:win
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and Docker
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 

Similar a CodeIgniter Lab

Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry Schreiner
 
OpenDayLight (ODL) Project
OpenDayLight (ODL) ProjectOpenDayLight (ODL) Project
OpenDayLight (ODL) ProjectVahid Sadri
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Serge van den Oever
 
sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)Jérémy Vial
 
Docker - BWI Innovation Talk
Docker - BWI Innovation TalkDocker - BWI Innovation Talk
Docker - BWI Innovation TalkTimm Heuss
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerLuong Vo
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedbackNicolas Degardin
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Symfoniacs
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Henry Schreiner
 
How to start your open source project
How to start your open source projectHow to start your open source project
How to start your open source projectEslam Diaa
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Lets play with Symfony2
Lets play with Symfony2Lets play with Symfony2
Lets play with Symfony2Noel GUILBERT
 
Leiningen 2 - Humane build management for Clojure
Leiningen 2 - Humane build management for ClojureLeiningen 2 - Humane build management for Clojure
Leiningen 2 - Humane build management for ClojureJohn Stevenson
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with ComposerJason Grimes
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...Eric Smalling
 

Similar a CodeIgniter Lab (20)

Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
OpenDayLight (ODL) Project
OpenDayLight (ODL) ProjectOpenDayLight (ODL) Project
OpenDayLight (ODL) Project
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
 
sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)sfdx continuous Integration with Jenkins on aws (Part II)
sfdx continuous Integration with Jenkins on aws (Part II)
 
Docker - BWI Innovation Talk
Docker - BWI Innovation TalkDocker - BWI Innovation Talk
Docker - BWI Innovation Talk
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Composer namespacing
Composer namespacingComposer namespacing
Composer namespacing
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
How to start your open source project
How to start your open source projectHow to start your open source project
How to start your open source project
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Lets play with Symfony2
Lets play with Symfony2Lets play with Symfony2
Lets play with Symfony2
 
DevOps_project.pdf
DevOps_project.pdfDevOps_project.pdf
DevOps_project.pdf
 
Leiningen 2 - Humane build management for Clojure
Leiningen 2 - Humane build management for ClojureLeiningen 2 - Humane build management for Clojure
Leiningen 2 - Humane build management for Clojure
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
 

Último

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 

Último (20)

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 

CodeIgniter Lab

  • 2. Outline - References (http://bit.ly/1fofKSV) - Lab 01: Introduction CodeIgniter 2.1.3 - Lab 02: HMVC - Lab 03: Grocery CRUD 1.3.3 - Lab 04: Eden Library 3.1 - Lab 05: Doctrine 2
  • 5. Outline - Download and config CI - Write a Hello world program
  • 8. Task 1 - Download CI - Goto CI download site http://ellislab.com/codeigniter/user- guide/installation/downloads.html
  • 9. Task 2 - Unzip CI - Unzip CI zip file.
  • 10. Task 3 - Download & install Sublime Text - Goto Sublime Text download site http://www.sublimetext.com
  • 11. Task 4 - Config autoload.php - Enter code: https://gist.github.com/leonguyen/5315988
  • 12. Task 5 - Config config.php - Enter code: https://gist.github.com/leonguyen/5315997
  • 13. Task 6 - Config database.php - Enter code: https://gist.github.com/leonguyen/5316010
  • 14. Task 7 - Run CI - Enter the url http://localhost/cilab/ on the browser.
  • 15. Task 8 - Userguide CI - Enter the url http://localhost/cilab/user_guide/ on the browser.
  • 16. Exercise 2 Write a Hello world program
  • 17. Task 1 - Create Helloworld controller - Copy Welcome controller, enter the following code then goto http: //localhost/cilab/index.php/helloworld
  • 18. Task 2 - Create .htaccess - Create .htaccess in root source files then enter the following code: https://gist.github.com/leonguyen/5251416
  • 19. Task 3 - Config config.php - Remove 'index.php' of 'index_page'. - Enter 'QUERY_STRING' of 'uri_protocol'.
  • 20. Task 4 - Run again - Goto http://localhost/cilab/helloworld.
  • 21. Lab 02 HMVC (Hierarchical Model View Controller)
  • 22. HMVC
  • 23. HMVC (cont) - Modularization: Reduction of dependencies between the disparate parts of the application. - Organization: Having a folder for each of the relevant triads makes for a lighter work load. - Reusability: By nature of the design it is easy to reuse nearly every piece of code. - Extendibility: Makes the application more extensible without sacrificing ease of maintenance.
  • 24. Outline - Download and config HMVC modular. - Create sample 'Foo' modules.
  • 25. Exercise 1 Download and config HMVC modular
  • 26. Task 1: Download HMVC Modular - Goto https://bitbucket.org/wiredesignz and download "codeigniter- modular-extensions-hmvc"
  • 27. Task 2: Copy 'MX' third_party - Copy 'MX' folder to 'third_party' folder of CI.
  • 28. Task 3: Copy to 'application/core' - Copy 'MY_Loader.php' and 'MY_Router.php' to 'application/core'.
  • 29. Exercise 2 Create sample 'Foo' modules
  • 30. Task 1: Create 'modules' folder - Create 'modules' folder in 'application' and 'Foo' modules.
  • 31. Task 2: Create 'Foo' controller - Create 'Foo' controller extends 'MX_Controller': https://gist.github.com/leonguyen/5326355
  • 32. Task 3: Create 'Foo' controller - Create 'Foo' controller extends 'MX_Controller'.
  • 34. Intro - Grocery CRUD is a library that makes a developer's life easier. Just few lines of code and you can create a full stable CRUD with nice views. A totally automatic system that even a newbie in PHP can work with.
  • 35. Task 1: Download - Go to www.grocerycrud.com
  • 36. Task 2: Installation - Unzip 'grocery_CRUD.zip' and copy all files to your CI project.
  • 37. Task 3: Installation - MySQL - Import 'examples_database.sql' to your project mysql.
  • 38. Task 4: Run - Enter the url http://localhost/CILab/examples/ on the browser.
  • 40. Intro - Eden is a PHP library designed for rapid prototyping, with less code. Yes, Really. - Eden simply a set of reusable components, that works with any PHP framework and CMS. Eden makes code logical and readable with dead simple syntax.
  • 41. Task 1: Download - Go to www.eden-php.com
  • 42. Task 2: Installation - Unzip 'eden.zip' and copy all files to 'libraries' folder of your CI project.
  • 43. Task 3: Create example controller - Create 'edenhellow.php' controller and enter code: https://gist.github. com/leonguyen/5915315
  • 44. Task 4: Run - Enter the url http://localhost/CILab/edenhello/ on the browser. Note: You have access to a server with at least PHP 5.3.x
  • 46. Intro - Doctrine is a very powerful ORM in php and it is possible to easily integrate and use doctrine with codeigniter as ORM
  • 47. Task 1: Download - Go to github.com/doctrine and download + ORM: github.com/doctrine/doctrine2 + Common: github.com/doctrine/common + DBAL: github.com/doctrine/dbal and Cache, Annotations, Lexer
  • 48. Task 2: Create Doctrine folder - Create ‘Doctrine’ folder into ‘application/libraries’ and put its files.
  • 49. Task 3: Create Doctrine bootstrap - Create ‘Doctrine.php’ into ‘application/libraries’ folder. - Enter code: https://gist.github.com/leonguyen/6696118
  • 50. Task 4: Load Doctrine - Modify the ‘autoload.php’
  • 51. Task 5: Create YAML mapping files - Enter code: https://gist.github.com/leonguyen/6701457 https://gist.github.com/leonguyen/6701498
  • 52. Task 6: Command Line Tool - Create ‘doctrine-cli.php’ into ‘application’ folder. - Enter code: https://gist.github.com/leonguyen/6700705
  • 53. Task 7: Setup Entities, Proxies, and DB Schema - List of commands: php doctrine-cli.php (See: youtu.be/yFH5JcH-RtM) - Entity classes: php doctrine-cli.php orm:generate-entities models (See: youtu.be/nEMfBno40vE) - Proxy classes: php doctrine-cli.php orm:generate-proxies (See: youtu.be/v4J_cI5CJe0) - Drop tables: php doctrine-cli.php orm:schema-tool:drop --force (See: youtu.be/lhGWsFmCeoc) - Create tables: php doctrine-cli.php orm:schema-tool:create (See: youtu.be/MhLAi4f_mg4)