Search code examples
phpreportingscalingsurvey

Large custom survey / reporting applications - best practice


The situation

When you study social sciences, you are frequently confronted with the need for online surveys (scientific data collection online). That's one of the main reasons why I started with PHP in the first place.

Recently these survey applications have grown and grown. A lot of complexity has been added: reporting (flash charts, PDF generation), data aggregation, different levels of aggregation (e.g. company units), questionnaire module selection for the companies involved, etc.

Now I see myself confronted with a complex data gathering and reporting application which is getting slow and unmaintainable.

One of my platforms has up to 100 new users per day and aggregates / reports data of several thousend users times hundreds of data items times dozens of hierarchy levels.

My questions

  • is PHP/mysql still a way to go?
  • could a framework like codeIgnitor be a basis for such an application or should I develop everything from the scratch?
  • do you know any kind of survey specific framework I could use as a basis?

Solution

  • is PHP/mysql still a way to go?

    Yes, PHP/MYSQL (LAMP) has been successfully used in hundreds of sites with exponentially larger user bases than yours.

    could a framework like codeIgnitor be a basis for such an application or should I develop everything from the scratch?

    Nontrivial PHP sites built without a framework (or a custom built framework) tends to get sloppy fast. PHP frameworks are now the norm for getting started, I would personally recommend the Zend Framework. It's a very robust framework, providing tools for many common PHP tasks (replacement/enhancements for Database, Date, JSON, RPC, REST) and an organized methodology for web application development: MVC using Zend_Controller.

    do you know any kind of survey specific framework I could use as a basis?

    None that I know of, but you may want to try using Zend_Form to automatically generate form elements (type, filters, sanitizers, validators) from configuration files.