Really, the TextHelper? Yes, this is probably one of the most overlooked helpers in CakePHP. Sure we all know about the HTML Helper, Form Helper, JS Helper, etc… but how many of us use the Text Helper? I’ve seen so many custom functions for truncating text and adding an ellipsis (…) to the end of it. How about replacing email addresses with links? Etc… No more I say! Let’s begin explorining the Text Helper now. (more…)
Category: Development
-
Maintaining a session in a session-less environment
Confused? I know I was at first, but let me explain. First, why would there be a session-less environment? I thought this was a HUGE plus to server-side development languages over basic HTML that is session-less? Well, you would be right in that sense; however, as I mentioned in a recent blog that I’ve switched careers and I am currently doing server-side game development for large Facebook Virtual Worlds. The client/server relationship in these games are completely session-less. Each time the client performs an action, the server doesn’t “know” who they are because it’s not a consistent relationship like a browser and a web server.
Don’t worry, there is a simple solution to this problem, let’s explore it now. (more…)
-
Modifying the CakePHP Bakery Templates
One of the keys to a successful website is a good user flow especially when leveraging jQuery template. What defines a good user flow? At the very core, it requires simple navigation, being able to find what you’re looking for, and being able to do it quickly. CakePHP’s bakery let’s you quickly create websites that list, add, edit, and delete data. All you need to do is create a database table and run a few simple bakery commands and this will be done for you.
The basic templates provided are pretty good. They include links to do all of the above as well as pagination and sortable headers on the table listing page. I find them a little bland and very “techie”. Most customers don’t like this, so let’s alter them to suit are needs. (more…)
-
Maintaining the back button with AJAX
When I blogged about whether or not you can use too much AJAX on your website. The short answer was no; with one caveat being that you must not lose the user interaction experience. In this scenario I’m referring to the back button. If the user has “felt” like the content changed, they are likely to click the back button to return. If they do this, it’s important for them to “go back” to where they “think” they were and not the last page that was loaded without AJAX and simply relying on Javascript events! I’ve put together a quick example of how to do this. (more…)
-
AJAX, can there be too much?
Like any problem, there is no one right solution. There are always many different solutions that work for different reasons. Some solutions require the best solution; some solutions require the more optimized solution; other solutions just need to “get done”.
As a developer, I like AJAX. It’s easy to develop and it makes for a really good user flow. No more loading new pages to add comments or view the description of a product. It can all be done with a smooth interface and less waiting.
But, can you have too much AJAX?
(more…)