-
Notifications
You must be signed in to change notification settings - Fork 16
Examples
Rosario Carvello edited this page Mar 18, 2020
·
18 revisions
Into WebMVC package you will find different examples of source code files located under examples
folder.
All these examples are organized into the following subsystems:
- examples (main subsystem)
-
- about (it contains a simple demonstration of coding a source code information helper)
-
- cms (it contains general examples about showing contents by using WebMVC)
-
- db (this subsystem contains some DB related examples)
Below is the directory structure:
You can alls run a demo here
As we just described in the previous page a subsystem, in WebMVC, is identified at two levels:
- a physical level by pathname, for example, the pathname
examples/cms
identify the subsystemcms
which is contained into the main subsystemexamples
; - a logical level, that you can use for referring it in your source code, by namespace, in this case, is the name
examples/cms
(equivalent to its pathname).
For each subsystem, WebMVC uses a directory to physically store all its classes and uses a namespace to refer each class when it needs to be instantiated and executed; directories and namespaces must have identical names that are conventionally written in lowercase.
In conclusion, you need to take in mind that there are now two decomposition levels when writing code with WebMVC:
- First is the MVC decomposition (directories: controllers, models, views and templates)
- Second is provided by the structure of the application subsystems. Inside those two levels live each WebMVC assembly, a logical definition for representing with a unique name the aggregation of the model, view, controller and, template.