Skip to main content

The Art of Objects



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 - 
  1. The Presentation Layer 
  2. The Business Layer
  3. The Configuration Layer
 There can be other layers also, but for simplicity I divided them in three parts.

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 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 .


Comments

Popular posts from this blog

Problem Solving and Algorithms

Problem Solving and Algorithms Introduction A problem space is all of the various components that go into creating a resolution for a problem. Think of it like a frame, which acts as something of a border to help define an area. A problem space helps you or, on a larger scale, a business, figure out what the problem is, work through ways to correct them and then drives implementation of the appropriate solution. The ultimate purpose is to take corrective action for some identified problem. Problem solving refers to cognitive processing directed at achieving a goal when the problem solver does not initially know a solution method. In computer science there are two different types of problems, ill-defined and well-defined : different approaches are used for each. Well-defined problems have specific end goals and clear expected solutions, while ill-defined problems do not. In computer science, an algorithm is a finite sequence of well-defined , computer-implementable inst...

A Beginner's Guide to System Design

A Beginner's Guide to System Design Introduction Systems design is the process of defining the architecture, modules, interfaces, and data for a system to satisfy specified requirements. Systems design could be seen as the application of systems theory to product development. There is some overlap with the disciplines of systems analysis, systems architecture and systems engineering. Whether you are a backend developer, product manager or technical manager, everyone needs to know the basics of System Design. So this article is the only destination that can solve all queries you have about System Design. Aspects of System Design High Level System Design High-level design ( HLD ) explains the architecture that would be used for developing a software product. The architecture diagram provides an overview of an entire system, identifying the main components that would be developed for the product and their interfaces. The HLD uses possibly nontechnical to mildly te...

A Basic Overview of LINUX

A Basic Overview of LINUX Introduction Linux is a family of open source Unix-like operating systems based on the Linux kernel,an operating system kernel first released on September 17, 1991, by Linus Torvalds . Linux is typically packaged in a Linux distribution.Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project.Popular Linux distributions include Debian , Fedora , and Ubuntu . Commercial distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise Server . Desktop Linux distributions include a windowing system such as X11 or Wayland , and a desktop environment such as GNOME or KDE Plasma . Distributions intended for servers may omit graphics altogether, or include a solution stack such as LAMP . Because Linux is freely redistributed, anyone may create a distribution for any purpose.Linux was originally developed for personal computers based on the Intel x86 architecture, but has ...