Domain Modelling Patterns

Image
There are two main patterns for organizing business logic: the procedural Transaction script pattern, and the object-oriented Domain model pattern. 1. Transaction script pattern: An important characteristic of this approach is that the classes that implement behavior are separate from those that store state. When using the Transaction script pattern, the scripts are usually located in serviceclasses, which in this example is the OrderService class. A service class has one method for each request/system operation. The method implements the business logic for that request. It accesses the database using data access objects (DAOs), such as the OrderDao. The data objects, which in this example is the Order class, are pure data with little or no behavior. This style of design is highly procedural and relies on few of the capabilities of objectorientedprogramming (OOP) languages. This what you would create if you were writing the application in C or another non-OOP language. Neverthe

About me

Hi , I am a budding Software developer at Flipkart
previously working as a developer at OlaCabs.
Here to spread knowledge through this tech blog.
Cheers!

To reach out :
Linkedin : https://www.linkedin.com/in/akashjain95/
Gmail : akash.2016.jain@gmail.com

Comments

Popular posts from this blog

Introduction to Kafka

Guice Tutorial

GraphQL Introduction