SlideShare una empresa de Scribd logo
1 de 33
Framework on Framework - FOF
Rapid application development for the Joomla! CMS
So, what’s that “FOF” thing?
Yeah, I know what you’re thinking
“Oh, dear Lord, not ANOTHER framework!”
FOF uses the Joomla! Platform
It does not completely replace it
Plays along with the other boys
Compatible with Joomla! 2.5, 3.0 and 3.1.
D.R.Y. - Don’t Repeat Yourself
I hate copying/pasting the same code over and over and over and over and over and over and over...
Less is more
Convention over configuration – less time, effort, code and bugs
Flexible, without imposing it’s way of thinking
There are no black boxes. There are methods, plugin events...
Backwards compatibility
There are no quantum, undocumented changes overnight
Some history
How we got here
July 2009 – Base MVC classes
My own classes, extending from JModel & co, minimising copied & pasted code
September 2011 – Turning into a proper framework
Basically, I wanted a RAD framework which doesn’t change every day
October 2011 – Implemented HMVC
while I was stuck on a plane, on the ground, for four hours
May 2012 – First public release
during the J and Beyond 2012 conference
June 2012 – Bootstrap & jQuery
In the optional Akeeba Strapper package
February 2013 – version 2.0 did NOT go into Joomla! 3.1
which is basically something good
March 2013 onwards – Taking off with XML view templates
making it a really Rapid Application Development framework
FOF’s Anatomy
Some general thoughts
Web services. Integrated JSON support and transparent
authentication, opening the door for data provisioning to apps (web,
desktop, mobile,...)
Almost RESTful, not entirely
HMVC components right here, right now, without having to
relearn Joomla! component development, i.e. the exact opposite of the
proposed Joomla! Framework, whenever that’s ready.
Structure
Dispatcher
Controller
Model View
ToolbarHelpers
“triad”
Table
The Dispatcher is the entry point (a.k.a. “router”). It will setup,
run and render the MVC triad.
The Controller is a thin interface to push data to the model state
and instantiate views
The Model is the workhorse. Business logic goes here.
The Table class is a hybrid data adapter, controller and model
(following J!'s convention)
The View fetches model state data and renders them in a
meaningful way
The Toolbar handles the rendering of titles, buttons and so onNon-OOP stuff. Basically, a nice way to say “cruft”
Convention over Configuration
Convention over configuration in
the Dispatcher
The Dispatcher is your component’s router. It routes the request to
the appropriate Controller based on conventions:
A POST request gets routed to the save task
A GET request to a plural view name gets routed to the browse
task
A front-end GET request with an ID gets routed to the read task
A back-end GET request with an ID gets routed to the edit task
Convention over configuration in
Models
Tables are named as #__component_view, e.g. #__todo_items
Auto increment field is named component_view_id, e.g.
todo_item_id
Magic fields: enabled, created_by, created_on, modified_by,
modified_on, locked_by, locked_on, hits
You can override defaults without copying & pasting code, ever.
Copy & paste is the devil!
Convention over configuration in
Controllers
Default tasks (not RESTful!): browse, read, edit, add, delete, save,
apply, ...
Customize with onBeforeMethod and onAfterMethod methods, e.g.
onBeforeSave. Don't copy & paste code.
All MVC objects can be passed a $config array to customize them. It
"flows" from dispatcher to component to model and view.
FOF guesses the task if it's missing based on plural/singular view
name and existence of ID in the query
Convention over configuration in
Views
Views inherit from FOFView and its specialized children, e.g.
FOFViewHtml
Customize using the onTask methods, e.g. onBrowse
The toolbar is handled outside the view, in a FOFToolbar descendant
class. Override it with a toolbar.php file in the component's root.
Magic toolbar methods, e.g. onItemsBrowse allow you to customize
the toolbar without copying & pasting code.
Epic features
HMVC – Hierarchical MVC
Include the results of component views anywhere (other views, other
component, modules, ...)
FOFDispatcher::getTmpInstance(‘com_foobar’, ‘items’, array(‘layout’
=> ‘fancy’))->dispatch();
Reuse view templates
Load a view template from another view, component, ...
echo $this->loadAnyTemplate('site:com_foobar/item/form');
Media files overrides
Load media files like this:
FOFTemplateUtils::addCSS('media://com_foobar/css/frontend.css');
Media overrides are inside the template folder, e.g.
templates/tpl_example/media/com_foobar/css/frontend.css
Web services & automatic JSON
and CSV views
Just add format=json or format=csv
JSON: You have an instant JSON-based remote API for your
components
CSV: You can quickly export whatever you see in the backend to
Excel, Numbers, LibreOffice, Google Docs, etc.
Transparent authentication support using URL parameters or HTTP
Basic Authentication
XML-based views
It’s JForm on double dose of steroids
Browse, read and edit views from XML templates
You don’t need to write any PHP or HTML, but you can mix
traditional PHP-based and XML-based templates, even in the same
view
Overridable with Joomla! template overrides
You can write components with virtually no PHP code at all
Resources
http://github.com/akeeba/fof
Rapid Joomla! application development with FOF framework

Más contenido relacionado

La actualidad más candente

Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Peter Martin
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Antonio Peric-Mazar
 
Custom Template for Joomla! 3
Custom Template for Joomla! 3Custom Template for Joomla! 3
Custom Template for Joomla! 3Carly Willats
 
How to Develop Your First Ever Joomla Template?
How to Develop Your First Ever Joomla Template?How to Develop Your First Ever Joomla Template?
How to Develop Your First Ever Joomla Template?damienwoods
 
Learn How To Develop With CakePHP
Learn How To Develop With CakePHPLearn How To Develop With CakePHP
Learn How To Develop With CakePHPMichael Bourque
 
Custom module and theme development in Drupal7
Custom module and theme development in Drupal7Custom module and theme development in Drupal7
Custom module and theme development in Drupal7marif4pk
 
Easy Blogging With Emacs
Easy Blogging With EmacsEasy Blogging With Emacs
Easy Blogging With EmacsDashamir Hoxha
 
PloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondPloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondDavid Glick
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-TranslatorDashamir Hoxha
 
Yii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerYii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerMayflower GmbH
 
Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3Rod Martin
 
Creating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without SwearingCreating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without Swearingmartinwolak
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldGraham Weldon
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Joomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksJoomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksSaurabh Shah
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-frameworkMarcelo da Rocha
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeBen Marks
 
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014Howard Greenberg
 

La actualidad más candente (20)

Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
Custom Template for Joomla! 3
Custom Template for Joomla! 3Custom Template for Joomla! 3
Custom Template for Joomla! 3
 
How to Develop Your First Ever Joomla Template?
How to Develop Your First Ever Joomla Template?How to Develop Your First Ever Joomla Template?
How to Develop Your First Ever Joomla Template?
 
Learn How To Develop With CakePHP
Learn How To Develop With CakePHPLearn How To Develop With CakePHP
Learn How To Develop With CakePHP
 
Custom module and theme development in Drupal7
Custom module and theme development in Drupal7Custom module and theme development in Drupal7
Custom module and theme development in Drupal7
 
Easy Blogging With Emacs
Easy Blogging With EmacsEasy Blogging With Emacs
Easy Blogging With Emacs
 
PloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondPloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyond
 
Development Setup of B-Translator
Development Setup of B-TranslatorDevelopment Setup of B-Translator
Development Setup of B-Translator
 
Yii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerYii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian Facker
 
Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3Joomla Explained - As Easy as 1, 2, 3
Joomla Explained - As Easy as 1, 2, 3
 
Creating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without SwearingCreating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without Swearing
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your world
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
 
Introduction to CakePHP
Introduction to CakePHPIntroduction to CakePHP
Introduction to CakePHP
 
Joomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksJoomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of Frameworks
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento Code
 
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014
Creating a Great XPages User Interface, TLCC Teamstudio Webinar - Feb, 2014
 

Similar a Rapid Joomla! application development with FOF framework

FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012Nicholas Dionysopoulos
 
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)dcoletta
 
