Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-settings.php on line 512 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-settings.php on line 527 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-settings.php on line 534 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-settings.php on line 570 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-includes/cache.php on line 103 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-includes/query.php on line 61 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-includes/theme.php on line 1109 Datensarg » Tonick.net

Archive for the ‘Tonick.net’ Category

Zend Tutorial

Monday, March 24th, 2008
Deprecated: Function split() is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-content/plugins/google-analytics-for-wordpress/gapp/googleanalytics.php on line 391 Deprecated: Function split() is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-content/plugins/google-analytics-for-wordpress/gapp/googleanalytics.php on line 391

I’ve been trying to set up my directories on the production server yesterday. Meanwhile I came across Rob Allen’s Blog. It features a nice tutorial including database access and forms. Rob doesn’t waste time doing it the “easy” way, like the Zend framework quick start tutorial does. You get your full load of class inheritance right away. Another useful link is the Zend framework multimedia section, especially the screencasts by Mitchell Hashimoto.

To bad I had to realize, that the framework wasn’t able to load a file named ReflectionClass.php. Even worse: After doing some reflection myself I figured out, that it wasn’t a framework issue: ReflectionClass was meant to be the actual PHP class, but since my provider has the reflection API disabled, the framework tried to instantiate it, failed and tried to find a file of that name instead. I really hope, they’ll fix that soon. (I know they will)

So instead I had to overhaul my XAMPP, which was quite easy, once I figured out how to do it. Well, here are my hints to get the Zend framework running on your raw XAMPP installation:

  • Be sure to activate mod_rewrite in your conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
  • You might want to create a virtual host for your project in conf/extra/httpd.vhosts.conf pointing towards the public directory of your project
<VirtualHost *:80>
    ServerAdmin aaa@bbb.de
    DocumentRoot c:\htdocs\myproject\public
    ServerName myproject.localhost
</VirtualHost>
  • If you do so, you should edit your hosts.txt (wherever it may be on your OS)

Have fun working it out!

Frameworks

Saturday, March 22nd, 2008
Deprecated: Function split() is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-content/plugins/google-analytics-for-wordpress/gapp/googleanalytics.php on line 391 Deprecated: Function split() is deprecated in /var/www/l3s6524/html/datensarg/wordpress/wp-content/plugins/google-analytics-for-wordpress/gapp/googleanalytics.php on line 391

After trying to rewrite my code using design patterns till 4:20 a.m. I thought, that someone already might have built a working collection of classes to do the same thing. It’s important to understand how design patterns work and why and where they can help you simplifying things, but hey: I wan’t to build a scalable web application and I don’t really want to spend my free time building my own framework.

I’ve been flipping through Duane O’Brien’s article on PHP frameworks for a while now and decided to give the Zend Framework a try.