[ANN] Nitro + Og 0.10.0

G

George Moschovitis

Hello everyone,

new versions of Nitro and Og were just released.

Homepage: http://www.navel.gr/nitro
Download: http://www.rubyforge.com/projects/nitro

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.

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 and SQLite 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
 
M

Michael Neumann

George said:
Hello everyone,

new versions of Nitro and Og were just released.

Homepage: http://www.navel.gr/nitro
Download: http://www.rubyforge.com/projects/nitro

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).

Wow. That's very good news. That makes database examples much easier, as
everyone will be able to try them without installing and configuring
Mysql or Postgresql. Thanks!

How to install the SQLite3 library? Could you give the gem name?

Hm, just an idea: Make a "og-sqlite3" meta gem, which serves just for
installing the SQLite3 dependencies.
* 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).

Could you explain how this works and how this can be useful (I'm sure it
*is* useful, but I don't know exactly what it is ;-).
* Og supports optional typechecking by using property metadata.

Can you give a little example?

Regards,

Michael
 
G

George Moschovitis

Hello Michael,
Wow. That's very good news. That makes database examples much easier, as
everyone will be able to try them without installing and configuring
...
installing the SQLite3 dependencies.

Yeap, sqlite3 is cool indeed, and Jamis's library is even better.

Please note that you need the (as-of-yet) unreleased version 1.1.0 of
Sqlite3-Ruby. Jamis Buck was kind enough to make some small changes to
the library to better support Og but havent released the new version yet.

I also run some tests with prepared statements in Og/Sqlite but is not
ready yet.
Could you explain how this works and how this can be useful (I'm sure it
*is* useful, but I don't know exactly what it is ;-).

well lets say you are running your site with this command:

$ ruby path/to/mysite/run.rb --lhttpd

(using the lighttpd/fastcgi adapter)

then you want to debug the site or interrogate some internal structures.
You just issue:

$ ruby path/to/mysite/run.rb --console

and you end up in a irb console with the correct environment of the
running site. This will be more usefull in the next releas when I
re-enable the distributed sessions (drb/memcache).

This works more or less like the Rails version.
Can you give a little example?

sure, first of all, enable typechecking:

Property.type_checking = true

then define your class:

class Article
prop_accessor :name, String
end

the try to violate tha prop_accessor type:

a = Article.new
a.name = 123 # => You get an exception!

useful to catch some bugs.

btw, this is NOT an restricted to Og application, this is not
an Og feature.



regards,
George
 
J

Jamis Buck

Hello Michael,


Yeap, sqlite3 is cool indeed, and Jamis's library is even better.

Please note that you need the (as-of-yet) unreleased version 1.1.0 of
Sqlite3-Ruby. Jamis Buck was kind enough to make some small changes to
the library to better support Og but havent released the new version yet.

I will be releasing 1.1.0 of SQLite3/Ruby ASAP. If you want to use it
sooner, you can use the version in svn:

http://www.jamisbuck.org/svn/sqlite3-ruby

Sorry for the delay.
 
F

Florian Gross

George said:
sure, first of all, enable typechecking:

Property.type_checking = true

then define your class:

class Article
prop_accessor :name, String
end

the try to violate tha prop_accessor type:

a = Article.new
a.name = 123 # => You get an exception!

useful to catch some bugs.

btw, this is NOT an restricted to Og application, this is not
an Og feature.

Interesting stuff.

I'm currently working on the ruby-contract library (see
ruby-contract.rubyforge.org) that would allow you to do something
similar like this:

class Article
attr_accessor :name
signature :name=, String
signature :name, :return => String # optional
end

I've also implemented type adaption so the above would also accept
anything that implements the .to_str method correctly. (Pathname and so on)

Feedback or questions are very welcome.
 
G

George Moschovitis

Interesting stuff.
...
Feedback or questions are very welcome.

Hello Florian,

I 'll go to download your library, seems to me this does more or less
the same. Perhaps we could cooperate on this and come up with a single
library that still works with Og.

Btw, perhaps I should contact you by email, I would like to use some of
your magic tricks EvilRuby tricks in Nitro.

best regards,
George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top