Advance Component Development by Azrul Rahim
Advance Component Development by Azrul RahimAdvance Component Development by Azrul Rahim
Advance Component Development by Azrul RahimJohn Coonen
 
JWC - Rapid application development with FOF
JWC - Rapid application development with FOFJWC - Rapid application development with FOF
JWC - Rapid application development with FOFNicholas Dionysopoulos
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend FrameworkJuan Antonio
 
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009ken.egozi
 
Create Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien PotencierCreate Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien PotencierHimel Nag Rana
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Rich Helton
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!Muhammad Ghazali
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC PresentationVolkan Uzun
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?dcoletta
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part IIMichael Fons
 
How Joomla! builds a webpage (annotated)
How Joomla! builds a webpage (annotated)How Joomla! builds a webpage (annotated)
How Joomla! builds a webpage (annotated)Randy Carey
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Svetlin Nakov
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction PresentationNerd Tzanetopoulos
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectureselliando dias
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1Gaurav Arora
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Gaurav Arora
 

Similar a Rapid Joomla! application development with FOF framework (20)

FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
FOF Rapid Application Development on Joomla! - Joomla! Day Denmark 2012
 
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
 
Advance Component Development by Azrul Rahim
Advance Component Development by Azrul RahimAdvance Component Development by Azrul Rahim
Advance Component Development by Azrul Rahim
 
