Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Netzke: Rich Internet Apps with Ext JS and Rails

Ext JS is a cross-browser JavaScript library for building rich internet applications. It provides an extended set of powerful, feature-rich widgets that can be used as building blocks for AJAX-driven GUI of almost unlimited complexity. Netzke is a framework that provides a unified way to build clean, reusable and maintainable back-end code for an Ext JS app in Rails.




   A nice example of a Ext JS widget that depends heavily on communication is a grid panel. It provides a convenient GUI for multi-line CRUD operations, as well as for the searching, filtering, and pagination of the information. Configuring an Ext JS grid panel in JavaScript will take some time even if you’re an experienced Ext JS developer - it is tedious work! How about using lots of grid panels (normally bound to different database tables) all throughout your application? You soon recognize, that not only your JavaScript code for those grid has to become reusable in some way, but also the server-side code (that responds to all the grid panel’s AJAX calls), will grow quickly in a not-so-DRY manner.


 This is where Netzke shines. It abstracts both client- and server-side code in to parts. By definition, parts are reusable, isolated and configurable pieces of code with a well-defined functionality. A Netzke part (a “widget”) is a Ruby class that “knows” how to build and instantiate its JavaScript part (used in a browser), as well as how to reply to AJAX calls coming back to the server part. All communication – while being done over the Web – happens “within” the part. Would you like to put several grid panels on the same web-page? Or possibly you need to dynamically load another grid in a modal window? While sharing the code (both JavaScript and Ruby), each of the grids will talk to its own instance, managing a separate ActiveRecord model if needed. See it in action here.


 Netzke GridPanel widget is one example of what can be done with the Netzke framework. Its philosophy is the following: generate a widget one time (you’ll need Ext JS knowledge for that, of coursework), and then reuse it all over again (or share it with the others), without the necessity to write JavaScript anymore. Besides, Netzke parts are basically extendible, use OOP: inheriting from Netzke::GridPanel provides for automatic prototype-based “inheritance” on the JavaScript level, ! Combining several widgets in to a compound widget is also no issue.


 The netzke-basepack project contains a set of pre-built Netzke widgets that can be used as basis for your RIA. And in case you like to know more about different aspects of Netzke, browse through a variety of tutorials on the WriteLessCode blog

View the original article
Related articles
  • Netzke: Rich Internet Apps with Ext JS and Rails (railsinside.com)
  • Ext Designer, HTML5 Prototyping Tool for Web Apps, Hits 75,000 Installations (prweb.com)
  • 5 Extensive JavaScript Code Library Options For Developers (makeuseof.com)
  • The Best Web Development Frameworks (webdesignish.com)


This post first appeared on Programming And Computer Science Junkies, please read the originial post: here

Share the post

Netzke: Rich Internet Apps with Ext JS and Rails

×

Subscribe to Programming And Computer Science Junkies

Get updates delivered right to your inbox!

Thank you for your subscription

×