SlideShare una empresa de Scribd logo
1 de 49
Rapid Application Development
with Framework on Framework (FOF)

November 18th, 2012 – Joomla! World Conference
So, what is FOF anyway?
November 18th, 2012 – Joomla! World Conference
I know what you’re thinking
“Oh, no, not yet another framework!”

November 18th, 2012 – Joomla! World Conference
FOF extends the Joomla! framework
It does not replace or undermine it

November 18th, 2012 – Joomla! World Conference
DRY - Don’t Repeat Yourself
I detest copying and pasting the same code, over and over and over and over and over and over and over...

November 18th, 2012 – Joomla! World Conference
Less is more
Convention over configuration – less dev time, less code, less bugs, less maintenance

November 18th, 2012 – Joomla! World Conference
Doesn’t impose its way of thinking
No black-box methods, multiple customizable triggers, plugin events, ...

November 18th, 2012 – Joomla! World Conference
Plays along nicely
Compatible with Joomla! 1.5, 1.7, 2.5 and 3.0.

November 18th, 2012 – Joomla! World Conference
Backwards compatible
No sudden, quantum changes from one day to the next

November 18th, 2012 – Joomla! World Conference
Some history
How it all came to be

November 18th, 2012 – Joomla! World Conference
July 2009 – Base MVC classes
Custom classes, extending JModel and friends, reducing copy & pasted code

November 18th, 2012 – Joomla! World Conference
September 2011 – Transformed into a framework
Basically, I was pissed with another framework which kept on screwing me over

November 18th, 2012 – Joomla! World Conference
Be the change
 you want to see!




September 2011 – Transformed into a framework
Basically, I was pissed with another framework which kept on screwing me over

November 18th, 2012 – Joomla! World Conference
September 2012 – HMVC
while stuck on the ground, inside a plane, for four freakin’ hours!

November 18th, 2012 – Joomla! World Conference
May 2012 – Public release
at the J and Beyond 2012 conference

November 18th, 2012 – Joomla! World Conference
June 2012 – Bootstrap & jQuery
In optional Akeeba Strapper package

November 18th, 2012 – Joomla! World Conference
Being a FOF Component
Inside its mind, without visiting the 71/2 floor of a Manhattan office building

November 18th, 2012 – Joomla! World Conference
AUDIENCE

ADVISORY
              BORING SLIDES
November 18th, 2012 – Joomla! World Conference
Structure

                         Dispatcher


   “triad”
                         Controller



             Model                    View

                 Table




                            Helpers    Toolbar
Structure

                                Dispatcher


 The“triad”
     Dispatcher is the entry point (a.k.a. “router”). It will setup,
                              Controller
                run and render the MVC triad.

             Model                               View

                        Table




                                   Helpers        Toolbar
Structure

 The Controller is a thin interface to push data to the model state
                               Dispatcher
                       and instantiate views
    “triad”
                                Controller



             Model                              View

                        Table




                                  Helpers        Toolbar
Structure

                            Dispatcher


   “triad”
                            Controller



             Model                         View

                    Table


   The Model is the workhorse. Business logic goes here.
                               Helpers      Toolbar
Structure

                               Dispatcher


    “triad”
                               Controller



              Model                           View

                       Table



  The Table class is a hybrid data adapter, controller and model
                                  Helpers        Toolbar
                     (following J!'s convention)
Structure

                             Dispatcher


   “triad”
                             Controller



             Model                         View

                     Table
   The View fetches model state data and renders them in a
                     meaningful way
                                Helpers      Toolbar
Structure

                             Dispatcher


    “triad”
                              Controller



              Model                            View

  The Toolbar handles Table rendering of titles, buttons and so on
                      the


                                Helpers          Toolbar
Structure

                          Dispatcher


   “triad”
                           Controller



             Model                          View

      Non-OOP stuff.Table
                     Basically, a nice way to say “cruft”


                              Helpers         Toolbar
Some general thoughts

✤   Almost RESTful, but not quite

✤   “Services first” approach. Built-in JSON and transparent
    authentication, opens the door to data provisioning for rich JS,
    Android, iOS etc apps

✤   OAuth not supported (yet?). A custom, secure, TOTP-based
    transparent authentication scheme and HTTP Basic Authentication
    are supported, though.

✤   We offer HMVC today. Actually, since October 2011.
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');
Language loading and overrides


✤   Automatically loads component language files (frontend and
    backend)

✤   Hierarchical language overriding

    ✤   English loads first

    ✤   Current site/user language loads next and overrides English
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
Services first – 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
A peek in my crystal ball
Are you pondering what I’m
pondering?
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)

