-
-
Notifications
You must be signed in to change notification settings - Fork 10
Main Simplify.Web principles
Alexanderius edited this page Jul 3, 2025
·
8 revisions
Uses MVC pattern
- It has controllers (which process HTTP requests)
- Views (which generate page content; not needed for small pages, because StaticTpl or Tpl controller responses can be used). Or just view model classes used by API controllers to generate JSON responses or create view models from JSON requests
- Model - your entity classes
Uses MVVM pattern
- Controllers can create a view model based on the HTTP request using
Controller<T>
,Controller2<T>
, andAsyncController<T>
base classes and theModel
property - Can serialize the view model to the HTTP response body
- Simplify.Web receives an incoming HTTP request
- Creates instances of controllers (which can handle the current request) via the Simplify.DI IOC container
- Executes controller instances
- Processes controller responses
- Builds page:
- Loads the
Master.tpl
template - Inserts data from the
DataCollector
class into it - Sets Simplify.Web variables
- Loads the
- Sends the generated page to the client
- If a controller returns
Redirect
,Content
,Json
, orStatusCode
responses, then steps 5 and 6 will be skipped - If the current request is for a static file and it is available to process (exists), then it will be processed by the static files request handler and step 2 and above will be skipped. This behavior can be changed depending on how you set up your application. For example, you can enable Kestrel or IIS static files handler, then Simplify.Web will not process static files.
If all your controllers use only non-template responses (such as Json
, Content
, StatusCode
, Redirect
, etc.), then the templating engine (and all required files for that, such as Master.tpl
) can be skipped completely.
- Getting Started
- Main Simplify.Web principles
- Simplify.Web controllers
- Simplify.Web views
- Simplify.Web templates
- Simplify.Web configuration
- Templates variables
- Static content
- Template factory
- Data collector
- String table
- File reader
- Web context
- Environment
- Dynamic environment
- Language manager
- Redirector
- HTML