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

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Último (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

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)