✤   Remove dependence on JModelLegacy and friends
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)

✤   Remove dependence on JModelLegacy and friends

✤   FOFForm: (almost) no PHP and no HTML Joomla! extensions
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)

✤   Remove dependence on JModelLegacy and friends

✤   FOFForm: (almost) no PHP and no HTML Joomla! extensions

✤   Platform abstraction, allow use with JApplicationWeb and friends
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)

✤   Remove dependence on JModelLegacy and friends

✤   FOFForm: (almost) no PHP and no HTML Joomla! extensions

✤   Platform abstraction, allow use with JApplicationWeb and friends

✤   RFC 2324 implementation (client)
Are you pondering what I’m
pondering?

✤   Input as an object, not as an array (yes, static methods suck)

✤   Remove dependence on JModelLegacy and friends

✤   FOFForm: (almost) no PHP and no HTML Joomla! extensions

✤   Platform abstraction, allow use with JApplicationWeb and friends

✤   RFC 2324 implementation (client)

✤   A plan to take over the world!
Resources and community
http://akeeba.info/fof
CAN I HAZ SOME CODEZ?
Over and out.

Más contenido relacionado

La actualidad más candente

Object-oriented Development with PL-SQL
Object-oriented Development with PL-SQLObject-oriented Development with PL-SQL
Object-oriented Development with PL-SQL
Donald Bales
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJS
Aaronius
 
Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01
Jeffrey Clark
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
Whmcs addon module docs
Whmcs addon module docsWhmcs addon module docs
Whmcs addon module docs
quyvn
 

La actualidad más candente (17)

Handlebars.js
Handlebars.jsHandlebars.js
Handlebars.js
 
Bootstrap 4 ppt
Bootstrap 4 pptBootstrap 4 ppt
Bootstrap 4 ppt
 
A Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes AddictsA Dexterity Intro for Recovering Archetypes Addicts
A Dexterity Intro for Recovering Archetypes Addicts
 
Object-oriented Development with PL-SQL
Object-oriented Development with PL-SQLObject-oriented Development with PL-SQL
Object-oriented Development with PL-SQL
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Ext JS Introduction
Ext JS IntroductionExt JS Introduction
Ext JS Introduction
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJS
 
Patterns In-Javascript
Patterns In-JavascriptPatterns In-Javascript
Patterns In-Javascript
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh My
 
Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01Zpugdc deformpresentation-100709203803-phpapp01
Zpugdc deformpresentation-100709203803-phpapp01
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
SPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery EssentialsSPSTC - SharePoint & jQuery Essentials
SPSTC - SharePoint & jQuery Essentials
 
Introduction to JavaScript design patterns
Introduction to JavaScript design patternsIntroduction to JavaScript design patterns
Introduction to JavaScript design patterns
 
Programming with JavaFX
Programming with JavaFXProgramming with JavaFX
Programming with JavaFX
 
Whmcs addon module docs
Whmcs addon module docsWhmcs addon module docs
Whmcs addon module docs
 
Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™
 

Destacado

Destacado (13)

SYSTEM DYNAMIC METHODOLOGY APPLICATION IN URBAN WATER SYSTEM MANAGEMENT
SYSTEM DYNAMIC METHODOLOGY APPLICATION IN URBAN WATER SYSTEM MANAGEMENTSYSTEM DYNAMIC METHODOLOGY APPLICATION IN URBAN WATER SYSTEM MANAGEMENT
SYSTEM DYNAMIC METHODOLOGY APPLICATION IN URBAN WATER SYSTEM MANAGEMENT
 
Apex day 1.0 citizen developer keynote speak_kamil schvarcz
Apex day 1.0 citizen developer keynote speak_kamil schvarczApex day 1.0 citizen developer keynote speak_kamil schvarcz
Apex day 1.0 citizen developer keynote speak_kamil schvarcz
 
Good dev citizen
Good dev citizenGood dev citizen
Good dev citizen
 
Rapid Application Development (in 2003)
Rapid Application Development (in 2003)Rapid Application Development (in 2003)
Rapid Application Development (in 2003)
 
Introduction to Rapid Application Development
Introduction to Rapid Application DevelopmentIntroduction to Rapid Application Development
Introduction to Rapid Application Development
 
