Synchronous Asynchronous RESTful Routing

Conclusion 1:
Ajax web application model = asynchronous client server request response
classic web application model = synchronous client server request response (means reloading all the assets for every request)

Conclusion 2:
An API that adheres to the principles of REST does not require the client to know anything about the structure of the API.

Conclusion 3:
Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index, show, new, edit, create, update and destroy actions, a resourceful route declares them in a single line of code.

1- What exactly is routing in frameworks ?
2- How to mix REST and AJAX to achieve requests/responses (without page refresh) ?
3- Is AngularJS is a good option for RESTful AJAXing ?

That depends. There are several ‘levels’ to a REST implementation and not all RESTful APIs go as far as implementing level 3, which is about including discoverable hyperlinks in the response.

Routing is where you specify the URLs that your application/API makes available, and which code will be executed for each route.

I’m not sure what you’re asking here. You can access RESTful APIs over AJAX the same as you can for any other kind of URL, and you can update web pages dynamically via AJAX without having to use REST.

That depends on how comfortable you are with Angular, as it does have quite a steep learning curve compared to other JS frameworks. Angular comes with the ngResource module which is designed for working with REST APIs, but there are other frameworks/libraries such as Backbone which are setup to use RESTful back-ends by default.

I disagree with this assessment.
ANY Web-based (browser based) interaction is asynchronous. In other words, there is no special knowledge about the connection and it is temporal. The client sends a request (that is a single, independent activity) and then server responds (another single, independent activity). Then the process repeats.
AJAX is just another way of sending the request and recieving the response.

I’m not sure I understand what you mean - for a tradtional non-AJAX app, each action can only make a single request to the server at a time (synchronous), whereas using AJAX an app can make multiple requests simultaneously - therefore from the point of view of the app, communication is asynchronous, surely?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.