JSON Configurable Personal Site
github.com
github.com
Doing these with a backend is not fun at all: it is too easy to program (you know that with a node server you could do way more than a "JSON configurable personal site"), but it also consumes too much resources to run. So if you could do it without a backend, why not?
Creating a site from a json file sounds good. I defintely want to play with that, but what is required on server?
I have had to configure some relatively large forms in an application using JSON. Its not a particularly easy to read format, and when the nesting is deep its easy to loose a brace, or not notice a trailing comma in a list.
(I don't know if YAML solves all of those problems, but it certainly looks easier to read).
Just look at the YAML spec - http://www.yaml.org/spec/1.2/spec.html
compared to JSON - http://json.org/
and JSON is already everywhere (as a built-in library, a known mime type, etc). I have to go out of my way in order to use YAML.
I guess the other reason is that I never trust projects with names like "Yet Another..." because I feel like it conveys a lack of craftsmanship. Looking at that YAML spec again today, it looks like every feature was thrown into it with little to no discrimination.
Anyway, I didn't say that I don't use it because of the length of the spec. I said I don't use it because it's orders of magnitude more complex than JSON and I used the spec as an example of that. A bigger spec means a bigger parser and a higher probability that other people will not limit themselves to the parts that "you generally use".
To that, I added that JSON is everywhere already and YAML isn't. My point about the name seems a little silly, but my intuition has served me well over the years.
For example, instead of hardcoding some setting in JSON, a Javascript configuration file could perform queries before configuring, or it could install callback functions as part of the configuration.
Ultimately, it's not about the language, it's about the simplicity. If you need more that what this does, you can go out and do that, but this looks like a wonderfully simple system where I can just write some information about myself and it uses that to build a site.
Because it's more powerful. More powerful, in many cases, is a worse thing. Executable imperative code isn't as flexible as a data file because all you can really do with it is execute it and take the output, rather than process it as you see fit.
See:
Rule of Least Power – https://en.wikipedia.org/wiki/Rule_of_least_power
Principle of Least Power – http://c2.com/cgi/wiki?PrincipleOfLeastPower
Take for instance the idea of the "semantic web", where information is stored neatly into proper html tags. It has turned out that this is not a very useful approach to storing information, and nowadays big search engines use machine learning techniques instead to extract the information.