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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

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