MVC on command line

PHP
MVC on command line
Image generated by ChatGPT (DALL·E)

If you work with Zend Framework, you likely tried ZF Console (Zend_Tool on command line). But have you tried to extend it? Why? To have common interface for all your Cli-scripts related to ZF-base project. How do you find the idea to program Cli-scripts in MVC? Zend Framework provides us with the tool to do it. First, you have to make ZF shell script zf.sh and assisting zf.php globally accessible. Wherever you have located them, just make a symlink on zf.

Real-Time Updates with HTML5: Unlocking Server-Sent Events

Real-Time Web
Real-Time Updates with HTML5: Unlocking Server-Sent Events
Image generated by ChatGPT (DALL·E)

Related articles: Bringing realtime to your web applications and WebSockets vs Server-Sent Events vs Long-polling Besides, already noted bidirectional communication channel, known as WebSocket, HTML5 propositions include also comet communication pattern by defining Server-Sent Events (SSE). WebSocket widely discussed by now, tons of server implementations are available and you can play already with fluent browser implementation under Chrome. However the second server-push technology of HTML5 yet stays in shadow. We are used to consider the HTTP protocol as request-response model, which means that the client sends a HTTP request and waits until the HTTP response is received.

YUI3 vs jQuery

JavaScript
YUI3 vs jQuery
Image generated by ChatGPT (DALL·E)

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’. YUI3is a classical framework that provides design patterns and development philosophy as well as tool. jQueryis meant as a rapid, lightweight, flexible and pretty easy to start library.

Mastering i18n: Internationalizing Dynamic UIs with Ease

YUI3
Mastering i18n: Internationalizing Dynamic UIs with Ease
Image generated by ChatGPT (DALL·E)

Since YUI 3.1 version, the framework includes internationalizing utility. That’s pretty huge from the prospective of application maintenance and deserves a little review. String translation The Yahoo team intended to bring into the library some ideas from Java internationalization experience. Particularly Yahoo Resource Bundles based on idea of Java property files. So, translation of an application can be achieved the following way: First, YRBis created. That can be a JSON-formatted file of .

From Chaos to Control: Improving Your PHP Error Handling Workflow

How to
From Chaos to Control: Improving Your PHP Error Handling Workflow
Image generated by ChatGPT (DALL·E)

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_handleris used. But it really works only for user-defined errors and uncaught exceptions.

Anonymous Functions and Closures in PHP

PHP
Anonymous Functions and Closures in PHP
Image generated by ChatGPT (DALL·E)

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: var scope = 'internal'; setTimeout(_callback, 100); // Callbacks var _callback = function() { alert(scope); } And when I needed a recursive use, even like that: (function(delay){ timer = setTimeout(function(){ timer = setTimeout(arguments.

Source Code Analysis: Code Sniffer

How to
Source Code Analysis: Code Sniffer
Image generated by ChatGPT (DALL·E)

Choice problem 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 Dynamic code analysis -* Xdebug (can be coupled with PHPUnit) -* php-code-coverage Static code analysis -* Token-Level Analysis by ext/tokenizer and PHP_TokenStream -* Syntax-Level Analysis by PHP_Reflection_AST and ext/parse_tree -* Bytecode-Level Analysis by ext/bytekit As far as you see, with such a set of tools you can do whatever you want.

Image Slider: Comparing JS, JQuery and YUI3 Implementations

JavaScript
Image Slider: Comparing JS, JQuery and YUI3 Implementations
Image generated by ChatGPT (DALL·E)

Here lies the story… 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. You can see what I got at the demo page. 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.

From Code to Content: Measuring Translation Coverage in Your Project

How to
From Code to Content: Measuring Translation Coverage in Your Project
Image generated by ChatGPT (DALL·E)

How to Make Translation Term Coverage Report Let’s assume our application has a UItranslation 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.

Persistent Full Duplex Client-Server Connection via Web Socket

Real-Time Web
Persistent Full Duplex Client-Server Connection via Web Socket
Image generated by ChatGPT (DALL·E)

RIAis considered as one of the mostly particular to the modern Web feature, and often stands for the trend, according to which web-applications tend to desktop applications. Nonetheless the approach is very relative. Overwhelming majority of “rich” web-applications is still built on the “request-response” model. I.e. events of the client side can be reflected on the sever side, but not vice-versa. In order to make such a trivial thing as a chat, you have to go with tricks.

Sapid CMF reload

CMS
Sapid CMF reload
Image generated by ChatGPT (DALL·E)

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? First of all that’s a new explicit architecture. According to the request dispatcher finds controller. The controller using services prepares data for the view. Services access raw data via DAOs, which respectively use DTOs(Data Transfer Objects).

Feature Driven Development for web-developers

Scrum And Agile
Feature Driven Development for web-developers
Image generated by ChatGPT (DALL·E)

About 10 years ago web-projects were mostly static and development process pretty simple. Now difference between web-applications and desktop applications disappears, functional complexity of web-projects grows up. It demands to new requirements. That’s usual now – the project is long-term , many of experts take part (non-experts as well). Everybody brings to the project backlog new ideas and goals, before the development stage as well as after. You see, goals and stories mutate and so the tasks.