2. Nooku Framework
The API that speaks for itself
Joomladay, December 2009, Barcelona ES
3. What is it ?
Rapid extension development framework for Joomla.
•Version 0.6.5/0.7.0
• GPL 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 frameworks don’t integrate easily with Joomla
• allow you to build an application
• Joomla is an ecosystem of applications
http:///www.nooku.org 1
7
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 automated copy/paste
http:///www.nooku.org 1
10
10. Write less code !
Leaves more time to focus on
business logic
and user experience
http:///www.nooku.org 1
11
11. How it should be ...
class WeblinksControllerWeblinks extends KControllerForm
{
// no code needed
}
class WeblinksModelWeblinks extends KModelTable
{
// no code needed
}
class WeblinksViewWeblinks extends KViewHtml
{
// no code needed
}
That’s all you need
for a working MVC extension!
http:///www.nooku.org 1
9
12. Ninjaboard
Lines of Code
Comment Lines of code
Non comment Lines of Code
9.964
?
1.782
30.190 3.572
Using Joomla Framework Using Nooku Framework
http:///www.nooku.org 1
11
13. Ninjaboard
Lines of Code
Comment Lines of code
Non comment Lines of Code
9.964 88% Reduction!
1.782
30.190 3.572
Using Joomla Framework Using Nooku Framework
http:///www.nooku.org 1
11
14. Security!
IBM says Joomla is insecure
http:///www.nooku.org 1
11
15. OSM says : Not our fault !
“The high rank is due to third party apps developed for
Joomla and not due to vulnerabilities in Joomla itself.”
Elin Waring - President Opensourcematters, Inc.
Link : http://community.joomla.org/blogs/community/1029-on-being-qthe-vendorq.html
http:///www.nooku.org 1
11
16. Nooku Framework says :
“Write less code to lower the risk of vulnerabilities.
Provide advanced automatic security features out
of the box.”
Link : http://community.joomla.org/blogs/community/1029-on-being-qthe-vendorq.html
http:///www.nooku.org 1
11
17. Reusability!
3600+ extensions and counting
http:///www.nooku.org 1
11
22. Joomla 1.5 only
Static
KModel
MVC
State State
Query Change
View Selection
KView KController
http:///www.nooku.org 21
23. KDatabase KTable Dynamic
MVC
KModel
All of this happens behind
State State
Query Change
the scenes, without writing
View Selection any code.
KView KController
Your task is specializing it:
Execute
Controller writing only the specifics
KTemplate KDispatcher
that deviate from the
default behavior.
http:///www.nooku.org 22
24. 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
25. Who is using it ?
Anahita Social Engine
http://www.anahitapolis.com
Nooku Content
http://www.nooku.org
Ninjaforge
http://www.ninjaforge.com
Custom Projects Upcoming Extensions
•Port of Antwerp
•DOCman 2 • AEC
• Italian Institute of Technology
• Kainga Real Estate system • YOOTheme • Dioscouri
http:///www.nooku.org 1
21
29. Learn more ?
1. Check out our presentations
http://www.nooku.org/framework
2. Look at the API
http://api.nooku.org
3. Get mailing list access
http://www.nooku.org/framework/request.html
4. Get the code
http://sourceforge.net/projects/nooku-framework/
http:///www.nooku.org 1
22