Design Pattern

Bridge Design Pattern – Structural Patterns

<p><strong>Bridge Design Pattern<&sol;strong> is used to decouples an abstraction used the client code from its implementation that means it separates the abstraction and its implementation in separate class hierarchies&period; And also Bridge pattern prefers the composition over the inheritance because inheritance isn’t always flexible and it breaks the encapsulation&comma; so any change made in the implementor that affects the abstraction used by client code&period;<&sol;p>&NewLine;<p>In software engineering&comma; one of popular notion is <em>&&num;8220&semi;<strong>prefer composition over inheritance<&sol;strong>&&num;8220&semi;<&sol;em>&period; Bridge design pattern promotes this popular notion&period; Similar to the other pattern&comma; this pattern also comes under the <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;structural-design-patterns&sol;">structural design pattern<&sol;a><&sol;strong> family of GoF Design pattern&period;<&sol;p>&NewLine;<h2>Bridge Design Pattern<&sol;h2>&NewLine;<div style&equals;"text-align&colon; left&semi;">&NewLine;<blockquote><p><strong>According to the Gang of Four&colon;<&sol;strong><&sol;p>&NewLine;<div style&equals;"text-align&colon; left&semi;">Decouple an abstraction from its implementation so that the two can vary independently&period;<&sol;div>&NewLine;<&sol;blockquote>&NewLine;<&sol;div>&NewLine;<p>Bridge pattern uses an interface as bridge between the concrete classes of an abstract class and implementing classes of that interface&period; You can make changes in both types of classes without any impact on the client code&period;<&sol;p>&NewLine;<div style&equals;"background-color&colon; &num;f2f9fc&semi; border-radius&colon; 3px&semi; border&colon; 1px solid &num;c9e6f2&semi; line-height&colon; 1&period;45&semi; padding&colon; 16px 16px 16px 16px&semi;">&NewLine;<h2 dir&equals;"ltr">Spring 5 Design Pattern Book<&sol;h2>&NewLine;<div dir&equals;"ltr" style&equals;"color&colon; &num;20124d&semi; font-family&colon; 'calibri' &comma; sans-serif&semi; font-size&colon; 13pt&semi; text-align&colon; justify&semi;">You could purchase my <strong>Spring 5 book<&sol;strong> that is with title name &&num;8220&semi;<strong>Spring 5 Design Patterns<&sol;strong>&&num;8220&semi;&period; This book is available on the <a href&equals;"https&colon;&sol;&sol;www&period;amazon&period;in&sol;Spring-Design-Patterns-Dinesh-Rajput&sol;dp&sol;1788299450&sol;ref&equals;sr&lowbar;1&lowbar;1&quest;ie&equals;UTF8&amp&semi;qid&equals;1507925340&amp&semi;sr&equals;8-1&amp&semi;keywords&equals;spring&plus;5&plus;design&plus;pattern" target&equals;"&lowbar;blank" rel&equals;"noopener"><strong>Amazon<&sol;strong><&sol;a> and <a href&equals;"https&colon;&sol;&sol;www&period;packtpub&period;com&sol;application-development&sol;spring-5-design-patterns" target&equals;"&lowbar;blank" rel&equals;"noopener"><strong>Packt<&sol;strong><&sol;a> publisher website&period; Learn various <strong>design patterns<&sol;strong> and <strong>best practices<&sol;strong> in Spring 5 and use them to solve common design problems&period; You could use author discount to purchase this book by using code- &&num;8220&semi;<strong>AUTHDIS40<&sol;strong>&&num;8220&semi;&period;<&sol;div>&NewLine;<div dir&equals;"ltr"><&sol;div>&NewLine;<div dir&equals;"ltr"><a href&equals;"https&colon;&sol;&sol;www&period;amazon&period;in&sol;Spring-Design-Patterns-Dinesh-Rajput&sol;dp&sol;1788299450&sol;ref&equals;sr&lowbar;1&lowbar;1&quest;s&equals;books&amp&semi;ie&equals;UTF8&amp&semi;qid&equals;1512607966&amp&semi;sr&equals;1-1&amp&semi;keywords&equals;dinesh&plus;rajput" target&equals;"&lowbar;blank" rel&equals;"noopener"><img class&equals;"aligncenter wp-image-3053 size-medium" title&equals;"Spring-5-Design-Pattern" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;03&sol;Spring-5-design-pattern-243x300&period;jpg" width&equals;"243" height&equals;"300" &sol;><&sol;a><&sol;div>&NewLine;<&sol;div>&NewLine;<h2>Applicability<&sol;h2>&NewLine;<p>There are following common problems solved by the <strong>Bridge Design Pattern&period;<&sol;strong><&sol;p>&NewLine;<ul>&NewLine;<li>Remove a permanent binding between the functional abstraction and its implementation&period;<&sol;li>&NewLine;<li>You able to make changes into implementing classes without affecting the its abstraction and client code&period;<&sol;li>&NewLine;<li>You can extends the abstraction and its implementation using sub classes&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<div style&equals;"text-align&colon; left&semi;">&NewLine;<blockquote><p><strong>also read&colon;<&sol;strong><&sol;p>&NewLine;<ul style&equals;"text-align&colon; left&semi;">&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;adapter-design-pattern&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;adapter-design-pattern&sol;">Adapter Design Pattern<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;composite-pattern-design-patterns-java&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;composite-pattern-design-patterns-java&sol;">Composite Design Pattern<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;decorator-design-pattern&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;decorator-design-pattern&sol;">Decorator Design Pattern<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;proxy-pattern-design-patterns-java&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;proxy-pattern-design-patterns-java&sol;">Proxy Design Pattern<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;builder-design-pattern&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;builder-design-pattern&sol;">Builder Design Pattern<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;creational-design-patterns&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;creational-design-patterns&sol;&sol;">Creational GoF Design Patterns<&sol;a><&sol;li>&NewLine;<li><a title&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;behavioral-design-pattern&sol;" href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;behavioral-design-pattern&sol;">Behavioral GoF Design Patterns<&sol;a><&sol;li>&NewLine;<&sol;ul>&NewLine;<&sol;blockquote>&NewLine;<&sol;div>&NewLine;<h2>UML class diagram of the Bridge Pattern<&sol;h2>&NewLine;<p>Let&&num;8217&semi;s see the following class diagram&period; It illustrates about the component classes and interfaces&period;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-3687" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2017&sol;12&sol;bridge&period;gif" alt&equals;"Bridge Design Pattern" width&equals;"448" height&equals;"293" &sol;><&sol;p>&NewLine;<p>The classes and objects participating in this pattern are&colon;<br &sol;>&NewLine;<strong>Abstraction &lpar;Bank&rpar;<&sol;strong><&sol;p>&NewLine;<ul>&NewLine;<li>It defines the abstraction&&num;8217&semi;s interface&period;<&sol;li>&NewLine;<li>It maintains a reference to an object of type Implementor&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<p><strong>RefinedAbstraction &lpar;IciciBank&comma; HdfcBank&rpar;<&sol;strong><&sol;p>&NewLine;<ul>&NewLine;<li>It extends the interface defined by Abstraction&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<p><strong>Implementor &lpar;Account&rpar;<&sol;strong><&sol;p>&NewLine;<ul>&NewLine;<li>It defines the interface for implementation classes&period; This interface doesn&&num;8217&semi;t have to correspond exactly to Abstraction&&num;8217&semi;s interface&semi; in fact the two interfaces can be quite different&period; Typically the Implementation interface provides only primitive operations&comma; and Abstraction defines higher-level operations based on these primitives&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<p><strong>ConcreteImplementor &lpar;CurrentAccount&comma; SavingAccount&rpar;<&sol;strong><&sol;p>&NewLine;<ul>&NewLine;<li>It implements the Implementor interface and defines its concrete implementation&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<h2>Pros of the Bridge Pattern<&sol;h2>&NewLine;<p>There are following pros of the Bridge Design Pattern&period;<&sol;p>&NewLine;<ul>&NewLine;<li>This design pattern allows you to make separation between the implementation and the abstraction&period;<&sol;li>&NewLine;<li>Bridge design pattern provides flexibility to change in both types of classes without side effect into client code&period;<&sol;li>&NewLine;<li>This pattern allows the hiding of actual implementation details from the client by using abstraction between them&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;<h2>Bridge Vs Adapter Design Pattern<&sol;h2>&NewLine;<p>The <strong><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;adapter-design-pattern&sol;">adapter design pattern<&sol;a><&sol;strong> helps it two incompatible classes to work together&period; But&comma; <strong>bridge design pattern<&sol;strong> decouples the abstraction and implementation by creating two different hierarchies&period;<&sol;p>&NewLine;<h2>Sample Implementation of Bridge Design Pattern<&sol;h2>&NewLine;<p>You look in the following example where I am going to demonstrate use of Bridge design pattern&period; Here I am taking two accounts of any <strong>Bank<&sol;strong>&comma; you can open two types of accounts one is <em><strong>SavingAccount<&sol;strong> <&sol;em>and other is <em><strong>CurrentAccount<&sol;strong><&sol;em>&period; Let&&num;8217&semi;s see the relationship between the abstraction of a <em><strong>Bank<&sol;strong> <&sol;em>and <em><strong>Account<&sol;strong><&sol;em>&period;<&sol;p>&NewLine;<h3>Relationship without using Bridge Design Pattern<&sol;h3>&NewLine;<p>Let&&num;8217&semi;s start to create a design without using Bridge Design Pattern&period; First create an interface or an abstract class&comma; <em><strong>Bank<&sol;strong><&sol;em>&period; And then I create its derived classes&colon; <em><strong>IciciBank<&sol;strong> <&sol;em>and <em><strong>HdfcBank<&sol;strong><&sol;em>&period; To open an account in bank&comma; first decide type of accounts classes&colon; <em><strong>SavingAccount<&sol;strong> <&sol;em>and <em><strong>CurrentAccount<&sol;strong><&sol;em>&comma; these classes extends the specific banks classes &lpar;<em><strong>HdfcBank<&sol;strong> <&sol;em>and <em><strong>IciciBank<&sol;strong><&sol;em>&rpar;&period; This simple deep inheritance hierarchy in this application&period;<&sol;p>&NewLine;<p>So what is wrong with this design as below figure&period; You will notice in this design&comma; there are two parts&comma; one is the abstraction part and other is the implementation part&period; Client code interacts with the abstraction part&period; Client code can only access new change or new functionality of the implementation part when you will update the abstraction part&comma; it means both parts the abstraction and implementation are tightly coupled with each-other&period;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-3690" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2017&sol;12&sol;without-bridge-pattern&period;png" alt&equals;"without bridge pattern" width&equals;"715" height&equals;"249" &sol;><&sol;p>&NewLine;<h3>Relationship using Bridge Design Pattern<&sol;h3>&NewLine;<p>Let&&num;8217&semi;s look into the following figure&comma; how Bridge design pattern solve these design issues as noticed in the without using bridge pattern example&period; Bridge pattern is separating the abstraction and implementation into two class hierarchies&period;<&sol;p>&NewLine;<p><img class&equals;"aligncenter size-full wp-image-3691" src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2017&sol;12&sol;with-bridge-pattern&period;png" alt&equals;"with bridge pattern" width&equals;"793" height&equals;"194" &sol;><&sol;p>&NewLine;<p>We have a <strong>Account <&sol;strong>interface which is acting as a bridge implementer and concrete classes <strong>SavingAccount<&sol;strong>&comma; <strong>CurrentAccount <&sol;strong>implementing the Account interface&period; <strong>Bank <&sol;strong>is an abstract class and will use object of <strong>Account<&sol;strong>&period;<&sol;p>&NewLine;<h3>Step 1&colon; Let&&num;8217&semi;s create bridge implementer interface&period;<&sol;h3>&NewLine;<p><strong>Account&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast;&Tab;Implementor for bridge pattern &NewLine; &ast;&sol; &NewLine;public interface Account &lbrace; &NewLine;&Tab;Account openAccount&lpar;&rpar;&semi; &NewLine;&Tab;void accountType&lpar;&rpar;&semi; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<h3>Step 2&colon; Let&&num;8217&semi;s create concrete bridge implementer classes implementing the <em>Account<&sol;em> interface&period;<&sol;h3>&NewLine;<p><strong>CurrentAccount&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; Concrete implementation 1 for bridge pattern &NewLine; &ast;&sol; &NewLine;public class CurrentAccount implements Account &lbrace; &NewLine; &NewLine;&Tab;&commat;Override &NewLine;&Tab;public Account openAccount&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;println&lpar;"OPENED&colon; CURRENT ACCOUNT "&rpar;&semi; &NewLine;&Tab;&Tab;return new CurrentAccount&lpar;&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine;&Tab; &NewLine;&Tab;&commat;Override &NewLine;&Tab;public void accountType&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;println&lpar;"&num;&num;It is a CURRENT Account&num;&num;"&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<p><strong>SavingAccount&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; Concrete implementation 2 for bridge pattern &NewLine; &ast;&sol; &NewLine;public class SavingAccount implements Account &lbrace; &NewLine; &NewLine;&Tab;&commat;Override &NewLine;&Tab;public Account openAccount&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;println&lpar;"OPENED&colon; SAVING ACCOUNT "&rpar;&semi; &NewLine;&Tab;&Tab;return new SavingAccount&lpar;&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&Tab;&commat;Override &NewLine;&Tab;public void accountType&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;println&lpar;"&num;&num;It is a SAVING Account&num;&num;"&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<h3>Step 3&colon; Let&&num;8217&semi;s create an abstract class <em>Bank<&sol;em> using the <em>Account<&sol;em> interface&period;<&sol;h3>&NewLine;<p><strong>Bank&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast;&Tab;Abstraction in bridge pattern &NewLine; &ast;&sol; &NewLine;public abstract class Bank &lbrace; &NewLine;&Tab;&sol;&sol;Composition with implementor &NewLine;&Tab;protected Account account&semi; &NewLine;&Tab; &NewLine;&Tab;public Bank&lpar;Account account&rpar;&lbrace; &NewLine;&Tab;&Tab;this&period;account &equals; account&semi; &NewLine;&Tab;&rcub; &NewLine;&Tab; &NewLine;&Tab;abstract Account openAccount&lpar;&rpar;&semi; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<h3>Step 4&colon; Let&&num;8217&semi;s create concrete class implementing the <em>Bank<&sol;em> interface&period;<&sol;h3>&NewLine;<p><strong>IciciBank&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; Refine abstraction 1 in bridge pattern &NewLine; &ast;&sol; &NewLine;public class IciciBank extends Bank &lbrace; &NewLine; &NewLine;&Tab;public IciciBank&lpar;Account account&rpar; &lbrace; &NewLine;&Tab;&Tab;super&lpar;account&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&Tab;&commat;Override &NewLine;&Tab;Account openAccount&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;print&lpar;"Open your account with ICICI Bank"&rpar;&semi; &NewLine;&Tab;&Tab;return account&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<p><strong>HdfcBank&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; Refine abstraction 2 in bridge pattern &NewLine; &ast;&sol; &NewLine;public class HdfcBank extends Bank &lbrace; &NewLine; &NewLine;&Tab;public HdfcBank&lpar;Account account&rpar; &lbrace; &NewLine;&Tab;&Tab;super&lpar;account&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine;&Tab;&commat;Override &NewLine;&Tab;Account openAccount&lpar;&rpar; &lbrace; &NewLine;&Tab;&Tab;System&period;out&period;print&lpar;"Open your account with HDFC Bank"&rpar;&semi; &NewLine;&Tab;&Tab;return account&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<h3>Step 5&colon; Let&&num;8217&semi;s create a demo class and use the <em>Bank<&sol;em> and <em>Account<&sol;em> classes to open different types of accounts Saving and Current Account&period;<&sol;h3>&NewLine;<p><strong>BridgePatternMain&period;java<&sol;strong><&sol;p>&NewLine;<pre class&equals;"highlight">package com&period;doj&period;patterns&period;structural&period;bridge&semi; &NewLine; &NewLine;&sol;&ast;&ast; &NewLine; &ast; &commat;author Dinesh&period;Rajput &NewLine; &ast; Demonstration of bridge design pattern &NewLine; &ast;&sol; &NewLine;public class BridgePatternMain &lbrace; &NewLine; &NewLine;&Tab;public static void main&lpar;String&lbrack;&rsqb; args&rpar; &lbrace; &NewLine;&Tab;&Tab;Bank icici &equals; new IciciBank&lpar;new CurrentAccount&lpar;&rpar;&rpar;&semi; &NewLine;&Tab;&Tab;Account current &equals; icici&period;openAccount&lpar;&rpar;&semi; &NewLine;&Tab;&Tab;current&period;accountType&lpar;&rpar;&semi; &NewLine;&Tab;&Tab; &NewLine;&Tab;&Tab;Bank hdfc &equals; new HdfcBank&lpar;new SavingAccount&lpar;&rpar;&rpar;&semi; &NewLine;&Tab;&Tab;Account saving &equals; hdfc&period;openAccount&lpar;&rpar;&semi; &NewLine;&Tab;&Tab;saving&period;accountType&lpar;&rpar;&semi; &NewLine;&Tab;&rcub; &NewLine; &NewLine;&rcub; &NewLine; &NewLine;<&sol;pre>&NewLine;<h3>Step 6&colon; Let&&num;8217&semi;s run the above demo class and verify the output&period;<&sol;h3>&NewLine;<pre class&equals;"highlight">Open your account with ICICI Bank&num;&num;It is a CURRENT Account&num;&num; &NewLine;Open your account with HDFC Bank&num;&num;It is a SAVING Account&num;&num; &NewLine; &NewLine;<&sol;pre>&NewLine;<div class&equals;"wp-post-navigation"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-pre"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;adapter-design-pattern&sol;">Previous<&sol;a> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-next"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;decorator-design-pattern&sol;">Next<&sol;a> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<&sol;div>&NewLine;<script type&equals;"text&sol;javascript">&NewLine;jQuery&lpar;document&rpar;&period;ready&lpar;function&lpar;&dollar;&rpar; &lbrace;&NewLine; &dollar;&period;post&lpar;'https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-admin&sol;admin-ajax&period;php'&comma; &lbrace;action&colon; 'mts&lowbar;view&lowbar;count'&comma; id&colon; '3686'&rcub;&rpar;&semi;&NewLine;&rcub;&rpar;&semi;&NewLine;<&sol;script>

Dinesh Rajput

Dinesh Rajput is the chief editor of a website Dineshonjava, a technical blog dedicated to the Spring and Java technologies. It has a series of articles related to Java technologies. Dinesh has been a Spring enthusiast since 2008 and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger. He has more than 10 years of experience with different aspects of Spring and Java design and development. His core expertise lies in the latest version of Spring Framework, Spring Boot, Spring Security, creating REST APIs, Microservice Architecture, Reactive Pattern, Spring AOP, Design Patterns, Struts, Hibernate, Web Services, Spring Batch, Cassandra, MongoDB, and Web Application Design and Architecture. He is currently working as a technology manager at a leading product and web development company. He worked as a developer and tech lead at the Bennett, Coleman & Co. Ltd and was the first developer in his previous company, Paytm. Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it. He is a very active member of the Java and Spring community on different forums. When it comes to the Spring Framework and Java, Dinesh tops the list!

Share
Published by
Dinesh Rajput

Recent Posts

Strategy Design Patterns using Lambda

Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…

4 years ago

Decorator Pattern using Lambda

Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…

4 years ago

Delegating pattern using lambda

Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…

4 years ago

Spring Vs Django- Know The Difference Between The Two

Technology has emerged a lot in the last decade, and now we have artificial intelligence;…

4 years ago

TOP 20 MongoDB INTERVIEW QUESTIONS 2022

Managing a database is becoming increasingly complex now due to the vast amount of data…

4 years ago

Scheduler @Scheduled Annotation Spring Boot

Overview In this article, we will explore Spring Scheduler how we could use it by…

4 years ago