Skip to main content

Posts

Why the Latest PHP 5.5 is Impressive on Ecommerce Stores?

               LAMP (Linux/Apache/MySQL/PHP) platform is a successful alternative to commercial software for building and operating dynamic and high performance web systems. PHP has become one of the major player on the web development market in the last few years. For all Linux hosting packages, PHP 5.5 has recently become the standard version. The upgraded PHP version 5.5 comes with lots of changes and value additions.Most of the changes are beneficiary for the e-commerce stores running on php. Here’s a Brief description of what php version 5.5 has to offer your e-commerce store…. (i) Addition of keywords : In php version 5.5, the provided refinery keyword facility will allow a developer to define block code, cache block for better keyword search. It improves the result of the search based on keywords. Keyword search is very much helpful in the e-commerce online stores. (ii) Availabili...

Learn about MySQL Stored Procedures

MySql 5 introduced the concept of stored procedure functionality. If you have already worked on other DBMS(Database management System) or Mysql,  you might be familiar with the concept of stored procedure. We will learn more about it in detail here. What is mysql stored procedure? Stored procedure is a set of SQL codes stored in a database server which can be invoked by a program, trigger or stored procedure itself.  Stored procedure is a way to execute tasks/business logic directly on your database server. Generic tasks can be performed  which are dependent on database table data. so rather to go multiple time on database to fetch data into your program and perform your business logic stored procedure give some generic way of coding for your business logic and take data return or you can save your processed data into your database. Let us take an example:- A loan officer wants to change the floating interest levied for a customer’s loan account. What is y...

CAKEPHP Interview Questions

  What’s wrong with this multiple Model Validation rule? Will both, one, or neither rule be executed and why? How might this code be fixed? 'email' => array( 'rule' => array( 'rule' => 'notEmpty', 'message' => 'Email address is required.' ), 'rule' => array( 'rule' => 'email', 'message' => 'The email address you entered is invalid.' ) ) Ans :-  The key 'rule' needs to be unique when calling multiple validation rules. In the case above, the notEmpty rule will never be called, as the email rule will simply overwrite it (since the multidimensional array has the same key). Each key should be unique, e.g: 'email' => array( 'rule-1' => array( 'rule' => 'notEmpty', 'message' => 'Email address is required. ), 'rule-2' => arr...

Bad Cakephp habbits

Bad CakePHP Habits & How to Rectify Them! SUNDAY OCTOBER 27, 08:23 I've been thinking a lot recently about how I can best help the CakePHP community - to try to give back some of the love which I have received over the years. I have been fortunate to use CakePHP for over 5 years now, and in that time have gotten to know some key members of the CakePHP community. So, what I wanted to go over was a few bad practices which I have seen over the years and how the correct procedure should be implemented.  This isn't to say my code is perfect, but as a programmer we are always learning, so it is important to follow the best practices and adjust to them as you learn them! CAKEPHP CONVENTIONS There are actually CakePHP coding conventions which should be followed.  These can be  viewed here .  I will highlight a few things which I often notice when viewing other programmers code. 1) Control Structures.  So often you see programmers get this wrong, and ...

Why implement Fat Model and Skinny Controller in CakePHP

Fat Model and Skinny Controller  encourages developers to include as much business logic into the application models and the controllers should translate the requests, instantiating classes, getting data from the domain objects and passing it to the view. This development methodology is not new but rarely adopted among the developers. Developers should focus on creating model behaviors rather than creating controller components. It is a simple and powerful concept to implement is offers numerous convenient features to the developers. Controller is responsible for handling & executing the actions routed through the router, it should be lightweight and agile in nature. It is not about counting the lines in controller, rather putting codes in the right place. Why Fat Model and Skinny Controller: After developing for a while, when you look back at your code you’ll realize how hard it is to keep track of all these things. When you have a  Fat Controller , it c...