verbalexp

Most newbie (and some seasoned) programmers have difficultly constructing Regular Expressions. Many a times one needs to create a Regexp quickly to test a a particular piece of code. However, not being comfortable withe Regexps can be a problem. VerbalExpressions is a PHP library that enables you to construct regular expressions using natural language like constructs. Think of it like a DSL for building Regexps.
Read More

Pretty error display for PHP

by: Sameer Posted in: php |  

14 Jul 2013

One of my pet peeves regarding PHP is the terseness of the error messages it throws. Not that they are unhelpful; the major headache it that one has to open the source file at the given error location to check for problems. Also the complete system context (the PHP system variables, cookies, session etc.) is not easily available.
Read More

In a non-strict MySQL server mode, columns with NOT NULL and without any DEFAULT values are given implicit default values based on their data types. This can be useful when no values are explicitly set for them during a SQL INSERT. However this can be recipe for disaster if the MySQL server is later configured for strict mode. The following are the general rules governing implicit default column values:
Read More

StrikeIron sales tax addon for cs-cart

by: Sameer Posted in: web |  

28 Jun 2013

CS-Cart is one of the premium shopping platform for building ecommerce sites. As with any ecommerce solutions CS-Cart includes various tax features. However, one important feature it lacks is sales tax. For a recent client work I needed to integrate the sales tax api from StrikeIron, which provides a cloud-based Data Quality Suite including email verification, address verification, phone validation, phone append, and sales tax calculation solutions. For those who may be interested in implementing sales tax for their CS-Cart installation I’ve provided the addon for download below. A sample screnshot of the tax screen is given below.
Read More

Updated : 19th November 2014

With the recent release of Laravel 4, PHP developers have at their disposal one of the finest frameworks for application development. As with all new frameworks, it is always good to write some quick code to get a feel for the underlying architecture. The following post shows a simple authentication application using Laravel.
Read More

Recently, Google introduced Schemas in Gmail messages to allow developers to deliver a more interactive email experience integrated with their web app. Schemas in emails can be used to represent various types of entities and actions. Email clients that understand schemas, such as Gmail, can render entities and actions defined in the messages with a consistent user interface. In the case of Gmail, this means that the emails can display quick action buttons that let users take actions directly from their inboxes, essentialy allowing them to tie their web app with Gmail for a more integrative experience.
Read More

By default, Laravel is configured to create daily log files for your application, and are stored in app/storage/logs. All Laravel logging features are handled by the wonderful MonoLog library. Monolog includes various log handlers you can use – FirePHP, ChromePHP, CouchDB, Stream and many more. One of my favorites is FirePHP while debugging PHP apps.
Read More

Drupal is one of the most popular free and open source web application frameworks. Drupal is almost infinitely extensible through not only various theme possibilities but also the vast library of modules or add-ons. However, this great extensibility is also a point of weakness should insecure or vulnerable code be used in either themes or community contributed modules that can result in compromise. The following guide on best practices for Drupal covers main areas of attention in regards to security for any Drupal web administrator.
Read More

With a wide variety of devices available for viewing web content, responsive design has become a necessity rather than a feature of a website. Below are some frameworks and tools that will help you in designing advanced responsive websites for any viewing device.
Read More

Intercepting mouse events on an iPad

by: Sameer Posted in: javascript |  

10 May 2013

In the last post we saw how we could easily work with mouse events on an iPad. Touchscreen devices like the iPad do not have a cursor, so the user cannot exactly move the mouse over an HTML element triggering a ‘mouseover’ event. One of the readers requested on how we could use a different interaction pattern on an iPad for a ‘mouseover’ event than on a desktop browser. For example in the following web page code the image-container class is attached to images div which displays a preview link overlay on mouseover.
Read More

Sign up for fresh content in your email