C
C
cvbcvb cvbcvbcvbcvb2015-01-02 22:20:07
PHP
cvbcvb cvbcvbcvbcvb, 2015-01-02 22:20:07

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

5 answer(s)
V
VZVZ, 2015-01-03
@VZVZ

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.

D
Dmitry S, 2015-01-02
@Hakkunamatata

If such a question arises, then, probably, it is not worth it.

P
Peter, 2015-01-02
@petermzg

So there is no difference. In both cases, a normal network request.
Yes, and PHP is server-side code, and ajax is client-side.

D
Dmitry Kovalsky, 2015-01-02
@dmitryKovalskiy

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.

A
Andrey Shedko, 2016-01-21
@Mamboking

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 question

Ask a Question

731 491 924 answers to any question