PHP Class for Date Time calculations - Part 2

Monday, July 21st, 2008

In my previous posting I touched on a PHP class called DateClass (by Steve Powell) that I downloaded from phpclasses.org. The DateClass package actually contained 2 separate classes. One for manipulating dates and the other for date spans.

This post will cover how to use the DateSpanClass to easily calculate the difference between 2 dates, in intervals from seconds to years. Sadly, however, the class have some bugs which needs to be fixed before it can be used.

(more…)

CakePHP: Baking in frustration

Tuesday, June 10th, 2008

CakePHP Frustration Sometime back, I posted about my first experience with CakePHP. I installed the framework and went through the tutorial on building a simple blog application, and said “I was quite impressed”.

Now, after 3+ development weeks trying to build a real-world application, I think, maybe I was too hasty to draw that conclusion.

(more…)

To interoperate or not?

Monday, May 12th, 2008

Later this week I’ll be attending a talk on interoperability, organised by Microsoft. A friend of mine working at the local Microsoft office is organising the event. He was asking me to help spread the word about the event.

We got talking and from what he tells me about his job as an ‘Evangelist’, I get the distinct feeling that Microsoft is aiming to swing those companies with mixed platforms to using more MS-centric solutions, “because MS products enables technical interoperability out of the box with other vendors”.

That got me thinking about which is better, companies running different technology platforms versus those that focuses on a specific platform?

(more…)

PHP or .NET? Help me to choose!

Wednesday, May 7th, 2008

We’ve all encountered it before, and we’ve all asked this question in one way or another. I see it appearing in Yahoo Answers every now and then, and I see similar platform comparison in blogs I read. Its clear this issue is still quite relevant today and will continue to be tomorrow.

So which is better? PHP or .NET?

(more…)

First look at CakePHP

Monday, May 5th, 2008

CakePHPFinally, I found some time to take CakePHP for a spin. I’ve heard some really good things about it, and I’ve been trying to get some time to try it out. I installed the framework and went through the tutorial on building a simple blog application. I have to say I’m quite impressed.

(more…)

‘Cool kids’ ARE using PHP and Ruby!

Wednesday, April 2nd, 2008

Coach Wei was wondering why ‘Cool Kids’ choose Ruby or PHP over Java? In his post, the power of Java is a “perfect fit for the areas where websites may need more than markups or scripting, such as middleware logic”, whereas PHP or Ruby are not ideal for building such middleware.

For example, PHP (and Ruby) are good for simple and lightweight implementations, but sites like Facebook which started with PHP, should be ideal for Java because of it’s growing complexity.

(more…)

VIDEO: PHP and Microsoft

Thursday, March 20th, 2008

A buddy of mine, Chris, recently did a presentation about Microsoft’s efforts to embrace non-MS technology - like PHP. This presentation was held during the December meet-up of the Singapore PHP User Group.

His video presentation was about an hour long, and covered the following topics:

  • SQL Server PHP driver
  • Open XML and PHP
  • Cardspace and PHP
  • Live Services and PHP
  • Silverlight and PHP
  • Server Core , IIS7, PHP and MySQL

So, go ahead and watch the video…

(more…)

Using comments in your PHP scripts

Wednesday, January 23rd, 2008

Adding comments to PHP code is a very useful practice. Comments allows you to add some descriptive text that you can use to document or remind you on what the various parts of the PHP script is doing.

Comments are not sent to the browser, so it won’t be visible in the actual page you load in your browser, but it will be visible in your text editor you use for writing your PHP script.

(more…)

Introducing PHP Variables

Friday, January 18th, 2008

In PHP, you can use something called a ‘variable‘ to store values or reference to things. It’s like a container which you can put some thing or things inside which can be easily passed around.

(more…)

Review: PHP5: Your visual blueprint for creating open source, server-side content

Wednesday, January 16th, 2008

When anyone starts learning something new these days, they tend to get overloaded with more information that they can handle. The same goes for trying to pick up PHP, the shear number of books available on this one topic is staggering. Luckily, there are some great books specially catered to beginners, and this book is one of them.

(more…)

Google