Category: Things I do

Turn on your P4A TV, the show is on! »

I’m proud to announce that the P4A screencasts channel opens today, turn on your TV or you’ll be late for the show!

The first screencast I’m publishing is about creating an hello world application, using a P4A_Button and some new system messages:

If you want to be a part of the P4A star system create your screencast and contact me, I’ll publish it on the TV :-)

7th preview for P4A 3 and planet P4A opened »

We’re doing steps ahead, the P4A 3 feature set is almost complete!

In this release you’ll find that P4A is now based on Zend Framework 1.5 (released today) and a bunch of bugfixes and small modifications.

We’re releasing more and more P4A 3 based projects for our customers and we’re getting a lot of positive feedback, most of all for the speed of the full AJAX stack (as I like to call the new AJAX-only mode).

Another great news: we finally had time to work on P4A planet, which has been opened today, we already have 3 languages (english, italian and spanish) and we hope we’ll have more in the future. If you have a blog and you write about P4A just contact me! I’ll be happy to add your blog to the planet! We’re now working on the new wiki, just give us a few days to complete the work.

Going back to the release, here you have the complete changelog:

- a bug with P4A_Navigation_Bar was solved
- P4A_Fieldset’s CSS was changed a bit so it should have the exact width set by setWidth
- “disabled” property was removed from P4A_Button’s HTML ’cause it caused a rendering bug with floats
- some minor CSS modifications were done
- a bug on Internet Explorer 6 and sidebars was solved
- jQuery::iFixPNG was updated to 2.0
- “folder” and “folder_open” icons were also added in the GIF format (due the ie bug and our usage in list-style-image)
- P4A_DB_Navigator’s CSS was reworked for browser compatibility
- a bug with PostgreSQL and automatic sequence name creation was fixed
- P4A_Thumbnail_Generator::isMimeTypeSupported() method was added
- P4A_Field::getAsFile() method now calls P4A_Thumbnail_Generator::isMimeTypeSupported() before rendering the image preview
- P4A_Field::getAsFile() method now always render the “preview” button, but it will be disabled if no preview is available
- P4A_DB, P4A_Tab_Pane, P4A_Table, P4A_Data_Source and P4A_Widget
were ported to the trigger_error() function for programming errors
- P4A_Error() global function was removed because unused
- P4A now throws an exception when uploading forbidden files
- P4A_EXTENDED_ERRORS was implemented for PHP errors
- P4A_EXTENDED_ERRORS was implemented for exceptions
- Zend Framework was updated to 1.5
- P4A_I18N::setFirstDayOfTheWeek() method was ported to ZF 1.5’s Zend_Locale_Data::getList()

Now you can Download P4A 2.99.6, please help us with translations and report us all the bugs you find! Thank you so much!

Confirmation of my doubts about ExtJS licensing »

ExtJs is a great javascript development library, some time ago I did some tests to port P4A to ExtJs and I wrote a post with my considerations about it and other javascript libraries.

In that post I wrote:

ExtJs as really a killer graphic layout, and it’s released under LGPL3 (developers wrote some licensing notes that I can’t really understand… actually I think that those notes could conflict with LGPL3 itself)

Today I found a post by Matt Asay called “ExtJs: When open source is not open at all“.

A quote from that post:

It’s a bit like saying, “You can use this as open source so long as you use the software how we’d like you to use it. If you have any money, forget open source: pay us instead.”

