Singleton Pattern - Một object duy nhất Xin chào các bạn, hôm nay chúng ta sẽ tiếp tục làm quen với một mẫu Design Pattern mới: Singleton pattern. Cái tên đã nói lên tất cả, nếu muốn trong suốt chương trình chỉ tồn tại duy nhất một đối tượng của một lớp nào đó thì … Continue reading Singleton Pattern – Một object duy nhất
Category: Methodology
Mediator and Facade Differences
The facade only exposes the existing functionality from a different perspective. The mediator "adds" functionality because it combines different existing functionality to create a new one. You have a logging system. From that logging system you can either log to a file, to a socket, or to a database. Using the facade design pattern you … Continue reading Mediator and Facade Differences
How to get rid of helper and utils classes
There you go once again, while performing a code review or after having justified a quick coding in the name of urgency and priority: it clearly stand in front of you yet another helper class. But everything works fine and the show must go on, release after release, so that helper class soon becomes a monster class, providing tons … Continue reading How to get rid of helper and utils classes
Multilayered Architecture (5) – The Presentation Layer
by Marco Di Stefano Introduction The final piece of a MultiLayered Architecture, in term of development design and dependencies is the Presentation Layer. It has mainly the scope to create an Interface with the final User of the application. It can take the form of Desktop forms, Java Applet, Web application and any other possible solution provided … Continue reading Multilayered Architecture (5) – The Presentation Layer
Multilayered Architecture (4) – The Infrastructure Layer
by Marco Di Stefano Introduction What is Infrastructure? If we think at a building, Infrastructure is what brings light and water. You can build a wonderful house, but if you don’t connect it to the city infrastructures, you will never be able to live in it. Finally this building is able to receive water and light, but is not … Continue reading Multilayered Architecture (4) – The Infrastructure Layer
Multilayered Architecture (3) – The Application Layer
by Marco Di Stefano Introduction As Business Documents are considered the input for the Domain Layer, System Requirement Specifications are the main input document for the Application Layer. Scope of this layer is to provide an implementation of the defined requirements for the system. So it is easy to understand that most of the logic contained is process oriented and so linked to … Continue reading Multilayered Architecture (3) – The Application Layer
Multilayered Architecture (2) – The Domain Layer
by Marco Di Stefano Introduction The domain layer is a collection of entity objects and related business logic that is designed to represent theenterprise business model. The major scope of this layer is to create a standardized and federated set of objects, that could be potentially reused within different projects. Once identified the enterprise business model segment that is useful for the … Continue reading Multilayered Architecture (2) – The Domain Layer
Multilayered architecture (1) – Introduction
by Marco Di Stefano Introduction If you ever worked in an IT project, you would probably know how necessary it is to factorize the source code to avoid that the entropy will take possession of your project as soon as it becomes larger and larger… If you ever encountered one of those scenarios: 1) I started with … Continue reading Multilayered architecture (1) – Introduction
Factory Pattern – Nhà máy của những đối tượng
Factory Pattern Chào mọi người, hôm nay mình sẽ tiếp tục loạt bài về Design Pattern với một pattern mới: Factory Pattern. Pattern này sẽ giúp chúng ta có một hướng giải quyết đúng đắn khi đối mặt với việc phải dùng những lệnh if/else trong khối xử lý để tạo ra những đối tượng … Continue reading Factory Pattern – Nhà máy của những đối tượng
Why extends is evil
Improve your code by replacing concrete base classes with interfaces The extends keyword is evil; maybe not at the Charles Manson level, but bad enough that it should be shunned whenever possible. The Gang of Four Design Patterns book discusses at length replacing implementation inheritance (extends) with interface inheritance (implements). Good designers write most of their code in terms … Continue reading Why extends is evil