We talk about new ideas, improvements and anything related to the increasing splendor of our garden.

If you would like to keep in touch, you can subscribe to the blog feed or to the mailing list. You can also follow zena_ on twitter for finer grains of zena development and news.

twitter_icon

  1. 1.1.3 Release

    This is a small release with just a few bug fixes and little changes to make us all a little happier.

    Does not expire templates in “dev”

    The most important changes concern editing a live site (either an application or public website). Before 1.1.3, whenever you edited a template, all dependent compiled templates would instantly expire. This is fine if you never make any mistakes but otherwise this becomes pretty bad.

    Now, in dev mode, only the “dev” templates are expired as a safety net. Once everything is working as needed, you must expire the cache by hand. You can set “expire_in_dev” in “site” to get previous behavior (instant cache expiration).

    Monolingual virtual classes

    When you have a multi-lingual site, you usually do not want to translate CSS files and zafu templates. This changes helps avoid mistakes with this type of files.

    By default all TextDocuments are now monolingual. You can easily create a different TextDocument for a given language by manually changing the “lang” setting in the edit popup.

    Full list of changes:

    Major changes

    • Does not expire compiled templates when working in dev mode by default.
    • Added ‘monolingual’ option for virtual classes. All TextDocuments are monolingual by default.

    Minor changes

    • Support sorting by scope index fields.
    • Fixed bug in math brick (using Open4 instead of system with redirections).
    • Added ‘change_prop’ method in console.
    • Fixed a bug with 404 pages not showing in the correct language.
    • Fixed a bug with properties called ‘copy’ not working as expected.
    • Added tag for dynamic CSS.
    • Added support for ‘value’ in ‘date’ input fields.
    • Added comment on property definition.
    • Added ‘coalesce’ method in queries.
    • Added ‘asset_host?’ in Acl queries.
    • Fixed scoped DOM ids in saved template.
    • Cosmetic changes to backend.css (menu on the left).

    Gaspard Bucher

  2. Added support for coalesce

    With the new “1.1.0” release of query builder, we are now supporting “coalesce” in SQLiss.

    You can simply use it in queries such as:

    actions in project order by done_at.coalesce(todo_at) desc

    In the current trunk, we are working on making it easier to attach documents to any object by simply providing an attachment during create or update. More later…

    Gaspard Bucher

  3. 1.1.0 Release

    This is a bugfix release with some new features. The most important changes are:

    • Selenium testing: this should help ensure some stability regarding Ajax code generated by zafu (see the blog post)
    • “single” brick: this brick eases shared hosting deployment. See deployment on dreamhost for instructions.
    • Tons of bug fixes: these bugs were mostly related to Ajax+zafu.
    • Read the commit log for details.

    Cheers !

    Gaspard Bucher

  4. Selenium testing

    While developing Ajax elements for zafu, it is very hard not to break existing code because of the complex interwinding of all the elements.

    Up until now, I could only rely on zafu compilation testing (with ajax partials) but that is not enough to ensure everything works as expected. To solve part of this nightmare, I had created a test page in which I would click to test different elements. I know for years that tools like Selenium exist but things were so broken during the rewrite for Zena 1.0, that I did not bother to install and learn Selenium. I was just opening the test page and clicking here and there.

    And then, near the end of the 1.0 stabilization, when things looked stable, I stopped clicking on the ajax test page and pushed the code in production, waiting for end users to complain: a little stress on users does not hurt. I was totally wrong. Using end users for testing is hell: it has put a lot of stress on everyone’s part for absolutely no gain.

    A couple of days ago, I felt it was time to tackle this problem seriously after discovering that an application I thought was bugfree happened to be unusable (could not create new elements) and I could not fix the problem because the bug was in Zena and was not simple enough for a safe quick fix: I would risk another client-side failure because of some side-effect.

    Getting started

    Installing the Selenium IDE was just a click away and by going through the Selenium Railscast I was running tests in minutes. Some helpers selenium, conventions and a rake method and browser based testing is a joy.

    Selenium with Zena

    Testing is now very simple: you need to install the “selenium-on-rails” plugin and then start the server with:

    rake zena:test_server

    This ensures that the server is started with cleared compiled zafu and freshly built fixtures.

    If you want to see some of Zena’s tests, they all live in “test/selenium”. You can manually run the tests by visiting “test.host:3000/selenium”.

    ajax testing

    Ajax test page (every box corresponds to a test case)

    Selenium for your own Zena based app

    Simply create a “selenium.yml” config file inside “config” and install the selenium plugin. Because selenium is a big beast, it has not been included inside Zena gem.

    script/plugin install http://svn.openqa.org/svn/selenium-on-rails/stable/selenium-on-rails

    Side-note on browser speed

    If you notice significant speed differences between Firefox and Safari or Chrome, this is due to addons and plugins (one of the greatest features of Firefox), NOT Firefox being a crappy browser. I did some testing:

    Firefox with my usual addons and extensions

    real  0m30.764s
    user  0m0.558s
    sys   0m0.167s

    Firefox (no addons, no extensions)

    real  0m16.075s
    user  0m0.582s
    sys   0m0.183s

    Safari

    real  0m15.767s
    user  0m5.154s
    sys   0m0.717s

    Chrome

    real  0m15.759s
    user  0m3.390s
    sys   0m0.854s

    conclusion

    Selenium is a great tool for integration testing and removes a lot of stress both on the application’s end users and on the developer by providing a safety net. Using selenium is very straightforward with the Selenium IDE so the cost of not using such a tool is way higher then the energy needed to start using it.

    Many thanks to the Selenium contributors for such an easy to use and powerful tool !

    Gaspard Bucher

  5. Zena 1.0 "Amen Break" release

    I am very proud to announce the move out of beta with the 1.0.0 release.

    We have migrated all previous websites on Zena 1.0 and have been running this branch in production for 6 months so things that we have been using should be pretty stable. This is still an “1.0” release meaning that the parts that we seldom use might contain bugs despite the 2756 unit tests (5293 assertions).

    From the first days in production in January 2007 after a year of coding to what Zena is today, we have gone a very long way. Most importantly, we have not spent time creating tons of “plugins” but we created languages so that anyone can write what she needs. For example SQLiss is a query language that knows everything from your application, models, relations and such, rubyless is a typed version of Ruby that can be used in zafu templates. And of course, zafu itself is a language on top of html that can also be used to generate csv exports or vcards.

    We know that learning curve for Zena is quite steep without many “introductory” materials but unfortunately we won’t have time to create such material before a couple of months, so do not hesitate to ask questions on the mailing list ...

    The name of this release is an homage to the Amen Break with the hope that sharing will always be a vector of creativity and never a patent risk.

    Happy sampling !

    Gaspard Bucher

  6. older posts
    archives: 2007, 2008, 2009, 2010, 2011