H
H
HaruAtari2014-03-09 15:06:15
JavaScript
HaruAtari, 2014-03-09 15:06:15

What to read about the principles of building ajax sites?

Good afternoon.
Tell me, where can I read about how to properly build the architecture of ajax sites?
In general terms, I understand how this should work: the user enters the site, after which the javascripts are loaded and further communication with the server goes through ajax. We get the data in json, insert it into the template and render it on the page.
But, for example, such a situation: there is a page with articles. And the article should open in a new window. It turns out, in this case, the user will again have to pull all the scripts for the new page. It seems to me that this is wrong.
And there are many such incomprehensible moments. Please advise, where can I learn how to build normal sites with a restfull backend?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-03-09
Protko @Fesor

If your articles should open in a new window, then you no longer have a single-page app, which means you yourself have to decide how to resolve what. In any case, if you correctly configure static caching on the server, then you should not worry about js-ki when you enter the page. They will already be in the browser and there will be no overhead at all.
As such, there are no generally accepted rules on how to build "standard sites" with a restfull backend (you follow restfull and that's good), usually indexing by search engines is important for sites, so I advise you to read about Google's ajax crawling (yandex and bing have the same thing). From this it will be possible to dance. Well, so ... take some popular framework like angularjs or a library like backbone (if you only need to organize the structure and navigation, I think it will be easier), there are also plenty of tutorials.

V
Vitaly Zheltyakov, 2014-03-09
@VitaZheltyakov

In my opinion, you are drawn to the FullAjax area (technology). I would recommend reading about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question