 Your new post is loading...
 Your new post is loading...
|
Scooped by
Mickael Ruau
February 25, 2015 4:01 AM
|
This website provides a palette of patterns you can use in the context of designing Java 2 Platform, Enteprise Edition (J2EE) applications. Occasionally, new patterns will be added and new insights will be incorporated into the current patterns, so check back often for updates. The BluePrints patterns catalog is based around the Sun Java Center patterns catalog, described in the Core J2EE Patternsbook by Deepak Alur, John Crupi, and Dan Malks.
|
Scooped by
Mickael Ruau
February 25, 2015 3:59 AM
|
Core J2EE patterns are broadly classified in the following three categories based on the layering of the multi tiered systems. A specific patterns applies to a specific layer of the system under development
|
Scooped by
Mickael Ruau
February 25, 2015 3:54 AM
|
A Design Patterns describe an optimal solution to a common recurring design problem within a specific context. Every author defined Design Patterns in slight variations but the essence is the same. The best in my opinion is by Christopher Alexander – “Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution”
|
Scooped by
Mickael Ruau
February 25, 2015 2:01 AM
|
This chapter from The Practice of Cloud System Administration: Designing and Operating Large Distributed Systems, Volume 2 is an overview of what is involved in designing services that use distributed computing techniques. These are the techniques all large web sites use to achieve their size, scale, speed, and reliability.
|
Scooped by
Mickael Ruau
February 18, 2015 3:34 AM
|
In our batch jobs for data import we had many similar classes for holding the data being imported. Technically they are all different, with different fields, yet conceptually they are all same. I find this conceptual duplication discomforting and have written a single, more generic, class to replace them all.
The refactoring has been inspired by Clojure and its preference of few generic structures such as maps with many functions over the OO way of many case-specific data structures (i.e. classes), as explained for example in this interview of Rich Hickey, starting with “OO can seriously thwart reuse”.
|
Scooped by
Mickael Ruau
February 13, 2015 4:33 AM
|
Have you ever worked with an application where you had to copy data from one object to another and another and so on before you actually could do something with it? Have you ever written code to convert data from XML to a DTO to a Business Object to a JDBC Statement? Again and again for each of the different data types being processed? Then you have encountered an all too common antipattern of many “enterprise” (read “overdesigned”) applications, which we could call The Endless Mapping Death March. Let’s look at an application suffering from this antipattern and how to rewrite it in a much nicer, leaner and easier to maintain form.
|
Scooped by
Mickael Ruau
February 11, 2015 5:48 PM
|
I stumbled across Uncle Bob’s SOLID principles of OOD quite a few years ago. They serve as the foundation of knowledge for designing object-oriented software. In fact, if you analyze the GOF patterns, you’ll find that virtually all of them adhere to the class design principles. I felt strongly enough about these principles that I included them in Chapter 1 of JOUP.
When used judiciously, they serve as excellent guidance in designing object-oriented software. But it’s not the SOLID class design principles I want to talk about here, at least not exclusively. Instead, it’s their less famous brethren that are often lost in the discussion of the SOLID class design principles…the principles of package design that I want to discuss.
|
Scooped by
Mickael Ruau
February 11, 2015 5:44 PM
|
Nous avons eu récemment en interne un retour aux sources autour de la POO, et des principes SOLID. Celui-ci a donné lieu à compte rendu, dont la dernière phrase fut le point de départ d’une longue file de message que je vais tenter de résumer ici. Et pour les amoureux de la lecture, vous trouverez la copie intégrale à la fin de cet article.
La phrase en question : Il faut éviter de réaliser du SurDesign : Pourquoi mettre une interface lorsqu’il n’y a qu’une seule implémentation, pourquoi factoriser du code s’il n’est utilisé qu’à un seul endroit ?
|
Scooped by
Mickael Ruau
February 11, 2015 5:32 PM
|
The following article aims to explain the five SOLID principles with real world examples. The SOLID principles are five programming principles which is considered to be the foundation of every well designed application. Following the principles will most likely lead to applications which are is easy to extend and maintain. That’s possible since you got small well defined classes with clear contracts.
|
Scooped by
Mickael Ruau
February 11, 2015 5:26 PM
|
Recently I had an interesting conversation with a developer at my current client, about how the SOLID principles would impact their code base. The client wants to write SOLID code - who doesn't? It's a beautiful acronym that fully demonstrates the power of catchy terminology.
However, when you start to outline what it actually means people become uneasy. At the point where the discussion became interesting, I had already sketched my view on encapsulation. However, the client's current code base is designed around validation at the perimeter. Most of the classes in the Domain Model are actually internal and implicitly trust input.
|
Scooped by
Mickael Ruau
February 11, 2015 5:20 PM
|
The first five principles are principles of class design. They are: SRP The Single Responsibility Principle A class should have one, and only one, reason to change. OCP The Open Closed Principle You should be able to extend a classes behavior, without modifying it. LSP The Liskov Substitution Principle Derived classes must be substitutable for their base classes. ISP The Interface Segregation Principle Make fine grained interfaces that are client specific. DIP The Dependency Inversion Principle Depend on abstractions, not on concretions.
The next six principles are about packages. In this context a package is a binary deliverable like a .jar file, or a dll as opposed to a namespace like a java package or a C++ namespace.
The first three package principles are about package cohesion, they tell us what to put inside packages:
REP The Release Reuse Equivalency Principle The granule of reuse is the granule of release. CCP The Common Closure Principle Classes that change together are packaged together. CRP The Common Reuse Principle Classes that are used together are packaged together.
The last three principles are about the couplings between packages, and talk about metrics that evaluate the package structure of a system.
ADP The Acyclic Dependencies Principle The dependency graph of packages must have no cycles. SDP The Stable Dependencies Principle Depend in the direction of stability. SAP The Stable Abstractions Principle Abstractness increases with stability.
|
Scooped by
Mickael Ruau
February 11, 2015 5:16 PM
|
|
Scooped by
Mickael Ruau
February 11, 2015 5:14 PM
|
In this post, I will list down 5 most recommended design principles, you should keep in mind, while writing your classes. These design principles are called SOLID, in short. They also form the best practices to be followed for designing your application classes.
Single Responsibility Principle Open Closed Principle Liskov’s Substitution Principle Interface Segregation Principle Dependency Inversion Principle
|
|
Scooped by
Mickael Ruau
February 25, 2015 3:59 AM
|
On this site, you will find the entire Java 2 Platform, Enterprise Edition (J2EE) Pattern catalog from the book Core J2EE Patterns: Best Practices and Design Strategies authored by architects from the Sun Java Center. All patterns are published in their entire form from the first edition of the book.
|
Scooped by
Mickael Ruau
February 25, 2015 3:56 AM
|
This topic illustrates the performance improvement best practices using Patterns in J2EE with the following sections: Overview of Patterns Service Locator Session Facade Message Facade Value Object Value Object Factory Value List Handler Composite Entity Key Points
|
Scooped by
Mickael Ruau
February 25, 2015 3:35 AM
|
Version gratuite en ligne du livre Oreilly
|
Scooped by
Mickael Ruau
February 19, 2015 5:35 AM
|
I once visited a team that had fifteen layers in their code. That is: If you wanted to display some data in the database in a web page, that data passed through 15 classes in the application. What did these layers do? Oh, nothing much. They just copied data from one object to the next.
|
Scooped by
Mickael Ruau
February 16, 2015 5:17 PM
|
L'injection de dépendances est souvent la base de tout programme moderne. L'idée en résumé est de déporter la responsabilité de la liaison des composants du programme dans un framework afin de pouvoir facilement changer ces composants ou leur comportement. Parmi les leaders du marché Java, il y a Spring IoC, Guice, Dagger… ou encore le standard « Java EE » CDI qui existe depuis Java EE 6. Ce dernier s'est inspiré de plusieurs standards de facto, pour finalement devenir aujourd'hui la base de la plateforme Java EE moderne. Ce tutoriel vous propose un tour d'horizon des fonctionnalités de base de CDI.
|
Scooped by
Mickael Ruau
February 11, 2015 5:53 PM
|
Voilà bien un sujet sur lequel j’ai adopté (une fois encore) la position du sceptique. Quand on m’a exposé l’idée de l’inversion de contrôle, j’ai trouvé que c’était un point de vue intéressant mais sans plus. Quand j’ai commencé à voir les premiers fichiers de configuration Spring en XML, j’ai écarquillé les yeux… Constater qu’une partie de mon code Java, organisé, compilé et déboguable, devait se retrouver sous forme déstructurée dans du XML peu lisible et mal contrôlé, ne m’a simplement pas emballé. Ce constat n’a pas empêché une flopée de développeurs de faire du Spring à fond les manettes, persuadés d’adhérer à une innovation majeure, avec parfois une pointe de dédain envers ceux qui n’en faisaient pas !
|
Scooped by
Mickael Ruau
February 11, 2015 5:46 PM
|
Of the SOLID principles, made famous by Robert C. Martin, we'll discuss the Single Responsibility Principle and the Open/Closed Principle, two of the presenter's favorite principles. But at the same time the least understood and used principles. That's why this session will explain them thoroughly and give real life examples instead of the regular customer & order examples. You'll walk away knowing what the benefits are and how to use them properly.
|
Scooped by
Mickael Ruau
February 11, 2015 5:36 PM
|
Most professional software developers understand the academic definitions of coupling, cohesion, and encapsulation. However, many developers do not understand how to achieve the benefits of low coupling, high cohesion and strong encapsulation, as outlined in this article. Fortunately, others have created stepping stones that lead to these goals,
resulting in software that is easier to read, easier to understand and easier to change. In this article series, I will define three of the primary object-oriented principles and show how to reach them through the five S.O.L.I.D. design principles.
|
Scooped by
Mickael Ruau
February 11, 2015 5:29 PM
|
|
Scooped by
Mickael Ruau
February 11, 2015 5:25 PM
|
Emergent design can quickly degrade into un-maintainable hack & slash yuckness without a set of guiding principles to keep you in check. Fortunately, Robert Martin’s SOLID Principles are just what the doctor ordered for saving your app from an early demise.
|
Scooped by
Mickael Ruau
February 11, 2015 5:19 PM
|
S.O.L.I.D. est acronyme regroupant les principes suivants:
Single Responsability Principle (SRP): Une classe devrait avoir une et une seul raison (responsabilité) d’être modifiée. Open Closed Principle (OCP) : Chaque classe devrait être ouverte pour des extensions et fermé autant que possible pour des modifications. Liskov Substitution Principle (LSK) : Les classes dérivées peuvent être substitué de leur classe de base Interface Segregation Principle (ISP) : Nos classes ne doivent pas hériter, via une interface, de méthodes qu’elles n’utilisent pas. Dependency Injection Principle (DIP) : On doit dépendre de classes abstraites et non de classes concrètes
|
Scooped by
Mickael Ruau
February 11, 2015 5:15 PM
|
The SOLID principles lie at the heart of the object-oriented paradigm. Many of the principles presented here first appeared in Robert Martin’s Design Principles and Design Principles [MARTIN2000], which serves as an excellent complement to this discussion. These principles help you manage dependencies between classes and encourage class cohesion. They are also critical to effective module design using object oriented techniques.
|