So how is this open source? This is a wholesale rejection of the Open Source Definition (#6).

That’s a confirmation of my doubts about ExtJs licensing and a confirmation that we took the right choice not to use it for P4A at the moment.

Now, I always try to be constructive also when writing critics about a project so here there are some suggestions for the ExtJs team:

  • clarify your licensing model, choose LGPL3 (or AGPL3 or whatever) definitively and remove your own notes (this will make ExtJs grow both within the final users market and the server-side market)
  • open your SVN, it’s ugly for FLOSS developers not to be able to follow the development
  • listen to user requests, when I wrote in the forums that there was no way to get a field’s label displayed if the field is not inside a form panel, the only answer I got (not from the team which didn’t answer at all, but from a premium member) was “buy a license and ask for that feature” [...]
  • think general purpose because not all the users want to build all the application from javascript, ExtJs could do fireworks if it could be better combined with server-side frameworks

6th preview for P4A 3 »

Another bugfix release for P4A 3, with a minor new features: the submenu indicator:
submenu1.png
submenu2.png
can you notice the small gray arrow on the right of the “categories” menu? This arrow will tell users that a submenu is available for that item.

Let’s go to the changelog:

- a bug with invisible P4A_Table was solved
- P4A_Quote_Javascript_String() global function was added
- P4A_Widget::requireConfirmation() method now uses P4A_Quote_Javascript_String()
- screen.css was renamed screen.css.php
- some of the images used for P4A_Table and P4A_Field were moved in a better directory organization
- P4A_Menu has a submenu indicator (a small arrow that make users aware that a submenu is present)
- jQuery::UI::datepicker was updated to 3.4
- a bug with FCKEditor’s filemanager was solved
- P4A_Button now render the “disabled=’disabled’” property if disabled
- P4A_Button now addes ‘p4a_button_disabled’ or ‘p4a_button_image_disabled’ class if disabled
- a bug with P4A_Field autocomplete was solved
- P4A_DB_Source was completely ported to the new error handlers
- multicheckbox CSS was fixed
- P4A_Field::getAsMultiselect() method now added a “size” property if none was specified
- index.php file was reworked and the new logo was added
- index.php file was renamed index.html

Now you can Download P4A 2.99.5, please help us with translations and report us all the bugs you find! Thank you so much!

5th preview for P4A 3 and first production rollout »

P4A 2.99.4 is available for download, this is nothing more than a bugfix release, mainly due to the first production rollout for a pretty big project of one of our customers.

Here’s the changelog:

- a bug with quoted strings in P4A_Field::getAsSelect was solved
- a bug with P4A::getFocusedObjectId() method was solved
- P4A_Object::__call() method now uses trigger_error() instead of p4a_error() when a method is not found
- P4A_Object::_loadHelper() method now direcly call P4A_Error_Handler() instead of trigger_error,
so we can pass the error file/line and have a readable resulting error message
- a few modifications were done on P4A_DB_Source so now you can add joins without selecting
any column from the joined table
- P4A_DB::getDBType() method was added
- P4A_DB_Source::getRowPosition() mystical bug with MySQL (same query called 2 times returns 2 different results)
was found again and patched again
- a bug with P4A_ERROR_Handler() was solved
- P4A_Field was ported to trigger_error() instead of p4a_error
- P4A::raiseXMLresponse() method is now public
- P4A_Error_Handler was rewritten to be used in ajax calls too
- check_configuration library now also checks for PHP version
- P4A::executeExternalCommands() method was added
- all tasks dealing with external systems where moved from P4A::main() to P4A::executeExternalCommands()
- P4A::executeExternalCommands() is executed just after the session_start(), in the P4A::singleton() method
- P4A_Object::destroy() now checks if every object to destroy is a P4A_Object before calling destroy() recursively on it

Now you can Download P4A 2.99.4, please help us with translations and report us all the bugs you find! Thank you so much!

4th preview for P4A 3 and forum considerations »

It’s time to release a new P4A 3 preview package! This mainly is a bugfix release, but we’ve a few interesting things out there, I started coding the new exception based error management and started porting some P4A components to it (or to “trigger_error” depending on the specific case). Zend Framework was updated to 1.0.4 and this raised a few issues I fixed (hope I found them all). Due to high demand I also worked on P4A_Sheet, supporting anchoring for text strings and re-creating the setFree method.

Here you have the full changelog:

- P4A_Toolbars code was refactored using P4A chainability
- a bug with P4A_Full_Toolbar and P4A_Simple_Toolbar about delete was solved
- a bug with P4A_DB_Source::deleteRow was solved
- P4A_Widget::requireConfirmation() now trigger an error if addAction wasn’t called before
- P4A_Exception class was added
- P4A_Exception_Handler now replaces PHP’s default exception handler
- a part of P4A_DB_Source error management was ported to the new error handlers
- Zend Framework was updated to 1.0.4
- P4A_DB_Source::load() now returns $this thus is chainable now
- P4A_DB_Source::_composeSelectCountQuery() now always encapsulate the complete select query (without order clause) in a second count query
- translations were synched with launchpad
- P4A_DB::query() method was added
- P4A_Mask error management was ported to exceptions
- p4a/libraries/standard.php was renamed p4a/functions.php
- P4A_DB_Select class was removed ’cause unused
- code reference was organized in packages
- P4A_Sheet was ported to the new error handling
- P4A_Mask::setFocus() method now checks if the passed object is an instance of P4A_Object, otherwise does nothing
- P4A::getFocusedObjectId() method now checks if the “active_mask” object exists, otherwise returns null
- P4A_Sheet::anchor() method now supports text strings and not only widgets
- P4A_Sheet::setFree() method was added

Now you can Download P4A 2.99.3, please help us with translations and report us all the bugs you find! Thank you so much!

Forum considerations:
You know P4A has a new fantastic spanish community, they created a new forum on google groups. I has a discussion with some users saying that sourceforge forums are ineffective because of the answers orders and few other things. We’ve to consider that, with P4A 3, 99% of the forum posts will become outdated, so the question is should we move P4A forums to google code or another service?

We always used SF forums because it’s one of the best ways to make the project activity rate raise and let P4A be one of the most active project all over SF. Moving the forum elsewhere will drop this positive effect. We also have to keep this is mind.

Please let me know your considerations!

PHP para Aplicaciones »

Yesterday I saw a post by Daniel Carrero on P4A’s forums, talking about this new website:

http://p4aenespanol.blogspot.com/

A spanish blog talking about P4A. Isn’t it cool? I think it really is! Thank you Daniel!

3rd preview for P4A 3 »

Only 4 days after the 2nd P4A 3 preview release I’m here again for a new release, which is both a bugfix release and an API stabilization release.

Let’s go directly to the changelog which is not so long and complex:

- P4A_Mask::main() method is now called also within an AJAX call, if a full redesign is required
- a bug with search function within products_catalogue sample was fixed
- more chainability was added to the P4A main class
- a bug with P4A_DB_Source::createDataField() method was solved
- P4A_DB_Source::addJoin*() methods now supports null 3rd parameter (fields list)
- a bug with P4A_DB_Source::setFields() and aliases was solved
- README updated because P4A can’t handle db tables with numeric column names
- P4A_Validate class was added, it subclasses Zend_Validate and we need it to remove validators from a validator chain (ZF does not support that feature)
- P4A_Field::removeValidator() method was added
- P4A_Mask::unsetRequiredField() method was added
- P4A_Widget::removeCSSClass() method was added

Now you can Download P4A 2.99.2, please help us with translations and report us all the bugs you find! Thank you so much!

New logo and new page for P4A »

P4A new logo

Click on the new logo to view the new splash page and access the old website.

2nd preview for P4A 3 »

This week I’ve been damn busy, we got so many feedback after the first P4A 3 preview release that I fixed some things and worked on some others.

Three important issues:

  • with the full ajax implementation to boost the user experience we found a bug when you’ve to download a file within a mask, this has been solved creating some new methods to work with
  • the README file was updated writing info about PDO, which was a FAQ in these days
  • due to the high requests, P4A_Sheet was re-created from scratch with a P4A 3 design in mind

I think we all need a new preview to work on the most updated software, here you have the changelog:

- a bug with “preview” button within P4A_Field file upload was solved
- a bug with file download was fixed
- P4A::inAjaxCall() method was rewritten
- P4A_Redirect_To_File() global function was added
- a bug with images preview on ie/opera was solved
- README was updated
- P4A_Output_File() global function was added, it has to be used when you want to creare a file at run-time and make users download it
- Chainability support was added for P4A_Simple_Toolbar, P4A_Navigation_Toolbar, P4A_Full_Toolbar and P4A_Actions_Toolbar
- P4A_Tab_Pane padding was changed a bit
- P4A_Sheet was re-created

Now you can Download P4A 2.99.1, please help us with translations and report us all the bugs you find! Thank you so much!