Bonnes Pratiques Web & Cloud
59.3K views | +0 today
Follow
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

Current selected tag: 'design pattern'. Clear
Scooped by Mickael Ruau
October 9, 2016 5:09 AM
Scoop.it!

SOAT Blog » L’architecture flux avec React

SOAT Blog » L’architecture flux avec React | Bonnes Pratiques Web & Cloud | Scoop.it

Cet article a pour but de décrire le pattern Flux. En revanche, étant fortement couplé à React et mis en œuvre de pair avec cette bibliothèque, on confondra ici Vue et composant React.

 

Flux ayant émergé suite à des soucis d’utilisation du pattern MVC chez Facebook, je vais revenir dessus en tant que base pour poser la problématique.

No comment yet.
Scooped by Mickael Ruau
May 13, 2016 1:59 AM
Scoop.it!

Learning JavaScript Design Patterns

An open-source book on JavaScript Design Patterns
No comment yet.
Scooped by Mickael Ruau
August 1, 2015 7:20 AM
Scoop.it!

PHP-DI - The Dependency Injection Container for humans

Dependency injection and dependency injection containers are different things:

  • dependency injection is a method for writing better code
  • a container is a tool to help injecting dependencies

You don't need a container to do dependency injection. However a container can help you.

PHP-DI is about this: making dependency injection more practical.

Mickael Ruau's insight:
The theoryClassic PHP code

Here is how a code not using DI will roughly work:

  • Application needs Foo (e.g. a controller), so:
  • Application creates Foo
  • Application calls Foo
    • Foo needs Bar (e.g. a service), so:
    • Foo creates Bar
    • Foo calls Bar
      • Bar needs Bim (a service, a repository, …), so:
      • Bar creates Bim
      • Bar does something
Using dependency injection

Here is how a code using DI will roughly work:

  • Application needs Foo, which needs Bar, which needs Bim, so:
  • Application creates Bim
  • Application creates Bar and gives it Bim
  • Application creates Foo and gives it Bar
  • Application calls Foo
    • Foo calls Bar
      • Bar does something

This is the pattern of Inversion of Control. The control of the dependencies is inverted from one being called to the one calling.

The main advantage: the one at the top of the caller chain is always you. You can control all dependencies and have complete control over how your application works. You can replace a dependency by another (one you made for example).

For example what if Library X uses Logger Y and you want to make it use your logger Z? With dependency injection, you don't have to change the code of Library X.

No comment yet.
Scooped by Mickael Ruau
February 13, 2015 2:38 AM
Scoop.it!

Essential jQuery Plugin Patterns - Smashing Magazine

Essential jQuery Plugin Patterns - Smashing Magazine | Bonnes Pratiques Web & Cloud | Scoop.it
I occasionally write about implementing design patterns in JavaScript. They’re an excellent way of building upon proven approaches to solving common development problems, and I think there’s a lot of benefit to using them. But while well-known JavaScript patterns are useful, another side of development could benefit from its own set of design patterns: jQuery plugins. The official jQuery plugin authoring guide offers a great starting point for getting into writing plugins and widgets, but let’s take it further.
No comment yet.
Scooped by Mickael Ruau
December 30, 2014 5:43 AM
Scoop.it!

Objets patterns et genie logiciel , par Julien Pauli

Lorsqu’on parle d’objet, de patterns ou de génie logiciel, PHP fait souvent sourire et Java vient tout de suite en tête. Cette session a pour but de prouver qu…
No comment yet.
Scooped by Mickael Ruau
August 20, 2013 11:39 AM
Scoop.it!

PHP Master | Constructors Breaking the Liskov Substitution Principle

PHP Master | Constructors Breaking the Liskov Substitution Principle | Bonnes Pratiques Web & Cloud | Scoop.it
Learn why implementing different constructors in a class hierarchy doesn't violate the Liskov Substitution Principle.
No comment yet.
Scooped by Mickael Ruau
August 20, 2013 11:22 AM
Scoop.it!

Understanding the Command Design Pattern - SitePoint

Understanding the Command Design Pattern - SitePoint | Bonnes Pratiques Web & Cloud | Scoop.it
The Command Pattern encapsulates actions so you can queue different requests and then trigger them at once. This article shows you how to implement the design pattern using a simple example of a message queue.
No comment yet.
Scooped by Mickael Ruau
September 14, 2016 4:03 AM
Scoop.it!

Practical PHP patterns

Practical PHP patterns | Bonnes Pratiques Web & Cloud | Scoop.it
PHP implementations for the GoF Design Patterns book and Martin Fowler's Pattern of Enterprise Application Architecture.

