Getting started with DB2 database and Ruby on Rails

Source: Internet
Author: User
Tags db2 express

It brings great opportunities for the development of Web solutions. This is the first article in the DB2 with Ruby on Rails series. The following articles mainly show you how to get started with the DB2 database and Ruby on Rails. In actual operations, the emergence of the Ruby language is combined with the powerful Rails framework, it brings great opportunities for the development of Web solutions.

This is the first article in the DB2 with Ruby on Rails series.

This article introduces Starter Toolkit for DB2 on Rails, describes various methods for installing the IBM_DB driver, and uses the Rails migration of DB2 ......

Configure the IBM_DB adapter and driver for Rails Application Development

The emergence of the Ruby language combined with the powerful Rails framework brings great opportunities for the development of Web solutions. With the introduction of IBM_DB adapters and drivers, Rails Applications can now seamlessly interact with IBM data servers. This is the first article in the DB2 with Ruby on Rails series. This article introduces Starter Toolkit for DB2 on Rails, describes various methods for installing the IBM_DB driver, and uses the Rails migration of DB2.

Introduction

Ruby on Rails was released in 2004 and has now quickly become one of the most popular frameworks in Web application development. This open-source project, also known as Rails or RoR, adopts the Model-View-Controller (MVC) architecture and Ruby object-oriented scripting language, and follows some simple principles, for example, "convention over configuration" and "do not repeat yourself (don't repeat yourself )".

Therefore, developers can build applications faster and more easily, reduce redundant code and configuration files, and flexibly create custom extensions to meet application requirements. With support for DB2 database persistence, you can use the database server and the built-in WEBrick Web server to quickly develop Web applications using this framework.

What does IBM_DB bring to the Rails field?

As the RubyForge community portal began to provide IBM_DB Rails adapters and Ruby drivers, the Ruby on Rails framework was officially tested and supported on all DB2 data servers. This may be a surprise for some of you. The community also has a free version of the DB2 9 database named DB2 Express-C that can be used. The development, deployment, and distribution of DB2 Express-C data servers are free of charge. There are no size, time, or user restrictions, and Starter Toolkit for DB2 on Rails is also included. This package helps developers quickly and easily set up and build Web applications in the RoR environment of DB2.

Although there are many types of data storage that can be configured in the Rails framework, the DB2 data server can bring some unique and outstanding advantages. Because pureXML is introduced in DB2 9™The primary advantage of using an IBM data server is that the IBM_DB adapter and driver support local XML data types.

Getting started with DB2 on Rails

There are currently two ways to set up the Rails development environment for using the DB2 database. If you are not familiar with the DB2 environment, you can use Starter Toolkit for DB2, which is the most convenient way to start the development of the DB2 on Rails application. Starter Toolkit version 2.1 can be downloaded from alphaWorks. There is also an earlier version of the install program for the IBM_DB adapter. This version does not support DB2 on i5 and zOS, but the update is in progress and a new version will soon be available for download.

After the release of the IBM_DB adapter and driver gem and plug-in, if you want to develop a Rails application in an existing DB2 environment, you can use the "manual" option, this option is also easy to use. See RubyForge rubyibm project to obtain the latest version (since January 1, April 30, Production/Stable release 0.6.0 is available ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.