User management – Service layer

Today let’s talk about User Management use-cases more closely. We need several database mappers, several services and facade pattern.

Let’s see how those will be integrated together.

ServiceLayers

As you can see we have layers in our user management subsystem.

First one is called Data mapping layer. Currently it contains five database mappers. Each mapper is used to perform two actions:

  1. Insert or update database record
  2. Delete record from database

Services layer performs all business logic. There will be service which will allow to create and register new user for example or delete user and all it’s messages/visits. We also need some service which will be used for constraints checking while performing various database operations. When user says something in chat room, his message should be logged inside database… And yes — this is another service.

In other words all business logic will be performed using services layer.

Finally we will use MUC manager (facade pattern) which will provide high-level interface for our use-cases. MUC manager won’t have any access to database and mappers, but will use services instead.

Currently I’m implementing database mappers. When it will be finished I’ll create several posts dedicated to business logic and will provide finished and precise interface for MUC manager. After that we will implement services (one by one) and finally integrate all of this together.

Advertisements

One Response to “User management – Service layer”

  1. Repository pattern « Tillias's Blog Says:

    […] User management – Service layer […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: