Содержание

CRUD - basic example of Limb3 based Create-Read-Update-Delete application

The main goals of this tutorial

You can find the source code of the example at Limb3 projects section (see CRUD).

System requirements

You can place your project files somewhere in your Apache DocumentRoot or you can also setup your web server with a Virtual Host:

<VirtualHost *>
  DocumentRoot /var/dev/crud/www/
  ServerName crud
  ErrorLog logs/crud-error_log
  CustomLog logs/crud-access_log common
</VirtualHost>

Also make sure what Apache reads .htaccess files from your application directory. There should be something like this in Apache httpd.conf file:

 <Directory "/var/dev/">  
     Options Indexes FollowSymLinks  
     AllowOverride All  
 </Directory>  

Limb3 packages

Limb3, as framework, distributed via several packages, like, CORE, ACTIVE_RECORD, WEB_APP, DBAL etc. You can read a short tutorial about Limb3 packages.

For our example application we need WEB_APP package and all other packages WEB_APP depends on.

The simplest way is to get WEB_APP via Limb3 PEAR channel:

  #PEAR-1.5 is in alpha
  $ pear install PEAR-alpha 
  # discovering Limb3 PEAR channel
  $ pear channel-discover pear.limb-project.com
  #web_app is in alpha too
  $ pear install limb/web_app-alpha 

There are many different ways to get Limb3 source code. For example you can download the release archive of Limb3 from SourceForge.net or checkout the code from SVN - just use method you feel comfortable with.

Steps