How thiagofernandesfelipe/cadastro_pessoas works
Project type and purpose
• This is a desktop CRUD application (“CadastroPessoas”) built in Delphi 11 targeting Win32.
• Implements an MVC-style pattern to manage person records in a MySQL database.
File structure
• Top-level Delphi project files (.dpr, .dproj, .res).
• Controllers folder (PessoaController).
• Models folder (PessoaModel, PessoaListaModel).
• DAOs folder (ConexaoDAO, PessoaDAO).
• Views folder (CadastroPessoasView .pas + .dfm).
• Win32\Debug\config.ini holds database connection settings.
• A SQL dump file for schema setup.
Key README insights
• Uses MySQL 8.0.23.
• config.ini holds database credentials and is read at runtime by ConexaoDAO.
Main components
a. View Layer
• Component: CadastroPessoasView (Delphi form + DFM)
• Role: UI for creating, editing, listing persons
b. Controller Layer
• Component: uPessoaController
• Role: Handles UI events, orchestrates calls to Models and DAOs
c. Model Layer
• Components: uPessoaModel, uPessoaListaModel
• Role: Encapsulate business objects and in-memory collections
d. DAO / Persistence Layer
• Components: uConexaoDAO, uPessoaDAO
• Role: Manage database connections and CRUD SQL operations
• Reads config.ini for DB credentials
e. External Service
• MySQL Database Server (schema from dump-projeto_silbeck-202502081956.sql)
• View → Controller: User actions (button clicks)
• Controller → Model: Create/Update domain objects
• Controller → DAO: Pass models for persistence
• DAO → MySQL: Execute SQL over TCP using credentials from config.ini
• DAO → Controller: Return results (success/failure, datasets)
• Controller → View: Push updated Models or lists back for display
Important architectural patterns
• MVC separation of concerns (UI, business, persistence)
• DAO pattern isolates SQL logic
• Config-driven connection to external DB
Technologies & frameworks
• Delphi VCL (UI, form definitions .dfm)
• MySQL 8.0.23
• INI-file parsing via Delphi’s TIniFile in ConexaoDAO
• Pascal units for each layer