Tokenizer + ::mark() = syntax colorizer

Here is selfie of syntax (tiscript) colorizer – the text below is a full source code of syntax highlighting routine. The code has colorized itself: Can your browser do that in 40 lines of code? And here are styles that define style of tokens: plaintext > text::mark(number) { color: brown; } plaintext > text::mark(number-unit) {…

Sciter, D language SDK port

Please welcome D language port of Sciter SDK by Mr. Ramon F. Mendes. As a demonstration Mr. Ramon kindly shared his OctoDeskdex Sciter application written in D: Octo Deskdex is basically a Sciter based desktop app that shows up Github mascots from the Octodex site.

Repeatable: simple jQuery plugin for rendering lists, tables, etc.

While ago I’ve published simple and compact (90 lines of code) plugin for rendering, well, repeatables. Here is its documentation and here is live demo. The Repeatable is a mechanism of DOM population from array of objects. Repeatable template is defined directly in markup: <ul id=”people”> <li><a href=”mailto:{{this.email}}”>{{this.name}}</a> <b if=”this.age > 18″>18+</b> </li> <li>No data…

Model-View-Whatever, the Plus engine for Sciter.

Preface I would say that human history is a history of reinventing "wheels" of various kinds. This time we see concept of data binding reincarnated with slightly pathetic name Model-View-Controller. Of course, as many people as many meaning they give to the MVC abbreviation but, nevertheless, it is all around basic idea of data binding…

MVC or not MVC? The Formation Engine for jQuery

Various JavaScript frameworks provide data binding facilities (Knockout, AngularJS, etc.) these days. They are based on kind-of-MVC concept: you have some data (structure, model), view rendering that data in html and some code in between that commonly named as controllers. How successful/convenient those frameworks are subject of separate topic. For me they are too intrusive…

Promises/A+ implementation in Sciter2

The Promises, as a concept, is generalization of callback mechanism. This pattern is quite popular these days so Sciter2 SDK contains now (sdk/samples/+promise/) pretty simple (60 lines of code) implementation of the Promises. The promise is an object that: maintins list/chain of callback function pairs [onsuccess:function, onfailure:function] by providing .then(onsuccess, onfailure) method; promise object provides…

Sciter UI, basic principles. Calling code behind UI from worker threads.

I’ve updated the SDK with new sample: /sdk/demos/ui-framework . This sample demonstrates principles outlined in “Sciter UI, application architecture” article. In particular it demonstrates definition of native function (view.execTask() -> window::exec_task()) and call of UI methods (callbacks in this sample) from worker threads. I’ve explained idea of calling UI code from worker threads in this…

Q.tis – micro port of jQuery for Sciter.

I’ve published today Sciter 2.0.2.2 with q.tis – micro-port of essential jQuery features. Here is the list of supported functions. It is just enough to put include “t.tis”; in your code and any existing DOM function that returns array of elements will “automagically” produce the q-collection. In my implementation I am using the fact that…