Bonnes Pratiques Web & Cloud
75.2K views | +0 today
Bonnes Pratiques Web & Cloud
Administration cloud et développement web
Curated by Mickael Ruau
Your new post is loading...
Your new post is loading...

Popular Tags

Scooped by Mickael Ruau
March 26, 2013 4:02 AM
Scoop.it!

Introducing the ZF2 Plugin Broker

In Zend Framework 2.0, we're refactoring in a number of areas in order to increase the consistency of the framework. One area we identified early is how plugins are loaded.

The word "plugins" in Zend Framework applies to a number of items:

Helpers (view helpers, action helpers)Application resourcesFilters and validators (particularly when applied to Zend_Filter_Input and Zend_Form)Adapters

In practically every case, we use a "short name" to name the plugin, in order to allow loading it dynamically. This allows more concise code, as well as the ability to configure the code in order to allow specifying alternate implementations.

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:57 AM
Scoop.it!

ZF2's New Controller::init() :: phly, boy, phly

In Zend Framework 1, controller's had an init() method, which was called after the controller was instantiated. The reason for it was to encourage developers not to override the constructor, and thus potentially break some of the functionality (as a number of objects were injected via the constructor). init() was useful for doing additional object initialization.

 

But this feature is missing from ZF2; how can we accomplish this sort of pattern?

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:56 AM
Scoop.it!

RESTful APIs with ZF2, Part 3 :: phly, boy, phly

In my previous posts, I covered basics of JSON hypermedia APIs using Hypermedia Application Language (HAL), and methods for reporting errors, including API-Problem and vnd.error.

In this post, I'll be covering documenting your API -- techniques you can use to indicate what HTTP operations are allowed, as well as convey the full documentation on what endpoints are available, what they accept, and what you can expect them to return.

While I will continue covering general aspects of RESTful APIs in this post, I will also finally introduce several ZF2-specific techniques.

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:53 AM
Scoop.it!

RESTful APIs with ZF2, Part 1 :: phly, boy, phly

RESTful APIs have been an interest of mine for a couple of years, but due to circumstances, I've not had much chance to work with them in any meaningful fashion until recently.

Rob Allen and I proposed a workshop for PHP Benelux 2013 covering RESTful APIs with ZF2. When it was accepted, it gave me the perfect opportunity to dive in and start putting the various pieces together.

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:47 AM
Scoop.it!

Injection de dépendances - Wikipédia

L'injection de dépendances (Dependency Injection) est un mécanisme qui permet d'implanter le principe de l'inversion de contrôle. Il consiste à créer dynamiquement (injecter) les dépendances entre les différentes classes en s'appuyant sur une description (fichier de configuration ou métadonnées) ou de manière programmatique. Ainsi les dépendances entre composants logiciels ne sont plus exprimées dans le code de manière statique mais déterminées dynamiquement à l'exécution.

En programmation objet, les objets de type A dépendent d'un objet de type B si au moins une des conditions suivantes est vérifiée :

Si A dépend de B, cela implique que pour créer A, on a besoin de B ce qui, en pratique, n'est pas toujours le cas.

No comment yet.
Scooped by Mickael Ruau
March 24, 2013 6:39 AM
Scoop.it!

Optimisation site internet : la règle des 3C

Optimisation site internet : la règle des 3C | Bonnes Pratiques Web & Cloud | Scoop.it
l'optimisation du site internet selon la règle des 3C (contenu, code et conception) dans le référencement naturel
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:46 PM
Scoop.it!

Develop Multilingual site using codeigniter i18n Library

Internationalization (i18n) Library is an extension of  CodeIgniter Language Library. Recently I extended this library with codeIgniter main language to build a multi-language site and found that v...
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:45 PM
Scoop.it!

Utiliser les adaptateurs de traduction - Zend_Translate - Zend Framework

No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

PHP 5.3 : namespace : les espaces de noms (partie 1) - Pascal MARTIN (n+1).zéro

PHP 5.3 : namespace : les espaces de noms (partie 1) - Pascal MARTIN (n+1).zéro | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

PHP 5.3 : Manipulation de dates - Pascal MARTIN (n+1).zéro

No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

PHP 5.3 : intl : Internationalisation et Localisation (partie 1) - Pascal MARTIN (n+1).zéro

PHP 5.3 : intl : Internationalisation et Localisation (partie 1) - Pascal MARTIN (n+1).zéro | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:36 PM
Scoop.it!

Internationalisation et Localisation — CakePHP Cookbook v1.2 documentation

Internationalisation et Localisation — CakePHP Cookbook v1.2 documentation | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:33 PM
Scoop.it!

La 57ième boule de cristal » Archives du Blog » Internationalisation des thèmes::partie 6::La méthode complète

La 57ième boule de cristal » Archives du Blog » Internationalisation des thèmes::partie 6::La méthode complète | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 26, 2013 4:00 AM
Scoop.it!

Getting started writing ZF2 modules :: phly, boy, phly

The key story in the release is the creation of a new MVC layer, and to sweeten the story, the addition of a modular application architecture.

"Modular? What's that mean?" For ZF2, "modular" means that your application is built of one or more "modules".

Mickael Ruau's insight:

The key story in the release is the creation of a new MVC layer, and to sweeten the story, the addition of a modular application architecture.

"Modular? What's that mean?" For ZF2, "modular" means that your application is built of one or more "modules". In a lexicon agreed upon during our IRC meetings, a module is a collection of code and other files that solves a specific atomic problem of the application or website.

 

