Codebase Walkthrough#

How to Run the Project Locally#

  1. Clone the repository. Add the repository URL, choose a local directory, and keep master as the initial branch.
  2. After cloning, check out DbChanges_Staging as the current branch.
  3. Open the cloned repository folder in Visual Studio.
  4. Double-click alohaSite.sln to load the solution.
  5. Reload any projects that appear as unloaded.
  6. Set up the database in your local SQL Server instance. Update the connection strings in Web.config with your local SQL Server user ID, password, and database name (Initial Catalog).
  7. Verify that all projects are loaded correctly, then set manexSite as the startup project.
  8. Run the project (IIS Express).

To log in, use the default credentials: compadmin / compadmin.

Project Structure Overview#

The application contains eight projects.

  • FrontendmanexSite, implemented as a single-page application.
  • Data modelMnxEFModel, the database-first Entity Framework model.
  • Business logic — organized in BLL and DAL.
  • 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#

  1. Readability matters. Use consistent naming for variables, functions, and classes. Prefer meaningful names that convey purpose.
  2. Comments and documentation. Include comments to explain complex sections. Document functions and classes — purpose, parameters, return values.
  3. Modularization. Break code into smaller components with a single, well-defined responsibility.
  4. Don’t Repeat Yourself (DRY). If you catch yourself writing similar code in multiple places, extract a function or class.
  5. Keep It Simple (KISS). Prefer the simpler solution when it achieves the same result.
  6. Code reviews. Be open to feedback. Use reviews to share knowledge and improve quality.
  7. Version control. Commit frequently with meaningful commit messages.
  8. Understand the problem before jumping into code. Break the requirement down.
  9. Stay updated. Track changes in languages, frameworks, and tools relevant to the project.
  10. Handle errors gracefully. Anticipate failures; return informative error messages.
  11. 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.