Skip to main content

Posts

My CakePHP 3 Review

My CakePHP 3 Review – Still Fresh, Still Hot This past month, the  CakePHP  team announced the launch of the alpha release of  CakePHP 3 . The Cake development team considers version 3 to be a game changer, so with the alpha release of version 3 now hot out of the oven, this article takes a fresh look at CakePHP 3 as an effective modern framework for PHP development. A Brief History These days, there are so many options when it comes to  PHP development . As PHP has matured, more and more PHP Frameworks have come onto the scene, providing developers with a wide array of choices. But it hasn’t always been that way. Back in 2005, when PHP 4 was still the standard, there were no PHP frameworks and developing an object oriented coding approach in PHP was certainly a challenge. It was then that CakePHP emerged – the first-ever PHP  MVC  framework. In the nearly 10 years that have passed since it was first released, CakePHP has continued to ev...

Top Ten Front-End Design Rules For Developers

As front-end developers, our job is, essentially, to turn designs into reality via code. Understanding, and being competent in, design is an important component of that. Unfortunately, truly understanding front-end design is easier said than done. Coding and aesthetic design require some pretty different skill sets. Because of that, some front-end devs aren’t as proficient in the design aspect as they should be, and as a result, their work suffers. My goal is to give you some easy-to-follow rules and concepts, from one  front-end dev  to another, that will help you go from start to finish of a project without messing up what your designers worked so hard on (or possibly even allowing you to design your own projects with decent results). Of course, these rules won’t take you from bad to magnificent in the time it takes to read one article, but if you apply them to your work, they should make a big difference. Do Stuff In A Graphics Program It’s truly rare that you comp...

A Guide to UTF-8 for PHP and MySQL

Data Encoding: A Guide to UTF-8 for PHP and MySQL As a MySQL or PHP developer, once you step beyond the comfortable confines of English-only character sets, you quickly find yourself entangled in the wonderfully wacky world of UTF-8. On a previous job, we began running into data encoding issues when displaying bios of artists from all over the world. It soon became apparent that there were problems with the stored data, as sometimes the data was correctly encoded and sometimes it was not. This led programmers to implement a hodge-podge of patches, sometimes with JavaScript, sometimes with HTML charset meta tags, sometimes with PHP, and soon. Soon, we ended up with a list of 600,000 artist bios with double- or triple encoded information, with data being stored in different ways depending on who programmed the feature or implemented the patch. A classical technical rat’s nest.Indeed, navigating through UTF-8 related data encoding issues can be a frustrating and hair-pul...

Creating Vertical slider jQuery

Create Simple  jQuery  Vertical slider HTML Part Creating vertical scroll using <ul> and <li> <div id="scrollContent">     <ul id="scrollList">         <li>AAAAAAAAAAA</li>         <li>BBBBBBBBBBB</li>         <li>CCCCCCCCCCC</li>         <li>DDDDDDDDDDD</li>         <li>EEEEEEEEEEE</li>         <li>FFFFFFFFFFF</li>         <li>GGGGGGGGGGG</li>         <li>HHHHHHHHHHH</li>         <li>IIIIIIIIIII</li>         <li>JJJJJJJJJJJ</li>         <li>KKKKKKKKKKK</li>         <li>LLLLLLLLLLL</li>         <li>MMMMMMMMMMM</li> ...

Create and download Zip folder in php

Create and download Zip folder in php ini_set("memory_limit","1280000M"); ini_set('max_execution_time', 60000); // Zip destination path $zipDestination =  __DIR__.'/images/zipfile.zip'; // Use php zip library $zip = new ZipArchive(); touch($zipDestination); // create zip files if($zip->open($zipDestination, ZipArchive::CREATE)!==TRUE) {     exit("cannot open <$zipDestination>\n"); } // If you want to add all files from folder  $pattern = __DIR__.'/bagImages'; // It will read all files of bagImages folder $files = glob($pattern.'/*.*'); foreach($files as $file) { $fileinfo = pathinfo($file); $zip->addFile($file,$img_fol.'/'.$fileinfo['basename']); } // if you want add sub folder files also use. $rootPath = realpath('images'); $files = new RecursiveIteratorIterator(     new RecursiveDirectoryIterator($rootPath),     RecursiveIteratorIterator::LEAVES_ONLY ); fo...

Access modifier in php

Access modifier in php Restricting access to properties PUBLIC PRIVATE PROTECTED Those class properties and class methods which are set to be PUBLIC is accessed from any where in PHP script.I Access: Every where Those Class properties and class methods which are set to be PRIVATE can only be access with in the class.i.e Only the same class can access the property. Access: This class only Those class properties and class methods which are set to be PROTECTED can only be accessed in side a class and from its child class.i.e only the same class and classes derived from that class can access the property Access: This Class and sub class. public $height; protected $social_insurance; private $pin_number; $abc = new User(); /* Since $pin_number was declared private, this line of code will generate an error. Try it out! */ echo "Tell me private stuff: ".$abc->pin_number; /* Since $pin_number was declared protected, this line of code will genera...