SlideShare a Scribd company logo
1 of 24
nooku.org/framework
Nooku Framework
   The extension API that speaks for itself !



Joomladay NL, June 2009 - Nieuwegein
Technology, features, experience !
At some point, to stay viable, content management systems
   require a quantum evolution that takes them beyond
  technology and features and on to the satisfaction of a
customer experience. That’s what we are trying to do with
                          Nooku.
                                              Johan Janssens




     http:///www.nooku.org                                     1
                                                               2
Joomla 1.0
                  Joomla! CMS




http:///www.nooku.org           1
                                3
Joomla 1.5
                           Joomla ! CMS

    Components         Modules      Extensions    Templates           Languages




    Administrator          Site     Application   Installation        XML-RPC




                                  Joomla! CMF


               Libraries            Framework               Plugins




http:///www.nooku.org                                                             1
                                                                                  4
Nooku Framework




http:///www.nooku.org   1
                        5
What is it ?
Rapid extension development framework for Joomla.

                     •Version 0.7.0
                     • GPL v 2.0 license
                     • Non-commercial
                     • Joomla 1.5 only
                     • Installs as a plugin
                     • 30k lines of code
                     • Can work standalone


     http:///www.nooku.org                          1
                                                    6
Why a new framework ?
1. Developing for Joomla 1.5 :
    • takes too much time
    • too much repeated tasks
    • resulting extensions are inflexible
    • PHP4
 2. Existing framework don’t integrate easily with Joomla



        http:///www.nooku.org                               1
                                                            7
How it used to be ...
                                                      ...
