Dmitry Sheiko's Web Development Blog

JavaScript

YUI3 vs jQuery

Everybody time to time comes to the dilemma which JS library to choose for further development. I used to work with prototype coupled with script.aculo.us and now use YUI3 in the office and jQuery at home. I like both of them, though finding each as the best one sui generis. YUI3 is a classical framework that provides design patterns and development philosophy as well as tool. jQuery is meant as a rapid, lightweight, flexible and pretty easy to start library. Its like Ruby on Rails and Python. Ruby and Python as languages are comparable (conceptual elegance against explicit consistency) and you will find APIs of both YUI3 and jQuery are quite similar.

Clean Code

From Chaos to Control: PHP Error Handling

However fondly you treat your application, errors happen and they happen often when it is being developed. That’s obvious you want to get all the tracing information during the development stage and something like ‘Application Error’ page if the error occurs on the production. Everybody knows error handler can be set in PHP through set_error_handler. The same about exceptions for which set_exception_handler is used. But it really works only for user-defined errors and uncaught exceptions. It doesn’t affect any of fatal error for instance. Well, PHP has such stuff as register_shutdown_function to deal with them. We can create ErrorHandler class and subscribe the handlers in the beginning of the script

PHP

Anonymous Functions and Closures in PHP

If you are used to switch between JS and PHP programming, it obviously happened to you to miss some of JS flexibility in PHP. I felt it every time when declaring a callback function , being eager to apply something from JS like that...

Developer Tools

Source Code Analysis: Code Sniffer

In the previous article we examined the only way of code analysis – PHP tokinizer. But digging deeper you’ll find many of options. Well-known expert of the subject Sebasitan Bergmann points out following. As far as you see, with such a set of tools you can do whatever you want. But here we are going to discuss the only application, which is known as code sniffing. Ok, you have some team, working on the projects and, obviously, you have some code convention to adhere. The lead, making code review, checks the compliance with standards by sight. Common, tell me you are not fond of it. There is an amazing tool but again by Sebastian Bergmann so-called PHP CodeSniffer.

JavaScript

Image Slider: Comparing JS, JQuery and YUI3 Implementations

First I decided rewrite my old BlogSlideShow JS-class. In fact I have a plan to rewrite all of my old works gaining to update functionally and appearance regarding to nowadays fashion and make better their code. So, after I finished with implementation on fluent JS, without use of any external library I ported it on jQuery. After that I wrote also implementation on YUI3. I’m fond of both those frameworks and found that is a good practice top have the same task solved thrice in different ways. So here is my observations experienced the task.

Developer ToolsPHP

Measuring Translation Coverage in Your Project

Let’s assume our application has a UI translation module. We created dictionary and use terms from there within the code of application components. Everything is clear so far. But one day we begin to suspect that not all of the terms presented in the dictionary are really used within the application. Besides, probably some of terms which are used in components are not available in the dictionary. So we need a script to traverse all the source code files searching translation module use occurrences. Having the list of all encountered terms the script can compare it with the terms of the dictionary.

Web StandardsJavaScript

Persistent Full Duplex Connection via Web Socket

RIA is considered one of the most distinctive features of the modern Web, reflecting a trend where web applications grow to resemble desktop applications. The overwhelming majority of rich web applications are still built on the request-response model. Events on the client side can reach the server, but not vice versa. To build something as simple as a chat, you have to use tricks. These techniques for emulating bi-directional connections are collectively called Comet, a term coined by Alex Russell of Dojo.

CMS

Sapid CMF reload

Eventually I reincarnated my personal site using alpha version of Sapid CMF 2. I’m still in progress refining the CMS release, but actually the only what I brought from old version is its name. So, what is going to be?

Software Design

Feature Driven Development for Web Developers

Web projects have grown far more complex. Teams are larger, backlogs shift throughout development, and time-based estimates often fall apart. Feature Driven Development (FDD) is an Agile methodology built for exactly this environment. This article walks through its four stages: Develop Overall Model, Build Feature List, Plan By Feature, and Design and Build By Feature.