Object Oriented Programming as the name suggests Programming around Objects, in this paradigm objects play a very big role. You can say Objects are the most important ingredient in building any Application using this languages.
The Language that I choose for discussing this topic is non other than Java. Why Java? Why Not Java ? this is a big question , and I am not experienced enough to answer that.
Modern world application are not built using monolith architecture, so now we don't have a single object responsible for every action. Now we have different architectures which deals with many type of Objects ,my discussion is based on Layered Architecture that we can see mostly in any application. The Application is divided basically in three parts -
The Language that I choose for discussing this topic is non other than Java. Why Java? Why Not Java ? this is a big question , and I am not experienced enough to answer that.
Modern world application are not built using monolith architecture, so now we don't have a single object responsible for every action. Now we have different architectures which deals with many type of Objects ,my discussion is based on Layered Architecture that we can see mostly in any application. The Application is divided basically in three parts -
- The Presentation Layer
- The Business Layer
- The Configuration Layer
Now If you have written code in this architecture then you know you can't except everything from a single object. Every layer have its own Classes thus own objects and we have logic written for mapping them.
The Presentation Layer Objects are known as DTO or Data Transfer Objects, as they have to transfer the data to a frontend application using HTTP protocols, in other words DTOs are the type of objects that are returned by the REST API.
The Presentation Layer Objects are known as DTO or Data Transfer Objects, as they have to transfer the data to a frontend application using HTTP protocols, in other words DTOs are the type of objects that are returned by the REST API.
The Configuration layer is where we do all the configurations, It also holds the Entity classes, that are used to map Database with Java Objects, Hibernate is a such ORM tool which is used in Java. Here this Objects are known as DAO or Data Access Objects.
The Business Layer doesn't hold any type of object, you can say all the mapping logics are written here to convert a DAO to a DTO.
This is the Art of Objects that I want to discuss, The beauty of OOPs and Layered Architecture.
If You have any questions or doubt feel free to comment .
I will try to give you the solution from my end .
If You have any questions or doubt feel free to comment .
I will try to give you the solution from my end .

Comments
Post a Comment