Huston, we landed on the moon and it’s full of coders, P4A 3 must be released!

It’s been a hard developing week, I had to do a close some big tasks before the preview release, there are 4 most important points since the last commit digest:

  • chainability
  • all the code and libraries which did not fit our new licenses was removed or rewritten from scratch. I removed getid3, phpthumb libraries and the jquery color picker but I had to write from scratch a thumbnail generator, it’s been easy and we’ve a good cache support and PHP5 code, light and fast.
  • P4A now has a “P4A_Login_Mask”, you can use it for login operations (usage within the P4A’s bundled samples) and it’s the only mask that’s allowed to do not display the “download source code” link in the footer zone
  • last but most important: this surely is the fastest release ever, all the client/server interaction was rewritten, javascript/css files will be loaded only one time by the browser, than every call we’ll be done via ajax. It’s lighting fast and it works flawlessly, believe me

Here you have the changelog for this digest:

- P4A_DB_Source::load() method now autodetect schema name
- P4A_DB::nextSequenceId now automatically creates sequences on oracle too
- jQuery color picker was removed
- getId3 was dropped, we went back to getimagesize() PHP function to extract images information but we can’t retrieve video files information anymore
- phpThumb was removed
- P4A_Thumbnail_Generator was added
- P4A_DB::nextSequenceId now automatically creates sequences on postgreSQL too
- P4A_DB_Source compose count query was changed a bit to support PostgreSQL syntax
- P4A_Field does not preview images if GD are not installed
- P4A_Login_Mask was added, it should be used if your application needs a login system, it does not display the “download application source” link in the footer zone
- products_catalogue sample now uses the P4A_Login_Mask to show how to use this new feature
- P4A_Object::implementMethod() method was renamed to implement()
- P4A::getBrowserOS() method was added
- default and popup templates now add to #p4a_body a new CSS class containing the browser platform (windows, linux etc…)
- P4A_Error was removed because outdated, it will be replaced by exception objects
- README was updated
- P4A_Tab_Pane::getActivePageName() method was refactored, if empty returns the first page name
- P4A_Tab_Pane::getAsString() method now calls getActivePageName() to avoid the possibility to render a tab pane without any active page
- P4A_Mask_Preview was renamed to P4A_Preview_Mask
- P4A_Mask_Error was renamed to P4A_Error_Mask
- P4A_Canvas now is rendered inside a container div to have id/class/properties/actions
- all P4A objects now support chainability
- P4A_Image::setSource() and getSource() methods were removed
- P4A_Mask::addTempCss(), dropTempCss(), clearTempCss(), addJavascript(), dropJavascript(), addTempJavascript(), dropTempJavascript(), clearTempJavascript(), addCSS(), dropCSS() were removed
- default and popup mask templates were broken in 3 files, now header and footer and manager by P4A and templates have only the body part
- P4A::getPopupMaskName() and getPopupMask() methods were removed
- P4A_Mask::getP4AJavascript() method was moved to P4A::getJavascriptInitializations()
- ajax manager was completely reworked and now, if you have ajax enabled, you won’t see no refreshes at all, every action will be managed by ajax call with automatic redesign

and now… right on time… do you want to try it? here you go:
DOWNLOAD P4A 3 PREVIEW

It’s been an hard work, something like 500 commits and most of the code rewritten, now we need your help, please:

24 thoughts on “Huston, we landed on the moon and it’s full of coders, P4A 3 must be released!

  1. Zoran Sinnema

    Hello Fabrizio,

    I would like to start testing and I have already 1 question: can I already start using postgresql as database manager or do I need some driver?

    Looking forward testing it.

    Best regards,
    Zoran

  2. Francisco Q.

    I get an error:

    Fatal error: Class ‘PDO’ not found in C:\AppServ\www\p4a\p4a\libraries\Zend\Db\Adapter\Pdo\Abstract.php on line 268

  3. Zoran Sinnema

    Hello Fabrizio,

    I tried to get postgresql to work but I got this error when I try to use the postgresql dsn.

    error:
    Checking DATABASE CONNECTION: FAILED
    Error: The pgsql driver is not currently installed
    Check P4A_DSN definition.

    dsn: define(“P4A_DSN”, ‘pgsql://postgres@localhost/postgres’);

    can you please help me.

    Thanks,
    Zoran

  4. Mohamad Rosni

    Hello Fabrizio,

    I tried to get mysql to work but I got dsn error.
    I will post to you malay translation in next few days.

  5. Zoran Sinnema

    Hi Fabrizio,

    Yes I saw it yesterday evening. Sorry for that. I already started and it works great, I love the chainability

    Bye
    Zoran

  6. Fabrizio Balliano Post author

    @Zoran Sinnema: yeah that’s great, please report me if you find problems, I absolutely need more tests with postgres, thank you very much!

    @Mohamad Rosni: fine, glad it’s all ok now, anyway in the next release it will be written in the README file.

  7. Carlo

    Hi,

    I installed p4a on a Wamp Server root (www), I’m testing products_catalogue but it seems to have problems with finding CSS and JS files which actually do exist in the directory they are supposed to be, so there seems to be a problem with paths. Is that possible? Any idea?

    Thanks

  8. BES

    First, thanks again and again for such high quality open source software!!!

    The following are features I really would like to see to improve my end users’ experience.

    Will P4A 3 improve printing ability? I often generate HTML into a mask (e.g., in response to a button click) and want to use the Print icon to print out the mask, but the printout is limited to only one printed page.

    This is related to the recurring issue of generating and printing HTML (and PDF, RTF, etc.) from within P4A. When P4A is used to provide access control (e.g., P4A Base Application), it is a real pain to have to jump out of P4A and revalidate the user (and prevent the URL from being usable after the user has logged out). I really would like to open surrogate windows within P4A that provide generated content which can be printed.

    I’d also like to be able to set and use cookies to store some information on the client side that persists between sessions.

  9. Fabrizio Balliano Post author

    @Carlo: could the wamp server have aliases that could redirect some calls to wrong phisical directories?

    @BES:
    we’ll sure work on printing when Zend Framework will allow us an easy way to print out tables and other things, anyway integrating something like DOMPDF inside a p4a mask is quite easy.

    About cookies, you could already do that with php’s core functions, it should not present any problem.

    let me know if you’re more technical samples.

  10. Carlo

    Don’t know,
    it’s a brand new default Wamp Server Installation. I installed p4a inside the www structure, not outside, so I did not change a line. I could send my httpd.conf to you but I can’t see any particular alias problem, this is the only line I would doubt of in httpd.conf:

    Include “f:/wamp/alias/*”

    Uhm…

  11. BES

    I got the 2.99.0 products catalog login to come up on WAMP (XP, Apache 2.2.3, MySQL 5.0.27-community-nt, PHP 5.2.5), but it returns to the login page with the correct user and password. Erroneous user/password does give the system message. (It passes the configuration check, after I set the db password.)

  12. Pingback: 2nd preview for P4A 3 @ Fabrizio Balliano's blog

  13. Chief Tony

    Checking DATABASE CONNECTION: FAILED
    Error: The mysql driver is not currently installed
    Check P4A_DSN definition.

    Io ho ricevuto questo mess.

    Uso Easyphp con Windows 7 e tutto funziona tranne questo!

    Mentre in gentoo e archlinux va tutto bene.. preferirei usarlo anche in Windows 7..

    Qualche aiuto???

    Grazie e complimentoni per il tuo grande lavoro!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>