Monday, December 16, 2024 – Last week, my focus was on developing an entity to store and manage information about the website and company. Initially, I designed a simple UI to display this information although everything was hard coded directly into the application. Later, Mr. Peter tasked me with creating an entity/schema capable of storing data for multiple pages, eliminating the need to define a separate entity for each page.
Following Mr Peter guidance, I drafted the potential structure (including key fields and their types) for the entity and discussed it with Mr. Peter. Once the design was finalized, I quickly started creating the context project. Since this entity was built for MongoDB, I discovered that setting up its schema model did not require the same configuration initialization as SQL entities, which I found interesting.
Next, I developed APIs to support the entity, including endpoints for creating, retrieving by ID and URL, and updating. Each API was accompanied by unit tests to ensure proper functionality. Although I encountered a few issues due to oversights, I managed to resolve them, and all tests eventually passed. The logic for retrieving data was notably simpler, likely because only one filter was required at this stage.
Once the backend APIs were functional, I moved to the front end to integrate and test them. Previously, the UI displayed hard coded information, but now I needed to enable admin users to create and edit pages dynamically. I started by creating a page to list all pages, including a “Create” button to navigate to the creation form. After completing the list page, I developed the creation page to test both the list retrieval and creation APIs in action.
By the end of the week, I successfully integrated both the APIs and front-end functionality. Next week, I plan to test the entity’s primary purpose, which is to dynamically call the created APIs to replace the previously hard coded UI pages. Additionally, I’ll also focus on updating the admin page, which requires some additional modifications.
