Well, we survived the storm last night. I couldn’t believe that Mackenzie slept through the whole thing. Now we’re just eagerly awaiting her return from Las Vegas.
Author Archives: Tim Golen
Choosing a Mobile Web Framework
In this day and age you don’t have to go far to find a framework that claims to be the BEST and MOST SUPPORTED mobile framework EVER!!! Three years ago, there were only a handful. IUI was there, JQTouch was there, and Sencha Touch was early on the scene. In the last year, there has been dozens of new frameworks on the scene. So, with all those frameworks, how in the world can you choose which one is right for you?
I’m not going to go into depth on every framework that is out there. A simple Google search for “mobile web frameworks” will put lists and lists of frameworks in front of your face, but that still doesn’t get you any closer to deciding which one is right for you.
I’ve used many of the frameworks, and I know the pros and cons of them. I’ve used them on client projects and on personal projects. I’ve used them with heavily customized styles, and I’ve used them with lightly customized styles. I’ve used them on iPhones, Androids, iPads, and Blackberry devices. When I talk about mobile frameworks, I know what I’m talking about. Let’s take a look at some of the most important criteria you should have when choosing a framework.
Support
This is perhaps the most important aspect of any framework. Some frameworks only provide API documentation (like Sencha Touch and JQuery Mobile), which is good if you want complete documentation, but it lacks in telling you how it all fits together. Other frameworks like Wink don’t mind telling you how it all fits together, but you don’t get full documentation if you really want to manipulate the application.
The other aspect of support is how quickly you can find answers to undocumented features. Typically you need to reach out to the community for answers. The more established a framework is (like Sencha Touch and JQTouch) the better and more responsive the community is.
The level of support will determine how quickly you learn to use the framework, and how quickly you can deal with obstacles that you come across. If you are going to create a heavily customized or richly featured application, then you want to find good support with a good community that can help you out when you get into a tough spot.
Win: JQuery Mobile, Sencha Touch
Fail: just about everyone else
Custom Design
This is where a lot of frameworks absolutely FAIL. Most frameworks force you (and you’re users) to conform to their designs, layouts, and animations. For some people, this is fine, but if you want to take Sencha Touch and put a high customized design on it, you’re going to run into performance nightmares when using it on anything but an iOS device or the newest Androids.
One good concept when it comes to building user interfaces is to not re-train a user how to use a well-known interface. For example, the typical interfaces on an iPhone are completely different than the typical interfaces on an Android. Why on Earth would you want force Android users to learn an iPhone interface? They chose an Android for a reason. Are you so arrogant that you alone can determine that an iPhone interface is superior to an Android interface?
In order to provide a highly customized interface, you’re going to want as much control over the looks and interactivity while retaining as much performance as you can. This is where smaller frameworks like XUI come in that merely provide a core set of tools and it’s up to you to make them look how you want.
Win: XUI
Fail: JQuery Mobile, JQTouch, Sencha Touch, many many others, so many others
Performance
Most frameworks show you demos of all their layouts, interfaces, and animations so you can test them out and see how wonderful they are. That’s only half the story though. What you’ll quickly find out is that when you start building your own application and customizing designs or animations, it’s quickly going to bog down. If you want to retain the original performance level, you’re going to have to stick with how they design things. The arrogance!
If you’re fine sticking with their designs, then that’s fine… nothing against that. That’s why I used JQuery Mobile on one of my projects because it was for iOS users only and I wanted something quick, simple, elegant, and not highly customized. It worked perfectly! However I’ve worked on projects that required a lot of styling and design and most frameworks performance quickly fell short especially on non-iOS devices.
Win: XUI
Fail: JQuery Mobile, JQTouch, Sencha Touch, too many to mention
Continued Development
The ideal framework will have an active development cycle. You don’t want to use a framework that was only created by one guy in order to fix a certain problem they had (ie. CiUI). Since technology is moving forward at such a fast pace, you want a framework that’s going to be around for at least a couple of years and that is going to be updated to move with technology.
Win: JQTouch (sorta), JQuery Mobile, Sencha Touch
Fail: CiUI, iUI, too manny to mention
Analysis
We’ve looked at some of the major criteria to take into account when trying to decide which mobile framework you should use. You need to have a framework with good support, good performance, and that will be around for a while. The bit about custom design isn’t for every project. There are only a handful of frameworks that are viable candidates at the current time.
Conclusion
JQuery Mobile, JQTouch, Sencha Touch, iUI, and XUI are the few and the proid. If you stick to that short list, you should be able to find something that suits your needs.
WordPress Custom Post Type as Static Home Page
I’ve been searching the last couple of days for some sort of solution to this problem. I’m using custom post types in WordPress and I want to be able to specify my static home page to be one of my custom post types. In the WordPress Reading options it only lets you specify ‘Pages’, not any of your custom post types.
I came across this discussion here, but it didn’t lead to any kind of a solution.
Another possible is here, but it wasn’t a good solution because you had to create an actual page, and then use a custom template. A little too messy for my taste.
I also found this which was the closest one yet. I found out, that manipulating those options does work, but not as intended. The home page was auto-redirecting to the permalink of my custom post type. So, in principle, when I went to my home page I was seeing my custom post type, but when looking at the address bar, it actually just redirects to the permalink. This wasn’t the solution I was looking for.
Then I decided that if you could specify the post ID somewhere (in my theme settings) of the page I wanted to be the home page, it would be as simple as modify the query for my main loop. I came up with the following code placed in my main index.php file for my theme before the loop starts, and it seems to work perfectly.
$postId = 12345; // substitute with the ID of the post you want to show
if ( is_home() && '' != $postId ) :
$post = get_post( $postId );
query_posts( array( 'post_type'=>$post->post_type, 'p'=>$postId ) );
endif;
Smarty Plugin: Autolink URLs
This is a plugin for the PHP template engine Smarty. It’s a modifier plugin, so you can use it like this:
{$text|autolink}
The purpose of the plugin is to automatically detect URLs within a string and wrap them in HTML anchor (<a>) tags.
Features:
- will detect URLs with or without http://
- detects http or https
- adds a _blank target and a nofollow rel (you can edit the file to remove those if you wish)
Let me know if you find it useful.
Download it here
Just place it in your Smarty plugin folder
PHP ZIP Archiver
I recently had to create a piece of PHP code that will take an entire directory on my hard drive, and make a .zip file out of it. I needed it to be recursive and I needed it to be simple. My code stemmed off the code I originally found here, but the problem was that it referenced another piece of code that must be required to use, and that code was held behind a registration page. So, I went ahead and created my own code that is self-sustaining and open source. You can check it out over at Google Code. I hope you enjoy it and let me know if you need any help with it.
GMails New Priority Inbox (beta)
Google has released a new feature for GMail called Priority Inbox Beta. It works by analyzing your email and filtering it out what it thinks are the important messages and giving you easier and quicker access to those. It does this by seeing which emails you read, and which ones it applies to. So, it’s customized for each individual user. At first the filters won’t be very accurate, but by seeing your patterns over the course of time, it will become increasingly more accurate. You can even tell Google that a certain email is “less important” or “more important” to help out it’s learning curve.
Dust 514 – New Console FPS MMO by CCP
Seems like CCP has been busy… seems like they also have too much money on their hands. What happens when you have a company run, built, and dreamed of by gamers? Apparently you get CCP. Their persistent world MMO EVE Online has been a classic. Something all other MMOs should strive to be. Now they are branching out. They have been busy developing a first person shooter called Dust 514. Apparently they are wanting to release it on consoles. “Well, what’s so cool about that?” you ask. I’ll tell you. The two games (EVE and Dust 514) will exist in the same universe. Actions done in either game will effect the same universe. Dust 514 will be battles in the trenches on the planets in EVE.
New Free MMO – Allods Online
So, I came across this MMO yesterday called Allods Online. I was very very skeptical. I’ve been looking for a good MMO to get into lately and the barriers have either been high-barriers to entry (EVE Online), you have to pay for it (just about any MMO out there), or bad graphics and childish gameplay (WoW). I was first impressed by the graphics for Allods. I looked at a couple of their videos on their website, and it had me intrigued. Then I saw that it was free subscriptions. Double-take! My first thought was then “they must make you pay for in-game items”. Not the case (at least as far as I can tell).
WPTouch and Webcomic Working Together
I happen to be a user of both WPTouch (a plugin that makes my blog mobile friendly) and Webcomic (a plugin and theme that allows you to organize comic series). The problem lies in that webcomic uses a custom post type for displaying the images associated with each comic and WPTouch has no idea how to display a webcomic. Thus, when someone visits my site on a mobile device, they can see any text that I post for a webcomic, but they can’t see the image associated with my post. Today I resolved to fix that problem and I was successful. While it’s not the most elegant of solutions, it at least works for now and I hope it can help others.