# mfaransa1/realestatemanagementinc- architecture

> Architecture diagram of the GitHub repository mfaransa1/realestatemanagementinc-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mfaransa1/realestatemanagementinc-
- Repository: https://github.com/mfaransa1/realestatemanagementinc-

## Overview

##### Main Architectural Components
- Presentation Layer:
- This includes all the .aspx pages and master pages (e.g., PropertyNetMasterPage.master, MyProfieMasterPage.master) that present the user interface. Note that there is a separation between the Administration area (found within the “Administration” folder) and the public-facing pages located at the root level.
- User controls (e.g., ucPublicHeader.ascx, ucAdminMenu.ascx) that encapsulate reusable UI components.
- Business Logic Layer:
- Represented by the “App_Code/Classes/BOL” folder where classes like clsAdvertisement_Logic.cs, clsBuildingType_Logic.cs, and other similar files exist. These classes encapsulate the core business operations such as advertisement management, property listings, and user management.
- Data Access Layer:
- Found in “App_Code/Classes/DAL” (e.g., clsDbConnector.cs). This part abstracts data access operations and database interactions.
- Database:
- Database component that is defined by the SQL scripts in the “Database” directory (e.g., “PropertySearch Script 2008.sql” and “property db script 2012.sql”). This is where persistent data such as property details, user information, and advertisement details are stored.
- Static Assets and Themes:
- This includes the “CSS”, “Images”, and “App_Themes” directories where stylesheets, images, JavaScript files, and theme files are maintained.
- External and Utility Components:
- Additional non-core components like the “ColorPicker2.js” (used for UI interactivity) and any documentation that exists for further insights (the “Documentation” folder).

##### Relationships and Interactions
- UI to Business Logic:
- Business Logic to Data Access:
- Data Access to Database:
- The data access layer interacts directly with the database using SQL scripts, so represent these connections clearly.
- The “Administration” vs. Public Views:
- That the administration area not only allows configuration and management but may have enhanced functionality (e.g., additional controls and menu options) compared to the public pages.

##### Important Architectural Patterns and Designs
- Layered Architecture:
- That the project uses a 3-tier layered architecture: Presentation (UI), Business Logic, and Data Access.
- Use of ASP.NET Web Forms:
- Use of Master Pages and User Controls for separation of concerns and code reusability.
- Modularization:
- The project’s file structure, especially with separate folders for “Administration”, “App_Code/Classes/BOL”, “App_Code/Classes/DAL”, and “Controls”, reflects a modular design that encourages separation of duties.

