Thursday, May 28, 2009

Yahoo YUI

It seems that the internet is being filled with JavaScript libraries that are freely usable that can make creating advanced, interactive user interfaces quite easy for even a moderately knowledge web developer.

Over the last few weeks I have been working a lot with Yahoo YUI and have had a lot of fun and success. The YUI, at the time of this writing) is in version 2.7 with version 3 in beta. The YUI is a collection of JavaScript driven API's which the user can either download and use locally on their own web site, or, call remotely from Yahoo's datacenter.

There is a vast collection of tools available for use, with the most common, or most widely usable being the tabbed interface, which is becoming increasingly common, simple button tools, AJAX utilities that make creating AJAX calls and div refreshes very easy, data tables, which take javascript arrays or remote data and create tables that are sortable by column, in addition there is a rich text editor, file uploader, image cropper, calendar, JSON interface and much more.

Most of these tools have the options of being either markup driven, or JavaScript driven. The downside I saw in some of them is that if they are JavaScript driven, your search engine freindly content becomes useless for ranking if tossed into a Javascript array. If there is a markup option, use it in cases where the content is critical to search engine positioning.

The Yahoo Developer web site is full of examples, source code, forums and more that help the developer implement the code. If you have virtually any notable experience as a web developer, implementation is quiet routine, a matter of copy and paste, edit a few values to suit your needs and your running. If you use it locally you can have much more control over changing the look and feel of the tools to further match your site.

if you are looking to get a bit more interactivity in your web site, but are not sure you have the time to write these massive libraries, check out the YUI, it's been a lot of fun for me thus far.

Friday, May 22, 2009

Converting Date Formats In PHP For Readability Versus Database Friendliness

One thing that has always annoyed me is the date formats which are considered readable, or often not the format a database understands. In the United States our commonly used date format is MM-DD-YYYY though, when putting it into a MySQL database DATE field, it wants YYYY-MM-DD.

Some databases recognize different common formats and add them properly anyway, whther it's using dashes or slashes between the pieces and that sort of thing. However, where it gets to be a challenge is when a handy little JavaScript widget is used on a form field that pops up a calendar to make date selection easy, and it puts it into the text field in that readable format. On submission of the form, some string manipulation has to be done to get it into database format.

So I have written a couple simple little PHP functions to take the date and switch it from standard format to database format and back again when extracting the date from the database. Of course on extracting you can use SQL functions to format as well, but since I wrote the one function for use when adding, it seemed logical to have the "undo" type of function as well.
function dateStandard2DB($date_str)
{
$date_array = split("-",$date_str);
$done_date = $date_array[2]."-".$date_array[0]."-".$date_array[1];
return $done_date;
}

function dateDB2Standard($date_str)
{
$date_array = split("-",$date_str);
$done_date = $date_array[1]."-".$date_array[2]."-".$date_array[0];
return $done_date;
}
I hope these little functions come in handy for you at some point.

Saturday, May 2, 2009

Final Words (for now) Regarding InfoLinks

I have been using InfoLinks as my in text advertising prodvider for over a month now, well long enough to get a good look at the system, the revenue, time for the "newness" of it on my site to wear off and watch it start performing as it normally would.

I have to say, moving from Kontera to InfoLinks has been one of the best things I have seen in the advertising business in a while. With the economic downturn, most every advertising platform has seen drops in revenue, but moving from Kontera to InfoLinks I have over doubled the average income I get from in text advertising.

The links they create are animated and dynamic, they catch the eye and get the clicks. The publisher has easy integration options, allowing the specification of link color, and link decoration type, with the options of single or double underlined. You can also set how many links per page you want to show, up to a maximum of 12, and categorize your site with their very limited, high level list.

The one downside I have noticed thus far is the fact that there is currently no method to have multiple web sites in one account and have them tracked separately. I have a smaller site that is still running Kontera, and I submitted it to InfoLinks for use with them and it was approved. However, in order to track the domains separately, I would have to create a second account, which sucks. I was, however, also told they have the multiple domain option coming in a release scheduled for release soon. I was given no exact date, but told "soon". With that, I am waiting to put it on my second site to avoid the multiple account hassle.

Currently, in looking at April's earnings report, InfoLinks averaged over double what Kontera averaged while I used it, and CTR is about 50% higher.

If you use in text ads, InfoLinks may well be worth a try.

Friday, May 1, 2009

FireFTP

A friend recently introduced me to a great Firefox add on; FireFTP. FireFTP is an FTP application that can do most anything a common FTP app can do within a tab of FireFox.

I use Aptana for my web development, I was under some time pressure on a project and was whining to a friend about some bugginess I was having with Aptana's FTP/Syncing functions and didn't have time to troubleshoot or fix them. He told me about this FireFox add on that can do the job.

The next morning I went and found it.

This is a great little FTP app, and very handy. It does everything any freeware or shareware FTP app does, moves files, creates and removes files and directories, sets folder permissions and all that good stuff. It does it all within another tab of FireFox, which is nice since you can hit the tab, move a file, flip back to the previous tab and preview the results.

The add on allows for multiple accounts, so if you run numerous web sites you can have a profile for each, define root directories for local and remote locations for each account. The absolute best feature is the ability to navigate in one window and the program automatically keeps the other in sync by moving in and out of the same directories. So if I am browsing the local directories, the remote directories will open and close in sync. Very handy!

If you are in need of a decent FTP application, and can get by with the basic requirements of any web developer, I highly recommend checking out FireFTP. Great stuff.

Thanks, Bob, for the heads up on this great add on for FireFox.