Close
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Applications
    • Applications
    • Development
    • IT Management
    • Servers

    Google Gears Takes Ruby on Rails Offline

    Written by

    Darryl K. Taft
    Published July 15, 2008
    Share
    Facebook
    Twitter
    Linkedin

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      Developers are putting Google Gears to some interesting uses, including offline support for Ruby on Rails and building client-side search engines.

      Gears for Rails represents another boost to cloud computing in its ability to deliver offline capability and synchronization. Meanwhile, Microsoft is leading its own data synchronization charge with its Live Mesh cloud-based data synchronization system, a test build of which is now open to the public.

      However, Google has pushed its way into the cloud-based development world. And the third-party Gears for Rails solution also represents another call for Google to open up its Google App Engine platform to other languages, such as Ruby. Currently, the Google App Engine development platform supports Python only.

      Michael Marcus and Rui Ma, two recent graduates from the information systems masters program at New York University, have designed a development framework called Gears on Rails. Google Gears is an open-source browser extension that lets developers create Web applications that can run offline. Gears on Rails is an open-source project that plugs Google Gears into Ruby on Rails, enabling developers to take a Ruby on Rails code base offline.

      In a blog post about the project, Dion Almaer, a Google engineer, said, “Gears on Rails helps developers to write fully offline functional Web applications based on Gears without learning a bit of Gears … The sweet spot is building a Rails application that can handle local interactions without having to drop down to Gears JavaScript APIs themselves.”

      Almaer also did an interview with Marcus and Ma in which Ma described Gears on Rails as a proof-of-concept project whose goal is “to let developers build the offline version of their Web site without having to know anything about Gears or even to learn new techniques.”

      To enable this, the duo did two key things, said Marcus in the podcast of the Gears on Rails team’s interview. “We tried to do as much native Rails code as possible to frame the JavaScript portion of Gears,” he said. “And on the JavaScript side we’ve created an API that looks syntactically a lot like Ruby, so that the JavaScript that developers do need to write is very comfortable for them and something they can learn very easily.”

      Developers using Gears on Rails need not worry about the data synchronization between the server and the clients or about database schema updates, Ma said. “Because our framework takes care of underlying technologies like database synchronization and the generation of Google Gears manifest file … developers only need to write Ruby-like JavaScript and they follow the same development experience as if they were using Ruby on Rails,” Ma said.

      The team built a mechanism that detects the current status of the environment-whether online or offline-“so our framework can switch from the online to the offline version,” Ma said.

      Gears on Rails takes advantage of the REST (Representation State Transfer) capabilities of Rails “without building any additional pieces on the server side to actually do the synchronization,” Marcus said.

      “What we’re asking developers to do is write local versions of their controllers and views…” he said. “So you’re basically doing the exact same thing in JavaScript on the local side that you’re doing in Ruby on the server side.”

      Marcus also said Gears on Rails makes use of a framework called Jester that “allows you to do RESTful calls through JavaScript. That’s what we built on, the notion that you can create, edit and destroy records on a database through JavaScript.”

      The Next Step: Plug-in

      The team’s next step is to get the technology “into a fully formed plug-in that can be used with any Rails app,” Marcus said.

      “And to make it more open-source-friendly,” Ma said.

      “That sounds like a great idea,” David Heinemeier Hansson, the creator of Ruby on Rails, wrote in response to questions about the Gears on Rails project. “I don’t personally have that great of an interest in offline Web applications, but this stuff would be super for those who do. While it’s probably a small fraction of developers out there who’ll bother to make offline-capable applications, it doesn’t mean that it’s not important for those who do need it. However small a percentage that may be.”

      Brad Neuberg, an engineer on the Google Gears team, has developed PubTools Search, which is “an open-source JavaScript library that drops a client-side search engine right into your page,” Neuberg said in an article he wrote about the project.

      Neuberg used Google Gears and the Dojo Toolkit to create the client-side search engine. However, “PubTools Search is not an official Google project or Gears API; it is a project I created on my own to teach and help developers,” he said.

      In the introduction to his article on PubTools Search, Neuberg said, “Did you know that you can use Gears to do fast, client-side searching of data, similar to a client-side search engine? Gears bundles Full-Text Search (FTS) abilities right into its local, SQLite database. MySpace, for example, uses this feature with their MySpace Mail application, downloading all of a user’s messages for fast, client-side search. Because all of the data is local, you can do nifty things like search over the data in real time as the user types, something that is much harder if you have to query over the network to a server to do the searching.”

      Darryl K. Taft
      Darryl K. Taft
      Darryl K. Taft covers the development tools and developer-related issues beat from his office in Baltimore. He has more than 10 years of experience in the business and is always looking for the next scoop. Taft is a member of the Association for Computing Machinery (ACM) and was named 'one of the most active middleware reporters in the world' by The Middleware Co. He also has his own card in the 'Who's Who in Enterprise Java' deck.

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2024 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×