On the second week of my internship, I begin to dwell deeper into the concept like ASP.NET Core, RESTful API and TDD. In ASP.NET Core, I learned the best practices to use whenever I work with the framework. Not only that, in ASP.NET Core, I learned on how to create an API where API allow for communication between 2 different application that uses different programming language. Lastly is the mediator pattern and CQRS. The mediator pattern is how two object communicate between each other and this promote loose coupling between the 2 objects. CQRS is the separation between the command model and query model where the command model is usually the create, update and delete operation which can change the data but doesn’t return data to the user. Meanwhile, the query model is the read operation in which it doesn’t change the data and return a result to the user.
The RESTful API is the communication between to application when it’s based on the CRUD (Create, Read, Update and Delete) operation. In an API, the client will send a request to the server through the API using the HTTP method like GET, POST, PUT and DELETE request. Afterward, the API will then fetch the appropriate data and send it back to the client. The REST is the constraint applied when creating the API. The constraints are usually, client-server architecture, stateless, cache-able, uniform interface and layered system.
Lastly is the concept of Test Driven Development (TDD). In TDD, the development of a software usually start with the testing first. The cycle of TDD involve creating a failing test first then applying the logic of the code to make the test green. Finally the last part of the TDD cycle is to refactor the code to make sure the code is clean. The process is then repeated again for the other part of the code. TDD allow for easier to test to code and provide a fast feedback to know whether or not the logic is working properly.
