What is the Joomla Framework and why do we need it?
-
Upload
rouven-wessling -
Category
Technology
-
view
1.264 -
download
1
Transcript of What is the Joomla Framework and why do we need it?
![Page 1: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/1.jpg)
What is the JoomlaFrameworkAnd why do we need it?
![Page 2: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/2.jpg)
Who am I?Active in the JBS since 2009
JSST member since 2011
Platform Framework maintainer
![Page 3: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/3.jpg)
I talk really fast...
...so stop me whenever you need to! ;)
![Page 4: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/4.jpg)
The Joomla Platform
![Page 5: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/5.jpg)
The goodStrong focus on unit testing and continuous integration
Independent release cycle
More decoupled code
Higher code quality achieved
J!Oscar 2011Innovation of the Year
![Page 6: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/6.jpg)
The badConfusing version numbers
Hard to use our great libraries in non Joomla based apps
All or nothing
Need to maintain a high level of backwards compatibility
![Page 7: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/7.jpg)
The uglyHuge baggage of CMS specific code
if (class_exists('JError')) {! return JError::raiseWarning(100, 'Unable to read archive');} else {! throw new RuntimeException('Unable to read archive');}
![Page 8: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/8.jpg)
So we decided to kill it.
![Page 9: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/9.jpg)
So we decided to kill it.kill rename
Why?
![Page 10: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/10.jpg)
Change in philosophy
Joomla! Platform Joomla! Framework
Fotos: Rolf Obermaier (PD), Benjamin D. Esham (CC BY-SA)
![Page 11: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/11.jpg)
allows along available breaking changes clear cms code
community composer contain current developers
documentation folder framework future including
install issue joomla libraries list mailing maintaining
making name namespacing needs package php plan
platform possible project provide ready release removal
repository suite system talks team tests upgrade version wider
![Page 12: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/12.jpg)
Namespaces
![Page 13: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/13.jpg)
New since PHP 5.3
Can be used to write much more readable code
Better code organization
Very hard to do in a way that’s backwards compatible
![Page 14: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/14.jpg)
<?php
$client = new JApplicationWebClient;
![Page 15: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/15.jpg)
<?php
$client = new Joomla\Application\Web\WebClient;
![Page 16: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/16.jpg)
<?php
use Joomla\Application\Web\WebClient;
$client = new WebClient;
![Page 17: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/17.jpg)
<?php
use Joomla\Application\Web\WebClient as Client;
$client = new Client;
![Page 18: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/18.jpg)
PSRs
![Page 19: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/19.jpg)
PSR-0: Autoloading
PSR-1: Interoperable code
PSR-3: Logging
PSR-X: Cache
Prepared for future PSRs like Uris
PSRs and the Framework
![Page 20: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/20.jpg)
What about PSR-2?
Nope.
![Page 21: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/21.jpg)
PSR-0
![Page 22: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/22.jpg)
Turns class names into path
![Page 23: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/23.jpg)
Joomla\Application\Web\WebClient
![Page 24: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/24.jpg)
Joomla/Application/Web/WebClient.php
![Page 25: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/25.jpg)
Discrete packages
![Page 26: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/26.jpg)
application archive cache client compat controller crypt
data database date event filesystem filter form github
google http image input keychain language log model oauth2 profiler registry router session string test uri utilities
view
![Page 27: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/27.jpg)
Composer
![Page 28: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/28.jpg)
Per-project dependency management
Public repository on packagist.org
Or host your own using Satis
Adopted by Symfony2, Laravel 4, Zend Framework 2, Drupal 8 and many more
Creates an automatic autoloader
![Page 29: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/29.jpg)
And the Framework?
Currently 33 packages+ 1 for the entire framework
![Page 30: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/30.jpg)
{ "name": "joomla/tracker", "description": "Issue Tracking application built on the Joomla! Framework integrating with GitHub to replace the existing Joomlacode solution.", "keywords": ["joomla","tracker"], "homepage": "https://github.com/joomla/jissues", "license": "GPL-2.0+",! "version": "1.0.0-alpha", "require": { "php": ">=5.3.10", "joomla/framework": "dev-master", "symfony/http-foundation": "2.2.*", "elkuku/console-progressbar": "1.0", "twig/twig" : "1.*", "mustache/mustache" : "2.1.*" }, "autoload": { "psr-0": { "Joomla\\Tracker": "src/" } }, "minimum-stability": "dev"}
![Page 31: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/31.jpg)
Semantic versioning
![Page 32: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/32.jpg)
}Bugfix
}Feature
}B/C break
1 . 2 . 3
![Page 33: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/33.jpg)
Let’s talk community...
![Page 34: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/34.jpg)
We not only want to offer our code to the PHP community...
![Page 35: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/35.jpg)
...we also want to take theirs.
![Page 36: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/36.jpg)
Support YAML in Registry thanks to Symfony2’s YAML
Considering to adopt Symfony2’s Session system
Dropped JMail in favor of using Swift Mailer or PHPMailer
Monolog will probably be the recommended logger
![Page 37: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/37.jpg)
Currently in alpha state
Expected release in Q4 2013
80% done - but the last 20% are the hardest
Need to fully decouple unit test
String package not ready
Need the Cache PSR
How far are we?
![Page 38: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/38.jpg)
And the CMS?
![Page 39: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/39.jpg)
Used in the Joomla Tracker
![Page 40: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/40.jpg)
Discrete packages
![Page 41: What is the Joomla Framework and why do we need it?](https://reader033.fdocuments.in/reader033/viewer/2022042605/58714dd11a28ab55588b72d7/html5/thumbnails/41.jpg)
Interfaces to the rescue