Archive for February, 2008

Magento, license could be a serious trouble »

IMPORTANT UPDATE: The only meaning of this post is to raise a critical point of view about the OSL license (choosen by Magento), absolutely not to discourage someone from using Magento itself, I simply love it.

Magento, the last and most promising open source e-commerce platform beeing developed, is released under the Open Software License 3.0.

The license is really difficult to read if you’re not an English expert, anyway let’s take a look at what GNU says about OSL (bold by me):

The Open Software License is a free software license. It is incompatible with the GNU GPL in several ways.

Recent versions of the Open Software License have a term which requires distributors to try to obtain explicit assent to the license. This means that distributing OSL software on ordinary FTP sites, sending patches to ordinary mailing lists, or storing the software in an ordinary version control system, is arguably a violation of the license and would subject you to possible termination of the license. Thus, the Open Software License makes it very difficult to develop software using the ordinary tools of free software development. For this reason, and because it is incompatible with the GPL, we recommend that no version of the OSL be used for any software.

We urge you not to use the Open Software License for software you write. However, there is no reason to avoid running programs that have been released under this license.

Being incompatible with GPL it’s a big issue, it avoids avery integration between Magento and any GPL software and it’s a big limitation.

A normal day of a free software developer:

I write a patch for Magento. That patch is released under OSL becuase that’s what OSL impose. I send the patch to some public mailing list or post it to a forum because I want to help developers creating a better and bug-free software.

In this situation I’m violating the license and I’m loosing my right to use the software anymore. I think this is a serious trouble that should be avoided and solved.

A note from OSL wikipedia page:

the OSL has never been tested in court and is not widely used

In fact we can see that only 3 project are listed (in that wikipedia’s page) to be using OSL.

Final thoughts:
In a forum post Roy Rubin (CEO of Varien, creators of Magento), says that a big difference from GPL is that OSL defines distribution over a network as a distribution. If this is the most important aspect Varien is taking care of, than I suggest to switch to Affero GPL 3, which is completely compatible with GPL 3 and takes care of the network distribution of a GPL software.

We all know that many people do not pay serious attention to all the license implications, but all the others could stop using Magento because of all the problems above and I don’t think this is a good thing for the project.

UPDATE: AGPL3 would not be suitable for the frontend, the license switch proposal is just a provocation.

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!

Magento and translations, a better approach »

Magento the last and most promising open source e-commerce platform beeing developed, but it has some critical points, such as translations.

Magento (which is still in beta) is releasing a bunch of CSV files containing 2 columns, the original string is the first, the translated string is the second. When a new string is added to the english codebase all translation files must be updated and delivered to translators, which have many difficulties merging these new files with the one they were working on.

This approach isn’t effective, brings many efforts and could lead to corruption between translation files.

Ok, critics are over, now let’s be constructive.

When we had to build the new translation system for P4A we did deep researches to find out how many free translation services where out there, result? We found a few but only one was good: Launchpad Rosetta.

Did you know Launchpad Rosetta before? I think you know it. It’s the software being used by Ubuntu and thousands of other FLOSS projects.

Developers create a POT file with the strings to be translated, they upload that to Rosetta and all languages are automatically updated and merged in the codebase, with no effort at all.

Magento guys, I think this is the only way (ok, someone could also build an “ad hoc” translation software but Rosetta is already there…) to fix all the translation issues and to be sure that all translations will be ready before the 1.0 release.

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!

Active Directory authentication on Ubuntu Hardy (8.04) »

Just in time for the feature freeze, likewise-open was uploaded to hardy’s universe repository.

likewise-open is a software which will allow users to join Active Directory domains easily, just a few click and all is set up.

I followed this new feature with great interest ’cause I’m working on an important linux-switch, thus I did some tests on the new packages (actually before it was uploaded to universe :-)).

I found a few bugs and I has some notes so I wrote everything using the likewise-open lauchpad bugs page. Please do some test if you can so we can confirm these bugs and help developers finding a solution.

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:

