Wednesday, April 7, 2010

Elevator Pitch

The Elevator Pitch1

Sinatra Question 8

a. What is Git? Why is it useful?

In order to do Linux kernel or Ruby development, Git is a source code control tool that was originally written by Linus Torvalds when the Linux kernel was looking for a new source code control system. It is a distributed system, which differs from traditional source code control systems such as cvs in that it is not required to be connected to a server in order to make a commit to the repository (Hartman, 2007).


Git is one of the most powerful, flexible, and fast source code control systems, and it has an active development team working behind it. And, Git is distributed version control system that considered on speed, affectivity and real-world usability on large programming. The main useful things are included (Git, n.d.):


  • Distributed development. Like most other modern version control systems, Git gives each developer a local copy of the entire development history, and changes are copied from one such repository to another. These changes are imported as additional development branches, and can be merged in the same way as a locally developed branch. Repositories can be easily accessed via the efficient Git protocol that is wrapped in SSH for authentication and security additionally using HTTP.


  • Strong support for non-linear development. Git supports rapid and convenient branching and merging, and includes powerful tools for visualizing and navigating a non-linear development history.

  • Efficient handling of large projects. Git is very fast and scales well even when working with large projects and long histories. It is commonly an order of magnitude faster than most other version control systems, and several orders of magnitude faster on some operations. It also uses an extremely efficient packed format for long-term revision storage that currently tops any other open source version control system.

  • Cryptographic authentication of history. The Git history is stored in such a way that the name of a particular revision depends upon the complete development history leading up to that commit. Once it is published, it is not possible to change the old versions without it being noticed. Also, tags can be cryptographically signed.

  • Toolkit design. Following the Unix tradition, Git is a collection of many small tools written in C, and a number of scripts that provide convenient wrappers. Git provides tools for both easy human usage and easy scripting to perform new clever operations.

References

Hartman, G.(2007). Linux Kernel in a Nutshell.(2nd ed, PP161-170) Sebastopol, CA: USA


Git.(n.d.).About Git. Retrieved April 9, 2010 from http://git-scm.com/about



b. Describe how Sinatra relates to Ruby on Rails.

Sinatra is a DSL for quickly creating web application in Ruby with minimal effort.


Sinatra is a Domain Specific Language (DSL) for quickly creating web-applications in Ruby.

It keeps a minimal feature set, leaving the developer to use the tools that best suit them and their application (Sinatra, n.d.).

It doesn’t assume much about your application, apart from that:

  • it will be written in Ruby programming language
  • it will have URLs


Sinatra is a free and open source web application framework and domain specific language written in Ruby. In Sinatra, it is an alternative to other Ruby web application frameworks such as Ruby on Rails. So, user can use the power of various Rubygems and other libraries for Ruby available. It does not follow the general Model-View-Control pattern like Ruby on Rails (Wikipedia, 2010). And, it uses certain URL directly to relevant Ruby code and returns its output for response. However, Sinatra focuses on creating web applications in Ruby with minimal quickly. Finally, some engine use Sinatra such as Heroku andGitHub. Heroku is supporting a lot for Sinatra's development.


References

Sinatra.(n.d.). What is Sinatra. Retrieved April 9, 2010 from http://sinatra-book.gittr.com/


Wikipedia.(2010). Sinatra (Software). Retrieved April 10, 2010 from http://en.wikipedia.org/wiki/Sinatra_%28software%29


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


Heroku is a cloud application platform for Ruby which is a way for making and deploying web apps. It deploys ruby app instantly with a Git push. This has benefit of features such as HTTP caching, mecached, rack middleware, and instant scaling built into users’ application (Heroku, n.d.).


A Dyno is equivalent to an individual Mongrel, Thin, or Fast CGI backend in traditional Ruby deployment environments. In detail, Heroku uses Thin at the core of its Dyno architecture, so you can think of dynos as having the same constraints as individual Thin processes.

