Archive for the ‘Practice’ Category

Node.js introduction

JavaScript’s popularity is obvious. And solutions such as node.js have a big influence on this. For a longer time, we can see and hear a lot about this technology. We also use node from some time, and… we can do really cool things, so for sure it’s something worthy of attention. And finally I have […]

Backbone.js tutorial for beginners – part 2/2

Today, the second part of exploring the Backbone.js secrets. Backbone.js tutorial After talking about the basics and key aspects, such as models and collections, we will focus on next – Router, View and Events. Routing – Backbone.Router For what would be our application without the possibility of interaction? Backbone.Router provides routing methods for client-side pages, […]

Backbone.js tutorial for beginners – part 1/2

Backbone.js is popular JavaScript library, used heavy to create single-page web applications. The library was constructed using RESTful JSON interface and model–view–presenter (MVP) pattern. The creator of Backbone.js is Jeremy Ashkenas – author of underscore.js and CoffeeScript. Backbone.js tutorial for beginners Backbone.js needs only one dependency to work: Underscore.js (>= 1.5.0). Example – working with […]

Compress JavaScript and CSS files

Minimizing / compression of JavaScript and CSS code is often encountered technique used to optimize the loading time by reducing weight of the file. Today we will try to briefly tell about the tools used for this purpose. Compress JavaScript and CSS code Recently someone asked me about it, so we have today’s small article. […]

Web storage tutorial – applications that store data locally

Today we present the tutorial about creating a simple web application, which stores data in localStorage. The app will be able to save and store the settings of its own appearance. Web storage tutorial 1. Let’s start by adding jQuery and simple CSS styles for UI elements: 2. Create a simple form in the body […]

DOM Storage – JavaScript Web Storage

There is no problem with Web apps with server-side back end code, where we can for example store data in MySQL or simply – in files. Thanks to Web storage / DOM storage, our modern web application can store the data itself, and we will handle them in JavaScript. JavaScript Web Storage It is a […]

Read files in JavaScript and HTML5

Actually I met with this issue for years. However, the modern solutions allow us really to approach this issue in a meaningful way, not related to one specific browser. Read files in JavaScript and HTML5 Among the easiest ways, we can mention loading the file contents via AJAX; in case of jQuery we can use […]

HTML5 Cache and JavaScript – how to use HTML5 cache?

Today, a few words about the issues and possibilities offered by HTML5 Cache. Working with HTML5 Cache The back end developers can associate it with a kind of caching the pages, to speed up their loading. In the case of HTML5 Cache it’s also about some other benefits. HTML5 offers caching mechanism for applications in […]

HTML5 tutorial: a photo on the Canvas with clickable elements

The result of today’s work will be an effect, that may be useful in a number of projects. It’s about a kind of comment or action related with defined point on the photo. We can, for example, show detailed information after clicking in that point. HTML5 tutorial – clickable elements on the picture We have […]

HTML5 Canvas, JavaScript and operations on images

Some time ago we got a small job. The subject: small research and creation of simple on-line editor for images, which should be editable from HTML5 Canvas and JavaScript level. Then the user should be able to save / send the final image. Today we present the basic elements and some examples related to this […]