== Version 0.17.0 The biggest release yet, featuring the brand new implementation of Og. Due to the many changes this should be considered a preview release, a stabilized version is expected shortly. Bug reports and comments on the new features are especially appreciated. Many thanks to Michael Neumann, Dan Yoder and other hackers on the mailing list for ideas and suggestions that made this version possible. Most notable Og additions: * Extremely clean source code. Better names are used thorougout. Extra care was taken to make all features more orthogonal. * Brand new relation mechanism. The 'enchanting' of entities (managed classes) happens in multiple passes to be more flexible. Totaly separated graph/metadata creation and serialization code generation. The Graph metadata can be used for advanced scaffolding, testing and more. * Support for fully customizable primary keys. You are no longer forced to use xxx_oid primary keys. Appart from the extra flexibility this feature provides, this is an essential step towards the planed 'reverse engineering' mode that will allow the use of existing schemas with Og. * More elegant inspection mechanism. Example: Article.relation(:user) # => Og::BelongsTo(...) Article.relations # => [...] Article.properties # => [...] * Joins_many relation, as an alias for one way, join table relations. * Support for 'active' collections. Active collection are synchronized with the backend Store and provide a more elegant interface and the opportunity for 'session' caching: article.comments << Comment.new instead of article.add_comment(Comment.new) # this is also allowed though. p article.comments p article.comments.size # the results of the first query is cached * Eager relations. comments = Article.comments(:include => User) for comment in comments p comment.user.name end Elegantly solves the N+1 query problem by using one join query. * No need for forward references when defining relations. Now, the following code magically works: class User has_many Comment # works even though Comment is not defined! end class Comment belongs_to User end * Use inflection where possible to infer missing configuration options. For example class Article belongs_to User # infects relation name :user ... * New, lean and mean Store interface. The code needed to teach Og how to serialize objects to backend store is dramatically reduced. The new interface is SQL agnostic, so non SQL-RDBM's stores are possible. * SQL agnostic querying interface, compatible with non-sql Stores. Here is an example: Article.find( :condition => 'hits > 2 AND rate > 3', :order => 'title', :offset => 30, :limit => 10 ) * More elegant (and non-sql store compatible) way for selective updates: article.title = 'Changed' article.hits += 1 article.update(:title, :hits) * New, in-memory store that support all features. This is a pure ruby solution useful for experimentation. It will also serve as the base for the forthcoming madeleine Store implementation. * Allow for multiple stores in one application. A great example, mysql_to_psql is provided. This example uses Og's powerfull features to automatically convert a Mysql database to a PostgreSQL database. Database migration was never easier. * Uses the excellent Facets utility collection to further clenup and minimize the code. * Managed classes or Entities should include the EntityMixin or extend the Entity class. Example: class Article < Entity .. end class Article include EntityMixin end This is done to avoid the Module module like in earlier versions of Og. However, Og is can infer the need to include the Managed mixin in typical cases: class Article property :title, String # when a property is defined Og automatically converts the # class to an Entity end class Article < AnExistingManagedEntity # also includes the mixin ... class Article include AModuleThatDefinesProperties ... * Improved support for og_delete interception. * Support for nested transactions. Check out the file test/og/tc_store.rb for a demonstration of the new features. And some Nitro additions: * Integrated the Facets library, and started donating some Glue code to this project. * Integrated the Prototype object oriented javascript library. * Included a preview implementation of the new tag library system, called Elements. This is based on an original idea by Dan Yoder. This feature is expected to change substantially in the next version. In the meantime here is an example: Here is a nice page.
This is #{variable}. hello admin
The tags and automatically instantiate objects of class Page and Box that handle the rendering. This is an alternative to the XSLT templating system and can also be used to implement some reusable components. The hierarchical structure of the elements is available to each object to facilitate advanced rendering tricks. Just like the XSLT shader the Elements transformation is preapplied to the page to avoid the overhead at runtime. * Fixed many reported bugs. == Version 0.16.0 was released on 16/04/2005. A snapshot of the latest developments. Many, many subtle improvements, new features and a major cleanup of the source code. Thanks to James Britt for significantly contributing to this release. Most notable additions: * Aspect Oriented Programming support. This new system is used to reimplement features such as Controller filters, Og callbacks and Og observers. By using this unified system you can now add Observers to controllers and use a metalanguage for wraping Og object callbacks: class Controller pre :force_login, :where => :prepend wrap Benchmark, :on => :index post :taraa, :on => login end module Timestamped pre :on => :og_insert { |this| this.create_time = Time.now } pre :on => :og_update { |this| this.update_time = Time.now } pre :on => [:og_insert, :og_update] { |this| this.create_time = Time.now } end This feature will be used extensivelly in future versions to improve logging, the shaders and more. * Added support for Test Driven Development. Many helpers and utility methods are added to the standard TestCase class, more will come in a future version: handle( '/login', request = { 'password' => Blog.password } ) assert_redirect assert_session_has(:owner) assert_session_equal(:username, 'George Moschovitis') assert_has_cookie('nauth') assert_has_no_cookie('wow') assert_cookie_equal('nauth', 'just an example, not used :)') * CGI adapter (by James Britt) * Major cleanup of the source. Converted the N namespace to Nitro, to be more compatible with other Ruby projects. * Add Og Timestamped mixin. * Og improvements. * Improved runner helper. * Improved reloading support. * Improved the Gem installation process. * Fixed all reported bugs. == Version 0.15.0 was released on 04/04/2005. A great release. Many cool new features and tons of subtle improvements. We also welcome a new core developer, Anastastios Koutoumanos, who's first contribution is the new SqlServer adapter. Most notable additions: * Advanced localization support: locale_en = { 'See you' => 'See you', :long_paragraph => 'The best new books, up to 30% reduced price', :price => 'Price: %d %s', :proc_price => proc { |value, cur| "Price: #{value} #{cur}" } } locale_de = { 'See you' => 'Auf wieder sehen', ... } lc = Localization.get lc['See you'] -> See you lc[:price, 100, 'euro'] -> Price: 100 euro lc = Localization.get[:de] lc['See you'] -> Auf wiedersehen Using the LocalizationShader you can have templates like this:

[[This is a localized]] String

do you [[:like]] this?

All strings enclosed in [[ ]] are replaced with localized versions (honouring the session locale). Check out the updated blog example. * Dynamic/Parametrised mixins. A great extension to Ruby's mixin feature. The Og::list implementation is replaced with the new Orderable dynamic mixin, here is an example: class Comment property :body, String belongs_to :article, Article include Orderable, :scope => article end c.move_higher The Orderable mixin uses the :scope parameter to dynamically alter the methods appended to the Comment class. This new feature will be used throughout the platform. * NestedSets mixin: class Comment include NestedSets end or class Comment include Hierarchical, :method => :nested_sets end c.add_comment(child_comment) c.full_children c.direct_children c.children this is a reimplementation of the SqlTraversable mixin available in older versions. * Improved templating system. Now allows <% %> intrerpolators and provides a number of html morphing effects:
admin interface
and more... * Og provides an SqlServer adapter out of the box. * Improved scaffolding code (still a lot more to come). * Build default environment, introduced nitro and nitrogen commands to help new users. * Many, many small improvements and fixes. == Version 0.14.0 was released on 28/03/2005. This release fixes *important* bugs amd improves various aspects of the platform. Moreover, we included some great *new* features for your pleasure. Most notable additions: * Fixed IMPORTANT bug in property inheritance. * Fine grained caching. Nitro allows you to cache whole pages (output caching), actions and fine-grained fragments. class MyController < Controller cache_output :my_action def my_action end end Stores the whole page created by the my_action method to the disk to be displayed by the web server thus completely Nitro and Ruby. or Here is some cached code
  • #{a.title}: #{a.body}