A Crash Course in Rapid Application Development
A Crash Course in Rapid Application DevelopmentA Crash Course in Rapid Application Development
A Crash Course in Rapid Application Development
 
Rapid Application Development with MEAN Stack
Rapid Application Development with MEAN StackRapid Application Development with MEAN Stack
Rapid Application Development with MEAN Stack
 
Modern Rapid Application Development - Too good to be true
Modern Rapid Application Development - Too good to be trueModern Rapid Application Development - Too good to be true
Modern Rapid Application Development - Too good to be true
 
Guiding Principles on Effective Rapid Application Development
Guiding Principles on Effective Rapid Application Development Guiding Principles on Effective Rapid Application Development
Guiding Principles on Effective Rapid Application Development
 
Rapid Application Development Simplified
Rapid Application Development SimplifiedRapid Application Development Simplified
Rapid Application Development Simplified
 
High Productivity Platform
High Productivity PlatformHigh Productivity Platform
High Productivity Platform
 
R.A.D. - Rapid Application Development
R.A.D. - Rapid Application DevelopmentR.A.D. - Rapid Application Development
R.A.D. - Rapid Application Development
 
Rapid Application Development on AWS
Rapid Application Development on AWSRapid Application Development on AWS
Rapid Application Development on AWS
 

Similar a JWC - Rapid application development with FOF

MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
Dilip Patel
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
Mark Rackley
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
elliando dias
 

Similar a JWC - Rapid application development with FOF (20)

Backbone/Marionette introduction
Backbone/Marionette introductionBackbone/Marionette introduction
Backbone/Marionette introduction
 
Code igniter - A brief introduction
Code igniter - A brief introductionCode igniter - A brief introduction
Code igniter - A brief introduction
 
Rapid application development with FOF
Rapid application development with FOFRapid application development with FOF
Rapid application development with FOF
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
Create an application with ember
Create an application with ember Create an application with ember
Create an application with ember
 
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,...
 
Windows phone and azure
Windows phone and azureWindows phone and azure
Windows phone and azure
 
Asp.Net MVC Intro
Asp.Net MVC IntroAsp.Net MVC Intro
Asp.Net MVC Intro
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
Spsemea j query
Spsemea   j querySpsemea   j query
Spsemea j query
 
SharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuerySharePoint Saturday St. Louis - SharePoint & jQuery
SharePoint Saturday St. Louis - SharePoint & jQuery
 
Presentation
PresentationPresentation
Presentation
 
Php and-mvc
Php and-mvcPhp and-mvc
Php and-mvc
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
 
MVC
MVCMVC
MVC
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
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
 
Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 

Más de Nicholas Dionysopoulos

Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Nicholas 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 Subscriptions
Nicholas 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! sites
Nicholas 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

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

