2014-11-12
| ||
15:06 | • Fixed ticket [bd94c11ab1]: Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content plus 4 other changes artifact: f1568d1362 user: ab | |
2014-10-27
| ||
15:21 | {413} updated MVC/MVVM [bd94c11ab1] documentation check-in: 0d4110cd46 user: User tags: trunk | |
2014-10-24
| ||
19:40 | {393} finishing documentation about MVC - [bd94c11ab1] feature request check-in: cdc7ed74b7 user: User tags: trunk | |
13:25 | {392} enhanced thread-safe of our MVC process as requested by [bd94c11ab1] check-in: a068f606ca user: User tags: trunk | |
2014-10-23
| ||
21:28 | {387} small fixes about sample 30 for MVC request [bd94c11ab1] check-in: 7369b698b8 user: User tags: trunk | |
21:27 | {386} documentation refresh - including latest mORMot MVC features - see request [bd94c11ab1] check-in: c697a47dc2 user: User tags: trunk | |
16:05 | {383} in our MVC [bd94c11ab1] model, {{TSQLMyRecord.HtmlTable MyRecord}} Mustache tag will now create a HTML table containing all information about the supplied MyRecord fields (from the current data context), with complex field handling - see e.g. {{{TSQLAuthor.HtmlTable Author}}} in AuthorView.html check-in: c802573c64 user: User tags: trunk | |
2014-10-22
| ||
11:39 | {374} allow URI level redirection for mORMot MVC - [bd94c11ab1] check-in: 0ed1ebfc44 user: User tags: trunk | |
2014-10-21
| ||
21:11 | {371} added some views to the mORMot MVC sample for [bd94c11ab1] - not yet finished check-in: 812812e29e user: User tags: trunk | |
20:13 | {370} fixed cache implementation and added /root/.static pseudo URI to server some static content needed by the views for feature request [bd94c11ab1] check-in: d5f9dbfe1a user: User tags: trunk | |
2014-10-20
| ||
21:05 | {363} added cache for mORMotMVC.pas as requested by [bd94c11ab1] check-in: b889a76d6c user: User tags: trunk | |
17:26 | {360} next step for mORMot MVC implementation - for feature request [bd94c11ab1] check-in: 92eb245754 user: User tags: trunk | |
10:05 | {358} mORMot MVC implementation refactoring - for feature request [bd94c11ab1] check-in: 725e2262b1 user: User tags: trunk | |
2014-10-19
| ||
08:08 | • Ticket [3a79adc10f] FPC support status still Open with 6 other changes artifact: 673112afbb user: ab | |
2014-10-18
| ||
07:58 | {354} enhanced mORMot MVC implementation - for feature request [bd94c11ab1] check-in: 0d31663d3b user: User tags: trunk | |
2014-10-17
| ||
16:07 | {350} introducing mORMotMVC.pas unit able to implement full MVC web applications, using mORMot ORM for the Model, Mustache templates for Views, and a pretty unique interface-driven way of defining a Controler (just take a look at MVCViewModel.pas unit in sample 30) see feature request [bd94c11ab1] (not yet finished) check-in: fae587bc9d user: User tags: trunk | |
2014-08-23
| ||
14:49 | • Fixed ticket [48e30e0e05]: Allow incoming parameters to be encoded as a JSON object plus 4 other changes artifact: 4bb669e6cf user: root | |
14:49 | TServiceMethod.InternalExecute() now allows incoming parameters to be encoded as a JSON object, alternatively to a JSON array - see feature request [48e30e0e05] - will also be used probably to implement our MVC model - see [bd94c11ab167] - updated documentation, about this enhancement of transmission content, and about using a CDN service for hosting and scaling check-in: 85b9c26c5e user: User tags: trunk | |
12:52 | • Ticket [bd94c11ab1] Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content status still Open with 4 other changes artifact: 38239f651d user: root | |
08:01 | • Ticket [bd94c11ab1]: 4 changes artifact: c36224af08 user: root | |
2014-06-27
| ||
10:12 | • Ticket [bd94c11ab1]: 3 changes artifact: ec26e8c780 user: root | |
10:12 | • New ticket [73c1da3c40] UI automatic mapping (via "Mediator" or "MVVM" patterns). artifact: 06b2a4c4a7 user: root | |
2014-06-10
| ||
09:17 | • Ticket [bd94c11ab1] Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content status still Open with 1 other change artifact: ef63953260 user: ab | |
2014-04-26
| ||
14:33 | added {{mustache}} template support for mORMot - high speed pure Delphi logic-less template system, with unique extensions - see feature request [bd94c11ab1] about implementing straight MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content check-in: c3effdb5a0 user: User tags: trunk | |
2013-11-07
| ||
14:17 |
| |
2013-11-06
| ||
16:48 | • Ticket [bd94c11ab1] Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content status still Open with 3 other changes artifact: 971325ad54 user: ab | |
16:48 | • New ticket [651c13009b] Implement method/interface-based services in JavaScript. artifact: 0e3d3a4a34 user: ab | |
14:50 | • Closed ticket [8c8a2a880c]: Custom Authentication classes plus 2 other changes artifact: bb48cc960b user: ab | |
14:49 | • New ticket [bd94c11ab1] Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content. artifact: a7f97fce37 user: ab | |
Ticket Hash: | bd94c11ab167d0a075fa1c3918b60f2c2fdd0b85 | |||
Title: | Implement MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content | |||
Status: | Fixed | Type: | Feature_Request | |
Severity: | Important | Priority: | High | |
Subsystem: | mORMot | Resolution: | Implemented | |
Last Modified: | 2014-11-12 15:06:39 | |||
Version Found In: | ||||
Description: | ||||
We would like to introduce a new MVC model (like RoR) in mORMot, for the exact purpose of serving WEB content.
Note that a generic caching mechanism should be made available, to improve service responsiveness. This cache may be handled at View level, and/or at Controller level, depending on the business logic. ModelThe MODEL would be the main mORMot's ORM model. ControllerThe CONTROLLERS would be dedicated classes (inheriting from an abstract TMVCController class), which will compute the data to be viewed within:
Output of the controller would be a JSON object, similar to the Mustache HASH: { "header": "Colors", "items": [ {"name": "red", "first": true, "url": "#Red"}, {"name": "green", "link": true, "url": "#Green"}, {"name": "blue", "link": true, "url": "#Blue"} ], "empty": true } To compute this JSON object, we would expect the following:
All server-side methods (ORM and services) would be usable to compute the resulting JSON object. ViewThe VIEWS would be dedicated classes (inheriting from an abstract TMVCView class) for rendering the JSON object as computed by the CONTROLLERS into HTML or any other mean. We propose to implement:
Typical Mustache template may be: <h1>{{header}}</h1> {{#items}} {{#first}} <li><strong>{{name}}</strong></li> {{/first}} {{#link}} <li><a href="{{url}}">{{name}}</a></li> {{/link}} {{/items}} {{#empty}} <p>The list is empty.</p> {{/empty}} Which may be rendered as such: <h1>Colors</h1> <li><strong>red</strong></li> <li><a href="#Green">green</a></li> <li><a href="#Blue">blue</a></li> <p>The list is empty.</p> Mustache has some nice features, like partial templates (which are some kind of "include"), and the ability to execute a function (see lambdas in its manual) before rendering the content. ab added on 2014-06-10 09:17:12 UTC: | ||||
User Comments: | ||||
root added on 2014-06-27 10:12:54:
Linked to [73c1da3c401eccaf0c], which is similar to this feature request, but for Delphi VCL/FMX UI. root added on 2014-08-23 08:01:12: This model is pretty close to the MVC implemented in AngularJS.
Our data context is indeed the same "glue" between the view and the controller.
See the Angular official tutorial for details about it. root added on 2014-08-23 12:52:35:
[48e30e0e05] feature request did let Here, the same rules applies all all routing mode:
This feature request may be used directly in our MVC model: the incoming parameters of the controllers or the view may be defined as a JSON object, and Since the MVC feature would most of the time be executed in the same process, on the server side, having a whole context supplied to the method won't be a problem. Process cost on the server side will be negligible, since our implementation will just ignore those unexpected properties, without allocating any memory for them. ab added on 2014-11-12 15:06:39: I suspect we reached some point of stability of this feature request. See the corresponding documentation available online. Any further modifications may be handled as separate bug fix or feature request tickets. |