AJAX Pagination and Sorting with CakePHP 2.x

CakePHP comes with a core JsHelper that allows a developer to call PHP functions that will create the JavaScript using a number of libraries including jQuery and Prototype. Pagination in CakePHP is a very common task and it can be enhanced using AJAX. Fortunately the Pagination component/helper are built to handle the AJAX. You can set the pagination defaults in the controller with the code below. Alternatively you could set specific elements of the array inside an action with a call like $paginate['conditions'] = array();

Living Without Adobe Flash Player

Richard Stallman founded the GNU Project and the Free Software Foundation. They have done a lot for the free software movment. Richard Stallman has a pretty hardcore philosophy and he is quite a character, but he is the leading role model for living life with only free software. For example, he uses a specific laptop brand because he wants to use a free bios. He doesn't use a cell phone because there are no totally free phones available. He is willing to make sacrifices to avoid something he has deemed unethical.

Exchange 2010 Calendar and Mail with Thunderbird

There is a way to get your exchange mail and calendar in Thunderbird, however I'll be honest I still had issues with the calendar after doing all of this. The calendar would load once, but then not load again. I'm going to provide this for reference. Perhaps in the near future some bugs will be sorted out in these addons, and maybe someone will have a comment on the configuration. I have included specfic versions numbers. If you want GOOD Exchange 2010 support, I recommend using Evolution.

Writing a Web Scraper with Node.js

Node.js is, according to their website, "a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices." It is essentially a javascript interpreter for the command line. With Node.js, you can write scripts in JavaScript just like you would with PHP and Python.

AJAX Form Submit with CakePHP 2.x

CakePHP has some great tools for a PHP developer to crank out JavaScript functions using only PHP. The JsHelper supports Prototype/Scriptaculous, Mootools/Mootools-more, and jQuery/jQuery UI. Refer to the CakePHP Book for details on all the functions provided by the JsHelper. In this example we're going to look at a creating a contact form that submits via AJAX, but also works properly for users without JavaScript.

Writing Secure Code with CakePHP 2.x Forms

CakePHP is one of my favorite web frameworks. There is one glaring security hole that caught my attention though. Without proper care from the developer, users have the potential to tamper with data sent with forms. For example, a common operation is to take the value from a form and save it like this:


Let's say the user manipulates the form and adds this line:

Responsive CSS Media Queries

Responsive design has been a big boom recently and it's still a mystery to some. Let's see just how easy it really is. Let's say you want to start simple with a normal desktop version of your website and one suitable for smaller screens like mobile phones. Let's start with something like the menu. You can create one menu and set it to display for large windows and make a compact menu, perhaps a dropdown, for smaller screens. This is where CSS Media Queries come in. In the HTML there can be two different menus created with only one set to display at a time.

Twitter Bootstrap Review

Twitter Bootstrap, which was renamed to simply Bootstrap, is am amazing tool for web developers. It is now my favorite way to get a new site going. As a developer, I feel it is powerful and flexible, but not bloated. It is just the right tools for almost any project. Check out their official website here. It comes in a very light and simple package that includes: