git.s-ol.nu mmm / e69acb9
add ba_log entry 2019-10-09 s-ol 3 years ago
3 changed file(s) with 41 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
77 | `/fileder/facet: type/subtype -> wrapped/type` | `/path/to/fileder` | `facet` | `type/subtype -> wrapped/type` |
88 | `/fileder/: some/type` | `/fileder` | (default facet) | `some/type` |
99 | `/fileder/alternate:` | `/fileder` | `alternate` | `text/html` (default type) |
10 | `/path` | `/path` | (default facet) | `text/html` (default type) |
1011 | `/` | `/` | (default facet) | `text/html` (default type) |
1112
1213 The fileder-index metadata was moved to a `?index` 'pseudofacet' (e.g. `/fileder/?index`).
14
15 **EDIT 2019-10-09:**
16 > I will take this chance to show and hopefully explain the point of this all again:
17 > With the system running it is now possible to demonstrate the type-coercion that powers the system.
18 >
19 > In the system, every piece of data (the *facet*s) is stored together with it's *type*.
20 > When requesting data, it can of course be loaded with that *type*, yielding the data unmodified,
21 > but it is also possible to demand a different *type* that may be more useful to the receiving application.
22 >
23 > as an example we can take for example this article about one of the internal libraries for writing HTML documents:
24 > [`/meta/mmm.dom/`](/meta/mmm.dom/).
25 >
26 > The path `/meta/mmm.dom/` corresponds, according to the table above, to the default facet of the `/meta/mmm.dom` fileder,
27 > and since no type was specified, it is assumed that the browser wants a `text/html` document.
28 > The follwing path gives the same result, but makes this explicit:
29 > [`/meta/mmm.dom/:text/html`](/meta/mmm.dom/:text/html)
30 >
31 > now, instead of asking for the rendered HTML document, we can also ask for the source, which is of the type
32 > `text/moonscript -> mmm/dom` (a Moonscript-script file that evaluates to a website-fragment):
33 > [`meta/mmm.dom/:text/moonscript -> mmm/dom`](/meta/mmm.dom/:text/moonscript%20-%3E%20mmm/dom)
34 >
35 > or, we could ask for the generated html fragment, but without the full HTML layout around it -
36 > that would be the type `text/html+frag`, as mentioned in the last post:
37 > [`meta/mmm.dom/:text/html+frag`](/meta/mmm.dom/:text/html+frag)
38 >
39 > lastly, we could also ask the system to generate a link to this content, in the `text/html` format (`URL -> text/html`):
40 > [`meta/mmm.dom/:URL -> text/html`](/meta/mmm.dom/:URL%20-%3E%20text/html)
41 > this might seem somewhat redundant, since we need a link to access this link,
42 > but it can be useful when a component cannot work with binary data directly, e.g. when mentioning or embedding an image
43 > or a video file.
1344
1445 I also added support to the server for serving static assets (e.g. the CSS stylesheet) from the `static` directory.
1546 These files are accessible through the `/.static/` route (e.g. `/.static/main.css`), where they shouldn't interfere
0 I added another driver/store that loads files straight from disk \[[`86bbe80`][86bbe80]\],
1 and made the server load the fileder tree when it receives a request for content, rather than loading the whole tree up front.
2 This means that I can work on the content again and see changes in the browser without restarting the server every time \[[`97bc4a0`][97bc4a0]\],
3 This feature should be made unnecessary by the in-page editing feature, but until then it's important for my workflow.
4
5 I also started cleaning up the mmmfs article a bit, and integrating this project log in a way that will make it available online soon5f78953becd422126a528b2c31dd611cb0b29ef6
6
7 [86bbe80]: https://git.s-ol.nu/mmm/commit/86bbe805a7ec49a8b891412713ea43d6e46d0d73/
8 [97bc4a0]: https://git.s-ol.nu/mmm/commit/97bc4a0d8d866026905eac6f0ba08b75f166219a/
1515 input, select, button { color: initial; }
1616 tt, code, kbd, samp { font-family: monospace; }
1717 code { font-size: 0.8em; }
18 b { font-weight: bold; }
18 b, strong { font-weight: bold; }
1919 em, i { font-style: italic; }
2020 a { font-size: 1em; cursor: pointer; }
2121 hr { clear: both; }