The features of Dyno are enabled by the Heroku platform that are the following (Heroku, n.d.).

  • Elasticity: The number of dynos allocated for your app can be increased or decreased at any time – without server provisioning of any kind.
  • Intelligent routing: The routing mesh tracks the availability of each dyno and balances load accordingly. Requests are routed to a dyno only once it becomes available. If a dyno is tied up due to a long-running request, the request is routed to another dyno instead of piling up on the unavailable dyno’s backlog.
  • Process management: Each dyno process is monitored for responsiveness. Misbehaving dynos are taken down and new dynos are launched in their place.
  • Distribution and redundancy: Dynos are distributed across a large cluster of machines called the Dyno grid. An app configured with two dynos is running two processes, as user expect, but each process is running on a separate machine.


In addition, there is the benefit of Heroku that make easy to deploy and scale Ruby web application by the platform architecture. The architecture is below (Heroku, n.d.):

  • Multi-Tenant- Heroku is a multi-tenant platform and hosting environment. Your app doesn't need its own servers, slices, or clusters, and you'll benefit from continuous platform improvements.
  • Fully Managed- Each element in this diagram represents a large pool of servers invisibly managed by Heroku. Because we control all the infrastructure and software layers, we can present a clean interface for deploying your code.

  • Curation- We actively curate each layer, ensuring you have the latest in software and best practices, and that it's all stable and integrated smoothly.

  • Everything You Need- Together, these elements provide everything you need to run a modern, high-performance, scalable web app. Click around to understand the path of a request through the system.



References


Heroku.(n.d.). Intruduction to Heoku. Retrieved April 9, 2010 from http://docs.heroku.com/heroku


Heroku.(n.d.). What is a Dyno?. Retrieved April 11, 2010 from http://docs.heroku.com/dynos


Heroku.(n.d.). How it works: Platform architecture. Retrieved April 11, 2010 from http://heroku.com/how/architecture


d. Inspect the Hello World application “app.rb” file. Answer these questions:

    1. What is the purpose of the “/param/:name” method?
The PARAM element is used to pass values to an embedded object that generally an embedded program. In both situations PARAM serves the same purpose and has almost the same implementation. Because, the official OBJECT with PARAM usage was meant to absorb the APPLET with PARAM functionality(Joomla, n.d.).

Reference
Joomla.(n.d.).What is ther purpost of the template details.xml file. Retrieved April 15, 2010 from http://docs.joomla.org/What_is_the_purpose_of_the_templateDetails.xml_file%3F


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

While hyperlink allows a user to initiate navigation to a particular, the work of locating and downloading the page is acted by the navigation service class. Essentially, navigation service navigation service provides the ability to process a navigation request on behalf of client code, such as the hyperlink Additionally, navigation service implements higher-level support for tracking and influencing a navigation request (MSDN, n.d.).

When a hyerlink is clicked, WPF calls navigation service. Naviation locate and download the page at the specified pack URI. The downloaded page is converted to a tree of objects whose root object is an instance of the downloaded page. A reference to the root page object is stored in the navigation service. Content property. The pack URI for the content that was navigated to is stored in the navigaton service, while the navigation service. current sources store the pack URI for the last page that was navigated to.

While user navigates to the home/page the above process will be occurred. Following is the example of the process:

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

WindowTitle="Page With Hyperlink"

WindowWidth="250"

WindowHeight="250">

...

Navigate to Another Page

...

Reference
MSDN.(n.d.). Navigation overview. Retrieved April 15, 2010 from http://msdn.microsoft.com/en-us/library/ms750478.aspx#Configuring_a_Start_Page

    1. What is the purpose of the :set directive?

The .set directive instructs the assembler to enable or disable certain options. The assembler has the following default options: reorder, macro, move, novoltile, and at. Only one option can be specified for each .set directive (MSDN, n.d.):

  • The reorder option permits the assembler to reorder machine language instructions to improve performance.
  • The noreorder option prevents the assembler from reordering machine language instructions. If a machine language instruction violates the hardware pipeline constraints, the assembler issues a warning message.
  • The macro option permits the assembler to generate multiple machine instructions from a single assembler instruction. This is the default action.
  • The nomacro option causes the assembler to print a warning whenever an assembler operation generates more than one machine language instruction. User have to select th noreorder option before using the nomacro option; otherwise, an error results.

Reference

MSDN.(n.d.). Assembler option directive .net. Retrieved April 15, 2010 from http://msdn.microsoft.com/en-us/library/aa275917(VS.60).aspx