# \[ANN\] Nitro + Og 0.13.0

**URL:** <https://rubytalk.org/t/ann-nitro-og-0-13-0/17001>\
**Category:** ruby-talk\
**Created:** [17 March 2005 12:44 UTC](https://rubytalk.org/t/ann-nitro-og-0-13-0/17001 "2005-03-17T12:44:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![George\_Moschovitis](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@George\_Moschovitis](https://rubytalk.org/u/George_Moschovitis)\
**Post date:** [17 March 2005 12:44 UTC](https://rubytalk.org/t/ann-nitro-og-0-13-0/17001/1 "2005-03-17T12:44:51Z")

</div>

Hello everyone,

new versions of Nitro and Og were just released.

Homepage: [http://nitro.rubyforge.org](http://nitro.rubyforge.org)

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.

Most notable Nitro changes:

\* Introduced Mailer subsystem:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MyMailer \< Mailer  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def registration\_email(to, username, password)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@from = 'system@navel.gr'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@to = to  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@subject = 'Registration information'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@body.username = username  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@body.password = password  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;the tempate (registration\_email.xhtml):

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hello #{username}

&nbsp;&nbsp;Thanks for registering, your password is '#{password}'

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then use it like this:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyMailer.deliver\_registration\_email('gmosx@navel.gr', 'gmosx',  
'rulez')

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.

Most notable Og changes:

\* Better separated from Nitro.

\* Database related validations (validate\_unique) etc.

\* Emmit warnings on implicit graph changes.

\* Many bugfixes.

Nitro is an efficient, yet simple engine for developing professional  
Web Applications using the Ruby language. Nitro aims to provide a  
robust infrastructure for scalable web applications that can be  
distributed over a server cluster. However, Nitro can also power simple  
web applications for deployment on intranets or even personal  
computers. Nitro integrates the powerful Og Object-Relational mapping  
library.

Nitro is a multiparadigm application framework and will integrate ideas  
from Rails, Wee, PHP, JSP and .NET

Nitro integrates the Og (ObjectGraph) object-relational mapping  
library. Og provides transparent serialization of object graphs to a  
RDBMS backend. Unlike other similar libraries Og maps standard Ruby  
objects to SQL tables and not vice versa. Og provides a meta language  
to describe the relations between objects, a flexible and intuitive api  
for querieng the database, raw access to the SQL language if needed  
(for example to fine tune the automatically generated SQL tables, or  
for custom queries), suports deserialization to Ruby objects or tuples,  
automatically generates join tables for many\_to\_many relations and  
provides a collection of usefull Mixins to synthesize common Entities.

Og is a combination of the best features of Active Record and the  
former O-R mapping library included in Nitro (NDB). Adapters for  
PostgreSQL, MySQL, SQLite and Oracle are included.

I hope this software will be useful for you, and I would love to  
receive your suggestions, ideas and bug reports.

have fun,  
George Moschovitis
