Q1. Make a list of all programming languages and web development tools used by you in prior experiences...
Q1. Make a list of all programming languages and Web development tools used by you in prior experiences. Describe what you know about Web application frameworks before we begin.Web applicaiton framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities used in web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code resue. (Source: Wikipedia, 2009)
I have mainly used these languages in the past
1. C and Sun SparcOS Digital Ultrix or Kodak's BSD version of Unix back in 1990s
2. Cobol
For Web development, i have used the following
3. Basic HTML tools
4. Simple PERL/PHP scripts interfacing MySQL
5. Microsoft Frontpage as an authoring tool (I tried dreamwever and didn't like it too much)
6. other image cropping software and FTP tools
7. Off the shelf CMS, Shoppingcart (eg. Drupal, Joomla, OScommerce)
Q2. Ruby is "an interpreted scripting language" for quick and easy object-oriented programming. Find out about the Ruby language and discover what this means.
Ruby is an interpreted scripting language unlike lower level languages like FORTRAN, C, PASCAL which need to be compiled into executable sources. Ruby is slower but offers high efficiency including lower level control of the operating systems. Ruby does not need to be compiled to offer the same level of access as the predecessor when comes to programming langugages.
Ruby is percieved by many to be more elegant, yet it does pretty much the same job as PERL, TCL and Python. Thomas & Hunt (2000) strongly supports that Ruby does offer very elegant and lightweight syntax and offers some rationale to maintain easy to read clean code.
Ruby is object oriented based programming language and was originaly inspired by PERL and Smalltalk; and originally created by a Japanese called Yukihiro "Matz" Matsumoto in 1990's.
Q3. What is Rails and how does it work with Ruby?
Rails Rails is a web development framework written in the Ruby language which is designed to make programming web applications easier by making several assumptions about what every developer needs to get started. Rails allows a web developer or programmer to write less code while accomplishing more than many other languages and frameworks.Ruby on Rails was extracted by David Heinemeier Hansson from his work on Basecamp, a project management tool by 37signals (now a web application company). Heinemeier Hansson first released Rails as open source in July 2004, but did not share commit rights to the project until February 2005. The latest verison is Rails version 2.3 which was released on March 15, 2009.
With the increasing popularity of the Rails web development framework, the Ruby programming language is making its way towards the top. By focusing on convention over configuration, RoR is lowering the barriers of entry to programming and positively impacting employee productivity-ultimately proving that all of the hype is true and well-deserved.
Rails work with Ruby by means of elegantly organized around the Model, View,
Controller architecture, usually just called MVC and also providing rapid feedback loop which allows developer to save time between making a change in code and seeing the results in the execution of your application on the screen
Q4. What is meant by "convention over configuration" in regards to the use of Rails in Web application development?
CoC is the short form for Convention over Configuration means that that Rails makes assumptions about what you want to do and how you’re going to do it, rather than letting you tweak every little thing through endless configuration files. means a developer only needs to specify unconventional aspects of the application. For example, if there's a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table "products_sold", that one needs to write code regarding these names.
Q5. When did Model-View-Controller begin and where is it used?
MVC begins in 1979 by Trygve Reenskaug, then working on Smalltalk at Xerox PARC. The original implementation is described in depth in the influential paper Applications
Programming in Smalltalk-80: How to use Model–View–Controller.
MVC is often seen in web applications, where the view is the actual HTML or
XHTML page, and the controller is the code that gathers dynamic data and
generates the content within the HTML or XHTML.
Q6. Describe the steps involved with the MVC design approach
MVC is often seen in web applications, where the view is the actual HTML or XHTML page, and the controller is the code that gathers dynamic data and generates the content within the HTML or XHTML. The model is represented by the actual content, which is often stored in a database or in XML nodes, and the business rules that transform that content based on user actions.The MVC design approach entails 3 major components - Models, Views and Controllers
Models (Active Record)
– A model represents the information (data) of the application and the rules to manipulate that
data.
– In the case of Rails, models are primarily used for managing the rules of interaction with a
corresponding database table.
– In most cases, one table in your database will correspond to one model in your application.
The bulk of your application’s business logic will be concentrated in the models.
Views (Active View)
– Views represent the user interface of your application.
– In Rails, views are often HTML files with embedded Ruby code that performs tasks
related solely to the presentation of the data. Views handle the job of providing data to the
web browser or other tool that is used to make requests from your application.
Controller (Active Controller)
– Controllers provide the “glue” between models and views.
– In Rails, controllers are responsible for processing the incoming requests from the web
browser, interrogating the models for data, and passing that data on to the views for presentation.
Reference
1. Thomas,. D & Hunt, A (2000) Programming Ruby: A Pragmatic Programmer's Guide, Addison Wesley.
No comments:
Post a Comment