Aug

24

The PHP Anthem

Someone with a very creative mind and musical talent has created an anthem for PHP. You just have to hear this song, make sure you pay attention to the lyrics.

My only question is what’s with the girls they have nothing to do with PHP nor programming, I guess they just wanted them there for the eye candy. Anyhow the lyrics to the song are pretty funny so let me know what you think.

Originally Posted by Chris Shiflett which also contains links to download the MP3 for the song or the entire album in MP3 format.

Development, Entertainment, Internet, PHP, Raves, Useful.

Mar

08

ZF: Creating RESTful Applications

Over the last few days I have been trying to use the Zend_Rest_Controller along with the Zend_Rest_Route to make a RESTful application for an API that I am working on. It is very easy to get things setup with these components and I will cover that now. You might be asking yourself why do I have to use both components, why is it not rolled into one nice component. The answer is really basic and if you look at the source code for the Zend_Rest_Controller you will see that it is solely an abstract class that defines the methods required for use with the Zend_Rest_Route. When your controller extends from the Zend_Rest_Controller it just forces you to implement the indexAction(), getAction(), postAction(), putAction() and deleteAction() methods. Technically you do not have to extend from Zend_Rest_Controller so long as you implement these methods in all of your RESTful controllers. It is good design to extend the class though as it will throw exceptions for developers who forget to add one of these methods. Without the methods the Zend_Rest_Route cannot route the request to the matching RESTful methods.

In order to get started you have to add a method to your Bootstrap file. This method can be named anything you like however it has to start with _init.

Read the rest of this entry »

Development, Frameworks, Internet, PHP, Rants, Raves, Tips & Tricks, Tutorials.

Apr

28

MySpace PHP REST Library

Over the last few days I have been digging deep into the concepts of REST. I have been reading through my copy of RESTful Web Services. Out of curiosity I searched Google for a "php REST library" and it turned up the Official MySpace PHP REST Library.

I started to look through the code and noticed something really weird about how the code is structured. It looks like they are trying to use an Object Oriented approach however I think they are going about things improperly. The code looks a lot like the following.

PHP:
  1. class Configs {
  2.           public static $APPLICATION_KEY = "api_oauth_consumer_key";
  3.           public static $APPLICATION_SECRET = "api_oauth_consumer_secret";
  4.       }
  5.  
  6.       class SelectorType {
  7.           public static $ME = "@me";
  8.           public static $ALL = "@all";
  9.           public static $SELF = "@self";
  10.           public static $FRIENDS = "@friends";
  11.       }

Now the structure of these classes is fine, but it does bring out the question as to why they are using classes for this type of stuff. The classes have no methods, they have only provided public static properties. I am not sure why they took this approach. I am not sure if they are trying to remain backwards compatible with PHP 4 or not. If they are however I think they would be better off using constants for these values in the Common.php file, also I am pretty sure they are not trying to support PHP 4 because they are using the static keyword in the classes and I believe PHP 4 would FAIL with that being there. I am unsure why they are not using class constants. I would suggest a better way of doing things.

PHP:
  1. // PHP 4 Backwards Compatability
  2. define('APPLICATION_KEY', 'api_oauth_consumer_key');
  3. define('APPLICATION_SECRET', 'api_oauth_consumer_secret');
  4. define('SELECTOR_TYPE_ME', '@me');
  5. define('SELECTOR_TYPE_ALL', '@all');
  6. define('SELECTOR_TYPE_SELF', '@self');
  7. define('SELECTOR_TYPE_FRIENDS', '@friends');
  8. // PHP 5 Compatability
  9. class Configs
  10. {
  11.      const APPLICATION_KEY = 'api_oauth_consumer_key';
  12.      const APPLICATION_SECRET = 'api_oauth_consumer_secret';
  13. }
  14. class SelectorType
  15. {
  16.      const SELECTOR_TYPE_ME = '@me';
  17.      const SELECTOR_TYPE_ALL = '@all';
  18.      const SELECTOR_TYPE_SELF = '@self';
  19.      const SELECTOR_TYPE_FRIENDS = '@friends';
  20. }

Even if they were to choose to go the PHP 5 way I would highly suggest that they do not use classes as containers for constants, there is no need to do this. It is not using proper OOP methodologies. Why create an object that just holds 2 - 4 constant variables, these would be better suited for define() calls in my opinion.

I am not trying to flame the work of others, I would just like an idea of why they are using these methods. Anyone reading this that knows the developers on the team feel free to have them explain what they were thinking when creating this code base.

Development, Entertainment, Internet, News, PHP, Rants, Reviews, Software, Useful.

Dec

28

Creating POI’s for TomTom Go Devices

Over the last month I have been a bit intriqued by the Tom Tom Go 930 that I bought.  I am a technical kinda guy so ofcourse I would have to look into how to add points of interestes to the device.  Now I know that you can easilly add a POI using the device but you have to do so one by one.

I subscribed to a website that will allow me to download CSV files for different retail outlets, food chains, etc that all contain the latitude and longitude for the locations.  I have a list of all Wal-Mart locations in the USA and even though I could download the Wal-Mart POI for the United States through TomTom HOME, what fun is that?  I wanted to figure out how to create my own POI files so that I could create a set and share them with the TomTom community.

Today I figured out how to create them however I wrote the code in PHP so it's not that useful outside of the web world.  However now that I know how to create them you can be sure I will be looking into writing an application for Mac OS X that will make life easier for me.  Maybe one day I will share the application with the world (so long as it meets my release expectations). It will be a while as I am still learning Cocoa and do not have much free time outside of work and Family Time.

