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

Post on 08-Jan-2017

1.263 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

What is the JoomlaFrameworkAnd why do we need it?

Who am I?Active in the JBS since 2009

JSST member since 2011

Platform Framework maintainer

I talk really fast...

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

The Joomla Platform

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

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

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');}

So we decided to kill it.

So we decided to kill it.kill rename

Why?

Change in philosophy

Joomla! Platform Joomla! Framework

Fotos: Rolf Obermaier (PD), Benjamin D. Esham (CC BY-SA)

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

Namespaces

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

<?php

$client = new JApplicationWebClient;

<?php

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

<?php

use Joomla\Application\Web\WebClient;

$client = new WebClient;

<?php

use Joomla\Application\Web\WebClient as Client;

$client = new Client;

PSRs

PSR-0: Autoloading

PSR-1: Interoperable code

PSR-3: Logging

PSR-X: Cache

Prepared for future PSRs like Uris

PSRs and the Framework

What about PSR-2?

Nope.

PSR-0

Turns class names into path

Joomla\Application\Web\WebClient

Joomla/Application/Web/WebClient.php

Discrete packages

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

Composer

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

And the Framework?

Currently 33 packages+ 1 for the entire framework

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

Semantic versioning

}Bugfix

}Feature

}B/C break

1 . 2 . 3

Let’s talk community...

We not only want to offer our code to the PHP community...

...we also want to take theirs.

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

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?

And the CMS?

Used in the Joomla Tracker

Discrete packages

Interfaces to the rescue

Thank You.

@RouvenWesslingwww.rouvenwessling.deme@rouvenwessling.de

top related