Answer the question
In order to leave comments, you need to log in
Should I register for Ajax?
Hello. Here is a question. I am doing a mini project. I chose React as my front-end framework. But that's not the point. This web application will have registration (YEAH?!). Applications - like instagram. To make it easy to understand. You can take inst as a subject of thought. Is it worth doing this registration on Ajax? Or make a simple reg in PHP and make a regular redirect after registration. How is it generally better? What are you using?
Answer the question
In order to leave comments, you need to log in
If at least in the future you plan, in addition to the actual web muzzle (HTML + CSS + JS), to write also a mobile / desktop client, and registration support is planned in it, then it’s better to do AJAX, and not just AJAX, but convenient, slender REST API with JSON. It really makes it easier to write additional clients.
After all, in the client you will have to make these back-end requests in some Java (if under Android) (those that the web muzzle makes), and send a request from java in the application/x-www-form-urlencoded format ( and even more so to receive a response in the form of HTML, which is then painfully parsed with regular expressions or libs like jsoup) - obviously not very convenient, and performance is also not very good - HTML is always redundant. It is better that at least the response contains JSON, and this already requires AJAX.
So there is no difference. In both cases, a normal network request.
Yes, and PHP is server-side code, and ajax is client-side.
If you want to make "if only there was" - make the usual one. If you want a bit of bumps and experience - do it on Ajax. And it doesn't matter at all. User registration is the smallest part of the planned functionality.
If something more than just filling in the fields is expected (for example, checking the login for employment, etc.), then it is difficult to do without JS + Ajax.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question