Nitro + Og 0.29.0: R operator, Improve error handling, routi

Dear devs,

The Nitro Development Team is proud to announce new versions of Nitro
and Og

homepage: http://www.nitrohq.com
install: gem install nitro
download: http://rubyforge.org/projects/nitro/
trac: oree.ch
irc: irc.freenode.net #nitro
faq: http://oxyliquit.manveru.net
mailing list: http://rubyforge.org/pipermail/nitro-general/

A bold step towards maturity. Great care was taken to
fix reported bugs and fine tune many aspects of Nitro and Og.
As always some great new features where added. Special thanks fly
to Jonas P., Bryan Sotto, Rob Pitt and Guillaume
Pierronnet for making this release possible.

Most notable changes:

  • Greatly improved error detection and report. Nitro now provides
    line exact error reports at compile or run time, in actions
    or templates. Stay tuned for more improvements in error
    handling.

  • Nitro now supports a very useful url endoding/decoding system
    along with a Camping inspired R operator. This new system allows
    you to refer to controllers and actions in your code, without
    bothering about the enforced nice urls and rewrite/routing
    rules. This allows you to write more robust code.

    Here are some examples:

    redirect R(UsersController, :login, :name, ‘gmosx’)
    delete

    some more helpers and better integration of this feature
    will be available soon.

  • To better support the URL codec, a new router was implemented.
    The new version is both more powerfull and faster. Here are
    some examples:

    r.add_route(%r{rewritten/url/(.)}, :controller => IdController,
    :action => :register, :param => :name)
    r.add_route(%r{another/zelo/(.
    )/(.)}, :controller =>
    AdminController, :action => :kick, :params => [:name, :age])
    r.add_route(%r{cool/(.
    )_(.*).html}, :controller => AdminController,
    :action => :long, :params => [:name, :age])

  • Og now supports calculations and aggregations. Here are some
    examples:

    User.min(:age)
    User.average(:age)
    User.maximum(:age)
    User.min(:age, :group => :profession) # => […] (aggregation)
    User.sum(:age, :group => :role) # => […]

    and more!

  • Improved template_root handling. Now Nitro automatically generates
    a template_root stack for each controller / publishable object.
    Of course the developer can fully customize this stack.
    This is great for reusable modules of functionality (parts). Lets
    say you have implemented a forum part. When you ‘mount’ the
    forum controller a path relative to the mount point is pushed
    in the template_root stack. When the dispatcher searches for
    a template, it traverses the stack. In the described scenario
    it first looks in the application template root, next in a template
    root the points inside the part template root and then in the
    proto dir template root. The proto dir template root is automatically
    pushed as the last root in the stack. This system facilitates
    ‘object oriented sites’.

    Use the following method to customize the template_root.

    def self.setup_template_root(path)

    end

  • Added support for JSP like application scoped (global)
    variables.

    def login

    global[:users] << current_user
    application[:users] << current_user

    end

    The global/application hash is backed by any of the available
    cache stores.

  • Improved Taggable mixin, now provides more helpers and supports
    tag garbage collection through reference counting.

  • Added a new store for the generalized caching system that is
    backed by a MemCache server. Useful to extract the last ounch
    of performance in a production environment.

  • Fixes in the SCGI adapter.

  • Many Og bug fixes and optimizations.

  • More flexible static include compiler.

  • Improved testing support.

  • Integrated latest versions of Scriptaculous and Facets.

  • Many, many bug fixes and small improvements throughout the
    code.

Nitro provides everything you need to develop professional Web
applications using Ruby and Javascript. Nitro redefines Rapid
Application Development by providing a clean, yet efficient API,
a layer of domain specific languages implemented on top of
Ruby and the most powerful and elegant object relational
mapping solution available everywhere.

have fun,
George M.

George M. wrote:

mailing list: http://rubyforge.org/pipermail/nitro-general/

A bold step towards maturity. Great care was taken to
fix reported bugs and fine tune many aspects of Nitro and Og.
As always some great new features where added. Special thanks fly
to Jonas P., Bryan Sotto, Rob Pitt and Guillaume
Pierronnet for making this release possible.

Outstanding. Thanks to George and the Og/Nitro dev team.


James B.

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - The Journal By & For Rubyists
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.30secondrule.com - Building Better Tools