Practical PHP Patterns: Transaction Script
Practical PHP Patterns: Domain Model
Practical PHP Patterns: Table Module
Practical PHP Patterns: Service Layer
Practical PHP Patterns: Table Data Gateway
Practical PHP Patterns: Row Data Gateway
Practical PHP Patterns: Active Record
Practical PHP Patterns: Data Mapper
Practical PHP Patterns: Unit of Work
Practical PHP Patterns: Identity Map
Practical PHP Patterns: Lazy Loading
Practical PHP Patterns: Identity Field
Practical PHP Patterns: Foreign Key Mapping
Practical PHP Patterns: Association Table
Practical PHP Patterns: Dependent Mapping
Practical PHP Patterns: Embedded Value
Practical PHP Patterns: Serialized LOB
Practical PHP Patterns: Single Table Inheritance
Practical PHP Patterns: Concrete Table Inheritance
Practical PHP Patterns: Inheritance Mapping
Practical PHP Patterns: Metadata Mapping
Practical PHP Patterns: Query Object
Practical PHP Patterns: Repository
Practical PHP Patterns: Page Controller
Practical PHP Patterns: Front Controller
Practical PHP Patterns: Template View
Practical PHP Patterns: Transform View
Practical PHP Patterns: Two Step View
Practical PHP Patterns: Remote Facade
Practical PHP Patterns: Pessimistic Offline Lock
Practical PHP Patterns: Coarse Grained Lock
Practical PHP Patterns: Implicit Lock
Practical PHP Patterns: Database Session State
Practical PHP Patterns: Gateway
Practical PHP Patterns: Mapper
Practical PHP Patterns: Separated Interface
Practical PHP Patterns: Layer Supertype
Practical PHP Patterns: Registry
Practical PHP Patterns: Value Object
Practical PHP Patterns: Money
Practical PHP Patterns: Special Case
Practical PHP Patterns: Plugin
Practical PHP Patterns: Service Stub
Practical PHP Patterns: Record Set
Practical PHP Patterns: Application Controller
Practical PHP Patterns: Client Session State
Practical PHP Patterns: Optimistic Offline Lock
Practical PHP Patterns: Server Session State
Practical PHP Patterns: Class Table Inheritance
Practical PHP Patterns: Data Transfer Object
Practical PHP Patterns: Visitor
Practical PHP Patterns: Memento
Practical PHP Patterns: Mediator
No comment yet.
Scooped by Mickael Ruau
April 21, 2016 9:05 AM
Scoop.it!

AngularJS - Dependency Injection | FormGet

AngularJS - Dependency Injection | FormGet | Bonnes Pratiques Web & Cloud | Scoop.it
Dependency injection in angular js is the design pattern of software, in which services(dependencies) are injected into a component(dependent object).
No comment yet.
Scooped by Mickael Ruau
February 14, 2015 3:47 AM
Scoop.it!

Le pattern Singleton implémenté en JavaScript

Le pattern Singleton implémenté en JavaScript | Bonnes Pratiques Web & Cloud | Scoop.it
A lire, ce très intéressant billet de blog. Son auteur explique qu'il préparait une conférence sur les Design Pattern. Ce faisant, il ouvre un livre pour se documenter, pour y lire en substance:

En JavaScript les constructeurs ne peuvent être privés. JavaScript ne permet pas une implémentation propre du Pattern Singleton, en l'absence de cette contrainte sur le constructeur.

Dans l'intéressante discussion technique qui s'en suit, l'auteur montre comment il résout notamment grâce à une fermeture, s'appuyant en cela sur le caractère fonctionnel du langage JavaScript.
No comment yet.
Scooped by Mickael Ruau
January 15, 2015 2:43 AM
Scoop.it!

AFUP-Design Patterns en PHP

Designs Patterns | rdv AFUP 1 Rdv AFUP - 12/07/12Designs Patterns en PHP
No comment yet.
Scooped by Mickael Ruau
August 28, 2013 4:54 AM
Scoop.it!

Gimme Bar : Front end styleguides and pattern libraries

 Anna Debenham‘s list of front end styleguides and pattern libraries

No comment yet.
Scooped by Mickael Ruau
August 20, 2013 11:30 AM
Scoop.it!

Implementing a Unit of Work - Handling Domain Objects through a Transactional Model - SitePoint

Implementing a Unit of Work - Handling Domain Objects through a Transactional Model - SitePoint | Bonnes Pratiques Web & Cloud | Scoop.it
CRUD applications that don’t encapsulate extensive chunks of business logic can quickly become bloated and generate a lot of overhead when it comes to performing multiple database writes.
No comment yet.