SlideShare a Scribd company logo
1 of 44
Running an Open-Source CodeIgniter project
The tale of PyroCMS - an open-source Content Management
System built with CodeIgniter. What, why and how!


                                  Phil Sturgeon
      email@philsturgeon.co.uk                http://twitter.com/philsturgeon
      http://philsturgeon.co.uk               http://github.com/philsturgeon
Introduction
My history in open-source
Introduction
My history in open-source
Introduction
My history in open-source
Introduction
What do I do these days?
 Work for Mizu Design Ltd
Introduction
What do I do these days?
 Work for Mizu Design Ltd
   Creating internal CodeIgniter applications
Introduction
What do I do these days?
 Work for Mizu Design Ltd
   Creating internal CodeIgniter applications

 MojoMotor Plugins
Introduction
What do I do these days?
 Work for Mizu Design Ltd
   Creating internal CodeIgniter applications

 MojoMotor plugins
 ExpressionEngine modules
Introduction
What do I do these days?
 Work for Mizu Design Ltd
   Creating internal CodeIgniter applications

 MojoMotor plugins
 ExpressionEngine modules
 PyroCMS development
Brief history of PyroCMS
StyleDNA produces StyleCMS

 We realise we need a CMS
 Back in 2007 PyroCMS was first born as
 StyleCMS, a basic CMS for small sites
 StyleDNA fails and burns horribly
 PyroCMS rises from the ashes
Brief history of PyroCMS
Turns out, looks matter!
Brief history of PyroCMS
Turns out, looks matter!
Basic Principles
Basic Principles

Clients are stupid
Basic Principles
Clients are stupid




“Can you put a redirect on Amazon to our
              homepage?”
Basic Principles
Clients are stupid




   "Why does 'N' come after 'L' in this
         alphabetical listing?!"
Basic Principles
 Clients are stupid




  "We refuse to use this font 'Century
GOTHIC Bold'. This is a family-friendly site!"
Basic Principles
Clients are stupid

 Hide confusing things
 Make it hard for them to break the site
 Control, sanitise and correct their input
   WYSIWYG

   MS Word!!!!

   XSS Clean

   CSRF protection
Basic Principles

Clients are stupid
Developers are lazy
Basic Principles
Developers are lazy
 Documentation
 Easy upgrades
 Use a logical folder structure
   addons
      libraries
      modules
      themes
   system
      codeigniter
      pyrocms
   uploads
Basic Principles
Folder Structure

  system
    codeigniter
    pyrocms
       controllers
       libraries
       models
       modules
       views
Basic Principles
Developers are lazy


   addons
     helpers
     libraries
     modules
     themes
     widgets
Basic Principles
Developers are lazy

                      Packages available in CodeIgniter 2.0
   addons
     helpers
     libraries
     modules
     themes
     widgets
Basic Principles
Developers are lazy

                      Packages available in CodeIgniter 2.0
   addons
     helpers           Modular Separation (BitBucket)
     libraries
     modules
     themes
     widgets
Basic Principles
Developers are lazy

                      Packages available in CodeIgniter 2.0
   addons
     helpers           Modular Separation (BitBucket)
     libraries
     modules
                       Template library (BitBucket)
     themes
     widgets
Basic Principles
Developers are lazy

                      Packages available in CodeIgniter 2.0
   addons
     helpers           Modular Separation (BitBucket)
     libraries
     modules
                       Template library (BitBucket)
     themes
     widgets
                       Crazy code, not available
Basic Principles

Clients are stupid
Developers are lazy
Designers are control freaks
Basic Principles
Designers are control freaks


 Themes
 Don’t mess with their HTML
 Let them mess with your HTML
 Don’t give them enough rope!
Basic Principles

Clients are stupid
Developers are lazy
Designers are control freaks
EllisLab are always “right”
Basic Principles
EllisLab are always “right”


 Never modify the core of CodeIgniter
Basic Principles
EllisLab are always “right”


 Never modify the core of CodeIgniter
 Not enough PHP 5?
Basic Principles
   EllisLab are always “right”

    Library autoload

   Call more than singletons:

   $foo = new Something(‘bar’);
   $bar = new Something(‘baz’);