##### Technologies, Libraries, and Frameworks
- ASP.NET Web Forms is the core technology.
- The code is built in C#.
- JavaScript is used for client-side functionality (e.g., ColorPicker2.js).
- SQL databases (as implied by the SQL script files).
- CSS and theme files are used for styling and consistent look and feel.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        subgraph "Public UI"
            pub1["Default.aspx"]:::public
            pub2["MyProfieMasterPage.master"]:::public
            pub3["PropertyNetMasterPage.master"]:::public
            pub4["PropertyNetSimpleMaster.master"]:::public
        end
        subgraph "User Controls (Public)"
            pubUC1["ucPublicHeader.ascx"]:::public
            pubUC2["ucPublicFooter.ascx"]:::public
            pubUC3["ucAdvertisementBanner.ascx"]:::public
        end
        subgraph "Admin UI"
            admin1["Administration/Default.aspx"]:::admin
            admin2["Administration/frmAdvertisementList.aspx"]:::admin
            admin3["Administration/AdminPropertyNetMasterPage.master"]:::admin
        end
        subgraph "User Controls (Admin)"
            adminUC1["ucAdminMenu.ascx"]:::admin
            adminUC2["ucAdminHeader.ascx"]:::admin
            adminUC3["ucAdminFooter.ascx"]:::admin
        end
    end

    %% Business Logic Layer
    BusinessLogic["Business Logic (App_Code/Classes/BOL)"]:::bol
    BOL1["clsAdvertisement_Logic.cs"]:::bol
    BOL2["clsBuildingType_Logic.cs"]:::bol
    BOL3["clsMember_Logic.cs"]:::bol
    BusinessLogic --> BOL1
    BusinessLogic --> BOL2
    BusinessLogic --> BOL3

    %% Data Access Layer
    DataAccess["Data Access (App_Code/Classes/DAL)"]:::dal

    %% Database Component
    Database["Database (SQL Scripts)"]:::db
    subgraph "Database Scripts"
        db1["PropertySearch Script 2008.sql"]:::db
        db2["property db script 2012.sql"]:::db
        db1 --> Database
        db2 --> Database
    end

    %% Static Assets & Themes
    subgraph "Static Assets & Themes"
        css1["CSS/PropertyNet.css"]:::assets
        css2["Administration/CSS/AdminPropertyNet.css"]:::assets
        themes["App_Themes/PropertyNetThemes"]:::assets
        images["Images"]:::assets
    end

    %% External & Utility Components
    subgraph "External & Utilities"
        ext1["Administration/ColorPicker2.js"]:::external
        doc["Documentation"]:::external
    end

    %% Connections: Presentation -> Business Logic
    pub1 --> BusinessLogic
    pub2 --> BusinessLogic
    pub3 --> BusinessLogic
    pub4 --> BusinessLogic
    pubUC1 --> BusinessLogic
    pubUC2 --> BusinessLogic
    pubUC3 --> BusinessLogic
    admin1 --> BusinessLogic
    admin2 --> BusinessLogic
    admin3 --> BusinessLogic
    adminUC1 --> BusinessLogic
    adminUC2 --> BusinessLogic
    adminUC3 --> BusinessLogic

    %% Connections: Business Logic -> Data Access -> Database
    BusinessLogic --> DataAccess
    DataAccess --> Database

    %% Support: Static Assets link to Presentation Layer (example linking to primary public/admin pages)
    css1 --- pub1
    css2 --- admin1
    themes --- pub1
    images --- pub1

    %% Support: External components linked to Admin UI (as an example)
    ext1 --- admin1
    doc --- admin1

    %% Click Events for Presentation Layer (Public)
    click pub1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Default.aspx"
    click pub2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/MyProfieMasterPage.master"
    click pub3 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/PropertyNetMasterPage.master"
    click pub4 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/PropertyNetSimpleMaster.master"
    click pubUC1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Controls/ucPublicHeader.ascx"
    click pubUC2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Controls/ucPublicFooter.ascx"
    click pubUC3 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Controls/ucAdvertisementBanner.ascx"

    %% Click Events for Presentation Layer (Administration)
    click admin1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/Default.aspx"
    click admin2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/frmAdvertisementList.aspx"
    click admin3 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/AdminPropertyNetMasterPage.master"
    click adminUC1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/Controls/ucAdminMenu.ascx"
    click adminUC2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/Controls/ucAdminHeader.ascx"
    click adminUC3 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/Controls/ucAdminFooter.ascx"

    %% Click Events for Business Logic Layer
    click BOL1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/App_Code/Classes/BOL/clsAdvertisement_Logic.cs"
    click BOL2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/App_Code/Classes/BOL/clsBuildingType_Logic.cs"
    click BOL3 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/App_Code/Classes/BOL/clsMember_Logic.cs"

    %% Click Event for Data Access Layer
    click DataAccess "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/App_Code/Classes/DAL/clsDbConnector.cs"

    %% Click Events for Database Scripts
    click db1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Database/PropertySearch Script 2008.sql"
    click db2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Database/property db script 2012.sql"

    %% Click Events for Static Assets
    click css1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/CSS/PropertyNet.css"
    click css2 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/CSS/AdminPropertyNet.css"
    click themes "https://github.com/mfaransa1/realestatemanagementinc-/tree/main/App_Themes/PropertyNetThemes"
    click images "https://github.com/mfaransa1/realestatemanagementinc-/tree/main/Images"

    %% Click Events for External Components
    click ext1 "https://github.com/mfaransa1/realestatemanagementinc-/blob/main/Administration/ColorPicker2.js"
    click doc "https://github.com/mfaransa1/realestatemanagementinc-/tree/main/Documentation"

    %% Class definitions for styling
    classDef public fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef admin fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef bol fill:#D5F5E3,stroke:#239B56,stroke-width:2px;
    classDef dal fill:#FADBD8,stroke:#922B21,stroke-width:2px;
    classDef db fill:#F6DDCC,stroke:#7D6608,stroke-width:2px;
    classDef assets fill:#D6EAF8,stroke:#2E86C1,stroke-width:2px;
    classDef external fill:#FDEDEC,stroke:#C0392B,stroke-width:2px;
```
