My Final Week in OOP C#
As I wrap up my last week in Object-Oriented Programming with C#, I wanted to reflect on the project I've been pouring my soul into β NoFallZone, a console-based shopping application built from scratch using clean OOP principles, Entity Framework, and a layered architecture. π What is NoFallZone? NoFallZone is a console app for a fictional climbing gear store. It allows users to: Browse products by category View featured deals Add products to their cart Register and log in with role-based access (Admin/User) Perform product management and CRUD operations (as Admin) Search products using keywords Manage their cart and proceed to checkout (coming soon!) Admins can manage: Products Categories Suppliers Customers Featured product deals π The Tech Stack C# with .NET 8 Entity Framework Core (Code First) SQL Server Clean and consistent OOP architecture Strong use of Interfaces, Repositories, and Service layers Console UI built with custom GUI layout helpers Session management for user tracking and cart state Nullable and unique constraints across the models using OnModelCreating π‘ Key Features I Focused On OOP Design: I applied SOLID principles to keep responsibilities separated and the codebase maintainable. Each entity β from Product to Order β is encapsulated and extended via service classes and validators. Validation: I implemented robust input validation using helper classes, with custom rules and clean user prompts. Session & State Management: User sessions are managed globally through a Session class, which tracks logged-in users and their shopping cart across different screens. Role-Based Menus: I created completely different menu experiences for users and admins. The system dynamically adjusts the UI and permissions depending on the userβs role. Custom Console UI: Using methods like GUI.DrawWindow, I developed reusable layout components to simulate windowed UI panels inside the terminal β for menus, product lists, and shopping cart views. Search & Filtering: Users can perform case-insensitive free-text search across product names, descriptions, and supplier names. π§ What I Learned This project has been an amazing way to bring theory into practice. Iβve gained a solid understanding of: How to architect a larger C# application using object-oriented design How Entity Framework handles relationships, constraints, and migrations How to manage real-world interactions like carts, sessions, and login systems The value of separation of concerns and modular design β it made the project scale easily βοΈ Final Thoughts This is one of the most rewarding projects Iβve built during my backend development studies. It's been a rollercoaster of learning, debugging, and refactoring β but I'm incredibly proud of what Iβve created. π― Next up? Possibly a WPF or ASP.NET UI layer for NoFallZone, or connecting the app to an API. Thanks for reading β and if youβre learning C# or backend development yourself, keep building. The best way to learn is by doing!
Comments for: 'My Final Week in OOP C#'
No comments yet.