 Your new post is loading...
 Your new post is loading...
|
Scooped by
Mickael Ruau
March 26, 2013 4:02 AM
|
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.
|
Scooped by
Mickael Ruau
March 26, 2013 3:57 AM
|
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?
|
Scooped by
Mickael Ruau
March 26, 2013 3:56 AM
|
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.
|
Scooped by
Mickael Ruau
March 26, 2013 3:53 AM
|
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.
|
Scooped by
Mickael Ruau
March 26, 2013 3:47 AM
|
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.
|
Scooped by
Mickael Ruau
March 24, 2013 6:39 AM
|
l'optimisation du site internet selon la règle des 3C (contenu, code et conception) dans le référencement naturel
|
Scooped by
Mickael Ruau
March 23, 2013 12:46 PM
|
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...
|
Scooped by
Mickael Ruau
March 23, 2013 12:45 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:36 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:33 PM
|
|
|
Scooped by
Mickael Ruau
March 26, 2013 4:00 AM
|
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".
|
Scooped by
Mickael Ruau
March 25, 2013 1:23 PM
|
Learn the basic principles of the Model-View-Controller (MVC) pattern and see an example of the MVC pattern in PHP.
|
Scooped by
Mickael Ruau
March 26, 2013 3:55 AM
|
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.
|
Scooped by
Mickael Ruau
March 26, 2013 3:48 AM
|
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.
|
Scooped by
Mickael Ruau
March 26, 2013 3:47 AM
|
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.
|
Scooped by
Mickael Ruau
March 23, 2013 12:55 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:45 PM
|
Here are some references and resources that explain how to create i18n web applications with CodeIgniter.
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
Internationalisation (i18n) en PHP avec XML
|
Scooped by
Mickael Ruau
March 23, 2013 12:43 PM
|
|
Scooped by
Mickael Ruau
March 23, 2013 12:36 PM
|
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é.
|
Scooped by
Mickael Ruau
March 23, 2013 12:34 PM
|
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.
|