How aaron-shrike/sistema-gestion-productos works
Project Type and Purpose
• This is a Windows-Forms “three-tier” product-management system written in C# (.NET Framework) with SQL Server as the backend.
• The README confirms it’s a semester project (“Sistema de Gestión de Productos”) using C# and SQL Server.
High-Level Architectural Layers
• Presentation (Ventas)
• Business Logic / Rules (ReglasNegocio)
• Data Access (DAL)
• Shared Domain Models (Entidades)
• Database (SQL Server)
Main Components and Their Roles
a. Presentation Layer (Ventas)
• A WinForms application with multiple forms (e.g., frmPrincipal, frmGestionarProducto).
• References MetroFramework packages for UI styling.
• Contains App.config for UI-level settings (e.g., connection strings).
b. Business Logic Layer (ReglasNegocio)
• RNEmpresa, RNProducto, etc.: encapsulate validation and business rules.
• Reads settings from app.config.
c. Data Access Layer (DAL)
• DAL.cs: CRUD operations using ADO.NET or similar.
• Manages SQL Server connections and commands.
d. Domain Models (Entidades)
• Plain CLR classes: Empresa, Categoria, Producto, Usuario, PrecioLocal, etc.
• Shared by all layers as method parameters and return types.
e. Database (SQL Server)
• Tables: Producto, Categoria, Empresa, Local, Marca, Personal, Usuario, PrecioLocal.
• Backup scripts under BackUp/ for initial schema and seed data.
Relationships and Data Flow
• UI → Business Logic: the forms call methods on RN* classes to apply rules.
• Business Logic → Data Access: RN* classes delegate persistence to DAL.
• Data Access ↔ Database: DAL executes SQL commands against SQL Server.
• All three layers reference the Entidades library for shared DTOs.
• MetroFramework packages are only referenced by the Presentation layer.
Architectural Patterns and Principles
• Layered architecture (Presentation → BLL → DAL → Database).
• Separation of concerns: UI is decoupled from business rules, which are decoupled from data access.
• Reusable domain models in Entidades.
• Dependency: Presentation depends on BLL and Entities; BLL depends on DAL and Entities; DAL depends on Entities.
Technologies and Frameworks
• C# .NET Framework (probably 4.x based on package libs “net40”).
• WinForms + MetroFramework (for theming).
• ADO.NET or similar in DAL.
• SQL Server (scripts provided in BackUp directory).
Checklist for the Principal Software Engineer
[ ] All four layers are represented.
[ ] Entidades is clearly shown as a shared component.
[ ] Note on backup scripts and config files.