7
Adapting a Drupal theme to pure HTML with a tight schedule as expected, the code came out a little more complicated than I’d like.
In this way, I had the opportunity to explore JSON and some of its functionalities
and decided to create an archive data.json
to feed all texts of the site and make it possible, in addition to the easy editing of these, in the near future to support other languages.
Follow JSON excerpt for analysis:
{"Textos": {
"TituloDestaque":"Lorem ipsum dolor sit amet,",
"CorpoDestaque":"<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>",
"Sobre1":"<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>",
"Sobre2":"<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>",
}}
This negatively affects the performance of a medium to large site?
The link I had access to test is brute, for lack of a better word, so I didn’t get a conclusive metric.
I’m talking about the order of 200~300 parameterized paragraphs in a JSON file called by 8~10 pages for medium sites and 750~1000 paragraphs on 20+ pages on large sites.
If it is not correct to solve in this way, what would be the option without using BD?
I believe that this will get Ruin for the clients, because the json will be processed by the browser and not by the server that would deliver everything ready, so the performance site would be low performance for less robust computers but download the server, it would be good to balance their work
– RodrigoBorth
@Felipefonseca now that I saw that it is a pure html site... considering that you have two options xml or json, and I think json really is the best option between the two...
– RodrigoBorth
http://www.ziggytech.net/technology/web-development/how-big-is-too-big-for-json/
– Andre Figueiredo
@Filipe.Fonseca Code editing that improves readability without changing logic are welcome! I changed the code by breaking lines without altering the logic to avoid scrolling. See more on http://meta.pt.stackoverflow.com/questions/749
– Andre Figueiredo
@But it changed the logic. My Jscript uses those markers, each one of them.
– Filipe.Fonseca
Read the @Gabe response
– Filipe.Fonseca
@Your link in the comments explains exactly what I would like. I ask you to please formulate an answer using it which will be a pleasure to accept it and +1.
– Filipe.Fonseca
@Filipe.Fonseca ah, right! I must have accidentally removed the transponders.
– Andre Figueiredo