<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ITC594's Blog</title>
	<atom:link href="http://itc594.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://itc594.wordpress.com</link>
	<description>Blog for ITC594 workshops and activities</description>
	<lastBuildDate>Fri, 05 Jun 2009 13:20:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='itc594.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ITC594's Blog</title>
		<link>http://itc594.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://itc594.wordpress.com/osd.xml" title="ITC594&#039;s Blog" />
	<atom:link rel='hub' href='http://itc594.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Elevator Pitch 2</title>
		<link>http://itc594.wordpress.com/2009/06/05/elevator-pitch-2/</link>
		<comments>http://itc594.wordpress.com/2009/06/05/elevator-pitch-2/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 13:17:41 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Evaluation Report]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=267</guid>
		<description><![CDATA[This is my elevator pitch for assignment 02<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=267&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is my elevator pitch for assignment 02</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='450' height='284' src='http://www.youtube.com/embed/8hPJxe0f-4w?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=267&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/06/05/elevator-pitch-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 8: Ruby on Rails Workshops Report and Evaluation</title>
		<link>http://itc594.wordpress.com/2009/05/24/workshop-8-ruby-on-rails-workshops-report-and-evaluation/</link>
		<comments>http://itc594.wordpress.com/2009/05/24/workshop-8-ruby-on-rails-workshops-report-and-evaluation/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:54:11 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 8]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=253</guid>
		<description><![CDATA[Evaluation and Report 1. The 3 strengths of the Ruby on Rails workshop series They help me to understand the concept of Ruby on Rails, how to use Ruby, the programming language, to develop a Web application. The steps of each exercise are clear and easy to follow, so I can base on them to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=253&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="western"><span style="font-family:Arial,sans-serif;"><span style="font-size:medium;"><strong>Evaluation and Report</strong></span></span></p>
<p><strong>1. The 3 strengths of the Ruby on Rails workshop series</strong></p>
<ol>
<li>
<p class="western">They help me to understand the concept of Ruby on Rails, how to use Ruby, the programming language, to develop a Web application.</p>
</li>
<li>
<p class="western">The steps of each exercise are clear and easy to follow, so I can base on them to develop my skills and knowledge</p>
</li>
<li>
<p class="western">The issues raised by those workshops are practical, it satisfies the needs for students who wish to have a good position in real industry.</p>
</li>
</ol>
<p><strong>2. The 3 weaknesses of the Ruby on Rails workshop series</strong></p>
<ol>
<li>
<p class="western">Too much time and effort required for such a long subject whilst I have to read, understand, practice in a limited time to finish the subject requirements.</p>
</li>
<li>
<p class="western">Because Ruby on Rails is new to all students, when I have problems with installing or programming, my questions were not answered properly.</p>
</li>
<li>
<p class="western">The questions are not clear, I had a hard time to read, confused, ask my friends about many questions which I could not understand what I should do to answer them.</p>
</li>
</ol>
<p><strong>3. Aspects that I found most difficult</strong></p>
<p>Read all documents about Ruby on Rails to answer the exercises of the subject.  In order to understand the concepts of Ruby, Rails, MVC, and so forth, I had to read long articles that took a lot of my time. Once understand them, I had to learn Ruby which is a new programming language with a lot of new terminologies and techniques.</p>
<p>Working with Instant Rails to develop a Web application is also a tough work as I have to learn how to type commands in black screen to create a project, controller, model, and connect to MySQL to work with database.</p>
<p><strong>4. Improvements that could be made to the workshop series</strong></p>
<p>The workshops should be done properly, the questions in each workshop should be clearer so that students can understand what they are asked to do. In addition, there should be a small tutorial with images that guide students step to step how to install software, how to configure them, and how to write programs in the most easiest way.</p>
<p class="western"><strong><span style="font-size:medium;"><span style="font-family:Arial,sans-serif;">Free response and reflective questions</span></span></strong></p>
<p><strong>5. Other frameworks</strong></p>
<p>I think .Net and J2EE can do as well if I try deploying OTBS application on them since them are the two most popular framworks in industry. As I have mentioned already earlier in the post, I think that Rails represents current thinking both technically and philisophically, which gives it extra value and longevity.  Perhaps a little more contrast could be given against Java or .NET given that these platforms represent the majority of the work done in industry.</p>
<p><strong>6. Comments on other tools</strong></p>
<p>I chose the developer team so I had to do a lot of work in writing Ruby codes and  develop the OTBS application. When I had problems with the codes, I tried to use google to search for the similar problems that others have met when they were learning like me, and posted them to forums. I also use the class forum provided by the google group to ask classmates and discuss about my problems as well as read and listen to their own problems. The replies were soon enough to solve my problems and help me to fix them ontime.</p>
<p><strong>7. Further comments</strong></p>
<p>I have no further comments</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=253&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/05/24/workshop-8-ruby-on-rails-workshops-report-and-evaluation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 7  End of the Line: production site migration and maintenance</title>
		<link>http://itc594.wordpress.com/2009/05/24/workshop-7-end-of-the-line-production-site-migration-and-maintenance/</link>
		<comments>http://itc594.wordpress.com/2009/05/24/workshop-7-end-of-the-line-production-site-migration-and-maintenance/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:51:57 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 7]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=251</guid>
		<description><![CDATA[Developers conclude their work with the OTBS and look at the options for deployment of the site. Examine the various platforms/software tools used for deployment such as UNIX environment suggested in the Discussion Notes, Mongrel or Mongrel cluster, Nginx, Subversion or Capistrano (during development stage), JRuby in the Java environment. Which way? The choice is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=251&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3 class="western"><strong>Developers conclude their work with the OTBS and look at the options for deployment of the site. Examine the various platforms/software tools used for deployment such as UNIX environment suggested in the Discussion Notes, Mongrel or Mongrel cluster, Nginx, Subversion or Capistrano (during development stage), JRuby in the Java environment. </strong></h3>
<h3 class="western"><strong><em>Which way?</em></strong></h3>
<h3 class="western"><strong>The choice is up to you as this workshop present just one option and you may like to use another, such as deploying the OTBS in a .NET or J2EE environment</strong></h3>
<p class="western">Deploying a Web application requires many steps involved such as installing software, platform, web servers, database, and so forth.  There are many software available on Internet allowing us to download and use.</p>
<p class="western">For my OTBS application, I chose Ruby as my programming language, Rails as the framwork, and MySQL as my database. the reasons for such choices are that firstly, I have to practice what I have been taught from the class, and secondly, the convenient and comfortable those software can bring to me during the development phase.</p>
<p class="western">Like other software and frameworks, I also have to learn how to configure them, understand how they work and work with them in a proper way. Actually, as recommended, I used InstandRails, a combinational software, providing a full set of both framework, database, and programming language, even available configured settings so I only have to concentrate on developing my application.</p>
<p class="western">I successfully finished my OTBS application in Rails framework using Ruby. And I think that Ruby on Rails is a very powerful tools for developing such Web 2.0 applications. .NET and J2EE environment are other choices that I have not tried regarding the limited time of the subject, but I did make some research about them and found out that Ruby on Rails are more prevail and dominant among others.</p>
<h2><span style="font-family:TimesNewRomanPSMT,Times New Roman,serif;">Can you get the OTBS Running in production mode as a minimal production server?</span></h2>
<p>In order to have a minimal production server, I should use Mongrel or Apache Web Server as the Rails application server. The database (MySQL) can be set up on the server so that the OTBS application can have access to the neccessary information like products data, user&#8217;s data. When database and servers are properly configured, I can upload my OTBS application to the server and publish it to the public so that every one can access and use the application from any where in the world.</p>
<p><span style="font-size:130%;"><strong>References</strong></span></p>
<ol>
<li>Alameda, E. (2008), Foundation rails 2, <em>Apress and fiends of ED books</em>, viewed by 19 May 2009</li>
<li>Hartl, M. and Prochazka, A. (2008), Railsspace: building a social networking website with ruby on rails, Person Education, Inc., ISBN 10: 0-321-48079-1, viewed by 15 May 2009</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=251&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/05/24/workshop-7-end-of-the-line-production-site-migration-and-maintenance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 6: Enjoying the Ride: Web framework alternatives, scalability and flexibility</title>
		<link>http://itc594.wordpress.com/2009/05/24/workshop-6-enjoying-the-ride-web-framework-alternatives-scalability-and-flexibility/</link>
		<comments>http://itc594.wordpress.com/2009/05/24/workshop-6-enjoying-the-ride-web-framework-alternatives-scalability-and-flexibility/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:49:53 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 6]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=239</guid>
		<description><![CDATA[DEVELOPER’S THREAD (RED team) Following the instructions from the book, I developed a Rails application named Online Taxi Booking Systems (OTBS). I first created a new project by the name otbs. Then I used ruby command to create the Site controller with 3 actions which are index, about and help and a User controller with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=239&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 class="western"><span style="color:#ff0000;">DEVELOPER’S THREAD (RED team)</span></h1>
<p class="western">Following the instructions from the book, I developed a Rails application named Online Taxi Booking Systems (OTBS). I first created a new project by the name otbs. Then I used ruby command to create the Site controller with 3 actions which are index, about and help and a User controller with 2 more actions named Register and Login.</p>
<p class="western"><img class="aligncenter size-full wp-image-240" title="w6_01" src="http://itc594.files.wordpress.com/2009/05/w6_01.jpg?w=450&#038;h=180" alt="w6_01" width="450" height="180" /></p>
<p class="western">When clicking on Register link, a registration form is displayed that allows a user to fill in his/her information in order to become a site member.</p>
<p class="western"><img class="aligncenter size-full wp-image-241" title="w6_02" src="http://itc594.files.wordpress.com/2009/05/w6_02.jpg?w=450&#038;h=207" alt="w6_02" width="450" height="207" /></p>
<p class="western">There are strict form validations applied restricting the entered data before it is inserted into database, for instance:</p>
<ul>
<li>
<p class="western">The 	length of screen name (username) must be within 4 and 20 characters</p>
</li>
<li>
<p class="western">Screen name 	(username) can not have spaces</p>
</li>
<li>
<p class="western">Email address must 	be valid (only one @ sign, no special characters such as ?, #, &amp;…)</p>
</li>
<li>
<p class="western">Email can not be 	blank</p>
</li>
<li>
<p class="western">Password must be 	within 4 and 20 characters</p>
</li>
</ul>
<p class="western">There is also a mechanism that checks the available of both screen name and email. If one of them is already taken, user is informed to use another one. I tried to type wrong information into the fields, and the results are displayed as below:</p>
<p class="western"><img class="aligncenter size-full wp-image-242" title="w6_03" src="http://itc594.files.wordpress.com/2009/05/w6_03.jpg?w=450&#038;h=338" alt="w6_03" width="450" height="338" /></p>
<p class="western">The form is only submitted when entered data obeyed the rules, hence I typed again my information, the correct one</p>
<p class="western"><img class="aligncenter size-full wp-image-243" title="w6_04" src="http://itc594.files.wordpress.com/2009/05/w6_04.jpg?w=450&#038;h=231" alt="w6_04" width="450" height="231" /></p>
<p class="western">After clicking Register button, my information is inserted into database, session containing my user id is set, and the browser redirects me to the index page which also has a flash screen informing that the username I typed recently was created. Meanwhile, I am already logged in.</p>
<p class="western"><img class="aligncenter size-full wp-image-244" title="w6_05" src="http://itc594.files.wordpress.com/2009/05/w6_05.jpg?w=450&#038;h=159" alt="w6_05" width="450" height="159" /></p>
<p class="western">Once logged in, the Log in hyperlink is replaced by Log out hyperlink. By clicking Logout link, my stored session is empty, the browser sends me back to index page and another flash screen is displayed informing that I was logged out. In addition, the Logout link is replaced by Login link.</p>
<p class="western"><img class="aligncenter size-full wp-image-245" title="w6_06" src="http://itc594.files.wordpress.com/2009/05/w6_06.jpg?w=450&#038;h=212" alt="w6_06" width="450" height="212" /></p>
<p class="western">In order to login back to the site, I have to click on Login link which brings me to the Login page containing a form for filling login information</p>
<p class="western"><img class="aligncenter size-full wp-image-246" title="w6_07" src="http://itc594.files.wordpress.com/2009/05/w6_07.jpg?w=450&#038;h=201" alt="w6_07" width="450" height="201" /></p>
<p class="western">This form also have an advanced feature – remember me – allowing system to store user’s session for a long time once clicked. I filled in my subscribed screen name and password and click Login button, the browser sends me to index page with a flash screen informing that I was logged in</p>
<p class="western"><img class="aligncenter size-full wp-image-247" title="w6_08" src="http://itc594.files.wordpress.com/2009/05/w6_08.jpg?w=450&#038;h=148" alt="w6_08" width="450" height="148" /></p>
<p class="western">There is another advanced feature in this application called “protecting pages”. For example, if a non-logged-in user tries to access pages that require logging in, the browser would redirect him/her to login page with a flash screen asking user to log in first</p>
<p class="western"><img class="aligncenter size-full wp-image-248" title="w6_09" src="http://itc594.files.wordpress.com/2009/05/w6_09.jpg?w=450&#038;h=223" alt="w6_09" width="450" height="223" /></p>
<p class="western">If I enter invalid screen name and password, I would be informed by the system</p>
<p class="western"><img class="aligncenter size-full wp-image-249" title="w6_10" src="http://itc594.files.wordpress.com/2009/05/w6_10.jpg?w=450&#038;h=225" alt="w6_10" width="450" height="225" /></p>
<p class="western">Chapter 5 is a long one which teaches me about how to do testing for my application such as</p>
<ul>
<li>
<p class="western">Database 	testing</p>
</li>
<li>
<p class="western">Site 	controller testing</p>
</li>
<li>
<p class="western">Functional 	testing</p>
</li>
<li>
<p class="western">Model 	testing</p>
</li>
</ul>
<p class="western">Chapter 6 and 7 focus on making advanced features for the application to enhance security and harden protection mechanisms.</p>
<p class="western">AJAX stands for Asynchronous JavaScipt and XML. AJAX includes several technologies:</p>
<ul>
<li>
<p class="western">XHTML for the markup of Web pages</p>
</li>
<li>
<p class="western">CSS 	for styling</p>
</li>
<li>
<p class="western">Dynamic 	display and interaction using DOM</p>
</li>
<li>
<p class="western">Data 	manipulation and interchange using XML</p>
</li>
<li>
<p class="western">Data 	retrieval using XMLHttpRequest</p>
</li>
<li>
<p class="western">JavaScript 	as the glue that meshes all this together</p>
</li>
</ul>
<p class="western">The Web page without being refreshed the contents of the entire page, when you retrieve data for a Web page by AJAX. In basic web architecture, when user clicks a link or submits a form, the form is submitted to the server. Then the server sends back a response new page to the user.<br />
When AJAX is used, it loads an AJAX engine in the background. The engine is written in JavaScipt and its responsibility is to both communicate with the web server and display the results to the user. The server returns an HTML fragment that contains the server&#8217;s response and displays only the data that is new or changed as opposed to refreshing the entire page.</p>
<p>Rails has a simple, consistent model to implements AJAX operations. Once the brower has render and displayed the initial web page different user actions trigger an AJAX operation:</p>
<ul>
<li>
<p class="western">Some trigger fires: by user clicking on a button or link, user 	making changes to the data on a form or in a field</p>
</li>
<li>
<p class="western">The 	web client calls the server: A JavaScript method, XMLHttpRequest, 	send data associated with the trigger to an action handler on the 	server.</p>
</li>
<li>
<p class="western">The 	server does processing: The server-side action handler does 	something with the data and returns an HTML fragment to the client.</p>
</li>
<li>
<p class="western">The 	client receive the response: The client-side JavaScript, which Rails 	creates automatically, receives the HTML fragment and uses it to 	update a specified part of the current pages.</p>
</li>
</ul>
<p class="western">
<p class="western"><strong>References</strong></p>
<p class="western"><span style="font-size:x-small;"><span style="font-family:AGaramond-Regular;">Hartl, M. and Prochazka, A. (2008), Railsspace: building a social networking website with ruby on rails, Person Education, Inc., ISBN 10: 0-321-48079-1</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=239&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/05/24/workshop-6-enjoying-the-ride-web-framework-alternatives-scalability-and-flexibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_01.jpg" medium="image">
			<media:title type="html">w6_01</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_02.jpg" medium="image">
			<media:title type="html">w6_02</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_03.jpg" medium="image">
			<media:title type="html">w6_03</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_04.jpg" medium="image">
			<media:title type="html">w6_04</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_05.jpg" medium="image">
			<media:title type="html">w6_05</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_06.jpg" medium="image">
			<media:title type="html">w6_06</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_07.jpg" medium="image">
			<media:title type="html">w6_07</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_08.jpg" medium="image">
			<media:title type="html">w6_08</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_09.jpg" medium="image">
			<media:title type="html">w6_09</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w6_10.jpg" medium="image">
			<media:title type="html">w6_10</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 5: Admiring the scenery  Forms, AJAX screen layout and mobile interfaces</title>
		<link>http://itc594.wordpress.com/2009/05/24/workshop-5-admiring-the-scenery-forms-ajax-screen-layout-and-mobile-interfaces/</link>
		<comments>http://itc594.wordpress.com/2009/05/24/workshop-5-admiring-the-scenery-forms-ajax-screen-layout-and-mobile-interfaces/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:43:09 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 5]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=209</guid>
		<description><![CDATA[Part A: Viewing the action 1. I used ruby command to create animal application 2. I tried running the application on localhost:3000 Mongrel ruby server and access via Web browser at http://localhost:3000/ 3. I created the controller Mammal using ruby command 4. Test the controller by starting the WEBrick server and navigating the browser to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=209&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><strong>Part A: Viewing the action</strong></h2>
<p>1. I used ruby command to create animal application</p>
<p><img class="aligncenter size-full wp-image-210" title="w5_pA_01" src="http://itc594.files.wordpress.com/2009/05/w5_pa_01.jpg?w=450&#038;h=79" alt="w5_pA_01" width="450" height="79" /></p>
<p>2. I tried running the application on localhost:3000 Mongrel ruby server and access via Web browser at http://localhost:3000/</p>
<p><img class="aligncenter size-full wp-image-211" title="w5_pA_02" src="http://itc594.files.wordpress.com/2009/05/w5_pa_02.jpg?w=450&#038;h=122" alt="w5_pA_02" width="450" height="122" /></p>
<p>3. I created the controller Mammal using ruby command</p>
<p><img class="aligncenter size-full wp-image-212" title="w5_pA_03" src="http://itc594.files.wordpress.com/2009/05/w5_pa_03.jpg?w=450&#038;h=66" alt="w5_pA_03" width="450" height="66" /></p>
<p>4. Test the controller by starting the WEBrick server and navigating the browser to http://localhost:3000/mammal</p>
<p><img class="aligncenter size-full wp-image-213" title="w5_pA_04" src="http://itc594.files.wordpress.com/2009/05/w5_pa_04.jpg?w=450" alt="w5_pA_04"   /></p>
<p>5. Create the breath” action by editing and saving the mammal_controller.rb class in projects\animals\app\controllers</p>
<p><img class="aligncenter size-full wp-image-214" title="w5_pA_05" src="http://itc594.files.wordpress.com/2009/05/w5_pa_05.jpg?w=450" alt="w5_pA_05"   /></p>
<p>6. Started the WEBrick server and browse at http://localhost:3000/mammals/breathe where I got a “missing template” message since it was missing a view for the breathe method.</p>
<p><img class="aligncenter size-full wp-image-215" title="w5_pA_06" src="http://itc594.files.wordpress.com/2009/05/w5_pa_06.jpg?w=450&#038;h=123" alt="w5_pA_06" width="450" height="123" /></p>
<p>7. I created a view named breathe.rhtml for the breathe action</p>
<p><img class="aligncenter size-full wp-image-216" title="w5_pA_07a" src="http://itc594.files.wordpress.com/2009/05/w5_pa_07a.jpg?w=450" alt="w5_pA_07a"   /></p>
<p>Restart the WEBrick server and browse again at http://localhost:3000/mammals/breathe</p>
<p><img class="aligncenter size-full wp-image-217" title="w5_pA_07b" src="http://itc594.files.wordpress.com/2009/05/w5_pa_07b.jpg?w=450" alt="w5_pA_07b"   /></p>
<p>8. Try Ruby code and HTML in the action view by using the &lt;%&#8230;.%&gt; wrapper around the inserted Ruby code.</p>
<p><img class="aligncenter size-full wp-image-218" title="w5_pA_08a" src="http://itc594.files.wordpress.com/2009/05/w5_pa_08a.jpg?w=450&#038;h=275" alt="w5_pA_08a" width="450" height="275" /></p>
<p>And the results are</p>
<p><img class="aligncenter size-full wp-image-219" title="w5_pA_08b" src="http://itc594.files.wordpress.com/2009/05/w5_pa_08b.jpg?w=450" alt="w5_pA_08b"   /></p>
<h2>Part B: The active view: passing data from an action too a view</h2>
<p>1. Create a new application called scenery</p>
<p><img class="aligncenter size-full wp-image-220" title="w5_pB_01" src="http://itc594.files.wordpress.com/2009/05/w5_pb_01.jpg?w=450&#038;h=122" alt="w5_pB_01" width="450" height="122" /></p>
<p>2. Create a controller called Demo in scenery\app\controllers</p>
<p><img class="aligncenter size-full wp-image-221" title="w5_pB_02" src="http://itc594.files.wordpress.com/2009/05/w5_pb_02.jpg?w=450&#038;h=67" alt="w5_pB_02" width="450" height="67" /></p>
<p>3. Add an action to demo_controller.rb as the method called rubycobe</p>
<p><img class="aligncenter size-full wp-image-222" title="w5_pB_03" src="http://itc594.files.wordpress.com/2009/05/w5_pb_03.jpg?w=450" alt="w5_pB_03"   /></p>
<p>4. Add a view template rubycode.rhtml</p>
<p><img class="aligncenter size-full wp-image-223" title="w5_pB_04" src="http://itc594.files.wordpress.com/2009/05/w5_pb_04.jpg?w=450" alt="w5_pB_04"   /></p>
<p>5. Save and restart the Web server and use browser to navigate to scenery/rubycode</p>
<p><img class="aligncenter size-full wp-image-224" title="w5_pB_05" src="http://itc594.files.wordpress.com/2009/05/w5_pb_05.jpg?w=450&#038;h=67" alt="w5_pB_05" width="450" height="67" /></p>
<p>6. Use the Time.now example to pass data from an action to a view</p>
<p><img class="aligncenter size-full wp-image-225" title="w5_pB_06" src="http://itc594.files.wordpress.com/2009/05/w5_pb_06.jpg?w=450" alt="w5_pB_06"   /></p>
<p>7. Modify and save the rubycode action with a value for the time instance variable in the DemoController class in app\controllers\demo_controller.rb</p>
<p><img class="aligncenter size-full wp-image-226" title="w5_pB_07" src="http://itc594.files.wordpress.com/2009/05/w5_pb_07.jpg?w=450" alt="w5_pB_07"   /></p>
<p>8. Then modify and save the corresponding view template in \app\views\demo\rubycode.rhtml by adding a call by reference to the action’s instance variable:</p>
<p><img class="aligncenter size-full wp-image-227" title="w5_pB_08" src="http://itc594.files.wordpress.com/2009/05/w5_pb_08.jpg?w=450" alt="w5_pB_08"   /></p>
<p>9. Restart the Web server and navigate the browser to http://localhost:3000/demo/rubycode</p>
<p><img class="aligncenter size-full wp-image-228" title="w5_pB_09" src="http://itc594.files.wordpress.com/2009/05/w5_pb_09.jpg?w=450" alt="w5_pB_09"   /></p>
<h2>Part C: Screen layouts and forms processing with text fields, check boxes, radio buttons and multiple list controls</h2>
<p>1. I created a new application called cabs</p>
<p><img class="aligncenter size-full wp-image-229" title="w5_pC_01" src="http://itc594.files.wordpress.com/2009/05/w5_pc_01.jpg?w=450" alt="w5_pC_01"   /></p>
<p>2. I created a controller called Vehicle in cabs\app\controllers</p>
<p><img class="aligncenter size-full wp-image-230" title="w5_pC_02" src="http://itc594.files.wordpress.com/2009/05/w5_pc_02.jpg?w=450&#038;h=82" alt="w5_pC_02" width="450" height="82" /></p>
<p>3. Add an action to vehicle_controller.rb as the method called cabtype</p>
<p><img class="aligncenter size-full wp-image-231" title="w5_pC_03" src="http://itc594.files.wordpress.com/2009/05/w5_pc_03.jpg?w=450" alt="w5_pC_03"   /></p>
<p>4. Add the view template cabtype.rhtml</p>
<p><img class="aligncenter size-full wp-image-232" title="w5_pC_04" src="http://itc594.files.wordpress.com/2009/05/w5_pc_04.jpg?w=450" alt="w5_pC_04"   /></p>
<p>5. Save the view and restart the Web server and navigate to http://localhost:3000/cabs/cabtype</p>
<p><img class="aligncenter size-full wp-image-233" title="w5_pC_05" src="http://itc594.files.wordpress.com/2009/05/w5_pc_05.jpg?w=450" alt="w5_pC_05"   /></p>
<p>6. Create a file in the public directory &#8211; \cabs\public called input.html</p>
<p><img class="aligncenter size-full wp-image-234" title="w5_pC_06" src="http://itc594.files.wordpress.com/2009/05/w5_pc_06.jpg?w=450" alt="w5_pC_06"   /></p>
<p>7. Edit the vehicle_controller.rb here is a start. The data in each form element in the Rails application can be accessed via its name and a hash called params</p>
<p><img class="aligncenter size-full wp-image-235" title="w5_pC_07" src="http://itc594.files.wordpress.com/2009/05/w5_pc_07.jpg?w=450" alt="w5_pC_07"   /></p>
<p>8. Edit the view template cabtype.rhtml</p>
<p>9. Start the Web server and go to the opening page of this application at http://localhost:3000/input.html</p>
<p><img class="aligncenter size-full wp-image-236" title="w5_pC_09" src="http://itc594.files.wordpress.com/2009/05/w5_pc_09.jpg?w=450" alt="w5_pC_09"   /></p>
<p>10. When I submitted the data, I got the following results</p>
<p><img class="aligncenter size-full wp-image-237" title="w5_pC_10" src="http://itc594.files.wordpress.com/2009/05/w5_pc_10.jpg?w=450" alt="w5_pC_10"   /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=209&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/05/24/workshop-5-admiring-the-scenery-forms-ajax-screen-layout-and-mobile-interfaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_01.jpg" medium="image">
			<media:title type="html">w5_pA_01</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_02.jpg" medium="image">
			<media:title type="html">w5_pA_02</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_03.jpg" medium="image">
			<media:title type="html">w5_pA_03</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_04.jpg" medium="image">
			<media:title type="html">w5_pA_04</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_05.jpg" medium="image">
			<media:title type="html">w5_pA_05</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_06.jpg" medium="image">
			<media:title type="html">w5_pA_06</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_07a.jpg" medium="image">
			<media:title type="html">w5_pA_07a</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_07b.jpg" medium="image">
			<media:title type="html">w5_pA_07b</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_08a.jpg" medium="image">
			<media:title type="html">w5_pA_08a</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pa_08b.jpg" medium="image">
			<media:title type="html">w5_pA_08b</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_01.jpg" medium="image">
			<media:title type="html">w5_pB_01</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_02.jpg" medium="image">
			<media:title type="html">w5_pB_02</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_03.jpg" medium="image">
			<media:title type="html">w5_pB_03</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_04.jpg" medium="image">
			<media:title type="html">w5_pB_04</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_05.jpg" medium="image">
			<media:title type="html">w5_pB_05</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_06.jpg" medium="image">
			<media:title type="html">w5_pB_06</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_07.jpg" medium="image">
			<media:title type="html">w5_pB_07</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_08.jpg" medium="image">
			<media:title type="html">w5_pB_08</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pb_09.jpg" medium="image">
			<media:title type="html">w5_pB_09</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_01.jpg" medium="image">
			<media:title type="html">w5_pC_01</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_02.jpg" medium="image">
			<media:title type="html">w5_pC_02</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_03.jpg" medium="image">
			<media:title type="html">w5_pC_03</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_04.jpg" medium="image">
			<media:title type="html">w5_pC_04</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_05.jpg" medium="image">
			<media:title type="html">w5_pC_05</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_06.jpg" medium="image">
			<media:title type="html">w5_pC_06</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_07.jpg" medium="image">
			<media:title type="html">w5_pC_07</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_09.jpg" medium="image">
			<media:title type="html">w5_pC_09</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/05/w5_pc_10.jpg" medium="image">
			<media:title type="html">w5_pC_10</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 5-8: Development Position</title>
		<link>http://itc594.wordpress.com/2009/05/24/workshop-5-8-development-position/</link>
		<comments>http://itc594.wordpress.com/2009/05/24/workshop-5-8-development-position/#comments</comments>
		<pubDate>Sun, 24 May 2009 03:10:18 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 5]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=207</guid>
		<description><![CDATA[I decided to take responsible for developing the Online Taxi Booking Systems (OTBS) as in Red Team. The application was designed to meet the assignment requirements of the subject. It requires two major sections, registration and login, which I follow the Hartl&#8217;s book to develop.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=207&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I decided to take responsible for developing the Online Taxi Booking Systems (OTBS) as in Red Team.<br />
The application was designed to meet the assignment requirements of the subject. It requires two major sections, registration and login, which I follow the Hartl&#8217;s book to develop.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=207&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/05/24/workshop-5-8-development-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>
	</item>
		<item>
		<title>Elevator Pitch</title>
		<link>http://itc594.wordpress.com/2009/04/10/elevator-pitch/</link>
		<comments>http://itc594.wordpress.com/2009/04/10/elevator-pitch/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 13:14:31 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=204</guid>
		<description><![CDATA[Assignment 1 &#8211; audio &#8211; Hung Khoa Tuan.mp3 &#8211; Hello, this is the audio file presented by Hung, Khoa, and Tuan for subject ITC594 – E-Systems Infrastructure Development. We have done assignment 1 including 11 exercises and 4 workshops, posted in wordpress blog at url itc594.wordpress.com in which we created categories for easy access. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=204&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;">
<div style="width:300px;">
<div style="background-color:#E6E6E6;padding:1px;">
<div style="float:left;padding:4px 4px 0 0;"><a href="http://www.imeem.com/"><img src="http://www.imeem.com/embedsearch/E6E6E6/" border="0" /></a></div>
<div style="padding-top:3px;"><a href="http://www.imeem.com/ads/banneradclick.ashx?ep=0&amp;ek=hWZSdYJXwx" rel="nofollow"><img src="http://www.imeem.com/ads/bannerad/152/10/" border="0" /></a><a href="http://www.imeem.com/ads/banneradclick.ashx?ep=1&amp;ek=hWZSdYJXwx" rel="nofollow"><img src="http://www.imeem.com/ads/bannerad/153/10/" border="0" /></a><a href="http://www.imeem.com/ads/banneradclick.ashx?ep=2&amp;ek=hWZSdYJXwx" rel="nofollow"><img src="http://www.imeem.com/ads/bannerad/154/10/" border="0" /></a><a href="http://www.imeem.com/ads/banneradclick.ashx?ep=3&amp;ek=hWZSdYJXwx" rel="nofollow"><img src="http://www.imeem.com/ads/bannerad/155/10/hWZSdYJXwx/" border="0" /></a></div>
</div>
</div>
<p><a href="http://www.imeem.com/people/ePLg_d/music/c4aqSiCB/assignment-1-audio-hung-khoa-tuanmp3/">Assignment 1 &#8211; audio &#8211; Hung Khoa Tuan.mp3 &#8211; </a></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">Hello, this is the audio file presented by Hung, Khoa, and Tuan for subject ITC594 – E-Systems Infrastructure Development. We have done assignment 1 including 11 exercises and 4 workshops, posted in wordpress blog at url itc594.wordpress.com in which we created categories for easy access. The 11 exercises aim to provide answers to all questions relating to Information Technology from general aspects like Internet, protocols, etc… to specific ones such as Model – View – Controller (MVC) design pattern, Ruby programming language, Ruby on Rails, XML, etc…</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">The 4 workshops focus on answering questions about MVC design, some basis of Ruby on Rails and a series of tutorials and practical activities. On workshop 2 and 3, we did create a small Web 2.0 application named Online Taxi Booking System using InstantRails software. We have tested and made screen shots for major parts of the application; all are already posted to blog entries which you can find by clicking on categories which are named Workshop 2 and Workshop 3</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">That&#8217;s all for the presentation. Thank you for your attention.</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=204&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/04/10/elevator-pitch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>

		<media:content url="http://www.imeem.com/embedsearch/E6E6E6/" medium="image" />

		<media:content url="http://www.imeem.com/ads/bannerad/152/10/" medium="image" />

		<media:content url="http://www.imeem.com/ads/bannerad/153/10/" medium="image" />

		<media:content url="http://www.imeem.com/ads/bannerad/154/10/" medium="image" />

		<media:content url="http://www.imeem.com/ads/bannerad/155/10/hWZSdYJXwx/" medium="image" />
	</item>
		<item>
		<title>Workshop 2: To do 4 &amp; 5</title>
		<link>http://itc594.wordpress.com/2009/04/10/workshop-2-to-do-4/</link>
		<comments>http://itc594.wordpress.com/2009/04/10/workshop-2-to-do-4/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 08:16:35 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 2]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=195</guid>
		<description><![CDATA[4.Got a spare hour or so? I recommend the UC Berkeley RAD lab’s Ruby on Rails Short course at http://youtube.com/watch?v=LADHwoN2LMM This is a RAD lab’s Ruby on Rails Short course was carried out by a group of students from UC Berkeley. Here is the content of the presentation First, he briefly describe about Ruby on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=195&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="color:#008080;"><span style="color:#008000;">4.Got a spare hour or so? I recommend the UC Berkeley RAD lab’s Ruby on Rails Short course at </span></span><a href="http://youtube.com/watch?v=LADHwoN2LMM"><span style="color:#008080;"><span style="color:#008000;">http://youtube.com/watch?v=LADHwoN2LMM</span></span></a><br />
<span style="color:#008080;"><span style="color:#008000;">This is a RAD lab’s Ruby on Rails Short course was carried out by a group of students from UC Berkeley. Here is the content of the presentation</span></span></h2>
<p><span style="color:#008080;"><span style="color:#000000;">First, he briefly describe about Ruby on Rails (RoR); how RoR was developed, and some of the basics of RoR. </span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">After that, he reviewed some knowledge about Web application 1.0, MVC, with doing some tutorials of Ruby project examples with explanations </span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">Then, he had mentioned about the convention of naming in RoR as well as how it is work in RoR and show us how to written all these automatic configurations.</span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">Advanced model relations</span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">Introduce to AJAX &amp; intro to testing</span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">And finally how easy to configure and deploy a Ruby program.</span></span></p>
<h2><span style="color:#008080;"><span style="color:#000000;"><span style="color:#008000;">5.Read the Flash article using ActionScript by Colin Moock titled “The Model-View-Controller Design Pattern “at </span><a href="http://www.adobe.com/devnet/flash/articles/mv_controller.html"><span style="color:#008000;">http://www.adobe.com/devnet/flash/articles/mv_controller.html</span></a> </span></span></h2>
<p><span style="color:#008080;"><span style="color:#000000;">I have read the article, and following here, I am going to summarize it:</span></span></p>
<p><span style="color:#008080;"><span style="color:#000000;">Firstly, the article explained the concept of the Model-View-Controller (MVC) design pattern. Basically, it separates the user interface code into three distinct classes:<br />
• Model: stores the data and application logic for the interface<br />
• View: renders the interface (usually to the screen)<br />
• Controller: responds to user input by modifying the model<br />
The basic principle of MVC is the separation of responsibilities. In an MVC application, the model class concerns itself only with the application&#8217;s state and logic. The view class concerns itself only with creating the user interface in response to generic updates it receives from the model. Finally, the controller class is occupied solely with translating user input (provided by the view) into updates that it passes to the model.<br />
Furthermore, by separating the code that governs a user interface into the model, view, and controller classes could bring back to us many advantages such as allows multiple representations (views) of the same information (model) or allows user interfaces (views) to be easily added, removed, or changed, at both compile time and runtime.<br />
Secondly, the article also mentions about the architecture of MVC design pattern. In communication in MVC, although the model, view, and controller classes in MVC are intentionally segregated, they must communicate regularly. The model must send notifications of state changes to the view. The view must register the controller to receive user interface events and, possibly, request data from the model. The controller must update the model and, possibly, update the view in response to user input.<br />
Class Responsibilities in MVC implementation are divided among the model, view, and controller. The model manages data and logic, the view creates the interface, and the controller processes user input. Those general responsibilities break down into many specific tasks.</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=195&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/04/10/workshop-2-to-do-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 4: Challenge Problem &#8211; Riding the Rails with Ruby</title>
		<link>http://itc594.wordpress.com/2009/04/09/workshop-4-challenge-problem-riding-the-rails-with-ruby/</link>
		<comments>http://itc594.wordpress.com/2009/04/09/workshop-4-challenge-problem-riding-the-rails-with-ruby/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 17:09:26 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[Workshop 4]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=185</guid>
		<description><![CDATA[1. Create, test and debug a Ruby program called dognames.rb or catnames.rb to accept 3 names from the keyboard and to display each name on the screen in alphabetical order WITHOUT using a data structure such as a list. Here is the script code of dognames.rb puts &#8220;Please enter the name of your first dog&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=185&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="color:#008000;">1. Create, test and debug a Ruby program called dognames.rb or catnames.rb to accept 3 names from the keyboard and to display each name on the screen in alphabetical order WITHOUT using a data structure such as a list.</span></h2>
<p>Here is the script code of dognames.rb</p>
<p>puts &#8220;Please enter the name of your first dog&#8221;<br />
$dog1 = STDIN.gets<br />
puts &#8220;Please enter the name of your second dog&#8221;<br />
$dog2 = STDIN.gets<br />
puts &#8220;Please enter the name of your third dog&#8221;<br />
$dog3 = STDIN.gets<br />
puts &#8220;Here are the names of your dogs in alphabetical order &#8220;<br />
puts [$dog1, $dog2, $dog3].sort<br />
And following is the output</p>
<p><img class="aligncenter size-full wp-image-192" title="ws4cha1" src="http://itc594.files.wordpress.com/2009/04/ws4cha1.gif?w=450&#038;h=221" alt="ws4cha1" width="450" height="221" /></p>
<ol style="margin-top:0;" type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Write a Ruby program called <strong>fizzbuzz.rb</strong> that prints the numbers from 1 to 100. But for multiples of three print &#8220;Fizz&#8221; instead of the number and for the multiples of five print &#8220;Buzz&#8221;. For numbers which are multiples of both three and five print &#8220;FizzBuzz&#8221;.</span><strong><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"></span></strong></li>
</ol>
<p class="MsoNormal" style="margin:0 0 0 .25in;"><strong><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></strong></p>
<p class="MsoNormal" style="text-indent:.25in;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Here is the script code of fizzbuzz.rb<strong></strong></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></p>
<p class="MsoNormal" style="background:#ccffff;text-indent:.25in;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;">for n in 1..100</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>   </span><span>      </span>if (n % 3 == 0 &amp;&amp; n % 5 == 0)</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>         </span><span>      </span>puts &#8220;FizzBuzz&#8221;</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>   </span><span>      </span>elsif n % 3 == 0</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>         </span><span>      </span>puts &#8220;Fizz&#8221;</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>   </span><span>      </span>elsif n % 5 == 0</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>         </span><span>      </span>puts &#8220;Buzz&#8221;</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>   </span><span>      </span>else<span>  </span></span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>         </span><span>      </span>puts n</span></p>
<p class="MsoNormal" style="background:#ccffff;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;"><span>   </span><span>      </span>end</span></p>
<p class="MsoNormal" style="background:#ccffff;text-indent:.25in;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:&quot;">end</span><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></p>
<p class="MsoNormal" style="text-indent:.25in;margin:0 0 0 .25in;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">And following is the output</span></p>
<p><img class="aligncenter size-full wp-image-193" title="ws4cha2" src="http://itc594.files.wordpress.com/2009/04/ws4cha2.gif?w=450&#038;h=300" alt="ws4cha2" width="450" height="300" /></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">3.</span></strong><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> Compare the Ruby and Python versions of the dog years calculator:<strong></strong></span></p>
<p class="MsoNormal" style="margin:0;"><span lang="EN-AU"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">#!/usr/bin/ruby</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"># The Dog year calculator program called dogyears.rb</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">def dogyears</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"># get the original age</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>puts “Enter your age (in human years): &#8220;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>age = gets # gets is a method for input from keyboard</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>puts # is a method or operator for screen output</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">#do some range checking, then print result</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>if age &lt; 0</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>puts &#8220;Negative age?!?<span>  </span>I don&#8217;t think so.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>elsif age &lt; 3 or age &gt; 110</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>puts &#8220;Frankly, I don&#8217;t believe you.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>else</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>puts &#8220;That&#8217;s&#8221;, age*7, &#8220;in dog years.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>  </span>end</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">dogyears</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><strong><span lang="EN-AU"><span style="font-size:small;"><span style="font-family:Times New Roman;">Python</span></span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">#!/usr/bin/python</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"># The Dog year calculator program called dogyears.py</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">def dogyears():</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"># get the original age</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>age = input(&#8220;Enter your age (in human years): &#8220;)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>print<span>       </span># print a blank line</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"># do some range checking, then print result</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>if age &lt; 0:</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>       </span>print &#8220;Negative age?!?<span>  </span>I don&#8217;t think so.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>elif age &lt; 3 or age &gt; 110:</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>       </span>print &#8220;Frankly, I don&#8217;t believe you.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>else:</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>       </span>print &#8220;That&#8217;s&#8221;, age*7, &#8220;in dog years.&#8221;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">### pause for Return key (so window doesn&#8217;t disappear)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>raw_input(&#8216;press Return&gt;&#8217;)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">def main():</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;"><span>    </span>dogyears()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;" lang="EN-AU"><span style="font-size:small;">main()</span></span></p>
<p><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">The two script code versions of Ruby and Python are written with familiar structure and purpose but different in syntax. They produce the same results if the end user enters the same input to both of them. In general, Ruby and Python are quite similar in both syntax and structure but they have some different syntax with negligibility.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">The purpose of two script codes are to allow the end user entering his age for input which is assigned to a variable name ‘age’. A comparison is made through the condition statement. If the assigned age is less than 0, a message of “Negative age?! I don’t think so” is displayed to the screen. And if the assigned age is less than 3 and more than 110, another message is displayed to the screen, “Frankly, I don’t believe you”. And in the remaining cases, a message with the result of multiplying between the assigned age and seven is display to the end user.</span></p>
<table class="MsoTableGrid" style="width:5.7in;border-collapse:collapse;" border="1" cellspacing="0" cellpadding="0" width="547">
<tbody>
<tr>
<td style="width:113.4pt;background-color:transparent;border:windowtext 1pt solid;padding:0 5.4pt;" width="151" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left:#ece9d8;width:2in;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="192" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Ruby</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left:#ece9d8;width:153pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="204" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Python</span></p>
</td>
</tr>
<tr style="height:15.25pt;">
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:113.4pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="151" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Function definition</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:2in;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="192" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Def dogyears</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:153pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="204" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Def dogyears():</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Function defined followed with parentheses and a colon</span></p>
</td>
</tr>
<tr style="height:15.25pt;">
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:113.4pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="151" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Reading</span><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> from the console</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:2in;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="192" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">gets </span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:153pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="204" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">input() </span></p>
</td>
</tr>
<tr style="height:15.25pt;">
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:113.4pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="151" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Display screen output</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:2in;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="192" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">puts</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:153pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="204" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">print</span></p>
</td>
</tr>
<tr style="height:15.25pt;">
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:113.4pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="151" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Condition statement (IF)</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:2in;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="192" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">If age &lt; 0<span>     </span>else </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">The condition statement is not followed with a colon</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Ends with the keyword ‘end’</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:153pt;border-bottom:windowtext 1pt solid;height:15.25pt;background-color:transparent;padding:0 5.4pt;" width="204" valign="top">
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">if age&lt;0:<span>      </span>else:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">The conditions statement followed with a colon (:)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;" lang="EN-AU">Do not have keyword ‘end’</span></p>
</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=185&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/04/09/workshop-4-challenge-problem-riding-the-rails-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/04/ws4cha1.gif" medium="image">
			<media:title type="html">ws4cha1</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/04/ws4cha2.gif" medium="image">
			<media:title type="html">ws4cha2</media:title>
		</media:content>
	</item>
		<item>
		<title>Workshop 4: To do &#8211; Riding the Rails with Ruby</title>
		<link>http://itc594.wordpress.com/2009/04/09/workshop-4-to-do-riding-the-rails-with-ruby/</link>
		<comments>http://itc594.wordpress.com/2009/04/09/workshop-4-to-do-riding-the-rails-with-ruby/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 16:54:51 +0000</pubDate>
		<dc:creator>itc594</dc:creator>
				<category><![CDATA[itc594]]></category>
		<category><![CDATA[Workshop 4]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://itc594.wordpress.com/?p=182</guid>
		<description><![CDATA[1. Spend some time moving your way through the 46 Ruby coding examples in the Ruby Tutorial with Code from http://www.fincher.org/tips/Languages/Ruby/ Working on 46 Ruby coding examples in this tutorial, There are many noticeable points about Ruby syntax and structure need to be regarded as following - Put, print, and printf are commands to produce outputs. - Gets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=182&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="color:#008000;">1. Spend some time moving your way through the 46 Ruby coding examples in the Ruby Tutorial with Code from </span><a href="http://www.fincher.org/tips/Languages/Ruby/"><span style="color:#0000ff;">http://www.fincher.org/tips/Languages/Ruby/</span></a></h2>
<p>Working on 46 Ruby coding examples in this tutorial, There are many noticeable points about Ruby syntax and structure need to be regarded as following</p>
<p>- Put, print, and printf are commands to produce outputs.<br />
- Gets is the command used to read inputs from the console<br />
- Basically, the syntax of a function definition starts with ‘def’ and ends with ‘end’. Other optional values such as parentheses and return values declared within the functions are available.<br />
- A specific class starts with the keyword ‘class’ followed with a name and ends with the keyword ‘end’. And the class name starts with a capital letter.<br />
- Variable naming are differently declared based on available rules. Global variables start with ‘$’, class variables start with <a href="mailto:‘@@’">‘@@’</a>, instance variables start with <a href="mailto:‘@’">‘@’</a>, and etc.<br />
- There are interesting tidbits about Ruby to be considered<br />
o &#8217;#&#8217; is the line comment character, all characters after this are ignored.<br />
o No semi-colons are needed to end lines, but may be used to separate statements on the same line.<br />
o A backslash (\) at the end of a line is used for continuation<br />
o Indenting is not significant, unlike python<br />
o Types of variables do not need to be declared<br />
o Lines between =begin and =end are ignored<br />
o Lines following &#8220;__END__&#8221; on its own line with no white space, are ignored<br />
- Variable don’t have specific type associated with them which all known as type of object.<br />
- String among double quote allows special character to be interpreted while this is not applied with single quotes.<br />
- An array which is known as a collection of values can be created by enclosing them in square brackets.<br />
- Similar with other programming languages, Ruby have control statements with the own syntax and structure. Such as condition statement, iteration statement, and etc.<br />
- Regular expressions are available in Ruby that used to compare with a specific string for validation purpose.<br />
- Ruby also provides File I/O for manipulating on file.</p>
<h2><span style="color:#008000;">2. What are the syntax differences in the way that Ruby and Javascript use the if statement?</span></h2>
<p>if expressions are used for conditional execution. The values false and nil are false, and everything else are true. Notice Ruby uses elsif, not “else if” nor “elif”.</p>
<table class="MsoTableGrid" style="width:5.25in;border-collapse:collapse;margin:auto auto auto .2in;" border="1" cellspacing="0" cellpadding="0" width="504">
<tbody>
<tr>
<td style="width:5.25in;background-color:transparent;border:windowtext 1pt solid;padding:0 5.4pt;" colspan="2" width="504" valign="top">
<p class="MsoNormal" style="text-align:center;margin:0;" align="center"><strong><span style="font-size:10pt;color:red;font-family:Verdana;">IF statement syntax</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;font-family:Verdana;">Ruby</span></strong></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;font-family:Verdana;">JavaScript</span></strong></p>
</td>
</tr>
<tr>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">if conditional [then]</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span>  </span>expression&#8230;</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">[elsif conditional [then]</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span>  </span>expression&#8230;]&#8230;</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">[else</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;"><span>          </span><span>  </span>expression...]</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">end</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">if (condition1)</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">{</span></p>
<p class="MsoNormal" style="text-indent:.5in;margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">Expression…</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">}</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">else if (condition2)</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">{</span></p>
<p class="MsoNormal" style="text-indent:.5in;margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">Expression…</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">}</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">else</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">{</span></p>
<p class="MsoNormal" style="margin:0 0 0 1in;"><span style="font-size:10pt;font-family:Verdana;">expression</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
</td>
</tr>
<tr>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:windowtext 1pt solid;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="text-indent:-.45in;margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;">- Ruby uses ‘elsif’ instead of ‘else if’</span></p>
<p class="MsoNormal" style="text-indent:-.45in;margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- The comparison condition is <strong>not</strong> put in parentheses</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- ‘then’ is optional to put to the following of the comparison conditions</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- Ruby do not need any curly brackets even there are more than one expression are written</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- Ruby do need the keyword ‘end’ when finishing the condition statement</span></p>
</td>
<td style="border-right:windowtext 1pt solid;border-top:#ece9d8;border-left:#ece9d8;width:189pt;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;" width="252" valign="top">
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- JavaScript uses ‘else if’ instead of ‘elsif’</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- The comparison condition is put in parentheses</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- JavaScript does not provide ‘then’ option</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- JavaScript do need curly brackets to embrace more than one expression</span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;"> </span></p>
<p class="MsoNormal" style="margin:0 0 0 .05in;"><span style="font-size:10pt;font-family:Verdana;">- JavaScript do not need the keyword ‘end’</span></p>
</td>
</tr>
</tbody>
</table>
<p>In addition in case of Ruby, the ‘if’ clause may be placed at the end of a statement. The command will execute left hand side expression, if right hand side expression is true. JavaScript does not provide this syntax of IF statement</p>
<p>Syntax:<br />
 expression if condition</p>
<p>For example:</p>
<p>age = 18<br />
print “Older than 18” if age &gt; 18</p>
<h2><span style="color:#008000;">3. While Ruby and Python are quite similar, can you find some similarities between Ruby and JavaScript?</span></h2>
<p>The JavaScript language is dynamic enough to support many of the concise concepts of Ruby on Rails. JavaScript has many of the same language features Ruby has, including<br />
- ducking typing<br />
- arbitrary class and object extension (i.e. adding methods/properties to classes or specific objects at any time)<br />
- simple arrays and hashes<br />
- closure<br />
- Lisp-like features<br />
- metaprogramming<br />
- eval<br />
- aspect oriented programming<br />
- blocks (first-class functions)<br />
 <img class="aligncenter size-full wp-image-190" title="ws41" src="http://itc594.files.wordpress.com/2009/04/ws41.gif?w=450&#038;h=352" alt="ws41" width="450" height="352" /></p>
<p><strong>Reference</strong><br />
Trimpath, 2007, Ruby on Rails Versus JavaScript on Junction code, viewed by 08 April 2009<br />
<a href="http://code.google.com/p/trimpath/wiki/RubyRailsVsJavaScriptJunction">http://code.google.com/p/trimpath/wiki/RubyRailsVsJavaScriptJunction</a></p>
<p>Derkeiler, 2006, JavaScript vs. Ruby, viewed by 08 April 2009<br />
<a href="http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.ruby/2006-02/msg02949.html">http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.ruby/2006-02/msg02949.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/itc594.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/itc594.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/itc594.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itc594.wordpress.com&amp;blog=6805628&amp;post=182&amp;subd=itc594&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itc594.wordpress.com/2009/04/09/workshop-4-to-do-riding-the-rails-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/71e192203a9bfc9240de7971c5026f94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itc594</media:title>
		</media:content>

		<media:content url="http://itc594.files.wordpress.com/2009/04/ws41.gif" medium="image">
			<media:title type="html">ws41</media:title>
		</media:content>
	</item>
	</channel>
</rss>
