Working with Google Charts and Visualization API

November 9th, 2009 / No Comments » / by Julian

Red line chart with pale gray backgroundThis week I had the chance to play around with Google’s charts API, and let me tell you that I’m loving it. In the past couple of years I’ve had to integrate charts into the different projects. I have used everything from Fusion Charts, to PHP/SWF Charts, and DOJO’s charting engine. But, since I learned that Google provided developers with an API to create charts on the fly, I wanted to give it a try. Read more…

Tags: , ,

Installing Zend Studio on Ubuntu 64-bit

November 2nd, 2009 / 5 Comments » / by Julian

Today I tried to install Zend Studio 7.0 on the latest 64-bit version of Ubuntu (9.10). Initially, it would just throw an error. (exec: 2481: /tmp/install.dir.2855/Linux/resource/jre/bin/java: not found). Since, the error was related to the installer not being able to find the java JRE that came bundled with the installer, I decided to install with the system’s JRE using:

./ZendStudio7_0_0.bin LAX_VM /usr/bin/java

That seemed to do the trick, but, once the installer had finished. Trying to open Zend Studio would give me an error (Failed to execute child process “/usr/local/Zend/Zend Studio-7.0.0/ZendStudio” (No such file or directory)). At this point I was about to give up, until I did a little bit of research and found that the problem was more simple that I imagined. Read more…

Tags: , , ,

Best Practices – Displaying Application Messages and Alerts

October 15th, 2009 / No Comments » / by Julian

traffic-lightOn my last post I wrote on how to debug and log error messages using Zend Framework and Firebug. Today I wanted to write on how to properly display messages and alerts to users.

There are different type of messages you can display to a user in a web application. From the typical validation messages, to a dreadful fatal error in your app.  Here are some rules I tend to follow when alerting the users that they must take an action without causing confusion:

  • Use the same massaging system to display all messages
  • Stick to 3 different types: warning (yellow),  success (green), and error (red)
  • On system error, do not display the system error to the user
  • Display informative messages when interface can be confusing

Read more…

Tags: , , , , , ,

Zend Framework and Firebug – Log and Debug your Projects

August 21st, 2009 / 2 Comments » / by Julian

firebugWhen developing an application there are some important factors that you have to pay close attention to avoid problems in the future. I think one of the most important is logging information on how your application is working and when it fails.

Must of us like to log only big exceptions and fatal errors, but the truth is, that when you are in the development process it’s very important to keep track of not just errors, but important information of when something gets executed. As a web developer one of the most important tools to have is FireBug. If you didn’t know, FireBug has an API that you can use to send console messages for logging purposes, when debugging JavaScript. But, did you know you can use FireBug to debug your php applications? Read more…

Tags: , , , , ,

Facebook iPhone App 3.0

August 18th, 2009 / No Comments » / by Julian

According to Joe Hewitt, developer of the facebook app. Version 3.0 of the facebook application has already been submitted to apple, and it’s waiting for approval.
Read more…

Tags: , ,

Maintaining PHP session when using CURL.

July 24th, 2009 / 11 Comments » / by Julian

Working now on some iGoogle like dashboard for the system I’m developing.

I was trying some stuff out with CURL and was having a hard time to maintain my current session when making a curl request to another page. I needed to stay authenticated in order to retrieve my widget.

Here is my initial code:

$strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/';
$ch = curl_init($rssFeedLink);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_COOKIE, $strCookie );
$response = curl_exec($ch);
curl_close($ch);

The problem with that piece of code is that it was generating a new session id instead of sending my current session.

The solution? Read more…

Tags: , ,

Firefox 3.5 Released

June 30th, 2009 / No Comments » / by Julian

fflogo2A new version of Firefox has been released today. What was slated to be version 3.1 became a more major release that include many important improvements and features. The more important features that are worth nothing are privacy browsing and JavaScript speed improvements. The firefox team claims that version 3.5 javascript engine is twice as fast as version 3.0 and 10 times fater than version 2. Read more…

Need For Speed? Google’s Page Speed

June 26th, 2009 / No Comments » / by Julian

Google recently release the competition to Yahoo’s YSlow. The Firefox add-on to test and analyze your website speed and performance. I have been using YSlow for quite some time. It has helped me optimized my websites dramatically. Well, now google has entered the market with a similar tool called Page Speed. Page speed consists of two parts, page speed activity and page speed.

The Page Speed tab is a summary of the performance. It gives a detailed report with it’s respective grade. With this report you can see the areas that are in need of optimization.  It covers the following topics: Read more…

Tags: , , , ,

Deal: 1yr Hosting plus Domain Registration for $9.24

April 24th, 2009 / No Comments » / by Julian

DreamHost.com is offering 1 year of hosting plus domain registration for only $9.24. That is a 92% off their normal pricing. Just select “Host a Domain” and when asked for coupon enter “777″

If you only need a domain name, GoDaddy.com has a 1-Year Domain Name Registration for only $1.19. Use coupon “99BUYCOM”.

I’m not sure until when the offers are valid, so just go grab yours now before is too late.

Zend Cache and Zend Feed Problem

April 22nd, 2009 / 1 Comment » / by Julian

Today I ran into a problem while caching feeds using Zend_Cache. I decided that I wanted to cache the returned object by the Zend_Feed. I had something like this:

$rssFeedLink = 'http://www.smooka.com/blog/';
$cacheId = 'rss_feed';

$frontendOptions = array(
		   	'lifetime' => 1800, // cache lifetime of 30 mins
		   	'automatic_serialization' => true);

$backendOptions = array(
		    	// Directory where to put the cache files
		    	'cache_dir' => '/cache/'
			);

// getting a Zend_Cache_Core object
$cache = Zend_Cache::factory('Core','File', $frontendOptions, $backendOptions);

if (!$rss = $cache->load($cacheId)) {
	try {
		$rss = Zend_Feed::import($rssFeedLink);
	} catch (Exception $e) {
		$feedError = true;
	}

	//check to see if it did not fail
	if (!$feedError && is_object($rss))
	{
		$cache->save($rss, $cacheId);
	}
}

//assuming that everything went right while fetching the feed
foreach ($rss as $item) {
	$channel['items'][] = array(
		'title'       => $item->title(),
		'link'        => $item->link(),
		'description' => $item->description()
	);
}

Read more…

Tags: , , ,