The Good and the Bad of JavaScript Full Stack Development

JavaScript is everywhere. If you are able to read this article or browse through your Facebook news feed, it is mostly due to this single technology.

One of the most popular programming languages and a dominant web development technology, JavaScript has been around for over 20 years now. Being initially bound to front end engineering, the language has seen even more growth in popularity after an ability to use it on the server side was represented. Ever since there has been a heated discussion going on about the use of full stack JavaScript.

Having 7+ years of JavaScript engineering experience, we were able to form our own opinion on the topic, which we would like to share with you. In this article, we will discuss the pros and cons of JavaScript full stack development and its best areas of application. But first, let’s talk about the concept of being a full stack developer.

What Is Full Stack Development?

It is almost impossible to create a full-fledged software product using only one technology. This usually involves complete tech stacks — Standard combinations of tools and programming languages. As all software products consist of the client side and a server, there are usually two separate stacks that cover each of the layers. However, there are approaches that can be used to build web or mobile application from A to Z. These are called full stack development.

Accordingly, a generalist that has broad skills across all aspects of product engineering is usually called a full stack developer.

Being considered unicorns due to their rare expertise and versatility, they are in high demand for large companies and startups alike, from Facebook and eBay to Munchery, Betterment or Tinder.

Yet, a full stack developer does not necessarily need to know a dozen programming languages. JavaScript alone can be used across all software layers. Therefore, a person who applies the language for both front end and back end programming is called JavaScript full stack developer. Taking into account the undisputed popularity of the programming language, such engineers are probably the most sought after specialists in web development.

One JavaScript, Different Technology Stacks

When talking about full stack JavaScript the first thing that comes to mind is the MEAN stack. It is a technology bundle that includes MongoDB, Express, AngularJS, and Node.js.

However, with the rapid growth of this approach, more alternative options for full stack JavaScript development are added. server side JavaScript programming relies primarily on a Node.js environment and Express web framework, other Node.js-based tools, such as Meteor, Sails.js, Koa, restify, or Keystone.js, might be used as well.

The choice of possible frameworks for the front end JavaScript is even greater. Aside from traditional AngularJS or AngularJS 2.0 frameworks, numerous libraries, such as React, Vue.js, knockout.js, or Backbone.js, are typically used, depending on the project specifics.

As for the database, almost any MongoDB alternative can be used: MySQL, PostgreSQL, Apache CouchDB or Apache Cassandra.

The Pros of Full Stack JavaScript Development

The fact that companies like Groupon, Airbnb, Netflix, Medium and PayPal adopted the full stack JavaScript approach to build some of their products speaks for itself. However, small startups seem to enjoy using it as well. This is mostly due to the number of benefits full stack programming offers.

⊕ Common language, better team efficiency with less resources

Having all parts of your web application written in JavaScript allows for better understanding of the source code within the team. Therefore, there is no such thing as a gap between front and back end engineering that occurs when two teams are working separately using different technologies. Moreover, you can now work with only one team instead of two, for back and front end, which should significantly reduce the cost and effort of finding and retaining the right talent. Such a cross-functional team is a great asset when following Agile methodologies.

⊕ Extensive code reuse

With full stack JavaScript, you save time through code reuse and sharing. Following the “don’t repeat yourself” (DRY) principle, you might be able to reduce the effort by reusing the parts of the code (or sharing libraries, templates, and models) on both back and front end that are very close in terms of logic and implementation. In other words, you don’t need to think about the Javascript utility equivalents in Python or Ruby, you just use the same utility on the server and in the browser. Reducing the number of lines of code by up to 40 percent is also a valuable capability when refactoring and maintaining the source code.

⊕ High performance and speed

Node.js uses event-driven, non-blocking IO model that makes it lightweight and fast as compared to other commonly used back end technologies. To prove this, PayPal published a comprehensive report on the results they have seen in the process of migrating from Java to full stack JavaScript. The company was able to make the development almost 2 times faster while reducing the engineering personnel involved. Moreover, they have seen a dramatic improvement in performance, doubling the number of requests completed per second and decreasing the average response time by 35 percent for the same page. This means that the pages are served 200 ms faster, which is definitely a noteworthy result.

