|
|
|
|
|
by lhorie
1758 days ago
|
|
I believe the objection is that "SDUI" amounts to re-implementing a poor man's "browser" except that it calls JSON.parse instead of HTML.parse, and it doesn't bother implementing a layout constraint engine. i.e. there's not much difference between `{"label": {"text": "Rocky Mountain", "fontSize": 11}}` and `<label text="Rocky Mountain" fontSize="11" />` The general problem that arises from "reinventing the wheel" is that people implementing these SDUI things don't necessarily have experience with layout engine design. Case in point, look at the example: ...
{
"padding": [7, 14, 7, 14],
"image": ...
"label": ...
}
...
This doesn't strike me as a schema that someone poured a lot of thought into, with regards to encapsulation/composition principles. It pretty much looks like a case of shaping things on a as-needed basis, only to later realize that a change to the rendering code is needed if, say, you need to tweak the space between the label and the image, or flip them around or bold/superscript some text or whatever. |
|