I have decided to make my website a bit more beginner-friendly, by writing some articles about the fundamentals. In this article, we will explore
- what your career prospects are,
Client-side development focuses on writing code that runs in the browser of the end user. Server-side development focuses on writing code that runs on the server of the service provider.
Animation in computer science is the act of moving an object on screen. During the move, the features of the object may change, which means that the animated object may be drawn in different color, different size, or in case of three dimensional animation, we might see the object from a different angle.
Displaying an object on screen at a given point in time is called rendering. Animation can also be defined by continuously rendering an object on screen, while its features, including its position, may change.
XMLHttpRequest object became standardised, meaning that you could submit a request to the server and await for its response. Once the response arrived, you could display the results without reloading the page. This worked like magic on websites, because before this technique became wide-spread, every interaction with the server required a full page reload. As a page reload may take seconds, getting rid of the need for reloading pages was a big achievement.
Not for long though. In 2006, another important milestone happened. The library
Unfortunately, jQuery created another problems. We could use the slogan of Scarlet Spider, the evil clone of Spider-Man: all the power, none of the responsibility. Lowering the entry barriers meant that people who didn’t give two flying fucks about software engineering, also started writing code.
The main problem was that people calling themselves software developers, used their hacking skills to create bad quality software. People soon realized that some jQuery knowledge limits the size of the application they can develop. Beyond a certain size, they encounter maintainability issues.
Maintainability is the act of making a software solution easy to develop, modify, scale, test, and debug. If you write ten lines of code, you need a different approach than writing a million lines of code.
A framework structures your code and runs your application. When using a framework, the framework is in control. This means, the framework calls your code.
A library is a set of functionalities that you can call to perform a given task. A library is not a framework, because as long as you use a library, you are in control, the library does not call your code.
In the early 2010s, literally everyone wanted to write a framework. A new framework got created literally every week. Creating a framework means that you reinvent the wheel, because you solve a well known problem in your own way. If you want to build a portfolio, don’t even think about building a framework, because it does not make sense.
- AJAX made it possible to update websites without reloading the page
- jQuery lowered the entry barriers to programming
- Frameworks and libraries forced us to use well known design patterns in software engineering
- ES2015 and beyond: many patterns became standard part of the language
If these benefits were not enough for you, let’s add some more sauce to the mix.
Interpreted code runs on a virtual machine, translating the sets of instructions written by a developer to executable commands. Interpreted languages are typically safer, but slower than compiled languages. Interpreted languages are also portable, which means that you can take the source code of a program and execute it on any system that has a virtual machine for that specific code. Languages that compile to machine code have the benefit of running code as close to machine code level as possible. This translates to faster execution times. Unfortunately, this machine code cannot be ported to different machines running different operating systems or having different hardware architecture.
Node.js solved the speed problem by offering a compiler to machine code. This is not a big deal yet, because most other server-side languages can do the same thing. Why is node.js still a good choice for certain server-side tasks?
The reason lies in some node.js architectural decisions. Node.js comes with an event loop that can execute and serve parallel requests on the server without blocking. This is called non-blocking I/O. Opposed to many other languages, when you have to read or write a database or a file, node.js is not blocked until the I/O operation is finished. This means that node.js stays busy handling other tasks, possibly important for other clients.
Think about it for a moment. When is this feature beneficial?
Node.js shines when there are a lot of independent parallel requests requiring a lot of I/O operations, but not many server-side computations.
For instance, 3D renderer algorithm comes with a lot of CPU operations. Even though the V8 engine produces fast machine code, there are some other languages that are faster. As those languages have a blocking nature when it comes to I/O operations, node.js gets the edge over them once we deal with many inexpensive operations that interact with a database.
In today’s world, this use case happens to be very popular. The computers of the end users are strong enough to run a lot of logic on client side. The application server providing an API mostly interfaces database servers and asset servers, and formats data in a way that clients can fetch and understand them using AJAX requests. The role of the server is limited to purposes that do not require a lot of CPU operations. This is an optimal environment of node.js.
This is because a lot of problems have been solved effectively by microservices. You can simply query a microservice to perform a CPU-heavy operation, often on another server, using a different technology. If you are interested in microservices, check out my introduction on this topic.
As a conclusion, once you learn client side development, you can upgrade your skills to perform server side development as well. Developers who are good at both client side and server side development are called full stack developers. Full stack development is a great career path upgrade for you in case you are looking for more responsibility in a smaller company.
- Node.js comes with non-blocking I/O, making it possible to handle many I/O operations in parallel
- Microservices. Seneca is one example for organizing microservices in your application.
According to the 2018 survey of HackerRank,
The 2018 survey of StackOverflow paints the same picture:
- Three frameworks lead the list of most popular frameworks: Node.js, Angular, React.
There is no money in the world that would compensate you for a bad developer experience though.
- Computer resources were more scarce than now
- The standardization of the language was a lot more immature than now, yielding to
elsestructures containing different code snippets for each browser,
- The ES5 standard provided a lot worse developer experience than ES2015 and beyond
- Browser developer tools and debugging capabilities were immature,
- Third party library support was scarce and unreliable,
- Good integrated development environments or text editors did not exist,
Because everything is given for you to experience flow. Flow experiences are often referred to as optimal experiences. It feels like you are “in the zone”. If you are in flow, time flies. You are deeply immersed in an activity. Your learning experience becomes close to optimal.
According to science, there are a few necessary conditions for flow to happen:
- The goals of the activity must be clear
- The task is neither too easy, nor too hard
- You get direct feedback on the outcome of your actions
Let’s see these points one by one.
The goals of the activity must be clear
The task is neither too easy, nor too hard
However, once you lay down the foundations, you will be ready for these resources, and nothing will stop you. Therefore, with proper guidance, you will improve, you will get better, without getting frustrated about your learning experience.
You get direct feedback on the outcome of your actions
This has been a beginner-friendly article on zsoltnagy.eu. You can expect more beginner-friendly articles in the future that will make this site a bit more beginner friendly than before.
If you would like to be notified about updates, sign up in the form below.