Design Patterns by PHP and JavaScript examples

Refactoring
Design Patterns by PHP and JavaScript examples
Image generated by ChatGPT (DALL·E)

After having your project fully tested, deployed and running, it seems the application architecture is pretty good enough. All the requirements met and everybody is happy. But then as it happens, the requirements change and you, all of sudden, find yourself in the time of troubles. It comes out that some modules easier to hack than to modify. Change of other ones brings endless changes in a cascade of dependent modules.

Bringing realtime to your web applications

Real-Time Web
Bringing realtime to your web applications
Image generated by ChatGPT (DALL·E)

Few years ago only lazy didn’t say about bringing desktop application experience to the web ones. However in reality, it just meant that user actions didn’t always required page reload, but could change page UI dynamically. As for other application events, as a rule they were not handled dynamically. Well, now you can find more and more web applications acting really like desktop ones. For example, Facebook and G+ have widgets which update automatically.

Build Your Own Simple Web Form Testing Tool

jQuery
Build Your Own Simple Web Form Testing Tool
Image generated by ChatGPT (DALL·E)

When testing a web-site, nevermind who you are developer or QA-engineer, it happens to you pretty often to fill-in form fields again and again. Boring, stupid work, but how to make sure the form does still work as intended? Some fields added, CAPTCHA was attached, whatever else done –you have to run the test again. Besides, it will be repeated on different browsers. Browser form auto-completion feature helps a bit, but that is not the same as when you have various sets of test-data always ready to apply on a form, isn’t it?

Support Request Tool like Google Feedback

How to
Support Request Tool like Google Feedback
Image generated by ChatGPT (DALL·E)

Have you ever noticed Google+ has an amazing feature called Google Feedback. You click on feedback highlight an area of the site page and getting screenshot with your marking on it sent to the Google support team. If you wonder of having this tool on your own, just take my code and adapt for your requirements. How to install First of all you have to install server side components for making screenshots ( XServer and CutyCapt).

WebSockets vs Server-Sent Events vs Long-polling

Real-Time Web
WebSockets vs Server-Sent Events vs Long-polling
Image generated by ChatGPT (DALL·E)

Apparently social networking is the banner of the nowadays web. Everybody intends bringing some features into his projects. Some of them require immediate notification. That is getting common, if you open a page with upcoming messages (status feed, notification subsystem, friends-list), you expected them being updated as soon as a new message (status, notification, friend-making action) arrives. As you well know, original web design allowed only one-way client-server communication (one requests, another one responds), though now HTML5 working group doing their best to fix it or rather to patch it.

Review services getting consolidated

Social Web
Review services getting consolidated
Image generated by ChatGPT (DALL·E)

I anticipate Google to swallow Review Services market using G+. I hate the idea of somebody having total control on everything, but when I buy a product (any product), I see number of variations from different producers. I want to read some reviews, to see some ratings on products and their producers before picking one. That’s natural. Where to get those? On the site of producer/seller? Oh, please! I would rather not trust them entirely.

HTML5 Video on iPhone: Challenges and Solutions

Mobile Web
HTML5 Video on iPhone: Challenges and Solutions
Image generated by ChatGPT (DALL·E)

Enabling your videos for iPhone Safari doesn’t seem as a big deal. You know it supports HTML5 . Besides, you don’t even need to write event handlers and produce a skin by yourself, but only take a ready JS component. Apparently [videojs.com] is getting close to be the most popular one. Though, I personally like [mediaelementjs.com]. It is very simple to use any of them. The only difficulty is to get your videos converted to h.

When Great Ideas Meet Bad Code: A Look at Drupal

How to
When Great Ideas Meet Bad Code: A Look at Drupal
Image generated by ChatGPT (DALL·E)

Related articles: Drupal Meets MVC: A Smarter Way to Build Websites and Beyond the Basics: Enhancing Drupal’s MVC Architecture Working with Drupal for half of year and constantly tuning it for better maintainability, code consistency I came to the idea – Drupal is going to be a toy, a pretty popular but only toy, unless they decide to rewrite everything from the scratch. Studying Drupal 7 I find the CMS wasn’t really refactored.

ECMAScript 5 and JS frameworks

JavaScript
ECMAScript 5 and JS frameworks
Image generated by ChatGPT (DALL·E)

Standards are being always approved with a slow pace. Though, the features declared in drafts usually find their implementation long before the standard release. Let’s take for an instance Websockets, which were already implemented in Chrome/Safari and Firefox 4b when standard unexpectedly changed. Apparently YUI3 and jQuery have implemented for long time the features, which are only coming up with ECMAScript 5 (the implementations is called JavaScript 1.8.5) spread. YUI 3 from the very beginning introduced controllable attributes.

Beyond the Basics: Enhancing Drupal’s MVC Architecture

Drupal
Beyond the Basics: Enhancing Drupal’s MVC Architecture
Image generated by ChatGPT (DALL·E)

Related articles: Drupal Meets MVC: A Smarter Way to Build Websites and When Great Ideas Meet Bad Code: A Look at Drupal I’ve already described an approach of using MVC in Drupal . It wasn’t bad for the beginning I hope. Though in real life you face requirements which hardly can be fulfilled with such a simplicity. In, more or less, complex application you ain’t going to be satisfied by the only controller (page controller) to serve the whole bunch of components presented on the page.

Customizing phpBB3 the Smart Way: Feature-Driven Configuration

phpBB
Customizing phpBB3 the Smart Way: Feature-Driven Configuration
Image generated by ChatGPT (DALL·E)

Let’s assume you have installed phpBB3 to run forums on the web-project you are working on. It can be a Drupal-based site using phpBBforum Integration module . Anyway, the forum system was re-skinned and your project manager, seems, is pretty happy for the first. But later he requests some changes, e.g. to prevent users from sending emails to each other within the board. This one is easy; you can just direct him to ACP / General / E-mail settings, where board-wide emails can be disabled globally.

Drupal Meets MVC: A Smarter Way to Build Websites

Drupal
Drupal Meets MVC: A Smarter Way to Build Websites
Image generated by ChatGPT (DALL·E)

Related articles: Beyond the Basics: Enhancing Drupal’s MVC Architecture and When Great Ideas Meet Bad Code: A Look at Drupal If you ought to build a new site and don’t have time to develop a CMS, you’ll likely take an open source solution. And likely it will be Joomla or Drupal. They seem as most popular. Actually they are similar in many ways. Both provide basic content management frameworks, extensible through plug-ins and customizable via themes.