Steps to Learn Each Microservices

Domain & Technical Analysis

  • What Domain Models requires
  • For Example in case of Catalog API
    • Model like product and categories required
    • Decide fields required in each model 
    • Relation with models
  • Application User case
    • Use cases of products n categories 
    • Searching
    • CRUD Operations
  • Rest API end points
    • Analysis REST API endpoints 
  • Under lying Data Structure
    • it may be Postgre SQL, or Mongo DB
    • So underlying data structure of the catalog microservices will be document database in order to store catalog Json data catalog data will be available for the Json.
    • So we can use MongoDB as a NoSQL database. Or we can use PostgreSQL database Json column feature with using Martin library that provide the. 

 

 

Technical Analysis

  • Application Architecture Style
    • Organize our code into 
      • feature folders. each folder encapsulate into a single cs file
      • Analise UI, Application, Domain and Infrastructure Layer

 

  • Learn- Pattern and Principals 
    • CROS Principal
    • Mediator Pattern
    • DI Pattern - to inject dependency 
    • Minimal APIs and Routing
    • ORM Pattern 
    •  
  • Develop & Test - Coding & Local Test
    • Libraries and NuGet packages that we are going to use in the
    • MidiatR for CQRS
    • Carter for API Endpoints
    • Martin Library  for PostgreSQL as a document database.
    • Mopster is a fast, configurable object mapper that simplifies the task of mapping operations from one type to another, and it is also streamlining the data transformation process.
    • Fluent validation is a popular library for building strongly typed validation rules
    •  
  • Deploy - Containerize & Orchestrate
    • We can examine the project folder structure
      • Organization in Model, Features, Data and Abstraction
      • Data Folder and Context object
  • Finally, we will containerize our microservice with Docker and ensuring the seamless deployment and integration with the PostgreSQL database.
  • So we will implement Docker file and docker compose file for running the catalog microservices and the PostgreSQL database in Docker environment.

 

  • Vertical slice architecture.
    • Vertical slice architecture introduced by Jaime Bogaerts and it offers this architecture against two traditional layered/onion/clean architecture approaches. 
    • Vertical Slice Architecture aims to organize code around specific features or use cases, rather than the technical concerns in a vertical slice architecture.
    • A feature is implemented across all layers of the software, from the user interface to the database.
    • This approach is often used in the development of complex, feature rich applications, particularly those that are delivered over the web.
    • Vertical slice architecture is dividing an application into distinct features or functionalities, and each of them cuts through all of the layers of the application.
    • This approach is in contrast to the traditional n-tier or layered architectures, where the application is divided horizontally.
    • Focusing on the vertical helps to lower dependency between various parts/components of the program.
    • Each slice can be seen as a mini application with its own distinct functionality and dependencies. It promotes the use of the cross-functional teams.
    • Development teams working with the vertical slice architecture are often cross functional, containing all the skills necessary to develop a feature from start to finish, which promotes a more holistic view of the development and the architecture supports scalability and maintainability. 
    • As the application grows, new features can be added as a Newer slices without significantly impacting the existing code, and also it allows for improved testing and deployment process.
    • Vertical slices can be individually tested and deployed, which simplifies the testing process, and it can lead to more reliable and faster deployments.
    • Vertical slice is an internal application architecture pattern that every microservices can follow.
    • It allows for focused development where the teams can concentrate on one feature at a time.

Related Question