Codebase Walkthrough#
How to Run the Project Locally#
- Clone the repository. Add the repository URL, choose a local directory, and keep
masteras the initial branch. - After cloning, check out
DbChanges_Stagingas the current branch. - Open the cloned repository folder in Visual Studio.
- Double-click
alohaSite.slnto load the solution. - Reload any projects that appear as unloaded.
- Set up the database in your local SQL Server instance. Update the connection strings in
Web.configwith your local SQL Server user ID, password, and database name (Initial Catalog). - Verify that all projects are loaded correctly, then set
manexSiteas the startup project. - Run the project (IIS Express).
To log in, use the default credentials: compadmin / compadmin.
Project Structure Overview#
The application contains eight projects.
- Frontend —
manexSite, implemented as a single-page application. - Data model —
MnxEFModel, the database-first Entity Framework model. - Business logic — organized in
BLLandDAL. - Resources project — shared assets.
- Service-installer projects — for additional Windows services.
For a more detailed code-level breakdown of the same solution (helpers, request flow, procedure classes), see Architecture.
Basic Code Principles and Guidelines#
- Readability matters. Use consistent naming for variables, functions, and classes. Prefer meaningful names that convey purpose.
- Comments and documentation. Include comments to explain complex sections. Document functions and classes — purpose, parameters, return values.
- Modularization. Break code into smaller components with a single, well-defined responsibility.
- Don’t Repeat Yourself (DRY). If you catch yourself writing similar code in multiple places, extract a function or class.
- Keep It Simple (KISS). Prefer the simpler solution when it achieves the same result.
- Code reviews. Be open to feedback. Use reviews to share knowledge and improve quality.
- Version control. Commit frequently with meaningful commit messages.
- Understand the problem before jumping into code. Break the requirement down.
- Stay updated. Track changes in languages, frameworks, and tools relevant to the project.
- Handle errors gracefully. Anticipate failures; return informative error messages.
- Performance considerations. Prefer readability over premature optimization. Optimize based on measurements.
For database and data-quality rules (Unicode handling, mojibake prevention), see Database Standards & Data Quality.