Posted By: George Moschovitis
Date: 2005-08-11 09:37
Summary: Nitro + Og 0.22.0
Project: Nitro

A snapshot of the latest developments. Many requested features
where implemented, and many reported bugs fixed.

* The much requested Og 'reverse mode' is implemented. Og's
domain specific language and API is extended to allow fine-grained
customization of the schema-to-objects mapping. Og can now handle
most of the legacy schemas you can throw at it. Here is an
example:

class User
property :name, String, :field => :thename, :uniq => true
property :password, String
property :age, Fixnum, :field => :age3
has_many Comment, :foreign_field => :user
set_table :my_users
set_primary_key :name, String
end

class Comment
property :cid, Fixnum
property :body, String
belongs_to User, :field => :user
set_table :my_comments
set_primary_key :cid
end

As you can see, even relation fields can be customized. For
higher level customization you can overload methods like #table,
#field_for_property etc.

* Og now handles multiple connections to multiple stores even
in thread safe mode. This means you can now have objects serialized
in different RDBM systems in the same application. Or you can have
some objects managed by an RDBMS store and others by a FAST
in-memory store. You can still have relations between objects in
different stores. An example:

mysql = Og.setup(:store => :mysql, ..)
psql = Og.setup(:store => :psql, ..)

class User
has_many Comment
end

class Comment
belongs_to User
end

mysql.manage_class User
psql.manage_class Comment

user.comments << comment

* Greatly improved support for testing and test-driven-development.
A reworked testing infrastructure for controllers is in place.
Moreover, support for Og fixtures and automatic test database
setup is provided. Fixtures can be defined with yml or csv files.

For an example of the testing infrastructure check out the
Spark 0.4.0 sources. Spark is a Wiki powered by Nitro.

* Reworked mailer implementation. The new mailer allows for
incoming email handling. Here is an example:

class Mailman < Glue::Mailer
def receive(mail)
article = Article.new(mail.subject, mail.body)
article.category = Category.find_by_name(mail.to.split('@').first)
article.save
end
end

* Added script/runner in proto as a convenience to running
ruby code in your application environment.

* Many fixes in the caching infrastructure.

* Many fixes in the XMLRPC service infrastructure.

* Many smaller changes and feature implementations that make
development with Nitro so much more pleasurable.

Latest News
v13.5.0 Released !!
    id 774 - 2013-05-18 12:28
Runt v0.9.0 Released
    Matthew Lipper - 2013-05-17 00:11
kramdown 1.0.2 released
    Thomas Leitner - 2013-05-09 06:58
mime-types 1.23 Released
    Austin Ziegler - 2013-04-21 01:41
diff-lcs 1.2.4 Released
    Austin Ziegler - 2013-04-21 00:08

 

Forums | Admin

Discussion Forums: nitro---og-0.22.0

Start New Thread Start New Thread

 

Topic Topic Starter Replies Last Post