Monday, July 28, 2008
By thomasw at 00:08:38
Hy interested ones,
a new feature has been added within Zend Framework. it now supports the usage of an application wide locale. Anyone who is using I18N classes in his application will love this feature.
So what’s all about this new feature…. let’s look into details. Until Zend Framework 1.5 when you wanted to use several I18N aware classes you had to set the locale you wanted to use within all classes. This looked like this:
$locale = new Zend_Locale('en_US');
$date1 = new Zend_Date($locale);
$date2 = new Zend_Date($locale);
$currency = new Zend_Currency($locale);
When you use only one or two instances there is not much difference. But the more instances you use the more work you would have with the syntax. Looking at this in detail I thought why not simply set the locale once within your bootstrap and let the framework do the rest.
The solution was the usage of the registry. So let’s look at the same example and the difference in the usage:
$locale = new Zend_Locale('en_US');
Zend_Registry::set('Zend_Locale', $locale);
...
$date1 = new Zend_Date();
$date2 = new Zend_Date();
$currency = new Zend_Currency();
As you can notice now, you can forget about the locale as it’s automatically taken from the registry. This is a small and simple solution but it will solve you several headache. You can use this feature within the actual trunk or you have to wait until 1.6GA is released.
Have fun with it, anyway.
Greetings,
Thomas Weidner, I18N Team Leader, Zend Framework
Friday, July 18, 2008
By thomasw at 22:55:15
Hy fellows,
a new version of Zend Framework will be released on Monday 21.July.2008.
It\’s the release canidate for 1.6. Even if it\’s until now not finished for public release, a release canidate can contain minor problems, it contains some new components and, of course, a huge amount of bugfixes and improvements.
My additions to this release are:
Zend_Transfer_Adapter_Ini: A adapter for using ini files for translations
Zend_File_Transfer: A component which handles file uploads and downloads for multiple transfer protocols.
Of course also a number of bugs and other small improvments to existing I18N components have been integrated.
Zend_File_Transfer is far away from being finished. But the ZF-devteam has decided that it should be integrated with 1.6. Actually it will support only the HTTP POST protocol. But it’s easy to use and it comes also with some validators especially created for file validation. As this component is not completly ready for now, it will additionally get an Zend_Form_Element_File which consumes this component, the decission has been made to delay it’s integration until RC2.
Yes, this are the bad news… we will have a RC2 anyway.
But the good news are, that we have some additionally days to fix some other issues.
Greetings
Thomas, I18N Team Leader, Zend Framework
Sunday, July 13, 2008
By thomasw at 20:01:36
Hy interested ones,
the Zend Framework has since today a new file transfer component ready for playing around.
Zend_File_Transfer allows file uploads and downloads when it’s finished.
For now, there is only HTTP POST upload available and it looks like it will be released with 1.6.
The component comes with several validators specially written for validating files with this component.
Below is an example of usage:
The example form looks like this:
<form enctype="multipart/form-data" action="index2.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
Choose a file to upload: <input name="uploadedfiles[]" type="file" /><br />
Choose a file to upload: <input name="uploadedfiles[]" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
The target looks like this:
<?php
require_once "Zend/File/Transfer/Adapter/Http.php";
require_once "Zend/File/Transfer/Exception.php";
$adapter = new Zend_File_Transfer_Adapter_Http();
$adapter->setValidators('size', '2000');
if ($adapter->isValid() === false) {
print_r($adapter->getMessages());
}
try {
$adapter->setDestination('C:\temp')
->receive();
} catch (Zend_File_Transfer_Exception $e) {
print $e->getMessage();
}
print "DOWNLOAD FINISHED!!";
As you see the usage is quite simple.
The seperated isValid() call is not necessary but will show you which failures occured while validation.
Any failure while uploading will also be returned as validation error even when you do not set any validator.
For now there are these validators available:
Zend_Validate_File_Count - validates the file count
Zend_Validate_File_DiskSpace - validates the disk usage of ALL files
Zend_Validate_File_Extension - validates the real file extension
Zend_Validate_File_Size - validates the size of single files
The Zend_Validate_File_Upload validator is the internal validator which checks for upload failures. There is no need to use it as it is automatically used by Zend_File_Transfer itself.
In future the component will be extended with other adapters and also with download capabilities.
I hope you enjoy testing and playing around.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
Saturday, June 21, 2008
By thomasw at 11:41:33
Short notice:
I finished the implementation of a new adapter for Zend_Translate.
It allows you to use *.ini files as translation source within your applications.
Monday, June 2, 2008
By thomasw at 15:50:47
Hy interested ones,
it was a long journey but after almost one year two of my proposals to the ZF were accepted by the dev team.
Proposal 1:
http://framework.zend.com/wiki/display/ZFPROP/Zend_Translate_Ini+-+Thomas+Weidner
This is a new adapter for Zend_Translate.
In future you will be able to have simple INI files to be used as translation source.
Not that I think that many people will use it, but from time to time it may be comfortable to have it. And INI files can be edited by customers very easy which makes them handy.
Proposal 2:
http://framework.zend.com/wiki/display/ZFPROP/Zend_File_Transfer+-+Thomas+Weidner
For this proposal the community waited about one year.
It integrates a standard way to handle file up and downloads supports many protocols and integrate several other benefits like filtering, processing and many more.
The INI adapter is almost finished and will be available in a few days when I have time.
The file transfer component will get my complete time after the coding standard has been finished. But it will not be available until the next release because it should stay a few weeks in the incubator for problem checking, bug fixing and possible improvements.
I’ll keep you informed as soon as I have new informations.
Greetings
Thomas
I18N Team Leader, Zend Framework
Monday, March 17, 2008
By thomasw at 21:50:12
After a long, long work we are finaly ready to give you, the community of the Zend Framework, the next stable release 1.5
We have had a lot of work and also a lot of help. Several new features have been integrated.
To give you a short overview we have
* a new Zend_Form component
* a new Zend_Layout component
* new View and Action helpers for Ajax and other automatic formats like Json
* Support for Lucene 2.1
* LDAP and OpenID Adapters
* new Webservices for Technocrati, Nirvanix and SlideShare
From the I18N core the following things have been added:
* Zend_Translate - directory scanning for addTranslations which enabled module based translations
* Zend_Translate - added cache support
* Zend_Locale - Improved autodetection for *nix servers
* Zend_Date - ISO dates recognise and use timezone settings automatically
and about 20 issues and improvements were fixed and integrated since the last official release.
Of course this is not the end for us… it’s more a beginning.
A overview of my work for Zend Framework in the near ro middle future includes the following tasks:
* Zend_Translate
— allow automatic rerouting
— plural support
— new SQL adapter
* Zend_Locale
— allow overwriting of detected locales by default
* new Zend_Locale_Phone component
* new Zend_File_Transfer component
* codes and translatable exceptions for the complete framework
* force Zend_Db_Schema with Rob
So have fun with it…
Greetings
Thomas
I18N Team Leader, Zend Framework
Saturday, March 8, 2008
By thomasw at 19:30:44
Hy fellows,
after a hard work and several changes I suceeded at last.
When the documentation for ZF is build, from now on also a CHM project file will be build.
This means that in a few days/weeks also a CHM docu could be available for Zend Framework.
The related issue is http://framework.zend.com/issues/browse/ZF-2454. The more of you vote for this the faster CHM docu will be available to public from the ZF homepage.
For all which can not wait just get the latest trunk version from SVN and see for the README file within the documentation for how to create the manual for yourself.
And as last service you can download the CHM help for the latest release 1.5 here for the
german language and the english language.
Greetings
Thomas
I18N Team Leader, Zend Framework
By thomasw at 10:28:26
Hy fellows,
the newest Version 1.5 for Zend Framework is waiting for release.
The code is already freezed and with all administrative work we will have it ready about monday 10.March.
Not only several bug fixes have been made, but also some feature enhancements and even new components.
To give you a small appetizer:
* New Zend_Service_Nirvanix component
* New Zend_Ldap component which fits to the new Zend_Auth_Adapter_Ldap component
* Couple of feature improvements for Zend_Form
* Several fixes for Zend_Controller
* and many many more
In sum I think there were about 70 issues fixed. Probably even more… I have lost the overview :-)
I hope you enjoy the new version and have fun with it.
Greetings
Thomas
I18N Team Leader, Zend Framework
Wednesday, February 27, 2008
By thomasw at 15:00:02
It has been annouced in the past, and now it’s reality.
A few hours ago the new version 1.0.4 of the Zend Framework has been released. It has been slightly improved and many bugfixes has been integrated.
With this release the version 1.0 comes to an end. This is the last release for 1.0.
But so time to be worry, the next release 1.5 is already looking out of the box. A release candidate can be downloaded and tested here.
Have fun with the new versions and features.
Greetings
Thomas
I18N Team Leader of the Zend Framework
Friday, February 15, 2008
By thomasw at 19:42:15
Es wurde bereits offiziell angekündigt…
Das neue Release 1.0.4 vom Zend Framework wird zwischen 20.Februar und 22.Februar veröffentlicht.
Es wird allerdings die letzte Release für 1.0 sein… das kommende Release 1.5 steht schon in den Startlöchern und wird in den nächsten 1-3 Monaten released.
Also… Frohliches Fameworking.
Grüße
Thomas
I18N Team Leader Zend Framework
…………………………………………..
Is was already official announced…
The next version 1.0.4 of the Zend Framework will be official available between 20.february and 22.february.
But this will be the last release for 1.0… the next release 1.5 is already in the starting blocks and will be released within the next 1-3 months.
So… happy frameworking.
Greetings
Thomas
I18N Team Leader Zend Framework