Application Building With Horde
Jan Schneider
I thought Horde was just ...
- Webmail?
- Groupware?
- A blue design with a sidebar?
"What is Horde?"
- The Horde Project: an open source project driven by:
- The Horde Developers: volunteer developers providing:
- The Horde Application Framework: a PHP web application framework, consisting of:
- The Horde Libraries: PEAR-style packages powering:
- The Horde Applications: real-world integrated web applications
Why: Libraries
- Over 60 high quality PHP libraries in PEAR packages
- PHP4 and PHP5
- Authentication and Permissions to MIME handling to user preferences to XML transformations
- Coding standards that were the basis for the PEAR coding standards
- Initial PEAR packages including Log and Mail were contributed from Horde to PEAR
Why: Standards
- XHTML/CSS Layout
- Comprehensive MIME standards support
- Groupware apps all handle iCalendar, vCard and iTip
- SOAP, XML-RPC, and JSON-RPC access to all application APIs
- SyncML server
- WebDAV server
Why: Backend Independence
- SQL drivers work for MySQL, PostgreSQL, Oracle, MSSQL, more
- LDAP support for contacts, preferences, users, more.
- VFS (virtual filesystem) support for local files, SQL, FTP, more
- Pluggable drivers for all backends
Why: Applications
- Over 50 in CVS
- Used by MIT, Portugal Telecom, and many many more
- Groupware apps are all in at least 2nd major release
- All applications integrate users and their data
- Developer tools including Chora and Whups
- Access to APIs without tight coupling
Why: Internationalization
- Full Unicode support in IMP and most apps
- Standards-compliant character set handling
- 39 different translations
Why: The Project
- Incredibly feature-rich
- Built through more than ten years of development ...
- ... of real-world production web applications
- Constantly updated, improved, innovated, and refactored
Application Building
All of these applications, APIs, libraries, etc. are why you can
build any kind of application or site with Horde.
What makes a Horde application?
Typically Horde applications share a common structure and code
organization. The skeleton application
provides this for you.
What makes..., cont.
But all you really need is:
- An entry in
horde/config/registry.php
That's all?
Technically, yes. But to take full advantage of Horde, you'll also want:
- A
config/
directory with at least conf.xml
and prefs.php
files
- A
lib/api.php
file describing your app's API
- A
locale/
directory for translations
- A
themes/
directory for styles and graphics
registry.php
Here's an application's registry.php entry:
Building CRUD applications
- Rdo: lightweight ORM with PDO-based and native drivers
- Automatic generation of Model classes
- Override with customized Model
- Automatic generation of Horde_Forms from Model
Introduction to Rdo
- ORM - Object-Relational Mapping
- Uses PDO drivers
- Use of PHP 5 interfaces - Iterator, IteratorAggregate, ArrayAccess, Countable, etc.
Rdo Example Usage
Rdo: Creating & Editing
Rdo: More Find & Delete
Form Generation
Introduction to Horde_Form
- Over 40 validating field types
- Can be created programmatically or automatically from Horde_Form_Helper
- Full server-side validation
- Javascript helpers for many tasks (date picker, color picker, et. al.)
More coming with Horde 4
- Horde_Routes: Port of Python Routes, mapping of URLs to code (controllers)
- Horde_View: Lightweight templating solution, using PHP as the template engine, extendable through helpers
- Horde_Controller: Complete MVC controller solution for Horde 4 applications
- Horde_Date_Parser: Parses natural language into dates and spans
- Oauth, Yaml, Cli, Argv, Webservices (Facebook, S3, Scribd, Twitter, Vimeo), and more
Questions?