What this Blog is About
Wednesday, May 27, 2009
Workshop 1: Setting up Ruby on Rails
Monday, May 25, 2009
Workshop 1: Loading MySQL
I have been attempting to get MySQL installed on my VM for the past few days, have had no luck and am not going to devote anymore time to it.
I goy the Aptana IDE installed, and it seems nice enough, and relatively easy to use. I followed the demo video on Saturday and had to replay the steps a few times to see what options they selected. I got the example to work. Was unable to get anything working if I chose MySQL as the default database. I get errors stating that the machine is denying the request. I don't have a screenshot of the error message unfortunately.
Having had no luck I decided that I would attempt to install MySQL on the VM. As I said above, this has proven to be unsuccessful. As this course is not about Installing and configuring MySQL I don't believe it is worth the time to track down the cause of the issue.
Thursday, May 21, 2009
Workshop 1: Learning Ruby
Workshop 1: Challenge problems
•ability to make operating system calls directly •powerful string operations and regular expressions •immediate feedback during developmentquick and easy:
•variable declarations are unnecessary •variables are not typed •syntax is simple and consistent •memory management is automaticobject oriented programming:
•everything is an object •classes, methods, inheritance, etc. •singleton methods •"mixin" functionality by module •iterators and closuresalso:
•multiple precision integers •convenient exception processing •dynamic loading •threading support3. What is Rails and how does it work with Ruby? Ruby on Rails is a powerful, open-source toolkit that enables you to build sophisticated web applications quickly. Built in Ruby (a dynamic, object-oriented language), Ruby on Rails is a framework that provides a broad set of capabilities upon which you can build your web application: It handles all the communication with the database, so you can deal with software objects and let the framework generate SQL. It provides a template system for handling layouts and page sections, plus extensive facilities for form processing and Ajax updates. There’s a wide range of plug-ins to quickly implement many features. Ruby on Rails was designed to make the best use of your time, eliminate drudgery, and let you create great solutions with an agile, iterative approach. There’s a tremendous demand for Ruby on Rails developers, so learning to build sites with Rails is a valuable step in your web development career, whether you’re building your skills as a freelancer or planning your next job move. 4. What is meant by “convention over configuration” in regards to the use of Rails in Web application development? Convention over configuration is a very important principle behind Rails. It goes hand-in-hand with another attribute of Rails, that it is “opinionated software”. The Rails design embodies lots of opinions about how you should structure your code, name your classes and files, and organize your database tables. There are methods to override most of these conventions, but if you go with the flow and follow the conventions, then you can avoid almost all configuration code. That’s convention over configuration — and the payoff is huge 5. When did Model-View-Controller begin and where is it used? History as defined by wikipedia MVC was first described in 1979[1] 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.[2] There have been several derivatives of MVC; one of the most known (due to its use by Microsoft) is the Model View Presenter pattern which appeared in the early 1990s and was designed to be an evolution of MVC. However Model–View–Controller still remains very widely used. In November 2002 the W3C voted to make MVC structures part of their XForms architecture for all future web applications [3]. These specifications will now be integrated directly into the XHTML 2.0 specifications. There are now over 20 vendors that support XForms frameworks with MVC integrated into the application stack. 6. Describe the steps involved with the MVC design approach. I will get back to this later
Workshop 1: InstantRails podcasts
Tuesday, May 19, 2009
Workshop 1: Learning Ruby
I downloaded the Audio (Lessons 1-8) from LearningRails and also the Screencasts (Lessons 9-23). Having never used a podcast in any form before, and not one to burn music, copying these to a format I could listen to in the car on the commute to and from work turned into a challenge that wasn't.
An aside:
The iTunes player didn't work very well in burning to disk. This may have been for a number of reasons. There may be a bug in Win7 RC that caused my DVD burner to lose itself intermittently. The burner itself may have had a problem. The iTunes interface may have been my problem.
In the end I stopped using my main machine and used my laptop. This is a dell XPS1330 and also has Win7 RC installed. This showed the benefits of the homegroups concept introduced in Win7, and the ease with which network setup and connections is now handled.
Now back to the point of the blog. I finally got the podcasts (audio lessons 1-8) copied onto 3 CDs. Listened to the first 6 episodes today and found that they give a very good, yet brief overview of the Ruby language. Hopefully 7 and 8 tomorrow will give me some idea about actually getting started with Ruby development.
Sunday, May 17, 2009
Workshop 1: InstantRails success – Ruby now working
Got to have some fun with testing Win7 and creating a virtual machine. Worked fine after I had fiddled a bit with some of the settings.
Got my completely vanilla Win7 virtual machine set up about 4pm. Have run the InstantRails app and it has all worked.
Have played with the Cookbook app, sort of but am not sure what I am connected to. Have never played with a Hosts file before so am presuming that when changed to point mycookbook to 127.0.0.1 it worked, but when you run the site how do you tell?
Workshop 1: Ruby fun
Workshop 1: Setting up the model railway
Topic objectives
- Install Ruby on Rails on your computer (InstantRails or Locomotive);
- Learn about the Model View Controller (MVC) approach to Web application design;
- Revise database techniques with MySQL
- Learn how to use the Ruby on Rails development environment
- Set up a focus group (like a study group for peer learning) to work on the Ruby on Rails workshops via Interact tools
To do:
1. Download iTunes from http://www.apple.com/itunes/download/ and subscribe to the “Learning Rails” Podcasts from http://www.buildingwebapps.com/podcasts
2. Install Ruby on Rails on your computer by using the material and downloads from http://www.rubyonrails.org/
3. Rather than get Ruby on Rails running manually, you use the pre-packaged solutions. These include everything in one bundle: Web server, database, Ruby, Rails, the works.
a. For OS X, there's Locomotive.
b. For Windows, there's Instant Rails.
Recommended time: 1-4 hours.
Challenge Problems:
- 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.
- Ruby is “an interpreted scripting language” for quick and easy object-oriented programming”. Find out about the Ruby language and discover what this means.
- What is Rails and how does it work with Ruby?
- What is meant by “convention over configuration” in regards to the use of Rails in Web application development?
- When did Model-View-Controller begin and where is it used?
- Describe the steps involved with the MVC design approach.