Monday, March 29, 2010

Sinatra Application Development & Questions

What is Git? Why is it useful?
Git is a free and open source, distributed version control system. It has been designed in such a way that it handles small to large projects in efficient and fast fashion. In a simple ways we can say that Git is a source control management tool. It maintains the files (source code) and their respective version during progressive development. The main focus is to back up flies but in an effective way. Every file in the system contains full history of the changes. Now designers and developers can go through it and can see all the changes that have been made.They even can easily restore the file to a certain version from the history.These backup files are called repository.
Git are very useful as developers can have a copy of the repository with all the history (branching),work around and again push back the edited repository(merging).This is called distributed development and very helpful for non-linear development.It has been designed in such a way that it can handle very large projects with ease.It features cryptographic authentication of history as well.Various number of useful toolkit are available focusing on human usages as well as efficient and new clever operations.
Hence, Git is very useful.

Describe how Sinatra relates to Ruby on Rails.
Sinatra and ROR are both framework based on Ruby Programming Language.

What is Heroku? What is a Heroku “Dyno”? Describe how Heroku makes deployment and scaling of Ruby web applications easy.

Heroku is an instant ruby platform where we can simply deploy and run ruby application using Git.
Heroku "Dyno" are single process which run our ruby on the Heroku server. Heroku Dyno are based on THIN.THIN are ruby we servers which is composed of 3 best Ruby libraries in web history.

  • The Mongrel parser, the root of Mongrel speed and security
  • Event Machine, a network I/O library with extremely high scalability, performance and stability
  • Rack, a minimal interface between webservers and Ruby frameworks
Heroku Platform Architecture consists of the following 3 features:
Multi-Tenant: This means a single instance of application on the server serves various or multiple number of clients. We don’t need our own server as well.
Fully managed: There is a huge number of different servers within Heroku which are fully managed by Heroku themselves giving as a clean and easy interface to deploy our code.
Curation: Each layers of Heroku architecture is maintained and updated hence providing us a better and latest platform.
These features make heroku
makes deployment and scaling of Ruby web applications easy.

Inspect the Hello World application “app.rb” file. Answer these questions:
What is the purpose of the “/param/:name” method?
Basically /param/:name is an url address .
Like http://warm-sunset-72.heroku.com/param/abhishek
here :name = abhishek
so :name is a parameter that we pass through url.

What happens when the user navigates to the /home page?

Wen the user navigates to /home
(http://warm-sunset-72.heroku.com/home)
the browser redirects the page to the index or main page of the application, which is
http://warm-sunset-72.heroku.com/
in the application we have deployed in heroku.

What is the purpose of the :set directive?

set is used to store a piece of information which can be used in our routes.

Reference:

About Git.Retrieved on April 13 from http://git-scm.com/about
Heroku.Retrieved on April 13 from http://heroku.com/how/architecture

Sinatra book. Retrieved on April 13 from http://sinatra-book.gittr.com/
Version Control.Retrieved on April 13 from http://hoth.entp.com/output/git_for_designers.html



No comments:

Post a Comment