Php and-mvc
Php and-mvcPhp and-mvc
Php and-mvc
 
JWC - Rapid application development with FOF
JWC - Rapid application development with FOFJWC - Rapid application development with FOF
JWC - Rapid application development with FOF
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend Framework
 
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
 
Create Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien PotencierCreate Your Own Framework by Fabien Potencier
Create Your Own Framework by Fabien Potencier
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part II
 
How Joomla! builds a webpage (annotated)
How Joomla! builds a webpage (annotated)How Joomla! builds a webpage (annotated)
How Joomla! builds a webpage (annotated)
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
 
Symfony2 Introduction Presentation
Symfony2 Introduction PresentationSymfony2 Introduction Presentation
Symfony2 Introduction Presentation
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
 

Más de Nicholas Dionysopoulos

Hidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeysHidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeysNicholas Dionysopoulos
 
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013Nicholas Dionysopoulos
 
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Nicholas Dionysopoulos
 
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Nicholas Dionysopoulos
 
Joomla! Day Deutschland 2012 - Advanced Akeeba Backup
Joomla! Day Deutschland 2012 - Advanced Akeeba BackupJoomla! Day Deutschland 2012 - Advanced Akeeba Backup
Joomla! Day Deutschland 2012 - Advanced Akeeba BackupNicholas Dionysopoulos
 
Joomla! Day Deutschland 2012 - Active Security
Joomla! Day Deutschland 2012 - Active SecurityJoomla! Day Deutschland 2012 - Active Security
Joomla! Day Deutschland 2012 - Active SecurityNicholas Dionysopoulos
 
Joomla! Day Poland 2012 - Monetize your site with Akeeba Subscriptions
Joomla! Day Poland 2012 - Monetize your site with Akeeba SubscriptionsJoomla! Day Poland 2012 - Monetize your site with Akeeba Subscriptions
Joomla! Day Poland 2012 - Monetize your site with Akeeba SubscriptionsNicholas Dionysopoulos
 
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...Nicholas Dionysopoulos
 
Joomla! Day Poland 2012 - Active Security for Joomla! sites
Joomla! Day Poland 2012 - Active Security for Joomla! sitesJoomla! Day Poland 2012 - Active Security for Joomla! sites
Joomla! Day Poland 2012 - Active Security for Joomla! sitesNicholas Dionysopoulos
 

Más de Nicholas Dionysopoulos (9)

Hidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeysHidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeys
 
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013
Joomla! Security 101 - Joomla! Day Bosnia and Herzegovina 2013
 
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
 
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)Advanced Akeeba Backup (Joomla! Day Denmark 2012)
Advanced Akeeba Backup (Joomla! Day Denmark 2012)
 
Joomla! Day Deutschland 2012 - Advanced Akeeba Backup
Joomla! Day Deutschland 2012 - Advanced Akeeba BackupJoomla! Day Deutschland 2012 - Advanced Akeeba Backup
Joomla! Day Deutschland 2012 - Advanced Akeeba Backup
 
Joomla! Day Deutschland 2012 - Active Security
Joomla! Day Deutschland 2012 - Active SecurityJoomla! Day Deutschland 2012 - Active Security
Joomla! Day Deutschland 2012 - Active Security
 
Joomla! Day Poland 2012 - Monetize your site with Akeeba Subscriptions
Joomla! Day Poland 2012 - Monetize your site with Akeeba SubscriptionsJoomla! Day Poland 2012 - Monetize your site with Akeeba Subscriptions
Joomla! Day Poland 2012 - Monetize your site with Akeeba Subscriptions
 
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...
Joomla! Day Poland 2012 - Advanced Akeeba Backup - Beyond just backing up you...
 
Joomla! Day Poland 2012 - Active Security for Joomla! sites
Joomla! Day Poland 2012 - Active Security for Joomla! sitesJoomla! Day Poland 2012 - Active Security for Joomla! sites
Joomla! Day Poland 2012 - Active Security for Joomla! sites
 

