what is the joomla framework and why do we need it?

42
What is the Joomla Framework And why do we need it?

Upload: rouven-wessling

Post on 08-Jan-2017

1.263 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: What is the Joomla Framework and why do we need it?

What is the JoomlaFrameworkAnd why do we need it?

Page 2: What is the Joomla Framework and why do we need it?

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?

I talk really fast...

...so stop me whenever you need to! ;)

Page 4: What is the Joomla Framework and why do we need it?

The Joomla Platform

Page 5: What is the Joomla Framework and why do we need it?

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?

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?

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?

So we decided to kill it.

Page 9: What is the Joomla Framework and why do we need it?

So we decided to kill it.kill rename

Why?

Page 10: What is the Joomla Framework and why do we need it?

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?

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?

Namespaces

Page 13: What is the Joomla Framework and why do we need it?

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?

<?php

$client = new JApplicationWebClient;

Page 15: What is the Joomla Framework and why do we need it?

<?php

$client = new Joomla\Application\Web\WebClient;

Page 16: What is the Joomla Framework and why do we need it?

<?php

use Joomla\Application\Web\WebClient;

$client = new WebClient;

Page 17: What is the Joomla Framework and why do we need it?

<?php

use Joomla\Application\Web\WebClient as Client;

$client = new Client;

Page 18: What is the Joomla Framework and why do we need it?

PSRs

Page 19: What is the Joomla Framework and why do we need it?

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?

What about PSR-2?

Nope.

Page 21: What is the Joomla Framework and why do we need it?

PSR-0

Page 22: What is the Joomla Framework and why do we need it?

Turns class names into path

Page 23: What is the Joomla Framework and why do we need it?

Joomla\Application\Web\WebClient

Page 24: What is the Joomla Framework and why do we need it?

Joomla/Application/Web/WebClient.php

Page 25: What is the Joomla Framework and why do we need it?

Discrete packages

Page 26: What is the Joomla Framework and why do we need it?

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?

Composer

Page 28: What is the Joomla Framework and why do we need it?

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?

And the Framework?

Currently 33 packages+ 1 for the entire framework

Page 30: What is the Joomla Framework and why do we need it?

{    "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?

Semantic versioning

Page 32: What is the Joomla Framework and why do we need it?

}Bugfix

}Feature

}B/C break

1 . 2 . 3

Page 33: What is the Joomla Framework and why do we need it?

Let’s talk community...

Page 34: What is the Joomla Framework and why do we need it?

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?

...we also want to take theirs.

Page 36: What is the Joomla Framework and why do we need it?

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?

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?

And the CMS?

Page 39: What is the Joomla Framework and why do we need it?

Used in the Joomla Tracker

Page 40: What is the Joomla Framework and why do we need it?

Discrete packages

Page 41: What is the Joomla Framework and why do we need it?

Interfaces to the rescue