⊕ Huge talent pool

According to the Stack Overflow annual survey, JavaScript is the most-used programming language, used by 55.4 percent of the respondents, which makes over 27,000 developers on the website alone. Taking into account the fact that the survey covered only about 0.4 percent out of more than 19 million developers worldwide, the total number of JavaScript engineers might be well over 10 million. Therefore, finding a skilled engineer is relatively easy.

⊕ Extensive knowledge base

Backed by giants like Facebook and Google, JavaScript has a powerful and fast-growing community. Based on the Stack Overflow survey, quoted above, the language tops the list of the most popular technologies on the website with 62,588 votes. The website currently lists 1,152,376 questions tagged “JavaScript”, which indicates the high activity of the developer community and the huge amount of valuable information that can be found there.

⊕ Free, open source toolset

Most of the full stack JavaScript development tools are free or open source projects. This means you don’t need to bear additional expenses for costly licenses or subscriptions. The tools that are open sourced are updated regularly and evolving fast due to the active community contributions. Instead of relying on a fixed set of technologies, you may use any of more than 250,000 tools, hosted by the npm, the largest JavaScript modules registry in the world.

The Cons of Full Stack JavaScript Approach

Yet, no technology is perfect. Despite all the benefits the full stack approach offers, there is always some drawbacks to be aware of.

Θ Insufficiency with computation-heavy back end

When it comes to heavy computation and data processing on the server side, Node.js is not the best option. There are lots of far better technologies to handle projects like machine learning, algorithms, or heavy mathematical calculations. Having a single CPU core and only one thread, that processes one request at a time, it might be easily blocked by a single computational intensive task. While the thread is busy processing the numbers, your application won’t be able to work with other requests, which might result in serious delays. Yet, there are numerous ways to overcome this limitation. By simply creating child processes or breaking complex tasks into smaller independent microservices, that use more suitable technologies and communicate with your back end, you can handle complex computational tasks in Node.js.

Θ Relatively young technologies

When compared with PHP or Java, server side JavaScript has been around for a shorter period of time. This results in a smaller knowledge base and limited integration capabilities. As an example, some developers cite the immaturity of the connections between Node.js and relational database tools, such as MySQL, Microsoft SQL Server, and PostgreSQL.

Θ Jack of all trades, master of none?

It is a common belief that a developer can truly master only one area of knowledge. With every other skill gained the quality of his/her expertise will decline. While syntax and grammar of JavaScript are mostly the same on client and server side, there are still many details to consider. Aside from being proficient in front end development, full stack JavaScript developers need to have an expertise in back end programming, such as HTTP protocol, asynchronous I/O, data storage fundamentals, cookies, etc. That is why some say that there are really no full stack developers: Every one of them is either front or back end oriented. However, we have all the reasons to disagree, based on our own experience and strong JavaScript skills.

Θ Drawbacks of every separate tool in the stack combined

As every technology stack, MEAN combines the weak sides of all 4 its elements. Most of them are minor technical limitations, which appear under certain circumstance. However, in order to use the stack, it’s important to realize possible bottlenecks of every tool and adjust your development strategy accordingly.

The Use Cases

Despite the fact that there are some drawbacks in going full stack with JavaScript, the approach already has a strong following and is evolving quickly. The number of active repositories on GitHub, is a compelling argument in favor of the language.

Due to its high scalability and speed, this approach is often used to build MVPs. Apart from that, there are a number of use cases for full stack JavaScript with Node.js. Based on the arguments listed above, we highly recommend using it within the following domains:

  • Real-time peer-to-peer applications and services (multi-user chats, social media platforms, online games, collaboration tools)
  • The Internet of Things
  • e-Commerce solutions
  • Fintech products (e.g. real-time stock broker’s dashboards)
  • Enterprise web solutions
  • Application/system monitoring dashboards, admin panels.

This article is a part of our “The Good and the Bad” series. If you are interested in cross-platform mobile development, take a look at our previous publication on the pros and cons of using the Xamarin platform.

You can find the original at AltexSoft’s blog: “The Good and the Bad of JavaScript Full Stack Development”.