Pros and cons of a 100% HTML/Javascript web application

Asked

Viewed 1,091 times

11

I am seriously thinking of developing a web application, using only HTML/Javascript on client-side for performance gain and by which, any and all necessary communication with the server is made through requests to a Webservice (there will contain my business rule).

I would like you to quote (technically) the pros and cons of this technique.

  • This type of question will have a lot of response based on opinions, but there may be a deeper technical part, if you leave the question a little more "closed" to technical questions, try to give an improved text of the question. (:

  • Iago, I suggest you change the title. I don’t know if "100% HTML/Javascript application" gives the right idea. Maybe it would look better: "Pros and Cons of a Single Page Application (Single Page Application)".

  • One more thing: I reopened the question because after editing it got better. It is possible to answer objectively pros and cons of this technique. The answers below sound strange to start with "In my view" and "In my opinion", which occurred because the question was not so well formulated, but still added some pertinent information.

5 answers

14

Obviously all pros and cons depend not only on the technique used but also on the actual implementation.

Pros

  • Better user experience responding faster and without breaks in information flow. User does not see the mechanism working.
  • Server load reduction that does not need to "render" pages, only works with data.
  • Smaller volume of traffic data (in most cases not much difference). There is usually a noticeable gain in performance.
  • There is a greater decoupling between what is on the server and the client. It gives more freedom to the designer. Eventually can increase security.

Cons

  • Obviously the Javascript requirement (or other language) working correctly.
  • Problems with SEO (no, the fact that Google interprets JS, did not solve the problem).
  • It is common to have more security breaches exposing things you shouldn’t (primarily XSS). Exposure can cause other problems as well.
  • An application like this running a long time in the browser can be resource-consuming, especially if there is a resource leak, which is common.
  • There are cases where you need to duplicate server code on the client.
  • The initial charge may be higher and cause frustration (bad UX).
  • It’s not simple to do it right.

There are some things that people complain about that are not problems anymore.

Obviously I may have forgotten something.

9


Pros :

  • Webdesigners have great ease with this architecture.
  • Your application is easily integrated with other systems. So you must create an API to connect with your frontend. Soon it is possible to create multiple frontends,
  • Facility for unit testing.

Cons :

  • Duplicate Validations. More than ever, you need to develop server-side and client-side validations. Never trust a validation that is only on the client’s side.
  • Beware of Javascript frameworks that are still in the ripening stage, can generate rework.

3

I had made a mistake of interpretation of the question, so I decided to restructure my answer. I hope it helps in solving your question.

Pros:

  1. Centralization of access to the data source which facilitates the analysis of use, performance.
  2. Easy maintenance/updating of the public part of the application
  3. Code sharing

Cons:

  1. Processing overload
  2. Blocking architecture, since a processing using shared resources waits for a dependent process to end before booting another.
  3. Difficulty matching visual behavior across platforms and devices.
  4. High Internet Connection/Dependency.

A Hug.

Vinicius

  • Hello, Vinicius. Welcome to [en.so]! I know the title of the question speaks of HTML and Javascript, but the question is actually asking the pros and cons of making an asynchronous system, as is Gmail and other applications that do not update the page, accessing all information via web services.

  • 1

    Thanks Luiz. I’m new here, and I’m having a hard time learning how to use this platform. When I started my career, I had great help from this community, and I would like to return this help, contributing to those who are going through what I went through, so any tip (links , articles) will be welcome to learn how to generate quality content. Thank you!

0

Pros:

  • No Framework or library dependency;
  • Easy maintenance;
  • Simple code;
  • Greater absorption of characteristic knowledge about language.

Cons:

  • Verbose codes
  • Increase in the structure of the application
  • Reinvent the wheel;
  • Rework if not well structured.

0

In my view this is the best way to work on the Web, because most other work models, traffic HTML from server to client and this doesn’t make much sense. This way you get a performance gain, only traffic necessary data.

Working this way you can take advantage of your front code and package it with phonegap, so create web apps without having to program again.

For SEO issues like Afonso, there are tools or ways of working that help you with this. For example if you use Angularjs which is something that really complicates SEO, you can use Prerender (https://prerender.io/), that helps you in SEO.

I don’t particularly see the downside of working that way.

Browser other questions tagged

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