However you can download my Wal-mart POI by clicking the following button: Add-To-TomTom

Once I make things easier for me I will probably add a nice TomTom page to my site where you will be able to download all of the POI's that I create. You will also be able to find my POI's in the TomTom Home software as I will be sharing them with the community there.

One thing that I can say is that TomTom needs to do some work on their documentation or their installation wizard. They state that you can create a CSV file in the format of Longitude,Latitude,Description and then use their wizard to share your POI. This is incorrect because you actually have to use the proper format for OV2 files which is not easy to find.

If you are an established Cocoa Developer and wish to give me a hand with some of the core stuff please leave me a comment and I will get back to you asap.

Development, Entertainment, Internet, Local, News, PHP, Raves, Software, Useful.

Nov

05

Related Articles

In a hope to keep visitors on my site and decrease my 80% bounce rate I have installed a plug-in that will show related articles on every article detail page. If you want to see what I mean just click on an article to go to the detail page. The related articles are listed below the post information box.

Do you like this idea?

Development, Internet, Local, News, PHP, Raves, Tips & Tricks, Useful.

Oct

22

Politics.com Launches Today (3PM EST)

Your POLITICS, Your VIEWS

The last few months have been keeping me so busy that I have not been able to post anything on my blog.  I am happy that I am able to post about the public launch of Politics.com.

The site will be going live around 3PM EST today.  If you have any interest in politics please head over and see what I have been working on.  It has been a long few months but I am proud of what the team and I have accomplished.

Politics.com is a social networking site, think of Facebook and YouTube combined into one with only one topic "politics".

You can post news, blogs, videos whatever you want.  You can even help determine what lands on the front page by contributing to the site.  Making comments on or endorsing an article will help it's overall ranking on the site.

I admit that in the past I have never really been that political but after working on this site I have been paying more and more attention to things.  I am still not sure who I want to win or whether I am a Republican or Democrat.  I still have more time I am in no hurry to rush my decisions.

Let me know what you think of the site!

Development, Internet, Local, News, PHP, Political, Raves, Useful, Websites, Work.

May

16

Blog Spam

This is nothing new for me. My blog is constantly hit with spammers trying to leave comments. THey have not succeeded because I am using the Akismet plug-in for wordpress. However I am starting to wonder if there is a better way to block these guys. I notice every time that they are coming from different IP addresses, so I cannot simply create a blocklist otherwise it would become huge.

I continue to have to monitor my spam queue and find things like this

birkoff_[!2] | birkoff_md@goatrance.com | index5.onirte.com | IP: 201.70.17.163
birkoff_[!2] | birkoff_yc@goatrance.com | index5.onirte.com | IP: 192.41.218.100

Akismet does a really good job so far it has stopped 13,813 spam comments from reaching my site but what I am wondering is if there is a better way to filter these guys out and not allow them to access the site using up bandwidth. If any of you readers know of a good method please share it with me in the comments below.

Internet, News, PHP, Rants, Websites.

Feb

19

Simultaneuos HTTP requests in PHP with cURL

When you are working with remote data feeds it will definatly impact the load time of your site.  For instance if you are using multiple curl calls to reach out to Google and Yahoo to get search results and Google takes 1 second but Yahoo takes 3 seconds it takes your application 4 seconds to load.  Now this can add up very quickly if you are making several connections.  The load time for your site becomes the total load time of all sites you are reaching out to.

What about simultaneous requests?  Well this would make sense because the load time of your application would be as long as the call that takes the longest.  In the example above the load time would be 3 seconds as opposed to 4 seconds.

Stoyan Stefanov wrote a nice article with example code showing just how to accomplish thi.  I cannot wait to give it a shot and boost the performance of my apps.  Thanks for pointing this out Stoyan.

Development, Entertainment, News, PHP, Raves, Tips & Tricks, Useful, Websites.

Dec

27

Everything has a free trial these days

Over the past few days I have been digging through the job sites posting my resume to just about everything that is available.  This morning I came across this posting on craigslist that caught my eye.  In the post the person is looking for a PHP Developer position and links to their online resume.  Their resume is located at http://www.php-mysql-developer.com/.  It is not odd that someone would put their resume online.  I have mine right here.  The part that really makes me laugh is highlighted in yellow on their resume and also shown below.

Even if you've never worked with a telecommuter before, I am so confident that you will not only like working with me but also start depending on me for all your programming needs. So if you have a requirement for a long term programmer, I would like to give you 2 weeks risk free trial! After 2 weeks, if you don't like my speed, knowledge, efficiency, communication or anything else, just don't pay for anything. I'm confident, after the trial period, I'll be your programmer forever -:)

It seems that these days everything comes with a free trial.  By looking at the persons name it seems as if they are from overseas.  This is just too funny.  If you dont like me after 2 weeks don't pay for anything lol.  What is the world coming to?

Development, Entertainment, Internet, News, PHP, Rants, Websites.

Dec

18

The Job Hunt Continues

I am still actively looking for a full-time PHP development position with a local company or a company which will allow for remote work.  If you have a position available or know of one please let me know.  I am also looking for some sub-contract work to fill the void while searching for a job. 

Development, Internet, News, PHP.

Technology Blogs Add to Technorati Favorites Page Rank Tool NYPHP Users Group View Joseph Crawford's profile on LinkedIn

   

SEO Consultant SEO services
11 visitors online now
2 guests, 9 bots, 0 members
Max visitors today: 15 at 12:50 am UTC
This month: 22 at 09-03-2010 02:06 am UTC
This year: 51 at 02-24-2010 03:06 pm UTC
All time: 51 at 02-24-2010 03:06 pm UTC