Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:
Blog Feed

Posts Tagged ‘php tips’

Five reasons you should be using PHP

Monday, February 18th, 2008

Here’s one for all the Ruby on Rails, Perl, Python (+Django) and ASP/.net web developers. There are a lot of myths about PHP, often developing from the language’s early beginnings, or simply by misconceptions perpetuated by areas of the enormous user base.

Sure, it isn’t perfect. It has its problems; from professionalism to consistency and even versioning. Still, it’s a fantastic language for web development; it’s efficient, scalable and, when used appropriately, effective. Read on for five reasons you should be using PHP for web development. (more…)

Valentine’s Day Fun with PHP and GD

Thursday, February 14th, 2008

Some of you may be familiar with Paul Reinheimer’s funcaday.com. Every day, the site lists a new PHP function, including the function prototype, description, uses and further notes. On Valentine’s Day this year, they chose a rather amusing parody function. Read on to have some fun with PHP and GD.

(more…)

5 Ways to be a Better PHP Developer

Wednesday, February 13th, 2008

Often, an inexperienced PHP developer will hop onto IRC and ask a question in ##php on Freenode. And if the question is trivial, the answer seems obvious or they simply seem like a newbie, they may soon find themselves bombarded with such comments as “RTFM”, “Go learn PHP”, “We are not your personal tutors” or simply “You need to become a better PHP developer”. So, how is it that one becomes a better PHP developer? In this post, I’ll outline five ways to be a better developer, improve your productivity, write less code and achieve more with your web applications. (more…)

And the winner of the most important security tip competition is…

Tuesday, February 12th, 2008

When it comes to PHP security, you often think of input filtering, SQL injection prevention, XSS in user submitted content and so on. Well, forget about that. They’re all pretty trivial compared to what I feel is by far the most important security issue of any web application. Read on to find out why. (more…)

Scoring a freelance PHP job

Friday, February 8th, 2008

Getting a job is pretty straightforward. Getting a PHP job is about as unconventional as it gets.  Here’s what you can do to secure a better job with your existing PHP skills. (more…)

PEAR Text_Diff is now stable!

Friday, February 1st, 2008

PEAR is always full of interesting and useful PHP packages. They may not be terribly efficient, but the power they offer easily outweighs that. As of today, we have a stable version of the very interesting Text_Diff package.

Ever seen Wikipedia’s revision diff system, that allows you to compare two versions of a page and clearly marks the differences? Well, if you’ve ever wanted to do that yourself, now you can. The PEAR package Text_Diff has just released a stable version, and offers all the text comparison functionality you need to add some pretty cool revision management features to your application. It even comes with a MediaWiki-style demo. If you’ve been looking for a version of the levenshtein() function that supports more than 255 characters, this could be your chance.

4 PHP Professional Development Paths

Monday, January 28th, 2008

So, you’re an up-and-coming PHP developer, you’re spending a lot of time learning new tricks and you’re always on the bleeding edge when it comes to using technologies in your web applications. What’s next? Here are some of the options available for professional development. (more…)

Before you code…

Sunday, January 27th, 2008

So, you’re about to build an entire web application in PHP. You’ve worked out how you’re going to do it, you’ve got a general idea what it’ll look like, maybe you’ve even chosen a framework (if you don’t have any to choose from, find some). Before you go any further, take a step back and run through this checklist.

  1. Plan. Do some design mockups, work out what functionality will go in what classes. You can never plan enough, and good planning can save you days of code rewriting later.
  2. Research. This is probably one of the most-forgotten areas of project planning. Chances are what you’re building has been done before, so do a bit of research on existing applications similar to yours. Consider any problems you may encounter and see how other applications handled these challenges. SourceForge is a great place to start.
  3. Future proof. Depending on your application, this might not be terribly important, but consider what technologies are being used at the moment and may start being used. This article has a few suggestions. For example, maybe in future you’ll add a microformat-export function, and your code needs to be structured differently to support that?
  4. Don’t reinvent the wheel. Most developers I’ve seen simply don’t practice this enough. Sure, you’re using your framework for some common tasks, but many people assume they’ll need to write a lot of their own code for complex routines. Before you start, check out PEAR and PHP Classes.
  5. Set some timeframes and get into it! Now that you have a good idea of what you’re going to build, and how you’ll make it happen, set some goals and get coding!

5 essential development facts every PHP developer should know

Thursday, January 24th, 2008

There’s always a bridge between textbook knowledge of programming - syntax, procedure etc. - and the real world knowledge that you get from actually developing real applications. Here are five things every PHP developer should be familiar with before they begin developing web applications in PHP.

1. Frameworks
Frameworks are arguably one of the most important areas of PHP development. With no single accepted way of developing web applications in PHP, a number of open source frameworks are available, helping you code quicker, more consistently and more effectively. Some of the best include CakePHP, Symfony and CodeIgniter. A lot of the frameworks also follow the MVC design pattern, which you should definitely be familiar with should you ever have to work on code that follows it. After a while, you may even feel inclined to create your own framework to meet your needs.

2. Templating engines
If you’re not using a framework that enforces a specific design pattern, chances are you want to be using a templating engine. Whether you create your own or using one of the existing options (like Smarty), a templating engine allows you to entirely seperate your code logic from your HTML interface code (and associated CSS/JS/etc.). This considerably simplifies your code, allows quick and easy modifications to the actual front-end of your application, and makes it easier for non-developers to modify your application’s visuals.

(more…)

Blog Categories Blog Archives