With JS, data validation can be done on the client side. So, for example, it is possible to check whether the email entered by a user contains “@” symbol, or to verify that the entered password is correct.
Today there are complex systems that involve analytics of advanced level. That is, a user has an opportunity to rotate columns in interactive tables, to push buttons, etc. To achieve this, queries associated with the required calculations are executed on the server side, and those related to beautiful view are performed in a browser.
First, JS is an interpreted language which is run in a browser. Complex projects always need to have awesome front end. JS and browser are on the top of the programming “chain”, and there is a huge interlayer between the logic and JS. Therefore, when complex calculations are required, JS might be slow. So, the more functionality is needed, the more powerful PC is required to handle this.
Second, different browsers contain different JS interpreters, so bugs happen. Nevertheless, browsers get advanced features, which may lead to new bugs. Thus, there is a need to be prepared for the fact that, when writing the code, the behavior in different browsers should be checked. This task is usually assigned to QA specialists.
Third, JS is rather limited in terms of the following:
Despite the benefits this paradigm provides, a product owner should be aware that search engine optimization may be challenged with this approach. Why is that? Without SPA, a page has a certain URL and content that is not subject to change. If SPA is the case, however, a page has a certain URL, and information is retrieved from various website sections. Say, a user clicks “Company” and gets info about a company, he clicks “Contacts” and gets contact info. The URL stays the same. Therefore, search engines face difficulties when indexing such a website. Nevertheless, capabilities of search engines improve day by day, so, hopefully, soon this won’t be an issue anymore.
Obviously, to deliver a highly functional product, a programmer should write a lot of code. The good news is that today there are many frameworks which allow doing it with ease.
Which framework to choose? This is actually a matter of taste. Although they differ in their ideology, all of them are aimed at making the work with JS easier. In our team ReactJS is one of the most preferable options.
We’ve already covered using JS on the client side. However, there is another aspect that should be noted. The software platform NodeJS, which allows writing server code in JS is spreading more and more. Thus, a single specialist can write both UI and backend easier.
Today there are tools that allow writing an app with JS and HTML. Using this tool, a native app for Windows, Linux and Mac OS can be generated. For complex cases, not everything is so smooth, however. Nevertheless, it does work in simple cases.