Hi All,

since many people are asking about the state of the sfGridPlugin, I
have decided to write an article about it here on sf-user-group.

First an introduction.
================

The sfGridPlugin is a symfony-plugin, once initiated by Bernhard
Schussek, but soon enhanced by me. Grids are capable of rendering
tabular data in a table and providing interaction to it (allowing you
to sort and browse through the paginated data).

The data is provided by DataSources, which are generic, simple
interfaces to query any data-source. At the moment there are
implementations provided for Propel, Doctrine and arrays.
The Grid can be configured, for example to setup which columns you
want to see from your datasource and the number of results you want to
see per page. The request can be bound to your grid to automatically
handle any interaction. Renders and widgets can be defined to
transform the data from the datasource to the desired html, or JSON,
or JavaScript or anything you want!


Current State.
===========

At the moment working code can be found in the svn of symfony. The
code has been divided over several plugins, all with there own
responsibility and use.
An ExtjsGrid-plugin with renderers and widgets is on its way, but
unfortunately currently has some minor issues I want to fix first.

PLEASE NOTE :The latest code is currently only in SVN!!!! The current
packages in the symfony-plugin page are OLD!


PropertyPath Support
-----------------------------

First of all I designed something I called ObjectPaths and
PropertyPaths with a colleague of mine. This are simple paths that
make it possible to resolve relations and select (related)fields. More
can be found in the readme of their plugin:

For Propel:
http://www.symfony-project.org/plugins/sfPropelObjectPathBehaviorPlugin

or for Doctrine:
http://www.symfony-project.org/plugins/sfAlyssaDoctrineObjectPathPlugin


The DataSource Plugin
-------------------------------

The datasource plugin makes use of the PropertyPaths to simplify the
joining of related tables. Joining can be done automatically with the
help of propertyPaths. I intend to remove the requirement for the
propertyPaths one day, but for now it is required.

http://www.symfony-project.org/plugins/sfDataSourcePlugin


The Grid Plugin
---------------------

The grid plugin has been re-arranged and somewhat refactored/improved,
compared to a year a go.

http://www.symfony-project.org/plugins/sfGridPlugin

ExtJS Grids
----------------

The ExtJS Grids are on there way. I have them working on my machine,
but want to improve some small things before I will submit them to
svn.



Future
=====

In my next post I will provide a full example, how you can use the
Grid in a reusable way.
However first I will finish my ExtjsGrid plugin, to show the full
potential of the GridPlugin.

In short it will take my 10 lines in my controller to be able to
generate a grid in html+javascript+json, using only one template!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to