Version 0.2 is out

The most notable new feature is the ability to create datagrids using arrays, XML, CSV or JSON files.

The process is as simples as it could be.

If you are using the 0.1 version you can update now, there are no compatibility issues between the two versions.

Download the new version from the google project page

http://code.google.com/p/zfdatagrid/downloads/list

Don’t forget to read the manual and to take a look at the example project to see how things now work.

Please report any bug you may find.

You can check a CSV example here http://www.petala-azul.com/grid/default/site/test

Best Regards,

Comments (2)

0.2 Available on SVN

For the impatiens one’s, the version 0.2 is already on SVN.

As always, see the SiteController.php to understand how the new features will work. It’s simple.

Please do a checkout and notify any bug

http://code.google.com/p/zfdatagrid/source/checkout

Stay cool…

Comments

0.2 this weekend

Hy everyone,

Just to announce that the DataGrid 0.2 for Zend Framework will be released this weekend over the next few days.

The main new feature is the ability to create grids using arrays, XML, CSV or Json.

Beside this new feature there are a few bugs solved.

Just one small example of how simple it will be using the new feature.

  1. $grid = new Bvb_Grid_Deploy_Table(Zend_Registry::get('db'));
  2. $grid->setDataFromXml('http://espacoultra.blogspot.com/feeds/posts/default?alt=rss','channel,item');
  3. #$grid->setDataFromJson('http://www.example.com/file.txt');
  4. #$grid->setDataFromArray(array(….));
  5. #$grid->setDataFromCsv('http://www.example.com/file.csv');
  6. $this->view->grid = $grid->deploy();

All the functionality available for database will also be available for array sources (format, decorators, titles, etc, etc)

Stay cool….

Comments

Update

The next “major” feature that will be implemented is the source type.

In other words, you can create one datagrid using an Array, Xml file, Json, any input format you want. This will increase the utility of this class, since this days we can gather a lot of information trough xml files (SOA?!!)

The first preview of this release (0.2) should be available in ~10 20 days

This is one of the most requested features and will required a lot of work.

The class will be partial rewritten, but the need to change your code will be minimal, or not even necessary.

Stay cool…

75% done…..

Comments

Fatal error: Allowed memory size.

Some people are reporting this type of error

  1. Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 196608 bytes) in /Library/WebServer/Documents/grid/library/Zend/Db/Statement/Pdo.php on line 284

This usually happens when you are trying to export a large number of records.

This is not a datagrid issue. Zend_Db will fetch ALL records to one array and it will consume a lot of memory, depending the number of records. To solve this, you need to increase the memory limit that PHP can use by adding this line of code in your index (or bootstrap) file

  1. ini_set('memory_limit', '50M');

This “will” solve your problem, but you should set the size to the amount of data you wan to export. If your table has more than 500.000 records, its a good idea increase the number.

Stay cool

Comments (1)

Datagrid using config files

What if you want to use the same datagrid more than once and on different locations?

From now on you can create datagrids using XML files

XML Datagrid

and then

  1. $grid->setDataFromXml('path/to/xml/file');

This code above will produce the same result on this two pages

Using PHP: http://www.petala-azul.com/grid/default/site/filters
Using XML: http://www.petala-azul.com/grid/default/site/xml

Even better.

After setting the grid using XML you can still add other stuff. The most probably thing you will want to do is change the template.

Do this:

  1. $grid->setDataFromXml('path/to/xml/file');
  2. $grid->setTemplate('frontend','table');

This is a work in progress, and the full specification is not defined.

Stay cool…

Comments

OpenOffice format

At this moment we can export the query results to eight different formats.

Word, Word 2007, Excel, Print, CSV, HTML (Table), PDF And XML.

Two new formats will be introduced, the Open Document Writer and the Open Document Spreadsheet.

There are no release date for none of those, but they will be developed before the next beta release (0.2).

Please leave a comment or mail me at geral[alienWord]petala-azul.com if you want any other format and I will see what I can do, or tell you how can you do that….

Stay cool.

Comments

« Previous entries