-2

Imagine we have a administrative system that is designed to be as fast and lean as possible, without too much fancy CSS or JS. The UE is not that great, but still it is pleasing on the eyes and gets the job done.

But my question is, is in such situation AJAX and the added overhead in form of JS worth it to save few HTTP requests? I mostly can see how AJAX is a good thing in content rich environment that is made for regular users, but I am not sure it is good to use it where content is not that important and functionality, lean code and speed is king.

1
  • 2
    I am not going to vote to close your question as too broad, but that is what your question probably is. It is generally unanswerable and entirely depends on your and your clients' needs. Yes, you are adding some overhead by introducing JavaScript interceptor for handling the HTTP requests and responses, but the performance drop by doing that is minimal, if that's what you are concerned about. You yourself need to decide that. My personal opinion is, I like UI updates dispatched from AJAX responses, rather than reloading an entire site to see the updated version. But that's me, not you.
    – Andy
    Commented Jul 8, 2016 at 9:24

2 Answers 2

0

I understand your concern that you want to keep JS code to bare minimum and rely on HTML and plain HTTP for all server calls. If your purpose is solved by doing so you can well keep out of AJAX.

But it will be wrong to say that AJAX is useful only in content rich environments.

Asynchronous requests not only provide a faster User Experience but are useful in keeping the code clean and separate as you only post/get/handle data required for a particular functionality.

I am not sure about the requirement of your system, but if you have more than one independent sections on web page which can be loaded and updated separately then Ajax can be useful.

-2

Yes it is. AJAX requests the HTTP too, but what's the best you can do it without reloading page. In example a system where you need to delete single users one-by-one it's more effective to delete them without reloading page, because you don't have to wait until page is loaded when choosing more users to delete. AJAX is more user-friendly.

Not the answer you're looking for? Browse other questions tagged or ask your own question.