P4A 3: the first PHP framework with chain effect :-) »

We kept this feature secret ’till now… let’s unveil the power of P4A 3 chainability:
working with P4A_DB_Source and chainability

This feature is already available for every P4A 3 component. It is inspired by the jQuery chainability and for the first time (AFAIK) comes to a PHP framework. I’m sure it will revolution the way everyone of us writes code, producing cleaner and much more readable code.

What did you say? Do you want a P4A 3 preview release? humm let me think… can you wait ’till monday? :-)

UPDATE: before writing this post I haven’t checked everyone of the 100,000 PHP frameworks out there thus I’m not sure P4A is the real first, the title is just a nice claim for a nice feature, nothing more. :)

P4A 3 commit digest (11th feb 2008): license switch and css rewritten »

The most of the work of this week was focused on the license switch (from GPL2 to AGPL3), that forced me to a mass commit today changing the header of all P4A files. Actually I was hoping to receive more feedback on the new license model post but anyway we feel that AGPL3 is the right choice for P4A.

Due to the new license we added a link in the footer zone: you’ve to set the target of the link using a new constant (P4A_APPLICATION_SOURCE_DOWNLOAD_URL).

The other big part of the work was rebuilding all the CSS from scratch, I changed all the class names and id to be more consistent and we’ve a new class added to the template’s body which identifies the browser thus to little tricks is now much more friendly. A great work was done on jQuery plugins too, removing some old ones and adding new and lighter ones.

I think that next week could be a nice goal to release the first 3.0 alpha, be sure to check it out!

Here you’ve the raw changelog:

- P4A_Field::setError() methods now fires a redesign event for the field
- jQuery::UI::datepicker was updated to 3.3
- jQuery::interface was removed
- jQuery::jqModal was removed
- a simple javascript trick was implemented to avoid concurrent clicks on the interface
- jQuery::bgiframe plugin was added and implemented (only for ie6) for tooltips and system messages
- P4A is now released under AFFERO GPL 3
- P4A_Label::setType(), getType(), setValue() and getValue() methods were removed ’cause unused
- P4A_Widget::addCSSClass() and getCSSClasses() methods were added
- tooltip HTML/javascript was rewritten to be simpler
- P4A_Box::setHTML() and getHTML() methods were added
- P4A_Box::setValue() and getValue() methods were marked as deprecated
- all widgets now use the composeStringClass() method, which now use the getCSSClasses() method
- CSS hacks for internet explorer were removed cause not needed anymore
- jQuery was updated to 1.2.3
- P4A_Table has no more container div thus can be styled much more efficently
- P4A_Field::setDefaultVisualizationProperties() method was removed
- P4A_Field::getVisualizedDataType() method was added and called during getAsString(), used to generate the data_type CSS class
- masks and widgets templates were renamed to “.php”
- P4A::isAjaxEnabled() method was removed
- P4A::isGecko(), isOpera, isSafari() and getBrowser() methods were added
- masks templates now add a class to the body (p4a_browser_ie, p4a_browser_gecko, p4a_browser_opera, p4a_browser_safari, p4a_browser_handheld) depending on brower
- P4A_Navigation_Bar buttons names were changed to be a bit better
- handheld CSS/Javascript management was changed, now we outputs all CSS/Javascript plus a basic handheld CSS
- P4A_Table’s action cols CSS now handles images much better
- thumbnails cache was enabled (stored in P4A_UPLOADS_TMP_DIR with “cache_” prefix)
- P4A_APPLICATION_SOURCE_DOWNLOAD_URL constant was added, you’ve to set it for every project, it must point to somewhere users can download the source code of the application
- default template now has a “download source code” link in the footer
- if P4A_APPLICATION_SOURCE_DOWNLOAD_URL is not set, the “download source” link on the default template will take user to an error page showing the right to receive the source code