Jun 24, 2009

Stolen content

Update: the stolen content is now removed from the offending site.

I was notified that a seo24.at web site republished my article about TYPO3 performance optimization as their own thus violating my copyright. Here is their copy and here is the original. Pity to see that there are still people like this one. The could have asked and got permission immediately. Now I have to ban them from republishing anything from this site... I like to share and promote the knowledge but I hate content stealing in any form.

Jun 14, 2009

When TYPO3 gurus cannot help you

I am working with TYPO3 since year 2003. I worked for several agencies and individuals during this time. I am one of the best TYPO3 experts. This is what people say about me, not what I say about myself (I never really wanted to become a TYPO3 expert, it just happened).
I learned a lot of things while working for many people using TYPO3. Among others, there is one most important learned thing: most people think they know the right solution and they only ask TYPO3 experts (like me) to implement that solution. Typically they say: "We want you to make this thing to work like that". They think that the problem will be solved and their own customer will be fully satisfied. They are wrong, of course.

Jun 12, 2009

Does gzip compression speed up or slow down your web site?

Gzip is a good way to make your web site faster. It may decrease the size of downlodable documents by half. This seriously speeds up the loading of the site because network delays affects the performance (and user satisfaction) most.

But there is a drawback of the gzip compression that many people do not realize.

In the early Apache 1.x days mod_gzip had a very nice feature: file cache for the compressed content. mod_deflate in Apache 2 does not have any caching for the compressed content. It means that downloading 500KB of ExtJS with compression means compression this file each time. If there is no client cache or mod_proxy, this becomes a major problem. It seriously increases the load on the server. Also it slows down the response time because the file has to be compressed each time. It is a serious issue to consider for large web sites. Even client caching is not a solution.

The solution that I use for such cases is a pre–compression of such files. Then I use a mod_rewrite checks and rules to rewrite requests to these files to their compressed versions. It speeds up the loading (by 1-2 seconds in case of ExtJS).

Jun 11, 2009

Developing from UI

How does the usual development of the product starts in the Open Source community? Typically there are some wishes (requirements in the best case). Next coding starts. When the code is more or less ready, development of the UI starts. The UI reflects internal technical implementation. In particular, this is how TYPO3 was built and how many TYPO3 extensions are still built today.

Recently I decided to change my development practices completely. Earlier I followed the traditional way: PHP implementation first, UI last. Now I do the opposite: UI first, PHP next.

The interesting consequences of this methods are:

  • UI becomes more friendly to the user. This happens because the UI is not affected or limited by the underlying PHP implementation. User's satisfaction is a very important factor these days. Anyone can build the application these days. Those who can do it more friendly — win.
  • PHP implementation now serves the UI, not the opposite. It makes PHP code more structured because it becomes task–oriented. Also it speeds up the implementation time because I can develop task by task.

When the UI uses ExtJS, such development tactics become even more efficient. For example, for the rest application I completely created the UI part using static JSON files for the sample data. Now I implement PHP part for each UI part. I implement only what is necessary for the UI, not what could be necessary. Simple, fast and effective.

Jun 3, 2009

Making custom ExtJS components using panels

Note: this article is valid for ExtJS 3.x (obsolete ExtJS version).

One of the principles of the object–oriented programming says that the functionality should be encapsulated into a component and handled by the component. It helps to keep the functionality in one place and modify it easily or rewrite/replace it completely without affecting other parts of an application.
Since ExtJS is an object–oriented JavaScript framework, the same principle should be used there.
Recently I had to create a numerous ExtJS components for one project. There are numerous ExtJS examples on the web, which show complex components but often they do not follow the encapsulation principle. I decided to make it the "right way" and I am going to show how.