The Value of a .NET Class
2025-04-29
That was one of the classes I was most worried about when I examined all the classes I would need to get my degree. Being the subject I had the least exposure to, I had no idea what it was even used for. So, to set the background of what it is, and more specifically what we did in the class, .NET is an application framework from Microsoft for building applications and services for Windows machines. ASP(Active Server Pages) or ASP.NET can be seen as an application framework, however, it is more accurate to describe it as a full stack solution, more akin to Ruby on Rails than PHP for example. In modern times, ASP uses C# for the programming language, and our class was using an older version around 5 or 5.3, but I don’t think that is considered legacy yet anyway.
This class was project based, and slowly added new concepts that would be of greater consequence than just learning C#. These broader guidelines like the Model View Controller, or MVC, architecture is used in other frameworks like Ruby on Rails or Java Springboot. This pattern allows the project to be divided into the concerns of models that represent the shape of data, a view that determines the layout of the application and the data, and the controller that performs any functions that need to run after the page is loaded, or upon user request.
Because of this separation of concerns, making a model was the first step. Using some built in data types to handle date data as well as primitives like strings and integers to hold year values, titles, and descriptions. After building out a rough model class, we could then use that as a migration to build a new table in the SQL database. This kind of development practice along with learning how to create Entity Relationship Diagrams in our Databases class combine to form the basics of Data-Driven Development. This tight integration has a lot of benefits especially in maintaining data type validation.
After the model is created and expressed in the database, the controller layer is programmed to create the essential CRUD operations. The way .NET Framework handles this is not how I have made discrete API endpoints before, because it is meant to handle page routing as well, sending the user to the appropriate front end, based on authentication and error handling and sending the appropriate data with it. This data is usually passes as a context object, which again is a common theme in full-stack systems.
Then, at first we just used that data fairly directly in the front-end or view. However, what really impressed me was the functionality that was achieved with the data-tables library for jQuery. Going into this programming degree path, I was convinced that libraries like jQuery were outdated compared to modern front-end frameworks, and ECMAscript 6 built-ins like fetch. What I didn’t consider about legacy systems is that they have solved a lot of problems. Some things that you get basically for free with data-tables like pagination, filtering, search, and sorting by clicking the column, are not trivial things to implement by hand for every project.
Part of working through this project was uploading a video every so often with updates, and an explanation of some choices made. I’ve included a playlist here, as well as a link to the project’s repo on github.
Repo — https://github.com/murraybot/CinemaTown
Comments