PHP Meetup Feb 09 - PHP CMS vs Frameworks

Post on 10-Apr-2015

5,689 views 4 download

description

Presenter: Michael Cheng

transcript

Ph.PSOCIETY

Philosophy in Programming Society

PHP CMS vs

PHP FrameworksWhen to use any of them?

Ph.PSOCIETY

Philosophy in Programming Society

CMS vs Frameworks• Joomla

• Drupal

• Wordpress

• TikiWiki

• Zend Framework

• CakePHP

• Symfony

• Code Ignitor

Ph.PSOCIETY

Philosophy in Programming Society

Considerations• Complexity of Project

• Features

• Design

• Scale

• Development methodology

• How much mid-course adjustments can you afford to make?

Ph.PSOCIETY

Philosophy in Programming Society

Considerations• Make-up of Development Team

• Single or Multiple members

• Functional roles

• Familiarity with CMS / Framework

• Timeline

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics• Open Source CMS

• Basic set of functionalities

• Extensions required to enhance app

• Standard look & feel with fixed positioning of design elements

• Themes to customise look & feel

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics• Open Source CMS works best when:

• Project requirements relatively straight forward

• Existing extensions can do the job

• Custom themes can conform to CMS’s basic structure

• “Square Peg in a Square World”

Ph.PSOCIETY

Philosophy in Programming Society

But...• Things start to fall apart when:

• “I need function Y which is not in Extension Z”

• “Can add category to this listing?”

• “The design is too square-ish.”

• “Can don’t have this thing here?”

• Which means...

Ph.PSOCIETY

Philosophy in Programming Society

What they really mean

• Things start to fall apart when:

• You’ll need to mod Extension Z to include Function Y (or new design element).

• You’ll need to mod the core system to include the new function.

• You’ll need to mod the design which may be intertwined with the core system

• “Square Peg in a Circular World”

Ph.PSOCIETY

Philosophy in Programming Society

Options Available

• Modify the codes

• Issues with future upgrades

• Submit Bug Fix / Feature Request to extension / core system developers

• Long wait...

• Create your own extensions

• DIY or Outsource

• Shorter wait & more control, but some restrictions still apply

Ph.PSOCIETY

Philosophy in Programming Society

Time to Mod / Hack =

$$$$

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics• Open Source Framework

• Basic set of functionalities

• Full control over how the site is put together (freeform & far more flexible)

• Standard look & feel (scaffold) or customise almost anything

• Conforms to your designs and requirements

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics

• Open Source Framework

• Handles all the primary functions (eg. connecting to database, parsing data, processing forms)

• Spend more time concentrating on the business-specific problem, rather than on the "plumbing" code behind it.

• Limit choices during development, so it increases productivity, especially in large and complex systems.

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics• Open Source Framework

• Patterns

• Model-View-Controller

• Factory

• Object Oriented

• Don’t Repeat Yourself

• Convention over Configuration

Ph.PSOCIETY

Philosophy in Programming Society

Characteristics• Open Source Framework works best when:

• Project requirements is complex & need maximum flexibility

• Flexible design and fully customised front-end

• Team-friendly & minimal documentation

• Focus on User Interface / Experience

Ph.PSOCIETY

Philosophy in Programming Society

But...• The down-side of Frameworks:

• Lower QC over end-product

• Man-hours for updates & upgrades

• Can be inflexible if not planned properly, resulting in total rewrite

Ph.PSOCIETY

Philosophy in Programming Society

Conclusion• Evaluate each project’s needs

• Know your tools

• Build your foundation & library of reusable codes

• Plan properly, but change is inevitable