Friday, December 6, 2013

JavaScript Design Patterns - Deferred Initiation

Prerequisites

First of all, I would strongly recommend an in-depth reading on the topic of Design Patterns. Here is a good starting point. This article has other really good references on the same topic, which covers different aspects at different level of detail.

So, let's do a quick overview about design patterns. You may skip this part should you know about this already.
  • What is a Design Pattern? A Design Pattern is a generalized, verified, well-tested solution to well-known problems during software development. Adapter is a popular example for solving the problem of multiple database providers (MS-SQL, MySQL, DB2, Oracle...)
  • I know JavaScript and PHP, do I need to know about Design Patterns? Design Patterns are not language specific. You can apply the adapter design pattern using either PHP or Java. There are a few differences (e.g. syntax and runtime...), however, the same elements of the design pattern will appear.
  • What benefits do I get? Design Pattern is about identifying common problems and the optimal solutions. A good knowledge about design patterns helps you stay in-line with the community of people like you (software engineers, front-end developers and the likes) so that you don't have to reinvent the wheels! Try it, just google for the word singleton and you will see what I mean.

Sunday, December 1, 2013

The basic structure of a Magento module


Magento is a feature-rich open-source web application that was first released on March 31, 2008. Varien is the company behind Magento, responsible for the development and on-going maintenance of the platform. It is built based on Zend Framework.

There are many Magento extensions that you can find on Magento Connect. However, it may not always meet your needs. If you can understand Magento module structure, you are able to modify a module or even developing a new one.

In this entry, we will explore a structure of a basic Magento module and in the next entry I will show how to develop a simple module for Magento.



Saturday, November 16, 2013

Introduction to MySQL Full-text Search


Part 1


I.  What is Full-text search?
In short, Full-text search  is the most natural way to search for information. It likes when you google a term, you only need to type a keyword in search box and press 'Enter' and then the results will appear. In the scope of this entry, we only discuss about Full-text search in MySQL but don't discuss about other Full-text search engines such as Sphinx or Solr.