JavaScript performance tests
Oct 19, 2013     21:11:40

When we developing simple JS app / website we don't even need to test something. If everything is simple - there is no reason to make it hard.

But while developing plugins, libraries, or a project with fat ("powerful") client-side part, JavaScript performance has much higher priority.

The are a lot of ways to test different cases:

  • JSPerf.com - JavaScript performance playground;
  • console.time() method of testing some code part performance;
  • console.time('timerName');
    /* your code */
    console.timeEnd('timerName');
  • Self written timers;

Lumia 800 in CSS3
Sep 08, 2013     19:45:51

A long time ago there was an iPhone... and iPhone created in CSS3.

Since that time I received a lot of emails and messages in social network, tweets and likes in facebook, etc.

And one day I received a message from Nishant Kothary. He asked me to update my creation a little for better work in IE10 (pre release version for that time).

After short conversation he decided to create the next challenge for me and send me Lumia 800.


Imageless Lumia 800

Meet new imageless creation - Lumia 800


Source

All sources available on GitHub - http://github.com/TjRus/Lumia.js


tTable.js - work with tables like a boss
Sep 08, 2013     18:05:47

tTable.js actually begins as a simple FedEx Day project. But from the first lines of code I understand that this will be my next opensource project.

For now it's not ready even for 10%. It's only a little bit coded idea.


A little story

Everything starts with Google Visualization Tables. Few years ago one of my colleague decided that this is the best solution for tables in our web service. At that time maybe that was really great solution, but not now...


tFormer.js updated to v0.5.2
Sep 07, 2013     22:00:00

28.08.2013 01:35 AM - that was the v0.5 finish time.

tFromer.js finaly was updated with great improvements (but it is still in beta).

It was actually rebuilded from scratch: new API, new type af work with form elements, and still on native JavaScript without any dependencies...


tformer.js - empower your HTML forms
Apr 25, 2013     11:11:11

Introduction:

Have you ever tried to develop forms? Or wrote a script for the validation of these forms on the client side? Did you have to use the already existing plugins for form validation?

I had to, but I've never been 100% satisfied with any approach to neither solving the problem directly (own validation script for each project under its forms), nor how the existing third-party plugins works.


The Problem:

The main problems of own scripts and plug-ins have always been - the flexibility, convenience and simplicity.

A large number of data-attributes, required for configuration scripts (as in Parsley.js) makes the code less readable, and never remembers how to write them correctly. Not so simple ...

Not all plugins are well suited for the desired HTML-forms, and constantly write own scripts for different forms are not always convenient and reasonable.


Objective:

Create something flexible, easily configurable, a fully controllable, with an intuitive syntax and the main idea - to validate.


Solution:

The solution resulted in a small opensorce plugin, called tFormer.js.


W3C Conf 2013 stream
Feb 21, 2013     14:41:45

W3Conf is W3C's an­nual confer­ence for web pro­fes­sion­als. If you are a web devel­op­er or designer want­ing to hear the lat­est news on HTML5, CSS, the open web platform and your place in it, come join us!

Watch it


Custom JavaScript Events
Jan 29, 2013     21:57:36

While working on a JavaScript plugin I decided that it is great when plugin informs user about what it have done or on what it is working right now. This functianality is the same as some events in javascript like 'click', 'keyup' or others. And the plugin should use it's own events.

But how to fire own crossbrowser event?

Red more to see details.


Stop all active ajax requests
May 31, 2012     07:18:03

Several months ago I encountered a problem - "How to abort() all current requests on the project page?". If you have a project built on AJAX you'll definitely need this functionality. Moreover, if your project is not built entirely on AJAX, but uses it in some cases to accelerate the navigation on the project you would not have prevented the use of abort() for such requests.

In a single use of AJAX it is simple. The XMLHttpRequest has a abort method, which cancels the request.

// creating our request
xhr = $.ajax({
	url: 'ajax/progress.ftl',
	success: function(data) {
		//do something
	}
});

// aborting the request
xhr.abort();

But what if we have a lot of requests and we wand to abort all of them?



How to block using your website throught iframe? It's simple!

<script>
	if (window!= top) // if your website window is not top
		top.location.href=location.href
</script>