Technical background of eGroupWare 2.0

From Tine 2.0 - Wiki

eGroupWare 2.0 will be based on following core components:

Why did we choose these 2 Frameworks?

The ZEND Framework is written by Zend, the main company behind PHP. The documentation is superior and it is an actively maintained framework. With Zend Framework, many things which we had to implement ourselves in eGroupWare 1.4, or things we always wanted to implement in eGroupWare are already done for us now. The following things can be used from ZEND Framework which don't need to be maintained by us anymore:

  • Database abstraction based on PDO
  • Caching based on files, memcache and APC
  • Inputfilter to validate user generated content
  • PDF generation
  • Date and Locale handling

The ExtJS framework is the best Javascript framework to design user interfaces we are aware of currently. It has all features we need to build a modern, feature rich groupware solution. To find out yourself what is possible with ExtJS in your own browser (no plugins required), just have a look at their examples page.

What do we want to change and how?

First of all, we would like to get rid of any code, which is not really our core business. We don't need to reinvent the wheel to filter user generated content. We also don't need our own database abstraction layer or our own caching mechanism. These are things any PHP project needs over and over again. We also don't need our own Javascript framework to build the user interface.

We can get all these things for free from the ZEND Framework and the ExtJS framework. And if we don't need to care about these items anymore, we have more time to work on our groupware solution.

Another nice point on using these frameworks is that we are more open for other developers. Any developer who knows how to work with the ZEND Framework or the ExtJS framework will instantly be able to develop for eGroupWare 2.0. We don't need to write any Howto's on how to develop for eGroupWare 2.0 ourselves. It's all there already. And for the ZEND Framework also translated to multiple languages.

Database abstraction based on Zend_Db/PDO

For eGroupWare 1.4 we can not be sure that any piece of code is safe against sql injection. Maybe it is, maybe not. With PDO you can rest assured. Any row of data is quoted correctly for any supported database. It's not up to the developer to do the proper quoting, it is done by PHP for us.

Date and Locale handling based on Zend_Date/Zend_Locale

Correct timezone handling is also not available for eGroupWare 1.4. Based on classes from the ZEND Framework we can let the user select the timezone he lives in and let him select the locale he likes to use. Now we know in which format we need to display the date and the time. And we also know the time offset for the users calendar.

Caching based on Zend_Cache

Doing the same complex query again and again is not very helpful when trying to write a fast groupware application. The ZEND Framework allows us the use of different caching backends using a common API.

Communication with the backend based on JSON

This is the biggest change compared with eGroupWare 1.4.

With eGroupWare 1.4 we are creating the user interface on the server. For every user, for every request - over and over again. This was good 2 years ago, because it was the only way to get the layout done correctly for every browser. The problem with this approach is that it does not scale very well. The more concurrent users you get the more processing is done on the server side. A lot of this can also be done on the client side today. If we can save 50% of the processing time on the server, we can double the number of concurrent user on the same hardware.

With eGroupWare 2.0 we are exchanging data only. We are loading the javascript based user interface at the beginning of the session. This does not require any PHP processing on the server, as the client just downloads it. Then the client can cache this file locally. When we need to display the data, we are exchanging the data between the webserver and the browser JSONencoded. We don't render any gui on the server anymore. It's all done on the client, thanks to the excellent ExtJS framework.

topics to resolve

  • is it possible to use events to get the grid data reloaded, when another folder gets selected?
  • resizing of the grid, when the window gets resized
  • layout of the buttons in the navbar
  • scrollbar in the grid to be able to display the non visible lines
  • Doesn't work for Safari (should be working with Safari version 2 and above)
  • how to handle menus for advanced options
  • how to integrate admin and preferences

useful links

Zend Framework website

Zend Framework manual

Zend Framework api documentation

ExtJS

main ExtJS website

api documentation

Application layout for Beginners - Something to play with

Creating an Ext JS grid using the Zend Framework

Displaying an image in a grid cell