Sjoerd Maessen blog

PHP and webdevelopment

Archive for December, 2009

8 Netbeans tips to speed up development

without comments

Netbeans is a great editor, below some tips to get the best out of it.

Use the shortkey for “Last Edit Location” default: CTRL+Q
Often I’m editing file and browse to another location inside the file. To go back to where I was Last Edit Location is a nice feature, it replaces the use of ctrl-z + ctrl-y to go to the previous location without changing anything. By htting the key multiple times all edit locations will be traveled.
Read the rest of this entry »

Written by Sjoerd Maessen

December 15th, 2009 at 12:58 pm

Posted in IDE

Tagged with ,

IDE roundup, 10 reasons why every PHP developer should try Netbeans

with 9 comments

A few months I have been looking for my ultimate PHP editor and now I finally found one! I’ve worked with a number of IDEs:
  • Eclipse PDT / Aptana with PHP Plugin
  • Zend Studio 6
  • Zend Studio 7
  • Notepad++
  • NuSphere PHPED
All of above editors just couldn’t satisfy my wishes.

Read the rest of this entry »

Written by Sjoerd Maessen

December 8th, 2009 at 6:44 pm

Posted in IDE

Tagged with , , , ,

Using the BitLy API to shorten urls

without comments

I was asked to place Twitter messages with product links when new products were added to a webshop. I’ve used my own Twitter class for posting the first test Tweet then I went looking for a shorten url a service to shorten the product links.

There are many url shorten services available on the internet, one of these services is Bitly.
The reasons why I’ve chosen Bitly:
– Urls don’t expire after a period of time.
– Bitly provides a click url summary (although Google Analytics can be used for this instead)
– Urls are short in length so i could use the remaining Tweet length for a small product description.
– And more important, they provide an easy to use API.
– Authentication does not require a password, we can use our API key instead.
Read the rest of this entry »

Written by Sjoerd Maessen

December 4th, 2009 at 5:05 pm

Posted in API

Tagged with ,

Creating XML files with DOM Document

without comments

As a first blog post I would like to have some attention for the fact that a lot of programmers are using functions and classes for doing exactly the same as what can be accomplished by using default PHP extensions.

XML files are very common nowadays and every developer needs to deal with them one day. Most of the scripts and classes used to generate XML files string use concatenation and echo to buildup XML files. Although this is a very short and quick method for simple XML files the same approach is often used with more complex XML files with namespaces. The code then often becomes bloated, unreadable and slow, so why not use the PHP 5 DOM API instead (or if you travelled from the past and still use PHP 4 try DOM XML). A quick example of the PHP 5 DOM API usage below.
Read the rest of this entry »

Written by Sjoerd Maessen

December 3rd, 2009 at 11:47 pm

Posted in XML