Use some kick-ass PHP 5 syntax:

    $foo = Settings::item(‘bar’);
Basic Principles
EllisLab are always “right”


 Never modify the core of CodeIgniter
 Not enough PHP 5?
 Extend for the win
Basic Principles
EllisLab are always “right”

         MY_Exceptions - Custom 404 messages
Basic Principles
EllisLab are always “right”
          MY_Form_validation - Extra Validation
Basic Principles
EllisLab are always “right”
      MY_Security - Allow some naughty tags through
Basic Principles
EllisLab are always “right”
            MY_Parser - Dwoo it!

 Template parser in CI blows for... pretty much everything.

                       {$message}

            {anchor(‘controller’, ‘Some page’)}

                        {lang($foo)}

               {if $user->group == ‘admin’)}

                      http://dwoo.org/
    http://bitbucket.org/philsturgeon/codeigniter-dwoo
Basic Principles

Clients are stupid
Developers are lazy
Designers are control freaks
EllisLab are always “right”
Managing the Code
Managing the Code
Managing the Code
Master, Branches, Tags
Master

 Same as Subversion trunk
 Default “branch” of the repository
 $ git clone git://github.com/pyrocms/pyrocms.git
 Should always be ready to tag or download, keep it stable!
Managing the Code
Master, Branches, Tags
Branches

 Keep code out of the way
 v1.0-dev is relatively stable
 v2.0-dev seriously fucked
 Work on X feature independent of version Y
 $ git checkout v1.0-dev
Managing the Code
Master, Branches, Tags
Tags

 Tag each version
 Marks a specific commit as a version
 Automatic “Downloads” entry on GitHub
 http://github.com/pyrocms/pyrocms/zipball/v0.9.9.7
 http://github.com/pyrocms/pyrocms/zipball/{$variable.cms_version}
Managing the Code
Master, Branches, Tags
Forks

 User owned copy of your repository
 People do your work for you
 Use it to trial new contributors

More Related Content

Similar to CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project

Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Joseph Yoder
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code Camp
Theo Jungeblut
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
Gabriele Santini
 

Similar to CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project (20)

Ci2
Ci2Ci2
Ci2
 
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
 
Agile toolkit present 2012
Agile toolkit present 2012Agile toolkit present 2012
Agile toolkit present 2012
 
Secure Your Open Source Projects For Free
Secure Your Open Source Projects For FreeSecure Your Open Source Projects For Free
Secure Your Open Source Projects For Free
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality code
 
20140819 Framework
20140819 Framework20140819 Framework
20140819 Framework
 
Writing Code for Humans, not Computers
Writing Code for Humans, not ComputersWriting Code for Humans, not Computers
Writing Code for Humans, not Computers
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
WordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress OptimizationWordCamp Ireland - 40 tips for WordPress Optimization
WordCamp Ireland - 40 tips for WordPress Optimization
 
Become a better UX designer through code
Become a better UX designer through codeBecome a better UX designer through code
Become a better UX designer through code
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
 
HTML5 Is the Future of Book Authorship
HTML5 Is the Future of Book AuthorshipHTML5 Is the Future of Book Authorship
HTML5 Is the Future of Book Authorship
 
Clean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code CampClean Code Part III - Craftsmanship at SoCal Code Camp
Clean Code Part III - Craftsmanship at SoCal Code Camp
 
Attacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous DeliveryAttacking Pipelines--Security meets Continuous Delivery
Attacking Pipelines--Security meets Continuous Delivery
 
DEVNET-2003 Coding 203: Python - User Input, File I/O, Logging and REST API C...
DEVNET-2003	Coding 203: Python - User Input, File I/O, Logging and REST API C...DEVNET-2003	Coding 203: Python - User Input, File I/O, Logging and REST API C...
DEVNET-2003 Coding 203: Python - User Input, File I/O, Logging and REST API C...
 
Zend Framework Modular Project Setup
Zend Framework Modular Project SetupZend Framework Modular Project Setup
Zend Framework Modular Project Setup
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 

Recently uploaded

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 

Recently uploaded (20)

Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 

CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project

Editor's Notes