Posted By: George Moschovitis
Date: 2006-01-18 07:44
Summary: Nitro + Og 0.27.0 Client code, WebFile, New examples, RDocs
Project: Nitro

Once again we have a great mix of cool new features, along
with bugfixes and a myriad of smaller improvements. Go and
download the most advanced Ruby Web/ORM Framework you can find.

Most notable changes:

* Added groundbreaking client side action/scripting support:

class FlickrDemo < Nitro::Controller
helper :javascript

class Client
# Actions defined here are executed as javescript in the
# browser.
def clear_me
hide :hide_me
end

def grab
ajax_upadate ...
end
end
end

in the template:

<div id="hide_me">...</div>
<a client="clear_me">clear</a>

the client element is converted to a javascript call that
executes the code in the client action. A domain specific
language is provided for the client action to implement stuff
like ajax async updates, scriptaculous visual fx and more.

* A collection of morphers to work along with client actions.
Here are some examples:

<!-- make a div draggable -->
<div id="hello" draggable="true">Drag me</div>

<!-- autocomplete a text field -->
<input type="text" name="tags" auto_complete="true" />

in the controller:

def tags_auto_complete
%{
<ul>
<li>navel</li>
<li>nitro</li>
<li>sexy</li>
</ul>
}
end

More stuff is coming in future versions.

* Greatly imporoved the Elements system. The ElementMixin module
is auto-injected if missing. Nitro automatically transforms
xhtml template files in the Element.template_root into
Element classes for even better separation of code and design.
A simple Rails style layout helper is implememnted on top of
the general and powerful Elements mechanism for people familiar
with Rails.

* New WebFile system. Uploading files and handling photos was
never easier:

class Photo
is Timestamped
is Taggable
property :title, String
property :file, WebFile, :magick => { :small => '64x64', :medium => '128x128' }
end

# the upload action

def upload
photo = Photo.assign(request)
photo.save
end

This saves the photo, and creates 2 thumbnails. You can easily
access the photo and thumbnails like this:

<img src="#{photo.file_medium_thumbnail}" />
<img src="#{photo.file_small_thumbnail}" />

ie obj.{propertyname}_#{thumbname}_thumbnail

* Og live collections support accumulation. Here is an example:

class Category
has_many :projects
end

class Project
has_many :clients
end

class Client
end

clients = category.projects.clients

# => returns all clients for this category!

* Improved TableHelper, better configurability, more skinnable,
sorting support and more.

* Added some intelligent auto-discovery features to minimize the
setup code. For example helpers are automatically loaded, and
the template_root is auto-discovered.

* Optimized the autoreloading system to only reload the dirty
files. In fact the new autoreloading system is so efficient
that it is enables by default even in live/production mode.

* Add Flickr, a great new example that shows off the new
javascript integration and AJAX features of Nitro.

* Added Gallery example to demonstrate the new WebFile
functionality.

* Improved the generated RDOC comments.

* Fixes in CGI adapter.

* Added evolution support to the KirbyBase adapter.

* Updated to scriptaculous 1.5.1

* Scaffolding - auto admin interface improvements.

* Added setup.rb for non-gem installation (experimental).

* Added ACGI adapter (experimental).

Latest News
TZInfo v1.0.0 and TZInfo::Data v1.2013.3 Released
    Philip Ross - 2013-06-02 17:12
icalendar 1.4.0 Released
    Ryan Ahearn - 2013-05-21 23:17
BinData 1.5.0 - source moved to github
    Dion Mendel - 2013-05-21 11:10
v13.5.0 Released !!
    id 774 - 2013-05-18 12:28
Runt v0.9.0 Released
    Matthew Lipper - 2013-05-17 00:11

 

Forums | Admin

Discussion Forums: nitro---og-0.27.0-client-code--webfile--new-examples--rdocs

Start New Thread Start New Thread

 

Topic Topic Starter Replies Last Post