Modern flower shop osCommerce template

Javascript and ajax enabled template for osComemrce/CRE Loaded. Quick product scroll module and product quick preview

Relatd javascript Articles

Ruby on Rails 1.1 released - RJS Template, Easy XML Serialization, and More

Ruby on Rails1.1 has been released with an impressive set of new features for a point release. For a comprehensive list of new features, check out Scott Raymond's postor the official annoucement.

The Ajax related features include:

  • RJS templates - Javascript generation in Ruby for common Ajax updates. Now in addition to .rhtml and .rxml, you'll have .rjs files with ruby to generate your javascript. For example, taking from Scott's example, the following pre-RJS JavaScript code:
    varCart = {
    add: function(product_id) {
    Element. addClassName('product_'+ product_id, 'incart')
    newAjax. Request('/account/add_to_cart/'+ product_id,
    {method: 'post', onComplete: Cart.refresh })
    },
    remove: function(product_id) {
    Element. removeClassName('product_'+ product_id, 'incart')
    newAjax. Request('/account/remove_from_cart/'+ product_id,
    {method: 'post', onComplete: Cart.refresh })
    },
    refresh: function() {
    newAjax. Updater('cartbox', '/products/cartbox')
    newAjax. Updater('num_items', '/products/num_items')
    }
    }

    Becomes this in Ruby using RJS:

    page.replace_html 'cartbox', :partial => 'cart'
    page.replace_html 'num_items', :partial => 'num_items'
    page.send :record, "Element.addClassName('product_#{@params[:id]}', 'incart')"

    See the rdocor Cody's blogfor more information and examples.

  • DRYcontrollers for Ajax clients, non-Ajax clients, and anyone else by responding to the HTTP Accept header. Davidgoes into more detail as well as Jamis, but the basic idea is to let the client tell you what data format it wants back using the Accept header so that Rails can respond easily with one controller method. The following create method can handles requests from any browser that needs plain html, from a browser with JavaScript support (returns a RJS template by default), and from a web services call expecting XML (returns a HTTP 201 "created" code and nothing else).
    def create
    @comment= Comment.create (params[:comment])

    respond_to do|type|
    type.html {redirect_to :action => "index" }
    type.js
    type.xml do
    headers ["Location"]=
    url_for (:action => "show", :id => @comment.id)
    render (:nothing, :status => "201 Created")
    end
    end
  • Easy xml serialization with to_xml:
    @person.to_xml(:include => @company)
    produces
    <person>
    <id>...</id>
    ...
    <company>
    <id>...</id>
    <name>...</name>
    ...
    </company>
    </person>
  • End to end integration testingbaked in
  • Updates Scriptaculousto 1.6 and Prototypeto 1.5.

Whew. The core teamis definitely not resting on their laurels. With 1.1 out and over fifteenRuby or Rails books coming out this year, Ruby on Rails does not appear to be losing any momentum.

Related javascript Projects

XSTM

What is XSTM?


XSTM
is a n open sourcelibrary which enables high performance object replication between processes. It is an object oriented Distributed Shared Memory, or a Distributed Object Cache.

XSTMhas similarities with technologies like Adobe Flex Data Services , JBoss Cache, Terracotta, Tangosol Coherence , ScaleOut , or IBM's ObjectGrid .

Our model is based on object shares, which work like file shares. When an object is added to a share, it appears on the other machines which have the same share opened. Modifications done to the fields of the object are from this point replicated between machines.

Read more in the project overview.


XSTMis made of three projects. The Java implementation is called JSTMand is the base from which the other versions are derived. An adapted version made with Luciano, the author of GWM , is available for GWT . It allowsthis library to be used in a browser. NSTM is a .NET port based on IKVM.

All implementations are compatible with each other so object replication can take place e.g. between a Java server and a .NET Smart Client.

Highslide JS
Highslide JS is an open source JavaScript software, offering a Web 2.0 approach to popup windows. It streamlines the use of thumbnail images and HTML popups on web pages. The library offers these features and advantages:
  • No plugins like Flash or Java required.
  • Popup blockers are no problem. The content expands within the active browser window.
  • Single click. After opening the image or HTML popup, the user can scroll further down or leave the page without closing it.
  • Compatibility and safe fallback. If the user has disabled JavaScript or is using an old browser, the browser redirects directly to the image itself or to a fallback HTML page.
JsonSQL

sql like json query lib.

YUI
The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. The YUI Library also includes several core CSS resources. All components in the YUI Library have been released as open source under a BSD license and are free for all uses.
GWT(Google Web Toolkit)

Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications like Google Mapsand Gmaileasy for developers who don't speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript's lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.

GWT lets you avoid many of these headaches while offering your users the same dynamic, standards-compliant experience. You write your front end in the Javaprogramming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.