...
The Controller acts as an intermediary between the View and the Model. It processes business logic and user requests, manipulates data, and renders the output through the View.
In noKodr, the Controller's role is handled by
Workflows
,Events
, andAttributes
.
Info |
---|
References: |
Responsibilities:
Receive and interpret user input.
Update the Model based on user actions.
Select and display the appropriate View.
...
The View is responsible for displaying the user interface. It gathers data from the Model through the Controller and presents it to the user.
In noKodr, the View is represented by
Layouts
,List Views
, andApplications
, with20+ customizable components
andcharts
for layouts.
Info |
---|
References: |
Responsibilities:
Render data in a specified format.
Display UI elements.
Update the display when the Model changes.
...
The Model manages all data-related logic. It retrieves and manipulates data from the database and responds to requests from the Controller.
In noKodr, the Model is represented by
Models
,Variables
, andRemote Action Classes
. Models can be of two types:Record Type Model
andAPI Type Model
.
Info |
---|
References: |
Responsibilities:
Manage data with CRUD operations (Create, Read, Update, Delete).
Enforce business rules.
Notify the View and Controller of state changes.
...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
For example, imagine an end-user needs to view account details and related contacts in a unified view. A request for this data is initiated through the View (i.e., Layout). The Controller (i.e., Workflow) then queries the Model (i.e., Record Type Model) to retrieve the required Account and related Contact information. |
Advantages of using MVC for noKodr
Separation of Concerns
MVC divides noKodr applications into distinct components:Model
,View
, andController
, making it easier to manage. For example, business logic (Model) is separated from the user interface (View), allowing independent updates without breaking the overall application.Easier Maintenance and Updates
By separating UI, logic, and data, developers can maintain and extend each part of the application more easily in noKodr. Updates to workflows (Controller) can be made without affecting the data handling (Model) or UI layouts (View).Parallel Development
Teams working in noKodr can develop the View, Model, and Controller components simultaneously. For example, while one developer customizes layouts using noKodr’s visual components, another can work on workflows, and yet another can focus on configuring data models.Reusable Components
The MVC architecture in noKodr encourages reusability. The same Model can be used across multiple Views, or a single workflow (Controller) can be reused with different layouts. This reduces the effort required to create new applications and improves consistency.Supports Test Driven Development (TDD)
noKodr's modular structure allows the independent testing of each MVC component. For instance, data management in the Model can be tested separately from the UI logic in the View. This leads to more reliable applications.Enhanced User Experience
In noKodr, the View components (layouts, list views, etc.) are highly customizable, providing a flexible and polished user interface while the underlying logic remains intact. MVC enables the UI to adapt easily to changes without modifying the core functionality.Efficient Data Management
Using noKodr’s Model components like Record Type Models or API Type Models, MVC facilitates efficient data handling, CRUD operations, and business logic enforcement. The separation ensures better data security and integrity.Scalability and Flexibility
The modularity of MVC allows noKodr applications to scale efficiently. As business needs evolve, new features or components can be added by updating or creating new Models, Views, or Controllers, without overhauling the entire application.