Nitro (web framework)

Nitro (web framework)
Nitro
Developer(s) George Moschovitis
Stable release 0.41 / December 12, 2006; 4 years ago (2006-12-12)
Operating system Cross-platform
Available in Ruby
Type Web application framework
License BSD License
Website http://www.nitroproject.org

Nitro was a Ruby-based web application framework created by George Moschovitis. Nitro featured a powerful template system with a configurable pipeline of transformation steps. It was licensed under a 3-clause BSD license.

A key philosophy of Nitro was that it did not dictate how a web application should be structured. One could use templates with embedded code, as is typical with PHP or ASP, or one could use the model-view-controller approach, as found in for instance Ruby on Rails, or expand even further with a custom architectural pattern.

Nitro featured support for Ajax, XML, web services and syndication while staying standards compliant.

One of its key distinctions from other similar frameworks was its use of "Og" as the object-relational database mapping layer. Og could create database tables based on Ruby classes, or it could be easily adapted to use an existing database schema.

Contents

Og

The persistence framework developed together with Nitro was named Og, short for ObjectGraph. It was an object-relational mapping (ORM) system that allowed for storage and retrieval of Ruby objects from a backend store. This could be an RDBMS, but did not necessarily have to be so. A backend adapter had been developed that stored objects in individual YAML files on the filesystem.

Og would infer the database structure from the definition of classes that were managed by it. Database tables would be created by Og as necessary. This was different from the ActiveRecord approach used in Rails where the developer is responsible for creating the database tables. Og could adapt the database schema to simple changes in the class definition, such as adding or removing attributes. This feature was best turned off in a production environment. More involved changes might have required manual intervention, one could also simply remove the affected tables and let Og recreate them.

Og could be made to work with an existing (legacy) schema, by supplying hints as to which column is used to store a particular property, and which property is considered the primary key.

Examples

Hello world

require "nitro"
class MyController
  def index
    "Hello from nitro!"
  end
end
Nitro.start MyController

Select day

This example demonstrates morphers, one of the available transformations for templates. This would result in a dropdown list containing the numbers 1 to 31, with the current day selected.

<select name="day">
  <option for="day in 1..31" selected_if="day == Time.now.day">#{day}</option>
</select>

Current status

Currently the development of this framework seems to have been abandoned, and the official website has been taken down. In 2009, it was announced that development of Nitro in the Ruby had been halted, since the primary contributor George Moschovitis had moved to development of Nitro under JavaScript[1]. Enthusiast were pointed to other Ruby framework projects, such as Ramaze[2].

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Nitro — may refer to: Contents 1 Chemistry 2 Entertainment 3 Television 4 …   Wikipedia

  • Django (web framework) — Django The default Django page Developer(s) Lawrence Jou …   Wikipedia

  • Nagare (web framework) — Nagare Developer(s) Alain Poirier, Net ng Initial release September, 2008 Stable release Nagare 0.3.0 / December 14, 2010; 9 months ago (2010 12 14) …   Wikipedia

  • Framework — Framework  термин, имеющий размытое значение. Обычно используется в программировании, обозначая «простую концептуальную структуру, используемую для решения сложной, проблемной задачи». Значение этого термина существенно зависит от контекста его… …   Википедия

  • List of web application frameworks — This is a list of notable web application frameworks, used for creating web applications. Client side ActionScript * Cairngorm * PureMVCJavaScript* Backbase * CJAX * Clean AJAX * Dojo Toolkit * Echo * Ext * [http://www.gapjumper.com/ Gapjumper] * …   Wikipedia

  • Lift (framework) — У этого термина существуют и другие значения, см. Lift. Lift Тип Фреймворк для разработки веб приложений Разработчик Lift Team …   Википедия

  • Akelos PHP Framework — Тип Фреймворк для разработки веб приложений Написана на ОС Кроссплатформенное программное обеспечение Версия 0.9 8 февраля 2009 …   Википедия

  • Aranea framework — Тип Веб фреймворк Разработчик Aranea Написана на Java Операционная система Кроссплатформенное ПО Языки интерфейса Java Последняя версия 1.0M1 ( …   Википедия

  • Comparison of web application frameworks — This is a comparison of notable web application frameworks. Contents 1 General 1.1 Perl 1.2 PHP 1.3 Java 1.4 Python …   Wikipedia

  • Spring Framework — У этого термина существуют и другие значения, см. Spring. Spring Framework Тип Application framework Разработчик SpringSource Написана на …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”