News


News

Showing articles from http://blog.agavi.org/rss External_link

[49 total ]
Agavi 1.0.2 RC2 released!

Hello everybody,

Agavi 1.0.2 RC2 is now available for download at www.agavi.org.

A couple of fixes have been made since RC1, and PHPUnit and the timezone database have been updated to their latest versions.

We’re ... [More] currently planning a final release next week, after another new version of the timezone database has been released.

Enjoy your weekend,

David [Less]

Fifth Agavi Article on IBM developerWorks

The fifth and final article in the series on Agavi over at IBM developerWorks has just been published.

This last part talks about handling of file uploads, storing data in sessions and writing custom validator classes. Go read it, rate it, blog about it and spread the word!

Agavi 1.0.2 RC1 released!

Agavi 1.0.2 RC1 is now available for download at www.agavi.org.

This maintenance release fixes a number of issues over Agavi 1.0.1 and brings a couple of minor enhancements.

The following fixes are worth ... [More] mentioning:

AgaviArraylengthValidator didn’t work with files.
AgaviValidationManager::clear() didn’t clear validation errors.
Multiple settings blocks and settings prefixes were not allowed in module configs.
AgaviNumberValidator does not mutate invalid input anymore.
Several ICU bugfixes have been ported.

Important Changes:

Optional strict comparison of elements in AgaviInarrayValidator now possible.
Validator shortcut “arraylength” now defaults to minimum of one element.
Routing callback parameters are now set before initialize method is called.
Lots of ICU bugfix and change backports to the date and translation system. As a result, custom time zones now have identifiers like “GMT+0200”.
Namespaced class identifiers can now be used in all configuration files.
AgaviValidator::getArgument() now accepts an argument identifier.
Support for PHPTAL 1.2.

Bundle updates:

The timezone database has been updated to version 2009m.
PHPUnit has been updated to version 3.4.0RC3.
ISO Schematron has been updated to version 2009-05-18.

Please refer to CHANGELOG for a full list of changes. [Less]

Fourth Agavi Article on IBM developerWorks

The fourth article in the series on Agavi over at IBM developerWorks has just been published.

The new part details Agavi’s Output Types and how to quickly implement alternative response formats. Go read it, rate it, blog about it and spread the word!

Get me a standard agavi project, the fast way

More often than not I want to create a new agavi project the “standard” way, that is:

Change the projects name
Change the projects prefix
Use the defaults for all other options

Calling agavi project-wizard makes me ... [More] answer all questions, one by one. Sure, pressing enter at every prompt works, but I value my time too much to press enter at every prompt. I’d rather go write a blog post about how not to press enter at every prompt.

Enter “yes”

“yes” is a small commandline utility that answers “yes” or any given string to any prompt given to it:

yes '' | agavi project-wizard

will create a project with all default values. Now the only thing that needs fixing is the project name and the project prefix - we can do that on the commandline[1]:

yes '' | agavi -D project.name "My little test project" -D project.prefix "MyLTP" project-wizard

This is not faster in any way than running through the wizard, but I can do other things during that time.

[1] Please note this bug that prevents passing parameters with spaces to the build system: http://trac.agavi.org/ticket/1137 [Less]

Third Agavi Article on IBM developerWorks

The third article in the series on Agavi over at IBM developerWorks has just been published.

This part focuses on creating an administration interface and on securing it. Go read it, rate it, blog about it and once again spread the word!

Finally, nightly documentation builds

Finally a nightly pdf build of the agavi guide is available. It’s based on trunk and can be downloaded from http://www.agavi.org/documentation-nightly-pdf.tar.gz. The tarball contains the pdf version of the guide and all stage ... [More] tarballs.

The current build scheme is very simple and the file is replaced every night. The location may change if and when we decide to keep older versions of the guide around. Until then: Enjoy. [Less]

Using your own build templates from second zero

Some tasks are nice to have around in each and every project, such as the JSLint task I wrote about earlier today. However, we still don’t want that in each and every project - where’s the point in having a js-lint in a project that does not use ... [More] any javascript at all like a pure service oriented project without any html output? So we don’t want that task in the core agavi build file but still in our standard project.
However, using agavi project-wizard copies the standard agavi buildfile, so we have to manually copy our changes over and over again. Tedious work. We might also have a customized set of templates to use with the latest output type generation feature and we’d like to use that from the start so that all views generated in the project wizard benefit from that as well. But hmm, agavi project-wizard uses the standard templates. So let’s go change that.

A custom template set

We start off by copying the standard template set - there’s a task for it:

Zodiacal-Light:Sites fgilcher$ mkdir agavi-build-templates
Zodiacal-Light:Sites fgilcher$ cd agavi-build-templates/
Zodiacal-Light:agavi-build-templates fgilcher$ agavi system-template-copy-all
Agavi > system-template-copy-all:

Output directory [/Users/fgilcher/Sites/agavi-build-templates]:
[copy] Copying 55 files to /Users/fgilcher/Sites/agavi-build-templates

Zodiacal-Light:agavi-build-templates fgilcher$

Now we modify the build.xml.tmpl to contain our JSL-Task:



We can also change or add any other template we might like at this point. From here on it’s a matter of passing the template directory to use to the agavi script:

Zodiacal-Light:Sites fgilcher$ agavi -D templates.directory /Users/fgilcher/Sites/agavi-build-templates project-wizard
...
Zodiacal-Light:Sites fgilcher$

Done. This project will use the modified set of build templates from now on. [Less]

Extending the build system - integrating JSLLint

Javascript errors are annoying and notoriously hard to track down due to limited IDE support and misleading error messages in browsers, but often it’s only a missing comma or a bracket in the wrong place. A linter helps by checking that your ... [More] javascript is a least structurally sound. It’s the first check I run on any javascript that does not work, so having it right at my fingertips is important. I’ll show how to integrate that into any agavi project.

There’s a number of JS-Linters out there, I use http://www.javascriptlint.com/, primarily because there’s an existing phing task for it (1). As the agavi build system is based on phing integrating that task is a breeze. Each agavi project has a build.xml in the root directory that can be used to define project-specific targets. By default it’s empty and looks like this:



Adding a JSL-Task is a matter of seconds:



And now it’s just a call to

Zodiacal-Light:~ fgilcher$ agavi lint-javascripts

That’s it. It’s trivial to extend the task-definition to pass some options to the linter - I’ll leave that to you.

(1) There’s a minor bug in the JSL-Lint Task that’s fixed on trunk. See http://phing.info/trac/ticket/349 [Less]

New SSL Certificates on agavi.org

https://svn.agavi.org/ and https://trac.agavi.org/ now use SSL Certificates signed by CACert. CACert’s root certificate is not installed by default on most operating systems, browsers and so forth, which means you might get trust ... [More] warnings.

You can either trust the individual certificates, or, for more convenience, you can download their root certificate from their website and import it into your system/browser/whatever; after you’ve done this, everything should work without warnings. Make sure you compare fingerprints and certificate details when doing this.

You will also need to trust the certificate separately for command line SVN, which is explained here. Of course, you can alternatively just trust the svn.agavi.org certificate itself when prompted.

Note to Mac OS users: after importing the root certificate into Keychain, you might still get warnings at least in Safari. If that’s the case, change the policy for “SSL” to “Always Trust” under “Trust”. [Less]