In ZF2, a module is simply a namespaced directory, with a single "Module" class under it; no more, and no less, is required.

So, as an example:

modules/ FooBlog/ Module.php FooPages/ Module.php

The above shows two modules, "FooBlog" and "FooPages". The "Module.php" file under each contains a single "Module" class, namespaced per the module: FooBlog\Module and FooPages\Module, respectively.

No comment yet.
Scooped by Mickael Ruau
March 25, 2013 1:23 PM
Scoop.it!

PHP Master | The MVC Pattern and PHP, Part 2

PHP Master | The MVC Pattern and PHP, Part 2 | Bonnes Pratiques Web & Cloud | Scoop.it
Learn the basic principles of the Model-View-Controller (MVC) pattern and see an example of the MVC pattern in PHP.
No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:55 AM
Scoop.it!

RESTful APIs with ZF2, Part 2 :: phly, boy, phly

In my last post, I covered some background on REST and the Richardson Maturity Model, and some emerging standards around hypermedia APIs in JSON; in particular, I outlined aspects of Hypermedia Application Language (HAL), and how it can be used to define a generic structure for JSON resources.

In this post, I cover an aspect of RESTful APIs that's often overlooked: reporting problems.

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:48 AM
Scoop.it!

Inversion de contrôle - Wikipédia

L’inversion de contrôle (Inversion of Control, IoC) est un patron d'architecture commun à tous les frameworks (ou cadre de développement et d'exécution). Il fonctionne selon le principe que le flot d'exécution d'un logiciel n'est plus sous le contrôle direct de l'application elle-même mais du framework ou de la couche logicielle sous-jacente.

L’inversion de contrôle est un terme générique. Selon la problématique, il existe différentes formes, ou représentation d'IoC, le plus connu étant l'injection de dépendances (dependency injection) qui est un patron de conception permettant, en programmation orientée objet, de découpler les dépendances entre objets.

Avec l'IoC, le framework (cadriciel) prend en charge l'exécution principale du programme ; il coordonne et contrôle l'activité de l'application. Le programme utilisateur définit alors les blocs de codes en utilisant l'API fournie à cet effet par le framework, sans relation dure entre eux. Ces blocs de codes sont laissés à la discrétion du framework qui se chargera de les appeler.

No comment yet.
Scooped by Mickael Ruau
March 26, 2013 3:47 AM
Scoop.it!

Learning Dependency Injection — Zend Framework 2 2.0.7 documentation - Zend Framework

Dependency Injection is a concept that has been talked about in numerous places over the web. For the purposes of this quickstart, we’ll explain the act of injecting dependencies simply with this below code:

1$b = new B(new A());

Above, A is a dependency of B, and A was injected into B. If you are not familar with the concept of dependency injection, here are a couple of great reads: Matthew Weier O’Phinney’s Analogy, Ralph Schindler’s Learning DI, or Fabien Potencier’s Series on DI.

 
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:55 PM
Scoop.it!

Internationalization (i18n) library for CodeIgniter 2

Internationalization (i18n) library for CodeIgniter 2 | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:45 PM
Scoop.it!

Internationalization i18n in CodeIgniter | jigniter™

Internationalization i18n in CodeIgniter | jigniter™ | Bonnes Pratiques Web & Cloud | Scoop.it
Here are some references and resources that explain how to create i18n web applications with CodeIgniter.
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

PHP 5.3 : namespace : les espaces de noms (partie 2) - Pascal MARTIN (n+1).zéro

PHP 5.3 : namespace : les espaces de noms (partie 2) - Pascal MARTIN (n+1).zéro | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

Internationalisation (i18n) en PHP avec XML

Internationalisation (i18n) en PHP avec XML | Bonnes Pratiques Web & Cloud | Scoop.it
Internationalisation (i18n) en PHP avec XML
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:43 PM
Scoop.it!

PHP 5.3 : intl : Internationalisation et Localisation (partie 2) - Pascal MARTIN (n+1).zéro

PHP 5.3 : intl : Internationalisation et Localisation (partie 2) - Pascal MARTIN (n+1).zéro | Bonnes Pratiques Web & Cloud | Scoop.it
No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:36 PM
Scoop.it!

Traduction d’un module | arNuméral

Traduction d’un module | arNuméral | Bonnes Pratiques Web & Cloud | Scoop.it

Autant le système de traduction de Drupal est efficace, autant cela peut vite devenir l'enfer lorsqu'il s'agit de créer et de maintenir un fichier de traduction spécifique à son module. Utiliser pour cet tache l'export de Drupal est déjà casse-binette (car on va y trouver toutes les traductions, celles de vos modules et le reste...) mais surtout pas exhaustif car les textes sont découverts par Drupal "à la volée", au moment de leur affichage.

La solution passe donc par un outil d'extraction prévu pour cet usage mais malheureusement pas pas assez connu et documenté.

No comment yet.
Scooped by Mickael Ruau
March 23, 2013 12:34 PM
Scoop.it!

Poedit

Poedit | Bonnes Pratiques Web & Cloud | Scoop.it

Poedit is cross-platform gettext catalogs (.po files) editor. It is built with wxWidgets toolkit and can run on any platform supported by it (although it was only tested on Unix with GTK+ and Windows). It aims to provide more convenient approach to editing catalogs than launching vi and editing the file by hand.

 
No comment yet.