Posts

Showing posts from July, 2023

Server Side Page Fragment Composition Design Pattern for Microservices E...

Image
Server Side Page Fragment Composition Design Pattern for Microservices Explained with Examples In this video we will learn about Server-Side Page Fragment Composition design pattern for microservices. Server Side Composition pattern assembles Fragments on the server side. There are customer-facing applications like B2C e-commerce web applications etc developed via microservices. There are many screens/pages to display data from multiple services. Server-side composition pattern suggest that UI fragments should be composed on the server, which means the client-side receives a fully assembled page, resulting in increased loading speed. Here assembly of fragments are performed by a separate component, located between the web browser and web servers. An example of such middle man component is CDN (content delivery network). Server-Side Page Fragment pattern works closely with Micro Frontends Patterns. Micro frontend is an architectural and organizational style not a technology. In ...

Dependency Inversion Principle Tutorial with Java Code Example for Students

Image
Dependency Inversion Principle Tutorial with Java Code Example for Students Dependency Inversion Principle is the fifth and final Solid principle. Robert C. Martin’s definition of the Dependency Inversion Principle consists of two parts. a. High-level modules should not depend on low-level modules. Both should depend on abstractions. b. Abstractions should not depend on details. Details should depend on abstractions. An important detail to note here is that high-level and low-level modules depend on the abstraction. It splits the dependency between the high-level and low-level modules by introducing an abstraction between them. Dependency inversion principle is related to other SOLID principles. That is, if you consequently apply the Open/Closed Principle and Liskov Substitution Principle in your code, it will automatically compliance with Dependency Inversion Principle. Dependency Inversion principle introduces an interface abstraction between higher-level and lower-level software ...

Interface Segregation Principle Tutorial with Java Coding Example for Be...

Image
Interface Segregation Principle Tutorial with Java Coding Example for Beginners Interface Segregation principle is the Fourth principle of SOLID principles. Interface Segregation principle states that Clients should not be forced to depend upon interfaces that they do not use. Similar to the Single Responsibility Principle, the goal of the Interface Segregation Principle is to reduce the side effects and frequency of required changes by splitting the software into multiple, independent parts. The goal of this principle is to reduce the side effects of using larger interfaces by breaking application interfaces into smaller ones. It's similar to the Single Responsibility Principle, where each class or interface serves a single purpose. The Interface Segregation Principle was defined by Robert C. Martin while consulting for Xerox to help them build the software for their new printer systems. Interface Segregation Principle prevents bloated interfaces that define methods for multipl...