At the end of each year, the State of JS team invites developers from all over the world to share their thoughts on the state of the JavaScript ecosystem. As a result, you gain a lot of graph-driven insights into the current JavaScript landscape. However, some developers often consider such surveys to be not entirely objective and take them with a pinch of salt. We asked the DHTMLX team to comment on the key questions from the survey to see how the actual results correlate with their real-life experience.
Adopting New JavaScript Features
JavaScript is regularly updated with new functionalities that help the development community achieve various coding goals. When looking at the survey results, it is nice to see that some relatively new JavaScript features such as optional chaining and nullish coalescing are already actively used by many developers. Let us find out whether the DHTMLX team shares optimism about the new JavaScript capabilities.
Which new JavaScript features do you frequently utilize in the development process?
Alex Klimenkov: Depends on what features you call new. Projects I’m involved with are not so fast at adapting modern features, since we have quite a large codebase that can’t be easily updated in one go. And usually, you don’t want different parts of the project to be written in different flavors of JS. Slowly but surely we migrate some parts of our codebase in TS, other places are being updated to more modern JS.
Optional chaining and nullish coalescing are new additions to JavaScript syntax that we started to use in our code. These small features simplify the coding process in JS. They also make your code clearer and less prone to bugs.
Anton Aksionau: Optional chaining and nullish coalescing enable you to reduce the number of code checks. Sometimes I also use proxies.
Dmitry Sachko: I frequently utilize such features as destructuring assignment, optional chaining, and nullish coalescing. But I would recommend programmers not to overuse optional chaining. Apply this operator only when you assume that the value before it does not exist.
Grazhina Lebeckaya: The use of optional chaining and nullish coalescing operators allows me to write less code and save time on writing code checks.
Ivan Izobov: Optional chaining is a great thing. I liked this feature once I tried it, and now I can hardly imagine my coding life without it. Another great JavaScript novelty is the at() method that allows you to get rid of boring arr[arr.length – 1]. I would also like to start using the logical assignment operators in the future.
Exploring JavaScript Ecosystem
Each year, many new tools appear on the JavaScript landscape and web developers willingly try them at various stages of the development process. Respondents of the State of JS 2021, for instance, seem very enthusiastic about the Svelte framework and pin hopes on a promising build tool named Vite. So it’s time to ask the DHTMLX team about their technology stacks.
What front-end frameworks do you use? Did you try Svelte or Solid that are rated very high in terms of satisfaction and interest?
Alex Klimenkov: Mostly, I use vanilla JavaScript, since we make our own JS libraries, but occasionally I also have to work with JavaScript frameworks. In recent times, it has been Svelte. So far it has been an enjoyable experience. Svelte allows you to build cool things while at the same time being lightweight and easy to read.
Anton Aksionau: Most of the time, I write code in vanilla JS. I also work with the “Big Three” frameworks (Vue, React, Angular) as well as Svelte. I have to say that the experience with Svelte leaves the most pleasant impression. You won’t need much time to master this framework. It helps to reduce the amount of code that is easier to read and understand. Compared to React, you’ll get a smaller application bundle size using Svelte.
Dmitry Sachko: Vue.js is the main framework that I use for work and I’m fully satisfied with it. Currently, I also use Svelte in our projects and I can say that it is a remarkable client-side technology.
Grazhina Lebeckaya: I’ve been with the company not so long and I haven’t had to use any framework for work tasks yet, just pure JavaScript. As a part of my professional development, I learn Angular.
Ivan Izobov: Now I actively work with Svelte in DHTMLX projects and I’m really happy with this framework. I also want to mention React which is still extremely popular among the development community and provides a lot of useful tools for productive coding.
Do you use any testing tools?
Alex Klimenkov: Currently, we rely on unit tests made with the Mocha framework, and a custom-made regression test suite powered by Puppeteer. We’ll probably explore Cypress in the near future.
Anton Aksionau: In most cases, I use traditional Mocha and Chai tools. We also try to adopt Cypress for visual testing.
Dmitry Sachko: I had some experience with Puppeteer.
Grazhina Lebeckaya: I utilize Cypress for end-to-end testing.
Ivan Izobov: Of course, I use different instruments for testing. In projects with my involvement, I employ Mocha (Chai) and Cypress. They are intended for various testing purposes.
What bundlers do you prefer for working on DHTMLX libraries? Have you tried any new bundlers such as Vite or esbuild?
Alex Klimenkov: For now, we continue using webpack.
Anton Aksionau: I tested Vite and esbuild. I’m satisfied with their performance and ease of configuration. I would like to start using them in real projects. But for now, we stay with Rollup and webpack for our project work.
Dmitry Sachko: I prefer to use the tried-and-true webpack bundler.
Grazhina Lebeckaya: Now I work with webpack. Regarding Vite and esbuild, it is necessary to examine these tools in more detail to learn about potential drawbacks. But I have to say that they have a significant advantage in terms of performance.
Ivan Izobov: I mainly apply webpack and Rollup. Out of curiosity, I also tried Snowpack.
What instruments are commonly used for managing monorepos in DHTMLX projects?
Our developers are a bit conservative in this question. They choose yarn and npm for managing dependencies.
Which criteria do you take into account when evaluating new libraries/tools/utilities?
Alex Klimenkov: There is a wide range of criteria that are commonly taken into account when evaluating new dev instruments: suitability for your specific objectives, maturity, availability of the proper documentation, ease of use, etc. It can be too time-consuming to estimate all these aspects separately. Therefore, firstly, I pay attention to the popularity/usability of the library among developers. In other words, when choosing between two tools with 100 and 100k downloads per week on npm, the second one will be an obvious choice. In the case of two equally known technologies, I would prefer a more intuitive library with better documentation.
Anton Aksionau: I consider numerous factors when choosing a new tool for working with DHTMLX components. I start with checking popularity rates and community presence for a tool under review. Then I take a look at the number of pull requests and issues in its GitHub repository. It is also hard to go without clear and well-structured documentation with guides and samples.
Dmitry Sachko: First of all, I obtain the info about the popularity of tools (Github stars, npm downloads). Secondly, I evaluate the completeness and usability of the documentation. And thirdly, I take into account community support for the targeted technology i.e. its size and activity level.
Grazhina Lebeckaya: Good documentation allows you to search for answers to any technical questions in the original source of information rather than in any third-party sources. It is also useful to consider the prior experience of other developers with a specific technology to understand what to expect in the process of its practical application.
Ivan Izobov: I appreciate it when a development tool for a web project comes with well-written documentation and an online sandbox (such as Svelte tutorials or DHTMLX code snippets), where you can try everything you read in the documentation. I also usually compare how much time I can save using a given technology in projects. One more important factor is the development community awareness of the reviewed library or utility. If not many programmers know about this tool, the chances are high that you will need a lot of time for solving any emerging issue related to its usage.
Thoughts on Present and Future of JavaScript
Now we come to the most interesting part, where respondents of the survey expressed their views on the current state and prospects of JavaScript. In general, participants of the State of JS 2021 are optimistic about JavaScript and its future, but at the same time, they also agree that there is always room for improvement. We asked DHTMLX developers to answer the most interesting questions from this section of the survey.
Do you agree that JavaScript is moving in the right direction?
Alex Klimenkov: I guess that I express our shared opinion by saying yes to this question. But there is also a popular opinion that with the development of JavaScript would-be programmers face higher skill requirements. The syntax and API become bigger and bigger, meaning that entry-level developers will have to know more things to be fit for work. For example, we have three different ways of handling asynchronous code, all of which are well established and widely used – callbacks, promises, and async/await syntax. And two different syntaxes for implementing inheritance – with prototypes and with classes. I guess that these aspects of the language can be quite challenging for newcomers.
But overall, I think most changes that happen with JavaScript are for the better. The language becomes more expressive and gets over some of the quirks that have complicated the life of JS developers for years.
What are your thoughts on the assumption that the JS ecosystem is changing too fast?
Alex Klimenkov: I disagree with this assumption. New JavaScript tools are created on a continuous basis, which is good. It’s indeed might be difficult to keep track of them, but that’s the price for work in technology.
Anton Aksionau: In my opinion, the opposite is true. The growing number of tools increases the competition between them, resulting in the improvement of the whole JavaScript ecosystem.
Grazhina Lebeckaya: I don’t think so. The development of the JavaScript ecosystem is only a plus since it helps to maintain interest in the language and cover the essential needs of the community.
Dmitry Sachko: On the whole, I think that JavaScript is developing at a normal pace.
Ivan Izobov: JavaScript is regularly enriched with new useful stuff and I fully support this kind of language evolution. However, new technologies must have some notable advantages to gain the trust of web developers and replace well-known tools such as Vue or React. That is why the emergence of many new libraries often goes unnoticed. But some worthy ones like Svelte stay afloat and help to move JavaScript forward.
Do you think that TypeScript is currently the most viable alternative to JavaScript?
Alex Klimenkov: Yes, TypeScript is awesome. Optional static typing and interfaces provided in TypeScript make everything better.
Anton Aksionau: Yes, TypeScript is a wonderful thing. It significantly simplifies code maintenance and helps avoid errors. Now it is hard to imagine the development process of large and complex projects without TypeScript.
Dmitry Sachko: TypeScript is great and it is certainly worth learning.
Grazhina Lebeckaya: Absolutely. With TypeScript, your code is more manageable during the development process.
Ivan Izobov: Yes, TypeScript helps you to avoid errors when writing code, thereby saving a lot of valuable time.
What are your JavaScript paint points?
Alex Klimenkov: Code architecture is truly a complex issue, but I would argue about debugging that is mentioned in the survey as one of the main problems in JavaScript. I assume that this issue stems from frameworks (Vue, Angular, React, Svelte). Using frameworks in your project, you write code with the expanded syntax of a particular framework. Therefore, when it comes to debugging, we are at mercy of codemaps and design decisions of the framework authors.
But if we talk about the debugging process in JavaScript, I think that debug tools available in browsers and IDEs (here I mean Chrome and VS Code) are good enough for effective work.
Anton Aksionau: To my mind, right now the main problem of JavaScript is delivering a good and maintainable architecture. In DHTMLX products, we try to minimize the number of external dependencies, thus we don’t have problems like the majority of the State of JS respondents.
Dmitry Sachko: Sometimes I experience difficulties with managing dependencies and bundle sizes.
Grazhina Lebeckaya: I would point out debugging as one of the key current issues in JavaScript.
Ivan Izobov: For me, code architecture and debugging are the most troublesome aspects of JavaScript.
What features would you add to JavaScript at the moment?
Alex Klimenkov: It would be nice to have a more developer-friendly class for working with dates and timezones since this functionality is needed in DHTMLX libraries. Apart from that, it will be great to find free time for mastering many other useful things that are already available in JavaScript.
Anton Aksionau: By analogy with TypeScript, it would be interesting to see static typing in JavaScript. Especially as there is a corresponding proposal for including this feature in the ECMAScript specification.
Dmitry Sachko: I wouldn’t mind having a standardized library containing everything that we frequently use during the development process.
Grazhina Lebeckaya: I’m happy with how things are in JavaScript.
Ivan Izobov: I don’t have in mind any specific feature that I miss in JavaScript at the moment.
And finally, are you satisfied with the general state of JavaScript?
Alex Klimenkov: Yes, right now JavaScript is better than ever.
Anton Aksionau: Yes, JavaScript is a great programming language and it becomes only better with time.
Dmitry Sachko: Of course I am. You’ll never get bored with JavaScript.
Grazhina Lebeckaya: Yes, there is always something new to learn in JavaScript.
Ivan Izobov: Yes, I’m quite happy with JavaScript and keenly interested in following its further development
Wrapping up
All in all, we can say the considerations of the DHTMLX developers on JavaScript trends are fairly similar to the results of the State of JS 2021 survey. We not only keep track of new JS tools but also integrate them into our development process. For instance, our team actively works with the well-proven Svelte frameworks. So we’ll continue following the development of JavaScript and adopting new technologies in DHTMLX products.