or Another one session[:admin]) do ?> ... Cached fragments can be stored in memory, filesystem. While this feature is fully operational, the API will be finalised in the next version. * Introduced support for Og mixins. In this version a List mixin is provided: class Article has_many :comments, Comment, :order => 'position DESC' end class Comment belongs_to :article, Article acts_as_list :scope => :article end An AR compatible API is provided. An alternative API is planned for the near future to give you more choice. * Reimplemented filtering infrastructure, allows for inheritance, conditional application of filters (:only/:except) modifiers, more performant Filters as Strings and more. * Fixed multipart support in fastcgi, added file upload example (tiny example). * The webrick adapter reuses the fastcgi infrastructure, making the adapters more compatible with each other. * Added many useful Og enchant methods. * Cleaned up configuration files for lighttpd/apache. * More compatible with win32. * Fixed examples and all reported bugs. == Version 0.13.0 was released on 17/03/2005. A snapshot of the latest code. The Nitro project is now split in three gems (nitro, og, glue) and the code is better separated. Many changes were made to make programming with Nitro more similar to Rails, to make the platform more accessible to newcomers. A conversion of ActionMailer and an AJAX example are also included. * Introduced Mailer subsystem: class MyMailer < Mailer def registration_email(to, username, password) @from = 'system@navel.gr' @to = to @subject = 'Registration information' @body.username = username @body.password = password end end the tempate (registration_email.xhtml): Hello #{username} Thanks for registering, your password is '#{password}' Then use it like this: MyMailer.deliver_registration_email('gmosx@navel.gr', 'gmosx', 'rulez') For more information, check out the updated blog example. * AJAX example, demonstrates how to use ajax techniques with Nitro. A simple Google Suggest style UI is implemented. * Use a Rails compatible directory structure. Check out the updated blog example. Please note that Nitro does not force a directory structure (see an alternative structure in the no_xsl_blog example). * Optional separate template_root/public_root for extra security. * Further code cleanup and bug fixes. == Version 0.12.0 was released on 07/03/2005. A careful blend of new features and subtle improvements to the existing infrastructure. Some important bugs where fixed aswell. Most notable additions: * Nitro allows the definition of metadata for each action. Routing (rewrite) rules, parameter constrains, hierarchy information and custom data can easily be attached to actions: def view @entry = Article[@oid] end action :view, :route => /view\/(.*)/, 'oid' => 1 just browse view/1 and @oid is automatically initialized with request['oid'] Browse the source to see how to add additional constrains, more is comming in the next version. This feature replaces the non portable ParseTree implementation. The scaffolder is updated to generate routings for nice urls. * Og automatically generates finders for all properties, for even easier (and portable) querying: class Article property :title, :body, String property :hits, Fixnum property :create_time, Time end you get the finders: Article.find_by_title Article.find_by_body Article.find_by_hits Article.find_by_create_time The finders take into account the unique constrain, to return an array or just an object as needed. * Og introduces lifecycle observers to avoid 'poluting' the model objects with excess functionality. You can use every object as observer (duck typing) or extend from an AR style Observer class. The observer callbacks are precompiled in the lifecycle methods only if defined, so the perfomance is not affected in the general case. * Factored out templating engine, can now be used in stand-alone mode. Usefull for example to render email templates etc: template = %q{ Hello #{user} dont forget the following facts:
  • #{item}
  • } user = 'gmosx' items = %w{ nitro is really great } out = '' # the rendered template comes here. Template.process(template, :out, binding) * New options in the default runner: --render crawls a web application and renders all pages as static html files. Allows you to leverage Nitro's advanced templating features to generate static sites. --crawl spiders the application, useful for testing. * Better error page, with more information (see blog example). * Fixed Og bug: multiple many_to_many relations with the same target class. * further code cleanup, improved examples and more. == Version 0.11.0 was released on 28/02/2005. The platform continues to evolve and now supports the Apache web server and the Oracle database out of the box. This version features improved documentation, important bug fixes and many subtle improvements to make programming even more enjoyable. Many thanks to Matt Bowen for his help with this release. Most notable additions: * Configuration files for Apache/FastCGI. * Og documentation (doc/og_tutorial.txt, doc/og_config.txt) * Actions with parameters: def list(username, oid) ... end http://www.mysite.com/list?username=tml;oid=2 calls list() with the correct parameters, no need to use request['oid'], just use oid. def list(username, oid) puts oid # oid == request['oid'] end WARNING: this feature requires the ParseTree library which is not compatible with Windows. For the moment, this feature is dissabled by default. To enable this feature, set Nitro.resolve_action_arguments = true. * New session store system, DRb sessions (stored in an independent DRb server) are reimplemented. Session.store_type = :drb * TableBuilder helps in creating html tables. * Integrated builders with the programmatic render. For example:
    #{o.build_table(:id => 'my_tab', :headers => headers, :values => values)
    or

    Object Form #{o.build_form(obj)}

    * Og Oracle adapter. * Og provides advanced metadata for the managed objects class Article property :title, String property :body, String has_many :comments, Comment end par = Article.properties_and_relations => [Property(:title), Property(:body), Og::HasMany(:comments)] par[2].klass => Comment par[2].meta[:linkback] => :article_oid * Og Typemacros, here is an example: def VarChar(size) return String, :sql => "NOT NULL VARCHAR(#{size})" end property :title, VarChar(30) * Option for faster startup, skip schema check. * Many small Og improvements and fixes. * FastCGI adapter bug fixes. * New example, why's wiki, from a cool post at http://redhanded.hobix.com * IMPORTANT security fixes. == Version 0.10.0 was released on 15/02/2005. Another strong release featuring a completely recoded Og implementation and redesigned Og adapter (formely backend) system. An SQLite3 adapter is also provided. Moreover the Nitro installation process is improved, and many small changes make the framework more elegant and easier to use: the updated examples reflect this! Most notable additions: * Improved Og implementation (cleaner code) and new Og adapter subsystem. * New SQLite3 Og adapter, improvements in MySQL and PostgreSQL adapters (WARNING: needs version 1.1.0 of Sqlite3-Ruby). * Added install.rb for easier installation of the tar.gz distribution. * Better GemSpec for easier installation by RubyGems. * Action/template/xsl auto-reloading system in debug mode, new implementation, works again. * New Nitro configuration system, with rational default parameters. * --console option attaches an irb session to a running instace of an application (works again). * Og supports optional typechecking by using property metadata. * request alias for context to be compatible with older versions of nitro and Webrick/jsp and other frameworks. * Improved the examples, cleaner code, work from any directory. * Removed more obsolete code and improved directory structure. * and many more smaller fixes. WARNING: If you used an earlier version of Og you may need to drop your database and let Og recreated it automatically. == Version 0.9.5 was released on 04/02/2005. A bug fix release. * Fixed nasty Windows deadlock bug. * Experimental Wee-style example (will be updated in the next version). * Changed default port to 8069 (8080 was to common). * Small fixes and improvements. == Version 0.9.3 was released on 01/02/2005. A *very* important release. A new abstract rendering pipeline is introduced. This pipeline allows for multiple adaptors (WEBrick, fastcgi are included). Many classes have be rewritten using *clean* code, and the directory structure has improved again. All unused and obsolete files have been removed. A new version of the Blog example was included. This version does not use XSLT and runs on Windows. If you havent seen Nitro or you had problems with an earlier version, this is the time to revisit this project! Most notable additions: * Drastically improved source code readability. * New abstract rendering pipeline. Benefits: * multiple adaptors. * better unit tests. * optimized memory allocation. * more modular desing. * FastCGI support (tested with Lighttpd). * no_xsl_blog example. This new example is easier to setup, even on Windows. This also demonstrates that Nitro does NOT force the use of XSLT. * No global variables used for nitro configuration. * Updated the docs to better reflect the rappidly evolving codebase. * Og metalanguage relations insert metadata into the target class, useful for advanced scaffolders. * Og refer_to meta-language command. * Many bug fixes and small optimizations. The next version will stabilize the Nitro api. == Version 0.8 was released on 12/01/2005. A snapshot of the latest code. Cool new features, many fixes and improvements in older features. Many thanks to Michael Neumann for giving intelligent suggestions and finding small bugs. Most notable additions: * New automatic validation system: class User prop_accessor :name, :password, String validate_confirmation :password validate_length :name, :range => 2..12 end u = User.new(...) unless u.valid? p u.errors.on(:name) p u.errors[:password] end * Programmatic xhtml rendering. This is an alternative method of rendering that is usefull in building components and helpers. This is a preview implementation. options = ['Male', 'Female'] o.select(:name => 'sex') { o.options(options, selected = 1) } options = { 'Male' => 'm', 'Female' => 'f' } o.select(:name => 'sex') { o.options(options, selected = 1) } o.html { o.p(:class => 'header') { o.b('Hello') } } * No global variables in Og. * Recoded Og to allow for future support of multiple databases (even on different RDBMS systems) on a single application. * Improved Blog example demonstrates latest advancements. (You have to drop the database of earlier versions!) * More unit tests. * Supports Ruby 1.8.2 * Integrated extensions/dev-utils by Gavin Sinclair. * Integrated blankslate by Jim Weirich. * And many IMPORTANT bug fixes. == Version 0.7 was released on 27/12/2004. A snapshot of the latest code. Many fixes and new features result in a more mature product. Many thanks to the ruby hackers that sent suggestions and patches used in this release! Most notable additions: * Improved win32 compatibility (Tiny example runs out of the box). * Binary content example (Flash, needs ruby-ming installed to run). * Totaly recoded prop_accessor mechanism, avoids polution of the Module class. * prop_accessors for Modules, allows synthesizing of managed objects from Mixins. * new automatically generated methods in Og. * MockDatabase leverages the FlexMock object for easier unit testing. * Integrated the cool Breakpointer library by Florian Gross. * Markup mixin to automatically expand/compact generalized markup code. * new_form wizard. * Statically (compile time) included subscripts. * Important bug fix in redirects. and many many bugfixes! :) == Version 0.6 was released on 13/12/2004. This is a preview release, the api for the new features is not finalized. This early release gives other developers to offer suggestions on the final form of those features. Most notable additions: * Og many_to_many relations with auto generation of the join table. * Og has_one relation. * PHP-style nested output buffering. * Rails-style Filters. * autoreload services. * complile time evaluation of ruby code in templates. * improved pager ui. * initial version of FormBuilder. * initial version of new_app wizard. * Improved Blog example. and... the nitro logo :) == Version 0.5 was released on 23/11/2004. Many new features: * Stand-alone Og distribution. * Scaffolding. * Og RDBMS index support (works again). * improved render/dispatcher. * REST/XML dspatcher. * RssBuilder. * Improved BLOG example. * Many fixes. == Version 0.4.1 was released on 15/11/2004. A MAJOR revision! The rendering engine was recoded from scratch and now features Rails-style actions. Some older features are not yet converted to the new engine though. Other new stuff includes a fully working / cool looking Blog example, a programmable shader pipeline, automatic object manager in Og, improved directory structure, bug fixes, many changes to make it easier to switch from Rails, and many many more cool improvements for you to find out in the detailed ChangeLog. == Version 0.3.0 was released on 01/11/2004. An important revision! Nitro now includes the first version of a brand new ObjectRelational mapping library called Og (ObjectGraph) that combines the best features of Active Record and NDB. A fully working MySQL adapter is also provided. Moreover the code base is further cleaned up. Small improvements to the application configuration system. == Version 0.2.0 was released on 25/10/2004. Greatly improved RDoc documentation. Cleaned up many source files, and improved the directory structure to be more compatible with other Ruby projects. Introduced a test suite. Important bug fixes in NDB. Tiny example no longer requires apache so should run out of the box. == Version 0.1.2 was released on 21/10/2004. The first public version. Features 2 examples and limited documentation. The aim of this release is to make the project known to the Ruby Community. We hope that the Ruby hackers will respond with valueable suggestions and ideas.