SlideShare uma empresa Scribd logo
1 de 53
Baixar para ler offline
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)

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante 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
 

Semelhante 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

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 

Último (20)

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 

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)