class WeblinksController extends JController
                                                                            // Checkout the weblink
{                                                                           $model = $this->getModel('weblink');
    function __construct($config = array())                                 $model->checkout();
    {                                                                   } break;
        parent::__construct($config);                                   case 'edit'    :
                                                                        {
          // Register Extra tasks                                           JRequest::setVar( 'hidemainmenu', 1 );
          $this->registerTask( 'add',  'display' );                         JRequest::setVar( 'layout', 'form'  );
          $this->registerTask( 'edit', 'display' );                         JRequest::setVar( 'view'  , 'weblink');
                                                                            JRequest::setVar( 'edit', true );
      }
                                                                            // Checkout the weblink
   function display( )                                                      $model = $this->getModel('weblink');
    {                                                                       $model->checkout();
        switch($this->getTask())                                        } break;
        {                                                         }
            case 'add'     :
            {
                JRequest::setVar(   'hidemainmenu', 1 );
                JRequest::setVar(   'layout', 'form'  );
                JRequest::setVar(   'view'  , 'weblink');
                JRequest::setVar(   'edit', false );
...




              http:///www.nooku.org                                                                          1
                                                                                                             8
How it should be ...
class WeblinksControllerWeblinks extends KControllerForm
{
   //do nothing
}

class WeblinksModelWeblinks extends KModelTable
{
   //do nothing
}

class WeblinksViewWeblinks extends KViewHtml
{
   //do nothing
}




      That’s all you need for a working MVC extensions !

           http:///www.nooku.org                           1
                                                           9
House Rules !
• Use existing Design Pattern
       Don’t reinvent the wheel - just make it roll smoother
• Make all code reusable
       Don’t repeat yourself - and don’t repeat anyone else either
• Extreme flexibility
       Every object, and every part of the code must be extensible and replaceable.
       Ability to hook into any controller, database or application action
• An API is like a User Interface
       Learn once, apply everywhere
       KISS : keep it sexy and simple
• Convention over configuration
• Scaffolding is a fancy word for copy/paste

        http:///www.nooku.org                                                          1
                                                                                      10
Features !
Flexibility                    Extensibility
 •Auto-loading                    • Chain of command
 • Factory/Object Store           • Inflector
 • Dependency injection           • Mixins
 • Smart and dynamic MVC          • Decorators
Data handling                   Security
  • ORM/Table Gateway               • Auto CSRF protection
  • REST/XML/JSON                   • Input filtering

       http:///www.nooku.org                             1
                                                        11
MVC

                           KModel

          State                                           State
          Query                                          Change




                          View Selection




                  KView                    KController




http:///www.nooku.org                                                1
                                                                    12
MVC
                           KModel

          State                                               State
          Query                                              Change




                          View Selection




                  KView                    KController




                                                     Execute
                                                     Controller




                                           KDispatcher




http:///www.nooku.org                                                    1
                                                                        13
KDatabase           KTable
                                                                                  MVC
                                  KModel

          State                                                           State
          Query                                                          Change




                                 View Selection




                  KView                                KController




                                                                 Execute
                                                                 Controller




                                                       KDispatcher




http:///www.nooku.org                                                                1
                                                                                    14
KDatabase           KTable                              MVC
                                  KModel

          State                                                           State
          Query                                                          Change




                                 View Selection




                  KView                                KController




                                                                 Execute
                                                                 Controller




                                                       KDispatcher




http:///www.nooku.org                                                                1
                                                                                    15
KDatabase           KTable
                                                                                      MVC
                                      KModel

          State                                                               State
          Query                                                              Change




                                     View Selection




                  KView                                    KController




                                                                     Execute
                                                                     Controller




                  KTemplate                                KDispatcher




http:///www.nooku.org                                                                    1
                                                                                        16
KFactory
KFactory::get('admin::com.harbour.model.boat');

KFactory::tmp('admin::com.harbour.model.boat');

KFactory::get('lib.koowa.database');

KFactory::get('lib.joomla.session');




    http:///www.nooku.org                      1
                                              17
KRequest
KRequest::get('get.layout', 'cmd', 'default');

KRequest::set('get.layout', 'mylayout');

KRequest::get('post', 'string');




    http:///www.nooku.org                         1
                                                 18
KController

                 •Browse
                 • Read
                 • Edit
                 • Add
                 • Delete


http:///www.nooku.org        1
                            19
KTemplate
<ul>
  <? foreach(@$boats as $boat) : ?>
  <li>
     <?=$boat->id?>.
     <?=$boat->name?>
  </li>
  <? endforeach; ?>
</ul>




 http:///www.nooku.org                 1
                                      20
Who is using it ?
           Anahita Social Engine
           http://www.anahitapolis.com

           Nooku Content
           http://www.nooku.org


Custom Projects                          Upcoming Extensions
  •Port of Antwerp                          •Virtuemart 2.0
  • Italian Institute of Technology         • YOOTheme
  • Kainga Real Estate system               • AEC Subscription

       http:///www.nooku.org                                      1
                                                                 21
Learn more ?
 1. Check out our presentations
    http://www.nooku.org/framework

 2. Look at the API
    http://api.nooku.org

 3. Get code & mailing list access
    http://www.nooku.org/framework/request.html

 4. Come to a Nooku Code Jam
    The next one is in Hamburg on June 27th

... or organize a Nooku Code Jam in your city


         http:///www.nooku.org                     1
                                                  22
You can find us at
     http://www.nooku.org
                 You can follow us on
http://www.twitter.com/nooku


   http:///www.nooku.org                 1
                                        23

More Related Content

Viewers also liked

Joomladay Es 2009 - Nooku Framework
Joomladay Es 2009  - Nooku FrameworkJoomladay Es 2009  - Nooku Framework
Joomladay Es 2009 - Nooku Framework
Nooku
 
T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
 T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
Zoran Jeremic
 
T 3.3 design paterni (a)
 T 3.3 design paterni (a) T 3.3 design paterni (a)
T 3.3 design paterni (a)
Zoran Jeremic
 

Viewers also liked (9)

Joomladay Es 2009 - Nooku Framework
Joomladay Es 2009  - Nooku FrameworkJoomladay Es 2009  - Nooku Framework
Joomladay Es 2009 - Nooku Framework
 
Interactive &amp; Collaborative Communication V002
Interactive &amp; Collaborative Communication V002Interactive &amp; Collaborative Communication V002
Interactive &amp; Collaborative Communication V002
 
Six Ps Of Leadership
Six Ps Of LeadershipSix Ps Of Leadership
Six Ps Of Leadership
 
M&amp;A Presentation Mip (Mba Polit. Milan) 8 May 2009 Picconi
M&amp;A Presentation Mip (Mba Polit. Milan) 8 May 2009 PicconiM&amp;A Presentation Mip (Mba Polit. Milan) 8 May 2009 Picconi
M&amp;A Presentation Mip (Mba Polit. Milan) 8 May 2009 Picconi
 
Samra Article Cm Principles For Consideration During Research Projects
Samra Article   Cm Principles For Consideration During Research ProjectsSamra Article   Cm Principles For Consideration During Research Projects
Samra Article Cm Principles For Consideration During Research Projects
 
T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
 T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
T 3.5 modelovanje stanja koriscenjem uml statechart dijagrama
 
T 3.3 design paterni (a)
 T 3.3 design paterni (a) T 3.3 design paterni (a)
T 3.3 design paterni (a)
 
Collaborative Transportation Management
Collaborative Transportation ManagementCollaborative Transportation Management
Collaborative Transportation Management
 
Seven Supply Chain Wastes
Seven Supply Chain WastesSeven Supply Chain Wastes
Seven Supply Chain Wastes
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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, ...
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
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
 

Joomladay Nl 2009 - Nooku Framework

  • 2. Nooku Framework The extension API that speaks for itself ! Joomladay NL, June 2009 - Nieuwegein
  • 3. Technology, features, experience ! At some point, to stay viable, content management systems require a quantum evolution that takes them beyond technology and features and on to the satisfaction of a customer experience. That’s what we are trying to do with Nooku. Johan Janssens http:///www.nooku.org 1 2
  • 4. Joomla 1.0 Joomla! CMS http:///www.nooku.org 1 3
  • 5. Joomla 1.5 Joomla ! CMS Components Modules Extensions Templates Languages Administrator Site Application Installation XML-RPC Joomla! CMF Libraries Framework Plugins http:///www.nooku.org 1 4
  • 7. What is it ? Rapid extension development framework for Joomla. •Version 0.7.0 • GPL v 2.0 license • Non-commercial • Joomla 1.5 only • Installs as a plugin • 30k lines of code • Can work standalone http:///www.nooku.org 1 6
  • 8. Why a new framework ? 1. Developing for Joomla 1.5 : • takes too much time • too much repeated tasks • resulting extensions are inflexible • PHP4 2. Existing framework don’t integrate easily with Joomla http:///www.nooku.org 1 7
  • 9. How it used to be ... ... class WeblinksController extends JController // Checkout the weblink {                 $model = $this->getModel('weblink');     function __construct($config = array())                 $model->checkout();     {             } break;         parent::__construct($config);             case 'edit'    :             {         // Register Extra tasks                 JRequest::setVar( 'hidemainmenu', 1 );         $this->registerTask( 'add',  'display' );                 JRequest::setVar( 'layout', 'form'  );         $this->registerTask( 'edit', 'display' );                 JRequest::setVar( 'view'  , 'weblink');                 JRequest::setVar( 'edit', true );     }                 // Checkout the weblink    function display( )                 $model = $this->getModel('weblink');     {                 $model->checkout();         switch($this->getTask())             } break;         {         }             case 'add'     :             {                 JRequest::setVar( 'hidemainmenu', 1 );                 JRequest::setVar( 'layout', 'form'  );                 JRequest::setVar( 'view'  , 'weblink');                 JRequest::setVar( 'edit', false ); ... http:///www.nooku.org 1 8
  • 10. How it should be ... class WeblinksControllerWeblinks extends KControllerForm { //do nothing } class WeblinksModelWeblinks extends KModelTable { //do nothing } class WeblinksViewWeblinks extends KViewHtml { //do nothing } That’s all you need for a working MVC extensions ! http:///www.nooku.org 1 9
  • 11. House Rules ! • Use existing Design Pattern Don’t reinvent the wheel - just make it roll smoother • Make all code reusable Don’t repeat yourself - and don’t repeat anyone else either • Extreme flexibility Every object, and every part of the code must be extensible and replaceable. Ability to hook into any controller, database or application action • An API is like a User Interface Learn once, apply everywhere KISS : keep it sexy and simple • Convention over configuration • Scaffolding is a fancy word for copy/paste http:///www.nooku.org 1 10
  • 12. Features ! Flexibility Extensibility •Auto-loading • Chain of command • Factory/Object Store • Inflector • Dependency injection • Mixins • Smart and dynamic MVC • Decorators Data handling Security • ORM/Table Gateway • Auto CSRF protection • REST/XML/JSON • Input filtering http:///www.nooku.org 1 11
  • 13. MVC KModel State State Query Change View Selection KView KController http:///www.nooku.org 1 12
  • 14. MVC KModel State State Query Change View Selection KView KController Execute Controller KDispatcher http:///www.nooku.org 1 13
  • 15. KDatabase KTable MVC KModel State State Query Change View Selection KView KController Execute Controller KDispatcher http:///www.nooku.org 1 14
  • 16. KDatabase KTable MVC KModel State State Query Change View Selection KView KController Execute Controller KDispatcher http:///www.nooku.org 1 15
  • 17. KDatabase KTable MVC KModel State State Query Change View Selection KView KController Execute Controller KTemplate KDispatcher http:///www.nooku.org 1 16
  • 19. KRequest KRequest::get('get.layout', 'cmd', 'default'); KRequest::set('get.layout', 'mylayout'); KRequest::get('post', 'string'); http:///www.nooku.org 1 18
  • 20. KController •Browse • Read • Edit • Add • Delete http:///www.nooku.org 1 19
  • 21. KTemplate <ul> <? foreach(@$boats as $boat) : ?> <li> <?=$boat->id?>. <?=$boat->name?> </li> <? endforeach; ?> </ul> http:///www.nooku.org 1 20
  • 22. Who is using it ? Anahita Social Engine http://www.anahitapolis.com Nooku Content http://www.nooku.org Custom Projects Upcoming Extensions •Port of Antwerp •Virtuemart 2.0 • Italian Institute of Technology • YOOTheme • Kainga Real Estate system • AEC Subscription http:///www.nooku.org 1 21
  • 23. Learn more ? 1. Check out our presentations http://www.nooku.org/framework 2. Look at the API http://api.nooku.org 3. Get code & mailing list access http://www.nooku.org/framework/request.html 4. Come to a Nooku Code Jam The next one is in Hamburg on June 27th ... or organize a Nooku Code Jam in your city http:///www.nooku.org 1 22
  • 24. You can find us at http://www.nooku.org You can follow us on http://www.twitter.com/nooku http:///www.nooku.org 1 23