This version brings bug fixes and some improvements. You can upgrade your current version of Total.js framework from NPM via
$ npm install total.js. I recommend to update Total.js now!
This is very important change in this version. I have replaced all keys with
- chars to keys with
_ chars. This change saves a lot of code and personally I think that the performance is may be better. For example:
Big differences in the code:
I don't know what the compiler really makes, but in the most cases (in different JS engines) can the compiler evaluates
['mail-smtp'] as a string which can affect CPU and memory consumption (maybe). Don't worry about backward compatibility because Total.js solves older keys without any problem and you will be notified about all older keys in app log. Backward compatibility will be removed in Total.js v4.
New version of Total.js supports a very simple encryption of config values. You can encrypt/encode values via
hex. So now you can encode credentials, secrets or SMTP credentials.
This version can extend
.html files. If you don't want to rewrite the entire content of some file and you want to extend a file for example
script then you can use
--ui.jswill be added into the
/themes/admin/ui.jsat the end of file
This version of Total.js supports external bundles which can be downloaded from URL address. Implementation is very easy, just create plain-text file
/bundles/cms.url with this content:
Total.js v3.1 supports
.bundlesignore file with a similiar syntax as
Code less, do more. The framework automatically pair a dynamic value as Total.js Schema and it's case insensitive. So you can merge multiple routes into the one. If the schema doesn't exist then the framework responds with
This was a missing feature. It's very helpful for e.g. Total.js CMS. Declaration is similar like
NoSQL storage is a good choice for storing data from IoT sensors. NoSQL storage creates a new NoSQL database every day. And this version of Total.js extends NoSQL storage by adding three new methods:
.find(beg, end, [threads])
.count(beg, end, [threads])
.scalar(beg, end, type, field, [threads])
This methods return NoSQL
DatabaseBuilder. The big benefit is that Total.js can read NoSQL storage with multiple threads, so you can traverse all data / million documents very effective outside of main thread:
Is a special feature for streaming and filtering data. It uses NoSQL reader filter engine which is optimized for the best performance.
U.reader() can be combined with e.g.
U.streamer(). It can be used in Total.js Flow.
TaskBuilder can create simple async tasks.
Usage in Schemas/Operations/Controllers:
This version brings better features for Total.js
OPERATIONS. Operations are something like Schema methods - operation/workflow/transform but they aren't have any declared schema, they are schemaless.
This is a new powerful feature which can run multiple operations in a row:
Now are operations part of routing, example:
I have added a
logger for measuring time of
Operations. It can be used only for better debugging of Total.js applications.
Example of output:
Tip from Tema Smirnov. Now you can defined a multiple HTTP methods directly in URL argument. IMPORATNT: between methods can't be any empty space.
I have improved
String.slug() for UTF characters for Chinese/Japan/Arabic/etc. languages. It creates a
hash from String. For example:
I have improved NOSQL/TABLE reader. I separated filtering engine to independent class and now the class is used for
NOSQL STORAGE. Of course, engine can be used for streaming data with new utils called
This version brings a more secured
UID() results, Total.js changes ending hash each minute. Now you can use
UID results in URL address directly as an argument.
I have implemented a new config key
default-cors which can contain hostnames as
origin. It's very helpful for the last restricting of
CORS() method. And from now the
CORS supports internal caching, so evaluating is a bit faster.
Many thanks to M.Sc. Jens Mueller / Security Researcher for the alert.
Now the framework uses scripts/styles according the group of components, so scripts/styles won't be rendered into the common file. I have enabled caching for components in
debug mode (previous versions use caching in
release mode only).
New global aliases can improve readability of the code in your Total.js application. Here is a simple comparison:
Total.js framework doesn't processed Total.js files (controllers, definitions, schemas, etc) if the file ends with
-bk.js or starts with
nosql.modify()methods if the first argument is a function
F.wait()in the test mode
LOCALIZE()didn't work for nested directories
WebSocketClientis connecting (for example, if the request is
autovalue and with enabled
LOAD('release')a release mode
SchemaInstance.$clean()for nested schemas
RESTBuildercache works only if the response status is
v4 will remove all older declaration from Schemas, Operations and some internal funcionallity. I have created a lot of projects and I learned a lot, so the core won't be changed.