The Ruby on Rails Web Framework

Ruby on Rails is a framework for developing database-backed web applications using the Model-View-Control (MVC) pattern. Rails gives you a Ruby development environment, starting from the Ajax in the view, to the request and response in the controller, and to the domain model wrapping the database. Almost everyone from business startups to non-profits to enterprise organizations are using Rails. It is all about infrastructure, so it fits practically into any type of web application, be it software for collaboration, community, e-commerce, content management, statistics,or management. It works with a wide range of web servers and databases, just about any operating system.

Benefit of a Real Closure – What to Do with a Block Made into an Object

A closure can be reconverted into a block, so a closure can be used anywhere a block can be used. Closures are used to store the status of a block into an instance variable, once you convert a block into a closure, it is becomes an object that can by referenced by a variable. Just as they are used in other languages, closures can be passed around the object to customize behavior of methods. To pass some code to customize a method, just pass a block. But if you want to pass the same code to more than two methods — convert the block into a closure, and pass that closure object to multiple methods.

Learning Ruby

As with any other computer language, writing codes, mostly using IRB, is the best way to learn Ruby. If you have written a number of lines, place it in a file and run it. After you’ve figured out how it works, learn about the unit testing framework, try to discover the machinery that makes it work. Another way is to get involve in discussions and if you come across unanswered questions, do research, deliberate and come up with an answer. It would also be helpful if you let the program reveal itself to you, accept it as a simple program and could give you a straightforward solution to a problem.

Rails Ecosystem

The Rails program includes a host of tools and extension methods:

Generators – special Rails method that make routine the making of models, controllers, etc.
Scaffolds – type of generator that automatically creates a simple set of incorporated functionality. They are used to maintain the CRUD views and controller actions for a specific model.
Gems – pack of Ruby codes
Rails plugins – similar to Gems but are directly established to a specific Rails application.
JavaScript frameworks are openly backed by Rails – the prototype and the scriptaculous.
RDoc and RI – devices for establishing and viewing program documentation.
Rails Console – makes available a command line setting for working directly with your application.

Ruby – Hidden Open Source WEB CMS Player

railfrogOpen source content management systems are all over the internet with a majority of these pages in PHP with Perl and Java on some and a tiny bit in Rails. There is a continuing debate over the power of Rails and PHP, with php being the one adapted early by most of the web developers, rails was indeed left on the sidelines, picking up areas that PHP deemed too have a small market and thus less profitable. Mephisto for example is described as one of the less known blog engines that integrates some CMS concepts has a surprisingly powerful templating system with an aggressive caching scheme that other platforms lack or suck at. Continue Reading »

Ruby – Too Much Diversity

ulitzerThe many companies who use Rails as their platform are muddling up the overall image of the platform which may be the main reason why it fails to go into mainstream web development. There are tons of variants and combination of the less than popular yet powerful tool which seems to be on a less than unified voice, compared to that of PHP which has a solid grip on the world and the web as a whole. Most of the pages we see on the internet are based on PHP with some dedicated yet promising ones on Rails, like the new and improved Ulitzer, which is set to become the premiere viral web advertising site of the whole web. That remains to be seen yet rails is simply too powerful enough and diverse which keeps it relevant in today’s unsecured web. Continue Reading »

Rails 2.3 Finally!!

railscreenshotThe much awaited upgrade to the much loved yet seemingly less loved Roby gets a full update with the full release of Rails 2.3 loaded with many updates and improvements to the rising underdog of the open-sourced world. Top features includes more built-in templates, making implementation of stripped down rails applications onto a skeleton framework easier, loaded with your default gem stacks, configuration settings and much much more. Nested forms have also become easier with improved built in handling allowing complex forms to be included easy as pie. Reusable application pieces in the engine completes the whole picture which allows developers and programmers to use, reuse and recycle working modules, easily including them into their current projects. Continue Reading »

Tips for Ruby and Rails programming

1. Be up to date
Try to be a part of the online communities that discuss Ruby and Rails programming so you can be updated on the latest developments in resources, updates, fixes, reviews that you can find online. This robust and constantly moving community is one of the best features of open source technology like Ruby and Rails, so use it and learn new things from it.

2. Utilize plug-ins.
Scratching you head and looking for the right code? Fear not. sites like the Rails Plug-in Directory and Core Rails feature plug-ins that do all the work for you. Many other like-minded sites exist online, it up to you to find them. Such power at your fingertips is one of the many benefits of using open source technology like Ruby and Rails.

New Bamboo’s – Panda streaming video heaven

pandaThe newly developed Panda from New Bamboo which is based on RoR os hoped to be the solution for video problems developers would rather not tackle die to huge demands on server resources and amount of bandwidth consumed. The software allows ease of integration, uploading and conversion to the many web formats we all love to use. The several formats of video that are required by the billions if internet users who need to use, upload and send streaming video is more streamlined than previous systems allowing seamless integration and being based on RoR, it is another plus for the platform which has maintained it small piece of the platform market. Continue Reading »

メイク(Make)のようなレイク(Rake)

イラスト提供: blogs.sun.com

レイクは、ユニックスのメイクと同様のユーティリティです。レイクは、ルビーのメイク、またはルビー・メイクのことです。幸運にもレイルには、あなたをヘルプする多くのタスクがあります。ルビー・レイクにサポートされている重要なコマンドの中には、

以下のリストのものがあります。

  • rake db:fixture:load- 現在の環境のデータベースにフィクスチャーをロードする
  • rake db:migrate -db/rateでのスクリプトを通じてデータベースを移動する
  • rake db:schema:dump – DBに対して使用できるdb/schema.rb ファイルを作成する
  • rake db:schema:load – schema.rb ファイルをデータベースにロードする
  • rake db:sessions:clear – セッション・テーブルを消去する
  • rake db:sessions:create – セッション・テーブルを
    "CGI::Session::ActiveRecordStore"の使用に作成する
  • rake db:structure:dump – SQL ファイルへのデータベースのストラクチャーを捨てる
  • rake db:test:clone – 現現在の環境のデータベースからテスト・データベースを再生する
  • rake db:test:clone_structure – デベロップメント・ストラクチャーからデータベースを再生する
  • rake db:test:prepare – テスト・データベースを準備し、スキーマをロードする
  • rake db:test:purge – テスト・データベースを空にする
  • rake doc:app -アプリケーションHTML ファイルを作る
  • rake doc:clobber_app – rdoc プロダクツを除去する
  • rake doc:clobber_plugins – プラグインドキュメンテーションを除去する
  • rake doc:clobber_rails – rdoc プロダクツを除去する
  • rake doc:plugins – 全てのインストールされたプラグイン用のドキュメンテーションを作り出す

« Previous PageNext Page »