JWC - Rapid application development with FOF

  • 1. Rapid Application Development with Framework on Framework (FOF) November 18th, 2012 – Joomla! World Conference
  • 2. So, what is FOF anyway? November 18th, 2012 – Joomla! World Conference
  • 3. I know what you’re thinking “Oh, no, not yet another framework!” November 18th, 2012 – Joomla! World Conference
  • 4. FOF extends the Joomla! framework It does not replace or undermine it November 18th, 2012 – Joomla! World Conference
  • 5. DRY - Don’t Repeat Yourself I detest copying and pasting the same code, over and over and over and over and over and over and over... November 18th, 2012 – Joomla! World Conference
  • 6. Less is more Convention over configuration – less dev time, less code, less bugs, less maintenance November 18th, 2012 – Joomla! World Conference
  • 7. Doesn’t impose its way of thinking No black-box methods, multiple customizable triggers, plugin events, ... November 18th, 2012 – Joomla! World Conference
  • 8. Plays along nicely Compatible with Joomla! 1.5, 1.7, 2.5 and 3.0. November 18th, 2012 – Joomla! World Conference
  • 9. Backwards compatible No sudden, quantum changes from one day to the next November 18th, 2012 – Joomla! World Conference
  • 10. Some history How it all came to be November 18th, 2012 – Joomla! World Conference
  • 11. July 2009 – Base MVC classes Custom classes, extending JModel and friends, reducing copy & pasted code November 18th, 2012 – Joomla! World Conference
  • 12. September 2011 – Transformed into a framework Basically, I was pissed with another framework which kept on screwing me over November 18th, 2012 – Joomla! World Conference
  • 13. Be the change you want to see! September 2011 – Transformed into a framework Basically, I was pissed with another framework which kept on screwing me over November 18th, 2012 – Joomla! World Conference
  • 14. September 2012 – HMVC while stuck on the ground, inside a plane, for four freakin’ hours! November 18th, 2012 – Joomla! World Conference
  • 15. May 2012 – Public release at the J and Beyond 2012 conference November 18th, 2012 – Joomla! World Conference
  • 16. June 2012 – Bootstrap & jQuery In optional Akeeba Strapper package November 18th, 2012 – Joomla! World Conference
  • 17. Being a FOF Component Inside its mind, without visiting the 71/2 floor of a Manhattan office building November 18th, 2012 – Joomla! World Conference
  • 18. AUDIENCE ADVISORY BORING SLIDES November 18th, 2012 – Joomla! World Conference
  • 19. Structure Dispatcher “triad” Controller Model View Table Helpers Toolbar
  • 20. Structure Dispatcher The“triad” Dispatcher is the entry point (a.k.a. “router”). It will setup, Controller run and render the MVC triad. Model View Table Helpers Toolbar
  • 21. Structure The Controller is a thin interface to push data to the model state Dispatcher and instantiate views “triad” Controller Model View Table Helpers Toolbar
  • 22. Structure Dispatcher “triad” Controller Model View Table The Model is the workhorse. Business logic goes here. Helpers Toolbar
  • 23. Structure Dispatcher “triad” Controller Model View Table The Table class is a hybrid data adapter, controller and model Helpers Toolbar (following J!'s convention)
  • 24. Structure Dispatcher “triad” Controller Model View Table The View fetches model state data and renders them in a meaningful way Helpers Toolbar
  • 25. Structure Dispatcher “triad” Controller Model View The Toolbar handles Table rendering of titles, buttons and so on the Helpers Toolbar
  • 26. Structure Dispatcher “triad” Controller Model View Non-OOP stuff.Table Basically, a nice way to say “cruft” Helpers Toolbar
  • 27. Some general thoughts ✤ Almost RESTful, but not quite ✤ “Services first” approach. Built-in JSON and transparent authentication, opens the door to data provisioning for rich JS, Android, iOS etc apps ✤ OAuth not supported (yet?). A custom, secure, TOTP-based transparent authentication scheme and HTTP Basic Authentication are supported, though. ✤ We offer HMVC today. Actually, since October 2011.
  • 29. 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
  • 30. 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!
  • 31. 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
  • 32. 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.
  • 34. HMVC – Hierarchical MVC ✤ Include the results of component views anywhere (other views, other component, modules, ...) ✤ FOFDispatcher::getTmpInstance(‘com_foobar’, ‘items’, array(‘layout’ => ‘fancy’))->dispatch();
  • 35. Reuse view templates ✤ Load a view template from another view, component, ... ✤ echo $this->loadAnyTemplate('site:com_foobar/item/form');
  • 36. Language loading and overrides ✤ Automatically loads component language files (frontend and backend) ✤ Hierarchical language overriding ✤ English loads first ✤ Current site/user language loads next and overrides English
  • 37. 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
  • 38. Services first – 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
  • 39. A peek in my crystal ball
  • 40. Are you pondering what I’m pondering?
  • 41. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck)
  • 42. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck) ✤ Remove dependence on JModelLegacy and friends
  • 43. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck) ✤ Remove dependence on JModelLegacy and friends ✤ FOFForm: (almost) no PHP and no HTML Joomla! extensions
  • 44. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck) ✤ Remove dependence on JModelLegacy and friends ✤ FOFForm: (almost) no PHP and no HTML Joomla! extensions ✤ Platform abstraction, allow use with JApplicationWeb and friends
  • 45. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck) ✤ Remove dependence on JModelLegacy and friends ✤ FOFForm: (almost) no PHP and no HTML Joomla! extensions ✤ Platform abstraction, allow use with JApplicationWeb and friends ✤ RFC 2324 implementation (client)
  • 46. Are you pondering what I’m pondering? ✤ Input as an object, not as an array (yes, static methods suck) ✤ Remove dependence on JModelLegacy and friends ✤ FOFForm: (almost) no PHP and no HTML Joomla! extensions ✤ Platform abstraction, allow use with JApplicationWeb and friends ✤ RFC 2324 implementation (client) ✤ A plan to take over the world!
  • 48. CAN I HAZ SOME CODEZ?

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n