Modern Web: SPA/REST

Asked

Viewed 323 times

1

Speaking on the modern web, we have new concepts like SPA/Rest and I keep some doubts.

Is it correct to focus/study these concepts? Since they have emerged as an improvement on some old concepts.

Is it feasible always or when you can use SPA/Rest? I know that with a Rest in hand I can use it to serve several other applications, such as mobile apps, stability and etc.

For safety reasons, is it safe to use a SPA? In a talk about SPA, that the validation focuses on the front, however I would not stop to do the validation on the server, I think it has no sense to do this.

I speak in systems of all contexts, sizes, objectives and etc.

I know that many of these things are not so new, being present on the web for a long time, but many concepts are still proposed "old".

  • Client-side validation makes sense to decrease server load and to make the user experience more agile (client-side validation is always faster). Of course, it doesn’t replace server validation, but instantly validating improves the user experience without burdening the server.

  • So in the case could continue using both sides, but with an advance of the client, although I find unsafe, because it is possible to manipulate javascript.

  • Not unsafe because the final validation is on the server.

  • Sorry, I ended up expressing myself wrong, I meant that I would still find insecure if it was totally on the client and not on the server. If it’s both of us, I agree.

1 answer

3

The correct thing to do when joining the web is to focus/study these concepts?

Yes. It’s always good to be up to date with new technologies. SPA means Single Page Application, is a new web and mobile application development model that has been gaining prominence in large companies like Microsoft, Google, Twitter, Facebook, etc. It basically means coding less on server-side and more in the client-side. That is, the application will be contained all or almost all in the client (within the web browser). It’s practically a desktop application running under the browser.


It is feasible always or when you can use SPA/Rest?

Everything has its advantages and disadvantages.

  • Upside:

    • Balancing the responsibility of execution between client and server
    • Less server code, more customer responsibility;
    • Improve user experience (UX) by creating an interface with modern usability and easy user understanding;
    • Lower bandwidth consumption, as data loads are made by demand and by AJAX.
  • Downside

    • Lots of code JavaScript to manage in the browser, loading the home page can be very slow (once you have to load and run a ton of JS). If you use a web server JavaScript as Node.js, you can partially resolve the last two issues by making the server-side same page.


For safety reasons, it is safe to use a SPA?

According to this website, nay. Why these types of applications are called "unreliable clients" since our server-side code has no control over the environment in which to run. Even regular web applications have these problems. People can easily change or inject code JavaScript on a page through the developer console. Mobile apps, such as those on Android and iOS, can be compiled and inspected. As such, you would not like to incorporate sensitive information such as secret keys or passwords into these types of customers.


References:

  • I’m not saying that your answer is wrong, this 'theoretical' part I already knew, until some of the sites you gave reference I had entered, but what kill themselves are the doubts I put here in the question.

  • @Martial, I edited the answer emphasizing your questions.

  • It was bad if earlier case I seemed "arrogant" or something like that, and I ended up not asking if I could complement with education, already I will read again, grateful. @Taisbevalle

  • @Martial, no problem, I thought you wanted to know a little of the theory too, with your comment I could improve the answer =)

  • It really, will depend on the situation and what the client wants, requirements, whether the focus is more on usability, available architecture and etc. I come from the back, and am not a fan of javascript syntax(typescript -), but since I can’t count on someone as front, I’ll have to become "full-stack" or at least almost kkk' that. About Rest, even if you have not commented, following the same situation of the SPA, not fitting in all situations, it is of great relevance to be able to serve several applications and even distribute their services and etc, Please, thank you @Taisbeballe

  • @Martial, you are welcome =)

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.