Category: "PHP"

Eclipse for PHP, eclipse for everyone!

I really like Eclipse as a Java IDE, I do! :D

However I'm getting really tired of having a different IDE for each language I am working with, no matter how cool those IDEs might be. Different display conventions, different keyboard shortcuts, different project browsing... :(

Microsoft sure has this right with their Visual Studio where you use an as-uniform-as-can-be IDE no matter what language you use: C++, C#, VB... Hum well, the problem is that it's a) quite expensive (unless you're completely commited to .NET and have an MSDN subscription anyway) and b) best suited to Microsoft supported languages. Java and PHP poorly qualify for this... :-/

The really nice thing that I found out today is that Eclipse is actually really beggining to become a common IDE even outside of the Java world! B)

As a matter of fact, I found no less than TWO very promising extensions for PHP:

Both of these are open source and have the minimal you could expect: PHP syntax coloring. TruStudio also supports Python and integrates a complete debugger interface. However I prefer PHPEclipse because it already has code completion where TruStudio only has contextual help.

Anyhow, it's very difficult to choose between both implementations so far since they both have pros and cons. You have to try them out both. Installation and removal are straightforward (just unzip or delete folders from the plugins directory). You'll also find out that you cannot use both at the same time (one PHP editor will disable the other one).

Those products will surely be very nice to use when they mature... but in the meantime they just add to the mess of finding the right IDE that does everything you need and does it right...

Internationalizing web applications using gettext in PHP

As I have said before, gettext is a very interesting framework for i18n and i10n.

Now the question is, how do I apply this to web applications? Actually, I'm going to restrict my discussion here to PHP since this is what I'm working with right now... but you should expect similar behaviour when using other web development tools that integrate gettext.

First of all, the good news: PHP fully supports gettext since version 3.0.7. So it's been used for a long time and you can even find tutorials on the net.

PHP/Gettext in action

Read more »

MagpieRSS

MagpieRSS provides an XML-based (expat) RSS parser in PHP.

MagpieRSS is compatible with RSS .9 through RSS 1.0, and supports the
RSS 1.0's modules (with a few exceptions).

Advanced PHP book?

So I've been developing on b2evolution for a couple of months now and people seem to be quite happy with it ;) (read the testimonials! ;) )

Nevertheless I still feel like I'd really need to learn PHP for real someday! :. I mean, it's easy to learn the basics from reading actual code (because it's very similar to C/C++) and occasionnaly referring to the online manual... but I'm pretty sure there are some advanced concepts out there I'm not even aware of... right now I'm thinking about the configuration options and the loading of modules...

I was about to buy a book online but I'm really afraid of getting something that will teach me "hello world" after a few hundred pages. What I need is a 15 page recap on datatypes and control structures and advanced stuff starting at page 20! :P

If anyone reading this knows the right book for this, please point me to it! Thanks a lot! ;D

Web application caching

Blogs, as most current web applications, need to address the server-side caching issue in order to reduce webserver load.

It looks like most people are quite happy with caching static versions of their pages for some defined amount of time. This method has often been called something like "half-baked/half-fried" in reference to the long running baked (static) versus fried (dynamic) discussion.

I'd actually call it "baked on demand"... but regardless of what name we use, I would not be satisfied with this.

I have actually done some experiments caching my blog homepages which is enough to significantly reduce load, but this really makes them too static for me. I do want to log some stuff in realtime, I do want new user comments to show up instantly, and most of all: I do want the page to be customized for each user: display new posts since last visit, display his personal choice of categories, etc... Caching a whole page for every possible combination seems plain stupid. (And it is! :>> )

Actually, the only smart caching mechanism one can be satisfied with in high-end web-applications is block-caching. As a matter of fact, a web page can actually almost always be considered as an assembly of different blocks. Some are static, some are dynamically updated several times a day, some are related to the user himself and some are so dynamic they change everytime the page is displayed, no matter what! By caching each of these blocks individually when it makes sense and rebuilding only those necessary at a given time, you can then reconstruct your whole page dynamically significantly faster than if you had to reconstruct all blocks from scratch every time.

And there you have it: performance and functionality. Yeah, Okay, I know... it's also much more complex to implement than any other caching mechanism... ;D