Pros and Cons of TotalJS Framework
Hello guys, There is a lot of NodeJS Framework out there, but in this article, I will talk about TotalJS Framework. I will describe all the pros and cons about TotalJS Framework. Since I write this article, actually I was working with many projects with using TotalJS as framework. It was around 6 months I was learning about TotalJS Framework. So from my experience, hope I can better to explain what is the pros and cons of using TotalJS Framework.
There are so many website write about pros and cons of TotalJS Framework, but most of them is too general, they explanation is not too spesific also they miss many features in TotalJS. So that is the reason why I write this similar article and I want to make people try to use TotalJS framework for their project in the future.
TotalJS framework was created by
Peter Sirka. Actually
Peter Sirka is not working alone, of course they have a team developer, so don’t worry, TotalJS is not maintained by single person. TotalJS is already mature as framework, because the first version of TotalJS framework was released at 2013. It was more than 5 years of development.
First of all, I will start to explain from the
pros. So here is the list pros of using TotalJS framework.
TotalJS framework was written in
Everything features in TotalJS framework is
no dependencies. So you are easy to learn all the features with just read from their wiki or documentation.
TotalJS has better performance compared with another NodeJS framework. There is someone from internet who have created the benchmark for TotalJS, and the TotalJS benchmark is around
32K req/second. For the detail about benchmarks, you can see at here.
TotalJS is very easy for scaling, because of it architecture. You can learn more detail about Modules, Packages, Workers and Clusters. This features help you very easy scale of your projects.
Controller TotalJS is very powerfull as it knows 3x types of routes which is classic, websocket and file route. Also controller is executed in one time, so this is really so fast and low in memory consumption. You are able to create controller as many as unlimited.
TotalJS has great dynamic routing. It is support classic and dynamic routes as regex. You are able to write routes for content, files and websocket. Routes also support HTTP Method, Flags, Cors and middleware.
TotalJS has built-in mail feature. This mail class will make you easier to create or sending mail message.
TotalJS has built-in cache feature. This cache is working in memory mechanism, so this will make your project run very fast.
TotalJS has modular architecture, there is Modules and Packages feature which is will bundle your custom feature as simple as plugin like in the most CMS out there.
TotalJS has built-in view engine which is will help you easier to make themes for you frontend. View engine will separate your server side and client side code. Also your frontend code will be more clean and easy to scale.
TotalJS has GZIP, Image, HTML, JS and CSS compression. This is already running in auto compression mechanism as default. So your project will be running so fast in performance.
TotalJS has Image manipulation feature. So you are very easy for example to create watermark, resize, and compress the image. But to use this feature you are required to install
TotalJS has websocket client feature which is help you to making connection into websocket as a client. So you are possible to create chat or realtime application with TotalJS. This websocket are use RFC 6455 standard.
NoSQL Embedded is built-in database which is your data will be saved as json file. This NoSQL Embedded has database builder which is support you to make crud, query and join. Even this NoSQL Embedded is design for small database, but this mechanism is using stream, so this will be strong enough if your data is getting bigger for around 100K row data.
TotalJS has schema feature which is help you to create interface validation for your data in every routes. Using schema also will make your code more clean, readable and ligtweight.
TotalJS framework is run as singleton, once it load, all features is available as lazyload, so your project will still fast and low in memory consumption. Also you can use TotalJS as library with another NodeJS framework.
TotalJS has built-in localization feature which is help you to create an application with multiple language. You also able to generate your localization directly with CLI feature.
TotalJS has workers and clusters feature which is help you to scale your application for heavy computation. You can run multiple thread of NodeJS by using clusters feature.
TotalJS has Debugging and built-in Unit Test feature. This will help you to maintain your source code when you are working in big team developer.
TotalJs has big ecosystem which is help you to improve your productivity. You don’t have to create all the things from zero. Just save your time and don’t reinvent the wheels unless you have another plan.
TotalJS has Community area, just register yourself and you are able to chat with other members. This community is so reactive also you are able to chat directly with the author of TotalJS framework
If you are work in serious project, high development or in growth company. You have to buy TotalJS for Enterprise. So you have Service Level Agreement for your company.
TotalJS has Wiki and Documentation, this will help you easier to learn all features in TotalJS framework.
That is not fair if we don’t explain about the
cons. So here is the list cons of using TotalJS framework.
Until I write this article, TotalJS still not having a plan to support TypeScript. So it is hard to combine TotalJS with another Typescript framework.
Documentation and wiki is available but not all features has been written completely. Also for the english version mostly written with broken english, so for someone who are not english native speaker, it will be more hard to understand, because we can not just copy paste the text into Google Translate because the text is not using grammar correctly.
TotalJS has many examples at here, but all of them is written with no any explanation. Remember that source code only it won’t help us to understand what is going on the framework itself.
If you take a look the source code of TotalJS, there are few big files written more than 15K of code line and unfortunately, they wrote the source code with very little comments of explanation in their source code. So for everyone who wants to contribute for the framework seems imposible.
TotalJS can be use as library, so you are possible to use some of TotalJS features in other framework.
Thank You for your time to reading my article, hope I didn’t miss a thing and please correct me if I’m wrong about this framework.