Último

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Último (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Rapid Joomla! application development with FOF framework

  • 1. Framework on Framework - FOF Rapid application development for the Joomla! CMS
  • 2. So, what’s that “FOF” thing?
  • 3. Yeah, I know what you’re thinking “Oh, dear Lord, not ANOTHER framework!”
  • 4. FOF uses the Joomla! Platform It does not completely replace it
  • 5. Plays along with the other boys Compatible with Joomla! 2.5, 3.0 and 3.1.
  • 6. D.R.Y. - Don’t Repeat Yourself I hate copying/pasting the same code over and over and over and over and over and over and over...
  • 7. Less is more Convention over configuration – less time, effort, code and bugs
  • 8. Flexible, without imposing it’s way of thinking There are no black boxes. There are methods, plugin events...
  • 9. Backwards compatibility There are no quantum, undocumented changes overnight
  • 11. July 2009 – Base MVC classes My own classes, extending from JModel & co, minimising copied & pasted code
  • 12. September 2011 – Turning into a proper framework Basically, I wanted a RAD framework which doesn’t change every day
  • 13. October 2011 – Implemented HMVC while I was stuck on a plane, on the ground, for four hours
  • 14. May 2012 – First public release during the J and Beyond 2012 conference
  • 15. June 2012 – Bootstrap & jQuery In the optional Akeeba Strapper package
  • 16. February 2013 – version 2.0 did NOT go into Joomla! 3.1 which is basically something good
  • 17. March 2013 onwards – Taking off with XML view templates making it a really Rapid Application Development framework
  • 19. Some general thoughts Web services. Integrated JSON support and transparent authentication, opening the door for data provisioning to apps (web, desktop, mobile,...) Almost RESTful, not entirely HMVC components right here, right now, without having to relearn Joomla! component development, i.e. the exact opposite of the proposed Joomla! Framework, whenever that’s ready.
  • 20. Structure Dispatcher Controller Model View ToolbarHelpers “triad” Table The Dispatcher is the entry point (a.k.a. “router”). It will setup, run and render the MVC triad. The Controller is a thin interface to push data to the model state and instantiate views The Model is the workhorse. Business logic goes here. The Table class is a hybrid data adapter, controller and model (following J!'s convention) The View fetches model state data and renders them in a meaningful way The Toolbar handles the rendering of titles, buttons and so onNon-OOP stuff. Basically, a nice way to say “cruft”
  • 22. Convention over configuration in the Dispatcher The Dispatcher is your component’s router. It routes the request to the appropriate Controller based on conventions: A POST request gets routed to the save task A GET request to a plural view name gets routed to the browse task A front-end GET request with an ID gets routed to the read task A back-end GET request with an ID gets routed to the edit task
  • 23. Convention over configuration in Models Tables are named as #__component_view, e.g. #__todo_items Auto increment field is named component_view_id, e.g. todo_item_id Magic fields: enabled, created_by, created_on, modified_by, modified_on, locked_by, locked_on, hits You can override defaults without copying & pasting code, ever. Copy & paste is the devil!
  • 24. Convention over configuration in Controllers Default tasks (not RESTful!): browse, read, edit, add, delete, save, apply, ... Customize with onBeforeMethod and onAfterMethod methods, e.g. onBeforeSave. Don't copy & paste code. All MVC objects can be passed a $config array to customize them. It "flows" from dispatcher to component to model and view. FOF guesses the task if it's missing based on plural/singular view name and existence of ID in the query
  • 25. Convention over configuration in Views Views inherit from FOFView and its specialized children, e.g. FOFViewHtml Customize using the onTask methods, e.g. onBrowse The toolbar is handled outside the view, in a FOFToolbar descendant class. Override it with a toolbar.php file in the component's root. Magic toolbar methods, e.g. onItemsBrowse allow you to customize the toolbar without copying & pasting code.
  • 27. HMVC – Hierarchical MVC Include the results of component views anywhere (other views, other component, modules, ...) FOFDispatcher::getTmpInstance(‘com_foobar’, ‘items’, array(‘layout’ => ‘fancy’))->dispatch();
  • 28. Reuse view templates Load a view template from another view, component, ... echo $this->loadAnyTemplate('site:com_foobar/item/form');
  • 29. Media files overrides Load media files like this: FOFTemplateUtils::addCSS('media://com_foobar/css/frontend.css'); Media overrides are inside the template folder, e.g. templates/tpl_example/media/com_foobar/css/frontend.css
  • 30. Web services & automatic JSON and CSV views Just add format=json or format=csv JSON: You have an instant JSON-based remote API for your components CSV: You can quickly export whatever you see in the backend to Excel, Numbers, LibreOffice, Google Docs, etc. Transparent authentication support using URL parameters or HTTP Basic Authentication
  • 31. XML-based views It’s JForm on double dose of steroids Browse, read and edit views from XML templates You don’t need to write any PHP or HTML, but you can mix traditional PHP-based and XML-based templates, even in the same view Overridable with Joomla! template overrides You can write components with virtually no PHP code at all