Wildlife Reserve CMS

A CMS that helps display information about difference creatures inside wildlife reserves.

TECH

C#
JavaScript
MySQL

Details

This was my final project for my C# / ASP.NET course at Sheridan College. The goal for this application was to teach myself the ASP.NET development environment through building MVC and REST API endpoints.

With the frontend, I had the requirement to use the Razor templating engine. I wanted to make things interesting so I took the opportunity to incorporate progressive web app features. Animal pages are loaded as modals and data is injected into the app using REST endpoints and stored in local storage to lower requests to the webserver.

Lessons Learned

Making Code Reusable

When tackling MVC or REST you want to separate your application into components. You can find out quickly that your codebase becomes very complex in a .NET or Java environment. An example issue is the size of code implemented directly in the controller endpoints. This causes lots of complexity to gather in a single point in the application and removes the possibility of reusable code.

Solution: Service files for models

What a service file can offer is the reuse of code. An example would be a method that requests a model object from a database by Id. This method can be reused throughout the application and lower the code written by a substantial amount. This also helps maintain the codebase as there is only one method to write tests for.