<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5837873896111880182</id><updated>2011-07-30T14:48:50.812-07:00</updated><category term='Exercise 10'/><category term='Exercise 24'/><category term='Workshop 6'/><category term='Exercise 26'/><category term='Exercise 3'/><category term='Workshop 2'/><category term='Exercise 22'/><category term='FYP-A1'/><category term='Exercise 15'/><category term='Exercise 5'/><category term='Exercise 17'/><category term='Workshop'/><category term='Workshop 4'/><category term='Elevator Pitch'/><category term='Exercise 12'/><category term='Exercise 2'/><category term='Exercise'/><category term='FocusGroup1'/><category term='Exercise 20'/><category term='Elevator Pitch 1'/><category term='Exercise 18'/><category term='Exercise 7'/><category term='Exercise 9'/><category term='Workshop 7'/><category term='Exercise 14'/><category term='Exercise 23'/><category term='Workshop 5'/><category term='Workshop 1'/><category term='Exercise 4'/><category term='FocusGroup'/><category term='Workshop 3'/><category term='Exercise 21'/><category term='Exercise 25'/><category term='Exercise 1'/><category term='Exercise 16'/><category term='Exercise 6'/><category term='About Me'/><category term='Exercise 13'/><category term='Exercise 11'/><category term='Workshop 8'/><category term='Elevator Pitch 2'/><category term='Exercise 8'/><category term='Exercise 19'/><title type='text'>Sam Kwong 's Blog</title><subtitle type='html'>E-systems Infrastructure Development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>83</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-3255749287480112965</id><published>2010-01-24T09:45:00.000-08:00</published><updated>2010-01-24T09:48:40.840-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP-A1'/><title type='text'>Final year project</title><content type='html'>From the start of 2010 to present, i review some system development methodologies for my final year project.&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-3255749287480112965?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/3255749287480112965/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2010/01/final-year-project.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3255749287480112965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3255749287480112965'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2010/01/final-year-project.html' title='Final year project'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1264518110063832251</id><published>2009-05-25T18:36:00.000-07:00</published><updated>2009-05-26T20:16:22.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Elevator Pitch 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Elevator Pitch'/><title type='text'>Elevator Pitch 2</title><content type='html'>&lt;strong&gt;Elevator Pitch 2&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I intend to build up an ebusiness for online fast food order and delivery service so far, after I have studied the ITC594 module, I have a further understanding on ebusiness development.&lt;br /&gt;&lt;br /&gt;Firstly, I would define my ebusiness working on client server architecture in an internet environment.&lt;br /&gt;&lt;p&gt;Secondly, I would consider what kinds of software development methodology should be used in developing a web application with short development period, for fulfilling this requirements, I would like to choose RAD, because I don’t want to have other competitors releasing that kind of application are faster than me. &lt;/p&gt;&lt;p&gt;Thirdly, I need follow the RAD framework to build up my ebusiness with its required techniques and tools. &lt;/p&gt;&lt;p&gt;Fourthly, I would follow the XML scheme and W3C standard in order to make my web application more structural and standard, and also define more keywords in the html headers and tags that are easy for customer searching by search engine. &lt;/p&gt;&lt;p&gt;Fifthly, I would consider the internet security, so that I should implement a hardware firewall and use internet security protocol in order for having a high internet security protection. &lt;/p&gt;&lt;p&gt;Sixthly, I would like to choose Pay pal to be my online payment method, because Pay pal is very famous, that can give a high confidence to the customers. &lt;/p&gt;&lt;p&gt;And finally, after my web application has passed the test plan and has migrated from development to production environment, I would like to join my web application to some famous search engine for example, Yahoo, Google and AltaVista for increasing the website rating. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1264518110063832251?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1264518110063832251/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/elevator-pitch-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1264518110063832251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1264518110063832251'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/elevator-pitch-2.html' title='Elevator Pitch 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8992507744780507848</id><published>2009-05-24T18:14:00.000-07:00</published><updated>2009-05-25T18:25:16.887-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 8'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 8</title><content type='html'>&lt;strong&gt;Evaluation and Report&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. List what you consider to be the three strengths of Ruby on Rails workshop series&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I consider the 3 strengths to be:&lt;br /&gt;&lt;br /&gt;a. We can learn ROR via workshop 1 -6 step by step, that is easy for us to understand ROR.&lt;br /&gt;b. We can learn MVC from workshop 1-2 step by step, that is clearly for us to understand how to apply MVC in ROR.&lt;br /&gt;c. We can learn how to use scraffolding, rake, session, post/get, cookie, etc from workshop 1-6 gradurately in order to build up a rapid application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. List what you consider to be the three weaknesses of Ruby on Rails workshop series:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I consider the 3 weaknessess to be:&lt;br /&gt;&lt;br /&gt;a. Some provided tutorial link is dead link.&lt;br /&gt;b. The recommented book from CSU library is always session full, we need to wait for other students logout and then we can access...&lt;br /&gt;c. In workshop 5, the provided source code has a bug, we need to debug first before doing the workshop.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. List what aspects of Ruby on Rails workshop series that you found to be most &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;difficult.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The most difficult aspects were:&lt;br /&gt;&lt;br /&gt;a. Initially it is difficult to understand the MVC architecture in ROR, for example, what is the relationship between model, views and controllers in ROR?&lt;br /&gt;b. Need to study how to create the table attributes by using db schema.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. List what improvements could be made to the Ruby on Rails workshop series:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;a. Verify the provides study link and source code whether is workable before anounces.&lt;br /&gt;b. Teach the student how to do the transaction as well, because transaction is the core of e-business.&lt;br /&gt;c. Use IDE for ROR project development.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. Reflect on your experiences with the other Web framework used in this subject: Was it effective? How can it be improved? Should other Web frameworks be used as well or instead of Ruby on Rails?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I have a experiance on using java servlet, mysql and apache to do the booking system, it is not effective if comparing with ROR because java code is more complex than ROR. I suggest to use Netbean IDE for ROR project development, because it can help to verify the code syntex that avoid syntax error. I think other web frameworks such VB.NET that should be better than ROR.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;6. Did the Developer or IT manager Team that you joined after workshop 4 have a preference towards using other tools to facilitate collaboration? Comment on the differences between these use of the sub-forum or Interact wiki tools from your experiences in this subject.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;When I work as a developer, I would like to use MySQL Query Browswer to perform data query use NetBeans IDE to edit my program code and use Rubywaver to create my web application interface.&lt;/p&gt;&lt;p&gt;This is my first time post my findings in Interact wiki tools, I think sub-forum mainly is used for group discussion and interact wiki tools mainly is used for finding the defination. There is totally different.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;7. Further comments to add?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;a. Too Many exercises. &lt;/p&gt;&lt;p&gt;b. Talk more about transactions.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8992507744780507848?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8992507744780507848/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-8.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8992507744780507848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8992507744780507848'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-8.html' title='Workshop 8'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5864756007863116066</id><published>2009-05-17T22:17:00.001-07:00</published><updated>2009-05-24T18:13:51.622-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 7-part 2</title><content type='html'>&lt;strong&gt;To Do - part 2&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A. Topic reading from Safari Books OnlineHartl, M &amp;amp; Prochazka, A, (2008). RailsSpace: Building a Social Networking Website with Ruby on Rails, Pearson EducationThis workshop continues to use your reading of the ‘RailsSpace’ online book and use of other online sites.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I have partially read Safari Books OnlineHartl, M &amp;amp; Prochazka, A, (2008) at CSU library.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;B. Focus QuestionAs either a developer or as an IT manager, what are the options available when deploying and maintaining the Ruby on Rails application online?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;According to the given discussion note, I discuss with Joseph Cheung. The options available when deploying and maintaining the Ruby on Rails application online are...&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Windows Platform VS Linux&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We select Linux as our platform because Linux is freeware with higher stability than MS-Window&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Skillset on ROR and Platform&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;There is no issue on skill set of ROR and Linux Platform because both of us have sound skills on ROR and Linux&lt;/p&gt;&lt;p&gt;&lt;strong&gt;3. Hosting Issue&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We will place the server in our office as a production environment&lt;/p&gt;&lt;p&gt;&lt;strong&gt;4. Scalability &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We will use the mongrel clusters for fault tolerance and Lunix RAID 5 external diskarry so volume expansion become easy.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;5. Tools&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We will use ROR freeware tools on the web.&lt;/p&gt;&lt;p&gt;From the given intruction,which way you choose to go will most likely depend upon:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The user interface and your own skills;&lt;/li&gt;&lt;li&gt;How quickly you are guided through deployment by admin tools that simplify management of the system;&lt;/li&gt;&lt;li&gt;System back-up, data security, virtualization and portability features&lt;/li&gt;&lt;li&gt;Future-proofness: (grid computing or a cloud computing service);&lt;/li&gt;&lt;li&gt;How much time and money is saved by an efficient deployment and maintenance schedule.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This guideline is very important and useful, but it sometimes is session full, that i need to wait for someone's logout. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5864756007863116066?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5864756007863116066/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-7-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5864756007863116066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5864756007863116066'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-7-part-2.html' title='Workshop 7-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7398208950333770820</id><published>2009-05-17T17:40:00.000-07:00</published><updated>2009-05-17T20:59:26.634-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 7-part 1</title><content type='html'>&lt;strong&gt;To Do:&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Which way?&lt;br /&gt;&lt;br /&gt;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&lt;br /&gt;&lt;br /&gt;Can you get the OTBS Running in production mode as a minimal production server?&lt;br /&gt;&lt;br /&gt;Share your success by posting progress comments and links etc to the Developers sub-forum site that has been set up for the Red team.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In my OTBS project, I install instantRails2.0 in my windows XP's PC and I feel instantRails2.0 is a good software for the student/developer to study ROR. &lt;/p&gt;&lt;p&gt;InstantRails2.0 has included mongrel web server, mysql server and ROR. Also, It is already preconfigures every setting for them.&lt;/p&gt;&lt;p&gt;In ROR development, i would like to use "rake" to generate the data table and use scaffolding to generate the view page. It is very good for Rapid application development.&lt;/p&gt;&lt;p&gt;Furthermore, i feel ROR is very convenient for SQL operation, because we do not need to create the SQL server connection string for query, insert, delete and update the DB. &lt;/p&gt;&lt;p&gt;Personally, I would like to implement my OTBS project from windows to linux platform because the performance of linux is better than windows. That's true. Also, I would like to use Mongrel cluster as well as using Mongrel, because Mongrel cluster simplifies the deployment of webapps and it conveniently configures and controls several mongrel servers, or groups of mongrel servers.&lt;/p&gt;&lt;p&gt;When need to get my OTBS running in production mode as a minimal production server, please following the below procedure:&lt;/p&gt;&lt;p&gt;1.) Backup the development database of OTBS by backup application which supports database backup for example NETVAULT.&lt;/p&gt;&lt;p&gt;2.) Use MYSQL query browser to gather the development table dictionary defination and save it in a text file.&lt;/p&gt;&lt;p&gt;3.) Using the development table dictionary defination file to create an identical table or db in production environment.&lt;/p&gt;&lt;p&gt;4.) Use Netvault with "copy data table" option to restore the development db to production db.&lt;/p&gt;&lt;p&gt;5.) Start the mongrel server in production mode by issuing the command -&lt;/p&gt;&lt;p&gt;mongrel_rails start -e production&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7398208950333770820?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7398208950333770820/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-7-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7398208950333770820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7398208950333770820'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-7-part-1.html' title='Workshop 7-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1354947640743694779</id><published>2009-05-15T21:10:00.000-07:00</published><updated>2009-05-17T00:22:12.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 6 -part 3</title><content type='html'>&lt;strong&gt;C. Set up a session in OTBS.&lt;/strong&gt;&lt;br /&gt;C1. Add session-check function in OTBS with following code. (See figure 1 to 4.)&lt;br /&gt;If Session[:uid] is true, the system will display the corresponding page info;&lt;br /&gt;If Session[:uid] is false, the system will request user to login.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5336676966062937570" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 352px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg-vbPsw1eI/AAAAAAAAAhg/QMlF2p-gw9w/s400/1.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 1. Passenger's index.rhtml page&lt;/strong&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5336680024386698322" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 367px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg-yNQ19_FI/AAAAAAAAAho/qFrI0i2RFdA/s400/2.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 2. Passenger's new.rhtml page.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336681196733309458" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 385px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg-zRgLLohI/AAAAAAAAAhw/9rsVhkwGodg/s400/3.bmp" border="0" /&gt;&lt;strong&gt; Figure 3. Passenger's show.rhtml page&lt;/strong&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336682695231745794" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 339px; CURSOR: hand; HEIGHT: 457px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg-0ouhDLwI/AAAAAAAAAh4/4xq4QpD_2ME/s400/4.bmp" border="0" /&gt;&lt;strong&gt;Figure 4. Passenger's edit.rhtml page.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;C2. Check the session of OTBS.&lt;/p&gt;&lt;p&gt;i.) If you directly access the passenger's index/new/edit page, it will requests user to login. (see video 1.) &lt;/p&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;object width="600" height="480" class="BLOG_video_class" id="BLOG_video-a86591e9940e10c" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v10.nonxt5.googlevideo.com/videoplayback?id%3D0a86591e9940e10c%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330028594%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D46414B810D617A672B24CAAD3F671FEE3E916B3F.5A4AF0D6FC7913DC7B93D5F0B23B9A2DC86175F7%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Da86591e9940e10c%26offsetms%3D5000%26itag%3Dw160%26sigh%3Dg-45FCtU2dF73lE20z35jAK11jU&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="600" height="480" bgcolor="#FFFFFF"flashvars="flvurl=http://v10.nonxt5.googlevideo.com/videoplayback?id%3D0a86591e9940e10c%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330028594%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D46414B810D617A672B24CAAD3F671FEE3E916B3F.5A4AF0D6FC7913DC7B93D5F0B23B9A2DC86175F7%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Da86591e9940e10c%26offsetms%3D5000%26itag%3Dw160%26sigh%3Dg-45FCtU2dF73lE20z35jAK11jU&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1354947640743694779?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=a86591e9940e10c&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1354947640743694779/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-6-part-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1354947640743694779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1354947640743694779'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-6-part-3.html' title='Workshop 6 -part 3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg-vbPsw1eI/AAAAAAAAAhg/QMlF2p-gw9w/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5143540086838937788</id><published>2009-05-15T19:33:00.000-07:00</published><updated>2009-05-15T21:08:05.275-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 6 -part 2</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;To D0 - part2. &lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;B. Create login page&lt;/strong&gt;&lt;br /&gt;B1. Create a controller named checkauth for handling some events, for example, logout, session timeout, logged-in redirection(see figure 1.)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336254417727246466" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 142px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg4vHse90II/AAAAAAAAAgA/Ac4t4ObDtkU/s400/1.bmp" border="0" /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;Figure 1.&lt;/strong&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;div align="left"&gt;B2. Edit the checkauth controller with the following code (see figure 2.)&lt;/div&gt;&lt;div align="left"&gt;i.) pass_login method is used when the user login information has been verified.&lt;/div&gt;&lt;div align="left"&gt;ii.) logout method is used when the user logs out the system.&lt;/div&gt;&lt;div align="left"&gt;iii.) check_auth is used when the session is invaild.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336257039154314994" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 386px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg4xgSD4fvI/AAAAAAAAAgI/PHLx8GYe510/s400/2.bmp" border="0" /&gt;&lt;/p&gt;&lt;div align="center"&gt;&lt;strong&gt;Figure 2.&lt;/strong&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="left"&gt;B3. Create a method name login in the user controller with following code. (see figure 3.)&lt;br /&gt;The login method mainly is doing:&lt;br /&gt;i.) Collect value of the variable named "login" and "password".&lt;br /&gt;ii.)Check the user name and password whether is vaild, if it is correct, redirect to passengers' index page, if it is incorrect, prompt out an error message. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336257868989648946" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 298px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sg4yQlcC0DI/AAAAAAAAAgQ/it72EuyqoIA/s400/3.bmp" border="0" /&gt; &lt;strong&gt;Figure 3.&lt;/strong&gt;&lt;/p&gt;&lt;p align="left"&gt;B4. Create a user view named register.rhtml with following code. (see figure 4.)&lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5336261196503560338" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 324px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sg41SRZLsJI/AAAAAAAAAgY/mw3SE2pvbO4/s400/4.bmp" border="0" /&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;strong&gt;Figure 4.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;B5. Restart the TaxiApp project and navigate to login page. (see figure 5.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5336261947263829746" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 395px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg419-MYRvI/AAAAAAAAAgg/fCMCoaRn9xA/s400/5.bmp" border="0" /&gt; &lt;p align="left"&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;strong&gt;Figure 5.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;B6. Test login page &lt;/p&gt;&lt;p&gt;i.) Input a wrong login info. (see figure 6.) &lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5336264721581567618" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 395px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg44fdVRboI/AAAAAAAAAgo/tdYzLCSpCgM/s400/6.bmp" border="0" /&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;strong&gt;Figure 6.&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;ii.) Input a correct login information. (see figure 7.) &lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5336265714192238306" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 298px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg45ZPGGRuI/AAAAAAAAAgw/QaiRLH7u0JI/s400/7.bmp" border="0" /&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;strong&gt;Figure 7.&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;iii.) Click the link named "Register here". (see figure 8.)&lt;/p&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5336267082301940978" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 334px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg46o3s3pPI/AAAAAAAAAg4/_d6us1X83CE/s400/8.bmp" border="0" /&gt; &lt;div align="center"&gt;&lt;strong&gt;Figure 8.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p align="center"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5143540086838937788?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5143540086838937788/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5143540086838937788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5143540086838937788'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-part-2.html' title='Workshop 6 -part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg4vHse90II/AAAAAAAAAgA/Ac4t4ObDtkU/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-9150011661395714781</id><published>2009-05-13T23:43:00.000-07:00</published><updated>2009-05-15T21:07:24.899-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 6-part 1</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;To do -Part 1&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Developers may continue to build upon work with the OTBS using the topic reading to help with user registration and advanced login features from Hartl et al (2008).&lt;/strong&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;generate a controller and an action by adding a method(s) to a controller.&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;create a view template for each action and to link to actions from views.&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;use AJAX to improve the user experience.&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="left"&gt;&lt;strong&gt;A. OTBS Registration.&lt;/strong&gt;&lt;br /&gt;A1.&lt;strong&gt; &lt;/strong&gt;Create a model named user. (See figure 1).&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335979588052383682" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 109px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg01KgKY98I/AAAAAAAAAeo/MMHMOmtob8k/s400/1.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 1.&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;A2. Edit the file named 002_create_users file for auto generating table by rake migrate&lt;/span&gt; (see figure 2.)&lt;br /&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335980090697608322" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 373px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sg01nwqWbII/AAAAAAAAAew/RBxvxTG09A0/s400/2.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 2.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;A3. Generate the user table (See figure 3.)&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335981497623365842" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 168px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg025p3lyNI/AAAAAAAAAe4/Ud4xLu6K9Hw/s400/3.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 3.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div align="left"&gt;A4. Create controller name user. (See figure 4.)&lt;/div&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5335982109855758354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 161px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg03dSnKuBI/AAAAAAAAAfA/G0BvDkraB20/s400/4.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 4.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div align="left"&gt;A5. Edit the user controller (See figure 5), use &lt;strong&gt;AJAX methods&lt;/strong&gt;- &lt;strong&gt;flash[:info]&lt;/strong&gt; to show the registration result.&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335983677886450786" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 292px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg044j-0TGI/AAAAAAAAAfI/A9C8ZMLW2Fg/s400/5.bmp" border="0" /&gt; &lt;strong&gt;Figure 5.&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;A6. Add validation in user model (See figure 6.)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5335984280701649442" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 283px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg05bppKQiI/AAAAAAAAAfQ/SgXY3xU4mLM/s400/6.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 6.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;A7. Create a view page named register.rhtml with following code. (See figure 7.)&lt;br /&gt;&lt;br /&gt;Use AJAX method - &lt;strong&gt;"form_tag(:action =&gt; 'register') do" and "submit_tag" &lt;/strong&gt;for performing the form subumition.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5335984745498863906" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 256px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg052tJc6SI/AAAAAAAAAfY/B8pGbNjs3rQ/s400/7.bmp" border="0" /&gt; &lt;p align="center"&gt;&lt;strong&gt;Figure 7.&lt;/strong&gt; &lt;/p&gt;&lt;p align="left"&gt;A8. Restart the taxiapp project and use brower to navigate at &lt;a href="http://localhost:3000/user/register"&gt;http://localhost:3000/user/register&lt;/a&gt; (See figure 8.)&lt;/p&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335985909873651090" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 387px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg066eyCLZI/AAAAAAAAAfg/6auWaCr5ua0/s400/8.bmp" border="0" /&gt; &lt;strong&gt;Figure 8.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;A9. Test the registration page.&lt;/p&gt;&lt;p&gt;a.) Input a null value.&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335988094681860194" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 376px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg085p05yGI/AAAAAAAAAfo/RGAbHPYsym8/s400/9.1.bmp" border="0" /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;b.) Complete the registration form and click Register button. &lt;/p&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335989713531920002" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 342px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sg0-X4g1XoI/AAAAAAAAAfw/AJn_D3aF4mM/s400/9.2.bmp" border="0" /&gt;&lt;/p&gt;&lt;p&gt;c.) Input the created account in the login field..it returns error because that user has already created..&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5335990545215040578" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 317px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sg0_ISxirEI/AAAAAAAAAf4/SuEFpDtcI98/s400/9.3.bmp" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;A10. Use MYSQL query browser to check the user named wilson whether is created. &lt;/p&gt;&lt;p&gt;Yes, the account named wilson and his information has already stored in the database.&lt;/p&gt;&lt;p&gt;A11. Add the link which is used to go back to the login page.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-9150011661395714781?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/9150011661395714781/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-6-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/9150011661395714781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/9150011661395714781'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-6-part-1.html' title='Workshop 6-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/Sg01KgKY98I/AAAAAAAAAeo/MMHMOmtob8k/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6578844784591490290</id><published>2009-05-11T22:24:00.000-07:00</published><updated>2009-05-12T02:57:26.656-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 5'/><title type='text'>Workshop 5-part 3</title><content type='html'>&lt;strong&gt;To Do - Part3&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Create a new application called cabs in the same projects directory to demonstrate the use of an active view.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&gt; rails cabs&lt;br /&gt;&gt; cd cabs&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334805514393760194" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 203px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgkJWa88McI/AAAAAAAAAbY/QoVmC2jP5J8/s400/C1.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;2. Create a controller called Vehicle in cabs\app\controllers&lt;/strong&gt;&lt;br /&gt;cabs&gt; ruby script/generate controller Vehicle&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334805920738994050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 192px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgkJuEtMZ4I/AAAAAAAAAbg/ggtv3SC-bcg/s400/C2.bmp" border="0" /&gt; &lt;strong&gt;3. Add an action to vehicle_controller.rb as the method called cabtype&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334806904105629986" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 247px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgkKnUCEeSI/AAAAAAAAAbo/45jsLBAzFTQ/s400/C3.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;4. Add a view template - cabs\app\views\vehicle\cabtype.rhtml&lt;/strong&gt;&lt;br /&gt;We will edit this view in later steps but you may like to add your own test HTML code to the view at this stage.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334808274634112962" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 381px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgkL3Fphf8I/AAAAAAAAAbw/hpZGA2uw-wk/s400/C4.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;5. Save the view and restart the Web server and navigate to&lt;/strong&gt; &lt;a href="http://localhost:3000/vehicle/cabtype"&gt;http://localhost:3000/vehicle/cabtype&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334809427480815554" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 394px; CURSOR: hand; HEIGHT: 282px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgkM6MVmJ8I/AAAAAAAAAb4/afsarg2dZ-s/s400/C5.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;6. Create a file in the public directory - \cabs\public called input.html&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334860406110465650" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 341px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgk7RiiCrnI/AAAAAAAAAcY/xgCjKqPfbCE/s400/C6.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;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 &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334811105174462866" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 202px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgkOb2O7oZI/AAAAAAAAAcI/3L2jMUpbyxY/s400/C7.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;8. Edit the view template cabtype.rhtml&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334860910314178370" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 333px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgk7u41kx0I/AAAAAAAAAcg/7gdtiTHHF9k/s400/C8.bmp" border="0" /&gt; &lt;strong&gt;9. Start the Web server and go to the opening page of this application at &lt;/strong&gt;&lt;a href="http://localhost:3000/input.html"&gt;&lt;strong&gt;http://localhost:3000/input.html&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334861672128006594" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 390px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sgk8bO0JScI/AAAAAAAAAco/ReopO8VGpdQ/s400/C9.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;10. Submit the forms data. What do you find?&lt;/strong&gt;&lt;br /&gt;a.) Fill in all information and click submit button, like the below figure:&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334862576115476306" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 390px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sgk9P2bjZ1I/AAAAAAAAAcw/jXZ7CRLZ2aI/s400/C10.1.bmp" border="0" /&gt;&lt;br /&gt;b.) Form data will send to "/vehical/cabtype" by post method and the result is listed as below:&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334863168372966578" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 390px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgk9yUwvhLI/AAAAAAAAAc4/9KC836hbqT0/s400/C10.2.bmp" border="0" /&gt;&lt;br /&gt;c.) Fill in information but unclick the Yes box and click submit button, and the result is listed as below:&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334863970527762818" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 390px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sgk-hBBWWYI/AAAAAAAAAdA/j7lA8rqqeZA/s400/C10.3.bmp" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;11. Report your progress or findings in your Developers Blog.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Firstly, there are several errors are prompted when we follow the procedure in workshop5. I need spend 3 hours to debug the source code, in details, please refer to my figure.&lt;br /&gt;&lt;br /&gt;Secondly, learning from Tutorialspoint(2009), the directory under ruby's project named public which like the public directory for a web server, this directory has web files that don't change, such a s JavaScript files (public/javascripts), graphics (public/images), stylesheets (public/stylesheets), and HTML files (public). This should be set as the DOCUMENT_ROOT of my web server.&lt;br /&gt;&lt;br /&gt;Thirdly, form data of input.html are stored in the methods named cabtype of vehicle controller , and cabtype.rhtml uses &lt;strong&gt;pass-by-reference&lt;/strong&gt; to gather those data from cabtype methods.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Tutorialspoint(2009). "Ruby on Rails 2.1.x - Directory Structure". Received 12th May, 2009 from URL - &lt;a href="http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-directory-structure.htm"&gt;http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-directory-structure.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6578844784591490290?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6578844784591490290/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6578844784591490290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6578844784591490290'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-3.html' title='Workshop 5-part 3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/SgkJWa88McI/AAAAAAAAAbY/QoVmC2jP5J8/s72-c/C1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1988310093853388271</id><published>2009-05-11T21:01:00.000-07:00</published><updated>2009-05-11T22:03:39.246-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 5'/><title type='text'>Workshop 5-part 2</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;To Do - Part2&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;1. Create a new application called scenery in the same projects directory to demonstrate the use of an active view.&lt;br /&gt;&lt;br /&gt;&gt; rails scenery&lt;br /&gt;&gt; cd scenery&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334787500973649202" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 197px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgj495u6bTI/AAAAAAAAAaY/3tuV0FFmzDw/s400/B1.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;2. Create a controller called Demo in scenery\app\controllers&lt;br /&gt;scenery&gt; ruby script/generate controller Demo&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334787949905699282" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 203px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgj5YCIp4dI/AAAAAAAAAag/vmekTzvxeMU/s400/B2.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;3. Add an action to demo_controller.rb as the method called rubycobe&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334788639230850130" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 237px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgj6AKEk9FI/AAAAAAAAAao/NPo-jEEYzKY/s400/B3.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;4. Add a view template - scenery\app\views\demo\rubycode.rhtml&lt;br /&gt;We will edit this view in later steps but you may like to add your own test HTML code to the view at this stage.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334792554278200338" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 304px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sgj9kCwmpBI/AAAAAAAAAa4/uL0Q6xZc5lc/s400/B4.0.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;5. Save and restart the Web server and navigate to &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://localhost:3000/demo/rubycode"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/demo/rubycode&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334792035559085762" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 280px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgj9F2YVFsI/AAAAAAAAAaw/BVelWcUzWbM/s400/B4.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;6. Use the Time.now example to pass data from an action to a view.&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;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&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334797145597099778" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 241px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgkBvSwVPwI/AAAAAAAAAbA/rkKd6-PZuys/s400/B5.1.bmp" border="0" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;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:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334797315423051522" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 369px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgkB5LZ_nwI/AAAAAAAAAbI/q5ILzKQzdMw/s400/B5.2.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;9. Restart the Web server and navigate the browser to http://localhost:3000/demo/rubycode&lt;br /&gt;&lt;br /&gt;Data has been passed from the action to the view as it is done with SQL requests. The instance variables of a Ruby class are available to view templates by referencing the action’s instance variables by name in the view .rhtml template.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334797447013828578" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 280px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgkCA1nrh-I/AAAAAAAAAbQ/peZqocKq9tY/s400/B5.3.bmp" border="0" /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1988310093853388271?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1988310093853388271/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1988310093853388271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1988310093853388271'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-2.html' title='Workshop 5-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgj495u6bTI/AAAAAAAAAaY/3tuV0FFmzDw/s72-c/B1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1513279749037494028</id><published>2009-05-11T19:52:00.000-07:00</published><updated>2009-05-11T21:00:34.446-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 5'/><title type='text'>Workshop 5-part 1</title><content type='html'>&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;To Do - PART A&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Create the Rails application framework in the projects folder: C:\InstantRails\...\projects\&gt;rails animals&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334772163023703106" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 262px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgjrBHarjEI/AAAAAAAAAZQ/Ovn-C-czvMs/s400/1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;2. Running the application on localhost:3000 using the WeBrick ruby server (or Mongrel as alternative) and access via Web browser at &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://localhost:3000/"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334773117341651682" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 470px; CURSOR: hand; HEIGHT: 332px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgjr4qhz0uI/AAAAAAAAAZY/5Pdx1f9B6L4/s400/2.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3. Create the controller to make the application do an action. This is under the controller-action/model-view structure.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Stop the WEBrick server each time you edit Ruby classes and then re-start or refresh the views you are testing. Use the Ruby command below:&lt;br /&gt;&lt;br /&gt;&gt;ruby script/generate controller Mammal&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334774807698610354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 159px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgjtbDmUGLI/AAAAAAAAAZg/MbviqltW_zU/s400/3.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;4. Test the controller by starting the WEBrick server and navaigatibng the browser to &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://localhost:3000/mammal"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/mammal&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt; Note how the controller name is appended to the end of the URL and that no action resulted because there are no controller methods.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334775425434583634" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 237px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sgjt_A2DAlI/AAAAAAAAAZo/onpV_LnTSyU/s400/4.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;5. Create an action by editing and saving the mammal_controller.rb class in projects\animals\app\controllers using your text editor to add the method below:&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;img id="BLOGGER_PHOTO_ID_5334782018096550098" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 237px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgjz-wbJUNI/AAAAAAAAAaQ/biJLcaO7-9M/s400/5.0.bmp" border="0" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;6. Start the WEBrick server and browse at &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://localhost:3000/mammals/breathe"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/mammals/breathe&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt; where you will get a “missing template” message since it is missing a view for the breathe method.&lt;br /&gt;&lt;br /&gt;Rails is trying to connect the breathe method action of the mammal controller to a view, by using the action’s name – breathe. This view template is created as breathe.rhtml and stored in the \projects\animals\views\mammal directory.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;img id="BLOGGER_PHOTO_ID_5334776442775457154" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgju6OvAzYI/AAAAAAAAAZw/NZrFXt4ibiI/s400/5.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;7. Create and save a view in that directory by using a text editor to create a view called breathe.rhtml&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;p&gt;&lt;/strong&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334777306250621986" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 204px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgjvsfbiNCI/AAAAAAAAAZ4/GigFQzI5ghY/s400/6.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;8. Try Ruby code and HTML in the action view by using the &lt;%....%&gt;wrapper around the inserted Ruby code. Here are some snippets to try from workshop 4:&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334778889176460434" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 356px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgjxIoSdrJI/AAAAAAAAAaI/uFuiop2X0dg/s400/7.bmp" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1513279749037494028?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1513279749037494028/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1513279749037494028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1513279749037494028'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/workshop-5-part-1.html' title='Workshop 5-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SgjrBHarjEI/AAAAAAAAAZQ/Ovn-C-czvMs/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4506718595476168521</id><published>2009-05-11T02:15:00.000-07:00</published><updated>2009-05-11T03:20:25.850-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 24'/><title type='text'>Exercise 24-part4</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;4. Computing ethics and bot programming case study: rocky&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;a. Get an account username and password from the lecturer to LC_MOO at &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://ispg.csu.edu.au:7680/"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://ispg.csu.edu.au:7680/&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt; and login to the Welcome Lobby.&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;I use the account named "train2" and password as "train2" for logging in to the Welcome Lobby .&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;b. Hold a 5-minute discussion with Rocky on a special topic. Commands: act rocky (start bot) hush rocky (stop bot) &lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;I have sent more than 5-minute discussion with Rocky on a special topic.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;And I can order Rocky going anywhere within the Map and order Rocky to doing some action like "take", "drop", "sit"....etc. It is very interesting!! Please see the figure 1. Also, I can teach Rocky to learn something i want it to know. Please see figure 2.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334502717489542354" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 321px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgf19UlR9NI/AAAAAAAAAY4/PU2k9uT4r5g/s400/r05.bmp" border="0" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 1. My robot action&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5334504423047518274" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 331px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sgf3gmR_WEI/AAAAAAAAAZA/Y750YIpOU2E/s400/r1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 2. An command for Building object.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;C. Rocky is an ELIZA-like bot. Report your findings.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;Rocky is an ELIZA-like bot, because Rocky can give you a corresponding action when you issue a pre-defined instruction. Please see figure 3 which is telling you how to create an instruction by that command.&lt;/div&gt;&lt;/span&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5334504561621180946" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 331px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sgf3oqghohI/AAAAAAAAAZI/TdlQ8mbciZs/s400/r2.bmp" border="0" /&gt; &lt;p align="center"&gt;Figure 3. An command for teaching Rocky.&lt;/p&gt;&lt;p align="left"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4506718595476168521?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4506718595476168521/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part4.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4506718595476168521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4506718595476168521'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part4.html' title='Exercise 24-part4'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/Sgf19UlR9NI/AAAAAAAAAY4/PU2k9uT4r5g/s72-c/r05.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6136647657753242615</id><published>2009-05-10T09:54:00.002-07:00</published><updated>2009-05-13T23:41:48.693-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 26'/><title type='text'>Exercise 26-part3</title><content type='html'>&lt;strong&gt;3. Edit TWO similar versions (include bibliography) of that summary to CSU Interact: &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;a. post version A as a wiki page contribution; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;b. add version B as a final entry to close your developer's blog.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;a.) Post my studies summary of ITC594 in wiki page of CSU&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Please click the following link for accessing my studies summary of ITC594 module in CSU:&lt;br /&gt;&lt;a href="http://interact.csu.edu.au/portal/site/ITC594_200940_W_D/page/5b2177b9-ee38-42d9-80bc-9c04903ec49e"&gt;http://interact.csu.edu.au/portal/site/ITC594_200940_W_D/page/5b2177b9-ee38-42d9-80bc-9c04903ec49e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;b.) My studies summary of ITC594&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After I have studied ITC594 module in CSU, I could further understand what is E-systems Infrastructure development. It can be classified into 5 stages which are Network, Computing Platform, Middleware, eCommerce applications &amp;amp; services and Business Processes.&lt;br /&gt;At stage 1 - Network field, I have understanded the network topologies (e.g. p2p), architecture (e.g. Client/Server and Grid Computing) , protocols (e.g. IP, TCP and ftp), securities(e.g. PGP, SSL and RSA).&lt;br /&gt;At stage 2 - Computing Platform, I have further understanded the database server (e.g. Mysql) and the web application server (e.g. Apache, WEBbrick and Mongrel). Specially, further learning the web program language about HTML, CGI, Python, Javascript and Ruby on Rail.&lt;br /&gt;At stage 3 - Middleware field, I have understanded the middleware technologies for instance, mobile computing middleware (e.g. WAP), XML-trade (e.g. XML and voice XML), CORBA, SOAP and service-oriented architecture (SOA).&lt;br /&gt;At stage 4 - eCommerce application &amp;amp; services, I have already understanded the Electronic marketplaces, Supply chain management (SCM) and customer relationship management(CRM).&lt;br /&gt;And finally, at stage 5 - Business processes, I have fully understanded the workflow of E-business (e.g. E-catalogue and Shopping Cart).&lt;br /&gt;Therefore, this module is very useful for me to understand those elements in order for implementing a well E-business.&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6136647657753242615?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6136647657753242615/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6136647657753242615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6136647657753242615'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part3.html' title='Exercise 26-part3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7200072146036483801</id><published>2009-05-10T09:54:00.001-07:00</published><updated>2009-05-26T20:32:40.799-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 26'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 26-part2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;2. Summarise your understanding and describe its relevance (250 words max) in either your study at university or in your work environment;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;After i have studied ITC594 module in CSU, I could further understand what is E-systems Infrastructure development. It can be classified into 5 stages , they are listed from the bottom to top, which are Network, Computing Platform, Middleware, eCommerce applications &amp;amp; services and Business Processes.&lt;br /&gt;&lt;br /&gt;In Network field, I have understood the network topologies (e.g. p2p), architecture (e.g. Client/Server and Grid Computing) , protocols (e.g. IP, TCP and ftp), securities(e.g. PGP, SSL and RSA).&lt;br /&gt;&lt;br /&gt;In Computing Platform, I have further undestood the database server (e.g. Mysql) and web application server(e.g. Apache, WEBbrick and Mongrel). Specially, further learning the web program language about HTML, CGI, Python, Javascript and Ruby on Rail.&lt;br /&gt;&lt;br /&gt;In Middleware field, I have understood the middleware technologies for instance, mobile &lt;span style="font-size:+0;"&gt;computing middleware (e.g. WAP), XML-trade (e.g. XML and voice XML), CORBA, SOAP and service-oriented architecture (SOA).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;In eCommerce application &amp;amp; services, I have already understood the Electronic marketplaces, Supply chain management (SCM) and customer relationship management(CRM).&lt;br /&gt;&lt;br /&gt;And finally, In Business processes, I have fully understood the workflow of E-business (e.g. E-catalogue and Shopping Cart).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7200072146036483801?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7200072146036483801/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7200072146036483801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7200072146036483801'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part2.html' title='Exercise 26-part2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7098843941746043984</id><published>2009-05-10T09:48:00.000-07:00</published><updated>2009-05-13T22:02:20.459-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 26'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 26-part1</title><content type='html'>&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 26 &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;What to do: The final topic is for group reflective study using the wiki tool in CSU Interact and a way for you to add a final reflective comment on systems integration and make your closing remarks to your Developer's blog. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;1. Choose ONE of the four ways to manage and develop integrated systems as listed below;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;I choose Federated databases to manage and develop an intergrate system.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;PartA. Develop a Federated Database(MySQL, 2008)&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;a.) we must have two servers running basically, either both on the same host or on different hosts. (It is possible for a FEDERATED table to use another table that is managed by the same server, although there is little point in doing so.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;b.) we must have a table on the remote server that we want to access by using a FEDERATED table. Suppose that the remote table is in the federated database and is defined like figure1: &lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335528080186613042" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 379px; CURSOR: hand; HEIGHT: 296px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SguahSSlHTI/AAAAAAAAAdQ/dQTgFJ5sqJY/s400/sql1.bmp" border="0" /&gt; Figure 1.&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;c.) Correspondingly, we should create a FEDERATED table on the local server for accessing the remote table as figure 2: &lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335529295791715730" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 248px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SguboCxa9ZI/AAAAAAAAAdY/mo7jp57GIWs/s400/sql2.bmp" border="0" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 2.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;The basic structure of this table should match that of the remote table, except that the ENGINE table option should be FEDERATED and the CONNECTION table option is a connection string that indicates to the FEDERATED engine how to connect to the remote server.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;d.) The remote host information indicates the remote server to which your local server connects, and the database and table information indicates which remote table to use as the data source. In my development example, the remote server is indicated to be running as remote_host on port 9306, so there must be a MySQL server running on the remote host and listening to &lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;port 9306.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/strong&gt;&lt;div align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Part B. Manage Federated databases&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;I use HoneyMonitor which is a GUI for MySQL™. Server Administration, Database and Database Objects Administration, Code Development, Server Monitoring, Performance Monitoring, Performance Auditing.&lt;/span&gt;&lt;/p&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;a.) Federated Servers are listed in the Federated Servers node of the Server Objects List (See figure 3), we can create / edit / drop a Federated Server using node's popup menu.&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335533746291175906" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 209px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgufrGLLceI/AAAAAAAAAdg/OfXu-r1MgYw/s400/1.jpg" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;b.) The SQL Tab (Figure. 4) contain the SQL syntax for recreating the current Server.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335534673975852290" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 286px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgughGEcPQI/AAAAAAAAAdo/JxTyBsjabAo/s400/2.jpg" border="0" /&gt; &lt;p align="center"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Figure 4.&lt;/span&gt; &lt;/p&gt;&lt;p align="left"&gt;c.) The Create Table Wizard helps you creating tables in a simply and fast way (Figure 5).&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335536444216206626" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 309px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SguiIIuoZSI/AAAAAAAAAdw/FylZgtUmwaY/s400/3.jpg" border="0" /&gt; Figure 5.&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;d.) In Connection field, the Federated Server List will be opened thus helping us choosing an existing Federated Server - without the need of writing its name - or creating one more (Figure. 6).&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5335536545302691906" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 250px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SguiOBThwEI/AAAAAAAAAd4/8C8BMfoOIKE/s400/4.jpg" border="0" /&gt;Figure 6. &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;p align="left"&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;MySQL (2008). "How to Use FEDERATED Tables". Received 14th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/federated-use.html"&gt;&lt;span style="font-family:arial;"&gt;http://dev.mysql.com/doc/refman/5.0/en/federated-use.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7098843941746043984?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7098843941746043984/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7098843941746043984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7098843941746043984'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-26-part1.html' title='Exercise 26-part1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/SguahSSlHTI/AAAAAAAAAdQ/dQTgFJ5sqJY/s72-c/sql1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4431363615910541951</id><published>2009-05-10T08:44:00.000-07:00</published><updated>2009-05-10T09:45:35.786-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 25'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 25-part4</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;4. According to Nokia: The Nokia One Mobile Connectivity Service provides easy and secure access to email, calendar, directory and more from a mobile phone, PDA, PC or fixed-line phone -take your corporate applications mobile. Why is a company like Nokia - &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://www.nokia.com/"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://www.nokia.com/&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt; - described as having end-to-end expertise? According to Takeshi Natsuno, media director of Gateway Business Department, NNT mobile Communications Network, Inc (NTT DoCoMo) of Japan: The mobile phone will be an electronic wallet.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Nokia is an end to end expertise because it fulfulls five key steps to create competitiveness through end-to-end innovation(Nokiasiemensnetworks, 2008). :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1. &lt;strong&gt;Do the research&lt;/strong&gt; - First, it' s essential to have a broadunderstanding of end-user needs, as well as market behavior and the challenges you face. Up-to-datemarket research from analysts around the world is one part of the jigsaw.A deeper insight comes from NokiaSiemens Networks' own research and global experience of markets, as well as our close cooperation with Nokia and Siemens and their understanding of end-user behavior.We discuss your needs and aims with you and combine all these elements to paint an accurate picture of your subscribers' needs and the business environment you face.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2. &lt;strong&gt;Identify the opportunities for innovation -&lt;/strong&gt; Innovation can encompass new business models, new revenues and new technologies, which all come together to deliver an exceptional end-user experience. Identifying the opportunities for innovation takes an analysis of the research data, using your own market and business knowledge combined with our expert consulting capability and global experience. The opportunities will vary depending on your preferred business model, homemarket and target user segments. Listening to you, we help to identify opportunities early, while the marketis ripe for development and your competitors are still playing catch-up.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;3. &lt;strong&gt;Specify the solutions&lt;/strong&gt;  - Services innovation depends on the whole end-to-end chain, encompassing technology aspects like the end-user device, access network and backhaul, core infrastructure, applications, management and operations, as well as striking the appropriate partnership deals with other playersin the ecosystem. It's essential to take into account all these aspects when creating solutions customized to your needs. As a leading solutions provider in mobile and fixed environments, we have the capability and resources to help you establish clear business goals and provide every link in the chain. You remain free to choose the services and solutions you want,whether devices, network design, infrastructure elements including thirdparty products, applications, network operations, managed services, or acomplete package.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;4.&lt;strong&gt;Implement your plans -&lt;/strong&gt; Having established the right solution, it needs to be implemented quickly and efficiently while retaining simplicity and quality, including proper interoperability.Our Solutioneers use proven processes to ensure an end-to-end focus when developing and delivering your solution. We can integrate entire systems or selected components to tailor solutions to your needs. Launching new services, rolling out infrastructure and improving business processes becomes efficient and fast. Project management, services and marketing support, network operation and competence transferhelp make it all happen.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;We can also be a strategic partner in the marketing of your servicelaunch, providing practical &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;co-marketing support to gain maximum revenues and profits.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;5. &lt;strong&gt;Evolve your services portfolio&lt;/strong&gt; - Markets move fast and it's vital to evolve services quickly to stayahead. Constant research is needed to predict changing user behavior and find new ways to improve theunderlying technology. This is an ongoing process, including planning roadmaps and lifecycle management for services, devices and networks. We constantly update our research to stay ahead of markettrends. Such intelligence is central to our dialog with you, helping to guide continuous solution development and process improvement, and leverage technology developments to enhance existing services and create new ones.Our commitment to R&amp;amp;D is fundamental in creating theinnovation you need to meet yourevolving requirements. This starts right back up the supply chain, withour close co-operative working relationships with early suppliers,such as chip manufacturers.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Nokiasiemensnetworks (2008). "End-to-end expertise - our offering". Received 11th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.nokiasiemensnetworks.com/cn/Insight/end-to-end/end-to-end-expertise.htm?languagecode=en"&gt;&lt;span style="font-family:arial;"&gt;http://www.nokiasiemensnetworks.com/cn/Insight/end-to-end/end-to-end-expertise.htm?languagecode=en&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4431363615910541951?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4431363615910541951/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part4.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4431363615910541951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4431363615910541951'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part4.html' title='Exercise 25-part4'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5437621997776039387</id><published>2009-05-10T02:35:00.000-07:00</published><updated>2009-05-11T03:23:02.498-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 25'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 25-part3</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3. Visit the W3C website and find the status of the VoiceXML project. When do you think it will affect business on the web and what will its impact be?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;W3 (2008) states that the Voice Browser Working Group has published the First Public Working Draft of Voice Extensible Markup Language (VoiceXML) 3.0. This document specifies VoiceXML 3.0, a modular XML language for creating interactive media dialogs that feature synthesized speech, recognition of spoken and DTMF key input, telephony, mixed initiative conversations, and recording and presentation of a variety of media formats including digitized audio, and digitized video. The primary goal of this version is to bring the advantages of Web-based development and content delivery to interactive voice response applications.&lt;br /&gt;&lt;br /&gt;When gauging VoiceXML server performance, Cisco (2009) states that the key aspects to consider are:&lt;br /&gt;• &lt;strong&gt;Network bandwidth&lt;/strong&gt; between Web application server and the VoiceGateway and QOS.&lt;br /&gt;• &lt;strong&gt;Performance on the VoiceXML Server&lt;/strong&gt; - CVP Bill of Materials (BOM) requires the MCS-7845 as a VoiceXML server. Adequate performanceis required on the server side to respond to VoiceXML over HTTP requests.&lt;br /&gt;• &lt;strong&gt;Use of pre-recorded Audio vs. Text to Speech&lt;/strong&gt; - Good Voice User Interface applications tend to use pre-recorded audio files wherever possible.Recorded audio sounds much better than TTS. Pre-recorded Audio file quality needs to be designedsuch that it does not impact download time and browser interpretation. Make recordings in 8-bit Mulaw 8Khz format.&lt;br /&gt;• &lt;strong&gt;Audio File Caching&lt;/strong&gt; - Make sure the Voice gateway is set to cache Audio content prevents delays in having to downloadfiles from the media source.Refer to the Section titled Gateway Prompt Caching Considerations for more details on PromptManagement on Supported Gateways&lt;br /&gt;• &lt;strong&gt;Use of Grammars&lt;/strong&gt; - A voice application, like any user-centric application, is prone to certain problems that might onlybe discovered through formal usability testing, or observation of the application in use. Poor speech recognition accuracy is one type of problem common to voice applications, and a problem mostoften caused by poor grammar implementation. When users mispronounce words or say things that the grammar designer does not expect, the recognizer cannot match their input against the grammar.Poorly designed grammars containing many difficult-to-distinguish entries also results in manymisrecognized inputs leading to decreased performance on the VoiceXML server.Grammar tuning is the process of improving recognition accuracy by modifying a grammar basedon an analysis of its performance.&lt;br /&gt;&lt;br /&gt;Hence, in order to implement the VoiceXML on their web, business needs focus on above points.&lt;br /&gt;Otherwise, poor performance with VoiceXML will result in negative response.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;W3 (2008). " &lt;/span&gt;&lt;a href="http://www.w3.org/News/Overview.html"&gt;&lt;span style="font-family:arial;"&gt;W3C Home Page News Archive&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;". Received 10th May, 2009 from URL -&lt;/span&gt;&lt;a href="http://www.w3.org/News/2008"&gt;&lt;span style="font-family:arial;"&gt;http://www.w3.org/News/2008&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Cisco (2009). "Design Implications for VoiceXML Server". Received 10th May, 2009 from URL -&lt;/span&gt;&lt;a class="l" onmousedown="return clk(this.href,'','','res','10','')" href="http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/customer_voice_portal/srnd/3_1/vp31vxml.pdf"&gt;&lt;span style="font-family:arial;"&gt;Design Implications for VoiceXML Server&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5437621997776039387?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5437621997776039387/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5437621997776039387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5437621997776039387'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part3.html' title='Exercise 25-part3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4164928719503171399</id><published>2009-05-10T00:02:00.000-07:00</published><updated>2009-05-10T02:34:27.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 25'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 25-part2</title><content type='html'>&lt;strong&gt;2. Visit an airline Web site and search for information on WAP or SMS access to booking airline services. Do the same for WAP or SMS services in banking. How do both industries compare?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I visit an airline web site named Northwest Airlines (&lt;a href="http://www.nwa.com/"&gt;http://www.nwa.com/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;And I study their work flow of booking airline services used WAP in the following:&lt;br /&gt;&lt;br /&gt;Step 1.) Passenger checks in online and opts for mobile boarding pass.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334110483490051826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 289px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaROTEclvI/AAAAAAAAAXo/i-tij-MX464/s400/step1.bmp" border="0" /&gt; Step 2. ) NWA's check-in system transmits the relevant data - barcode number, mobile phone number, handset make and model and dynamice text underneath (seat number, flight destination to Mobiqa (mobiqa 2009) which is a travel web agent in XML format. Mobiqa's API is available on request.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334110850855167138" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 263px; CURSOR: hand; HEIGHT: 119px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaRjrnHZKI/AAAAAAAAAXw/HlzorPuol50/s400/step2.bmp" border="0" /&gt;&lt;br /&gt;Step 3.) Mobiqa send out the mobile tickets either by WAP push, Email (link html attachment) pr MMS to the customer's mobile phone.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaShcVEcSI/AAAAAAAAAYA/zSBHK5PYzVs/s1600-h/step3_1.bmp"&gt;&lt;/a&gt;&lt;img id="BLOGGER_PHOTO_ID_5334112507823899026" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 141px; CURSOR: hand; HEIGHT: 287px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgaTEITPwZI/AAAAAAAAAYQ/oUwSsH-bE9U/s400/step3_1.bmp" border="0" /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;p&gt;Step 4.) Passengers take their monile phone and it is scanned at security and the boarding gate.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334112771082312962" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 191px; CURSOR: hand; HEIGHT: 134px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaTTdA8XQI/AAAAAAAAAYY/NzaFOIOzS2E/s400/step4.bmp" border="0" /&gt;&lt;br /&gt;Step 5.) Scanner used were Desko GRSK 500 either containing or linking to the original ticketing platform that sold the ticket in the first place to compete validation.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5334113042249396066" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 152px; CURSOR: hand; HEIGHT: 234px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaTjPMNr2I/AAAAAAAAAYg/H_Bv7zdVig0/s400/step5.bmp" border="0" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Generally, there are little different of using WAP service beween booking airline services and mobile banking, for example&lt;/p&gt;&lt;p&gt;a.) Your cellphone when using WAP banking service that must have got the Security certificate before doing any operation. &lt;/p&gt;&lt;p&gt;b.) Your bank account must be linked with your phone card number. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Mobiqa (2009). "Products". Received 10th May, 2009 from URL - &lt;a href="http://www.mobiqa.com/airlines/products.html"&gt;http://www.mobiqa.com/airlines/products.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgaNPVPSOEI/AAAAAAAAAXg/pDUnfahs_o4/s1600-h/Mobiqa1.bmp"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4164928719503171399?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=46a45079fd492675&amp;type=video%2Fmp4' length='0'/><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=c21c505944a6f331&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4164928719503171399/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4164928719503171399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4164928719503171399'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part2.html' title='Exercise 25-part2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SgaROTEclvI/AAAAAAAAAXo/i-tij-MX464/s72-c/step1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4239631757993689878</id><published>2009-05-09T23:42:00.000-07:00</published><updated>2009-05-10T00:01:44.146-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 25'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 25-part1</title><content type='html'>&lt;strong&gt;Exercise 25: M-commerce and the e-wallet: Innovation and mobile devices &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Explore ONE of the problems associated with mobile technology or their supplier, from 1 to 4 below:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;1. What is meant by a location based service?&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Wikipedia (2009) states that A location-based service (LBS) is an information and entertainment service, accessible with mobile devices through the mobile network and utilizing the ability to make use of the geographical position of the mobile device. &lt;/span&gt;&lt;span&gt;LBS services can be used in a variety of contexts, such as health, work, personal life, etc. LBS services include services to identify a location of a person or object, such as discovering the nearest banking cash machine or the whereabouts of a friend or employee. LBS services include parcel tracking and vehicle tracking services. LBS can include mobile commerce when taking the form of coupons or advertising directed at customers based on their current location. &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Wikipedia (2009). "Location based service". Received 10th May, 2009 from URL - &lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="http://en.wikipedia.org/wiki/Location_based_service"&gt;http://en.wikipedia.org/wiki/Location_based_service&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4239631757993689878?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4239631757993689878/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4239631757993689878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4239631757993689878'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-25-part1.html' title='Exercise 25-part1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-872029000999081342</id><published>2009-05-09T22:35:00.000-07:00</published><updated>2009-05-09T23:22:26.920-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 24'/><title type='text'>Exercise 24-part3</title><content type='html'>&lt;strong&gt;3. Identify various activities in e-commerce where software agents are currently in use.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Umn (1999) tells me that there are various activities in e-commerce where software agents are currently in use as follows.&lt;br /&gt;a. )&lt;strong&gt; Procurement:&lt;/strong&gt; obtaining materials, services. managing inflow into the organization towards the end user.&lt;br /&gt;b.) &lt;strong&gt;Brokering Services&lt;/strong&gt;: finding information about products, sellers, and prices, providing protection for privacy, validating purchasers credit, billing and accounting, etc.&lt;br /&gt;c.) &lt;strong&gt;Digital Libraries and Recommending Services:&lt;/strong&gt; retrieving information from distributed sources, filtering information on contents, collaborative filtering.&lt;br /&gt;d.) &lt;strong&gt;Notification Services:&lt;/strong&gt; notifying of new books or CDs, notifying when specific products are available at a specific price.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Umn (1999). "Intelligent agents for E-Commerce". Received 10th May, 2009 from URL -&lt;br /&gt;&lt;a href="http://www-users.cs.umn.edu/~gini/csom.html"&gt;http://www-users.cs.umn.edu/~gini/csom.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-872029000999081342?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/872029000999081342/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/872029000999081342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/872029000999081342'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part3.html' title='Exercise 24-part3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-2105394670185691186</id><published>2009-05-06T09:23:00.000-07:00</published><updated>2009-05-09T22:39:47.291-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 24'/><title type='text'>Exercise 24-part2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;2. Describe how techniques such as artificial intelligence and statistical techniques are used in software agents.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Erols (2000) states that AI technologies extend from the word Technology which stems from the Greek word technos, which means "art" and "skill." A sophisticated technology is then a cumulative building of learned and well-refined skills and processes. In the AI area, these processes have manifested themselves in a number of well-recognized and maturing areas including &lt;strong&gt;Neural Networks&lt;/strong&gt;, &lt;strong&gt;Expert Systems, Automatic Speech Recognition, Genetic Algorithms, Intelligent Agents, Natural Language Processing, Robotics, Logic Programming, and Fuzzy Logic&lt;/strong&gt;. Each of these areas will be examined in some depth here, but it is first important to understand that the importance of these individual areas has changed over the last two decades. These changes have been based upon the progress in each area, and the needs that each area meets. For example in the early 1980’s robotics was a large thrust in artificial intelligence. At that time benefits could be seen in manufacturing applications. In the late 1990’s the blossoming of the Internet pushed the importance of intelligent agents forward for performing routine tasks and complex searches. At the same time, throughout the 1980s and 1990s, orders of magnitude advances in computer processing power have allowed hurdles in speech recognition and image processing to be overcome. The maturity of each of these technology areas also differs. &lt;strong&gt;Expert Systems&lt;/strong&gt; and &lt;strong&gt;Automatic Speech Recognition&lt;/strong&gt; are among the most mature while &lt;strong&gt;Natural Language Processing&lt;/strong&gt; and &lt;strong&gt;Intelligent Agents&lt;/strong&gt; remain in early stages of development. In the next few paragraphs the basis for each of these technologies will be reviewed. In addition examples where the technologies have been effectively utilized will be presented.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:+0;"&gt;Wikipedia(2009) tells me there are some statistical techniques , for example, Analysis of variance (ANOVA), Chi-square test, Correlation, Factor Analysis, Mann-Whitney U,&lt;br /&gt;Mean Square Weighted Deviation MSWD, Pearson product-moment correlation coefficient&lt;br /&gt;Regression analysis, Spearman's rank correlation coefficient, Time Series Analysis, etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Erols (2000). "A Primer on Artificial Intelligence Technologies ". Received 10th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://users.erols.com/jsaunders/papers/aitechniques.htm"&gt;&lt;span style="font-family:arial;"&gt;http://users.erols.com/jsaunders/papers/aitechniques.htm&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;&lt;br /&gt;Wikipedia (2009). "Statistics ". Received 10th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Statistics"&gt;&lt;span style="font-family:arial;"&gt;http://en.wikipedia.org/wiki/Statistics&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-2105394670185691186?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/2105394670185691186/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2105394670185691186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2105394670185691186'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24-part2.html' title='Exercise 24-part2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5003437491402466554</id><published>2009-05-06T07:15:00.000-07:00</published><updated>2009-05-06T09:23:22.458-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 24'/><title type='text'>Exercise 24-part1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 24: Virtual business worlds and cyber agents&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Search the Web for a site that uses a cyber character or cyber agent to host a business site. (If you create a successful cyber agent, you mat be able to get large companies to use it to sell their products online.)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Differentiate the various types of software agents. &lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Kfupm(1996) states that software agent can be classified 8 types.&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;There are collaborative agents, interface agents, mobile agents, information agents, reactive agents, hybrid agents, heterogeneous agent systems and smart agents. (See figure 1.)&lt;img id="BLOGGER_PHOTO_ID_5332718909605218434" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 99px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgGfmCYHCII/AAAAAAAAAXY/5HVw-ezPij8/s400/class_softAgent.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 1. A Classification of Software Agents&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;a.) &lt;strong&gt;Collaborative agents&lt;/strong&gt; emphasise autonmy and cooperation (with other agents). Hence, they may have to negotiate in order to reach mutually acceptable agreements on some matters. They typically are large coarse-grained, deliberative-style agents with non-trivial internals.(Alex L. G. Hayzelden,1999) &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;b.) &lt;strong&gt;Interface agents / Information agents&lt;/strong&gt; emphasise autonomy and learning in order to perform tasks for their owner. Pattie Maes, a key proponent of this class of agents, points out that the key metaphor underlying interface agents is that of a personal assistant who is collaborating with the user in the same work environment. Note the subtle emphasis and distinction between collaborating with the user and collaborating with other agents as is the case with collaborative agents.(Alex L. G. Hayzelden,1999) &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;c.) &lt;strong&gt;Mobile agents&lt;/strong&gt; emphasise deploying mobile code that is the adoption of mobile agent technology. Mobile agent technology is concerned with the ability to move executable code from one computer to another.(Alex L. G. Hayzelden,1999) &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;d.) &lt;strong&gt;Reactive agents&lt;/strong&gt; represent a special category of agents which do not possess internal,symbolic models of their environments; instead they act/respond in a stimulus-responsemanner to the present state of the environment in which they are embedded. (Kfupm, 1996 )&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;e.) &lt;strong&gt;Hybrid agents&lt;/strong&gt; refer to those whose constitution is a combination of two or more agent philosophies within asingular agent. The key hypothesis for having hybrid agents or architectures is the belief that, for someapplication, the benefits accrued from having the combination of philosophies within asingular agent is greater than the gains obtained from the same agent based entirely on asingular philosophy. Otherwise having a hybrid agent or architecture is meaningless. Clearly,the motivation is the expectation that this hypothesis would be proved right; the ideal benefitswould be the set union of the benefits of the individual philosophies in the hybrid.(Alex L. G. Hayzelden,1999) &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;f.) &lt;strong&gt;Heterogeneous agent&lt;/strong&gt; systems refer to an integrated set-up of at least two or more agents which belong to two or more different agent classes. The essential rationale for them is that the world abounds with a rich diversity of software products providing a wide range of services for a similarly wide range of domains. (Alex L. G. Hayzelden,1999) &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;g.) &lt;strong&gt;Smart agents&lt;/strong&gt; are a new form of software agent that interface with other agents forming an artificial intelligence system. The acronym "SMART" stands for "System for Managing Agents in Real Time". This is a bit of a misnomer because the agents manage themselves and each other by agreeing to become part of the collective whole. SMART Agents work together, within a SMART system, to perform smaller pieces of larger programming tasks so that the combined collective can achieve great things with relatively simple programming building blocks. (Wikipedia, 2009).&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;Alex L. G. Hayzelden(1999). "Software agents for future communication systems".Springer Publisher. pp 70-200.&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;Kfupm(1996). "Software Agents". Received 6th May, 2009 from URL - &lt;a href="http://reference.kfupm.edu.sa/content/s/o/software_agents__an_overview__83303.pdf"&gt;http://reference.kfupm.edu.sa/content/s/o/software_agents__an_overview__83303.pdf&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;Wikipedia (2009). "Smart Agents". Received 6th May, 2009 from URL - &lt;a href="http://en.wikipedia.org/wiki/SMART_Agents"&gt;http://en.wikipedia.org/wiki/SMART_Agents&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5003437491402466554?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5003437491402466554/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5003437491402466554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5003437491402466554'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-24.html' title='Exercise 24-part1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/SgGfmCYHCII/AAAAAAAAAXY/5HVw-ezPij8/s72-c/class_softAgent.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1216323646824210463</id><published>2009-05-06T06:09:00.000-07:00</published><updated>2009-05-06T07:13:56.093-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 23'/><title type='text'>Exercise 23</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 23: Searching mechanisms&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. What is a spider? What does it do?&lt;br /&gt;&lt;/strong&gt;Webopedia (2009) states that a spider is a program that automatically fetches Web pages. Spiders are used to feed pages to search engines. It's called a spider because it crawls over the Web. Another term for these programs is webcrawler. Because most Web pages contain links to other pages, a spider can start almost anywhere. As soon as it sees a link to another page, it goes off and fetches it. Large search engines, like Alta Vista, have many spiders working in parallel. &lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;2. What is a meta-search engine? Provide some examples.&lt;br /&gt;&lt;/strong&gt;Wikipedia (2009) explains that a meta-search engine is a search tool that sends user requests to several other search engines and/or databases and aggregates the results into a single list or displays them according to their source. Metasearch engines enable users to enter search criteria once and access several search engines simultaneously. Metasearch engines operate on the premise that the Web is too large for any one search engine to index it all and that more comprehensive search results can be obtained by combining the results from several search engines. This also may save the user from having to use multiple search engines separately.&lt;br /&gt;&lt;br /&gt;The examples of meta-search engine are listed in the following:&lt;br /&gt;a.) Chofter meta-search engine (&lt;/span&gt;&lt;a href="http://www.chofter.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.chofter.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;br /&gt;b.) Dogpile meta-search engine (&lt;/span&gt;&lt;a href="http://www.dogpile.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.dogpile.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;br /&gt;c.) Ixquick meta-search engine (&lt;/span&gt;&lt;a href="http://www.ixquick.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.ixquick.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. How can you get your site listed at major search sites; and how could you improve your site ranking? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;We can get our site listed at major search sites by following methods:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;a.) The website named AllTheWeb (&lt;/span&gt;&lt;a href="http://www.alltheweb.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.alltheweb.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) that is owned by overture. It also provides results for Lycos. And it provides a free submission. You can add your web site's URL by this link &lt;/span&gt;&lt;a href="http://www.alltheweb.com/add_url.php"&gt;&lt;span style="font-family:arial;"&gt;http://www.alltheweb.com/add_url.php&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;b.) The website named Altavista (&lt;/span&gt;&lt;a href="http://www.altavista.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.altavista.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) that is owned by overture. It also provides a free submission. You can add your web site's URL by this link &lt;/span&gt;&lt;a href="http://www.altavista.com/addurl/new"&gt;&lt;span style="font-family:arial;"&gt;http://www.altavista.com/addurl/new&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;c.) The website named Google (&lt;/span&gt;&lt;a href="http://www.google.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) that is the top choice for searchers. It's search engineresults also appear in Yahoo and AOL. You can add your web site's URL by this link &lt;/span&gt;&lt;a href="http://www.google.com/addurl.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/addurl.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;We can improve our web site ranking by the following methods.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;a.) Place keywords in your web pages by following Isitebuild(2006) 's suggestion.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Title Tag&lt;/strong&gt; - This tag should contain your most important keyword phrase. Make the title interesting enough to grab the visitor's attention. Only use 5 to 6 words in your title with your most relevant keyword in the beginning. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Description Meta Tag&lt;/strong&gt; - The search engines often use this tag when they display the description of your web site in the search results. Try to make the description inviting for your visitors. The length should be less than 200 characters, including spaces. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Keyword Meta Tag&lt;/strong&gt; - This tag will contain a listing of your keywords and keyword phrases that are relevant to your page and enable a Search Engine to find you.Here are some things to remember: (1) Don't use the same keyword more than 3 times. (2) Use keywords that occur in your Title Tag and Description Tag. (3) Use only 200 characters for all your keywords. (4)Use different keywords for all your pages. (4) Only use keywords that are relevant to your site. (5) Use lower case letters. (6) Use the single and plural forms of your keywords. (7) Use commas or spaces between your keywords or keyword phrases. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Heading Tags &lt;/strong&gt;-&lt;strong&gt; &lt;/strong&gt;These tags hold separate topics between paragraphs and range from h1, which is very large and bold to h6, which is very small and bold. Your page heading should contain your most important keywords or keyword phrase. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Alt Tag &lt;/strong&gt;- This tag is used to add text in place of the image. The user may haveturned off reading the graphics to make the page load faster. Therefore he will read the ALT Tag text instead.Add short keyword rich text to your graphic links. Make sure theALT text describes the link destination. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Hypertext Links &lt;/strong&gt;-&lt;strong&gt; &lt;/strong&gt;Include your keywords or keyword phrase in your link text. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Content&lt;/strong&gt; - Search Engine spiders put more weight on keyword richcontent that is higher up on the page rather than in the middleor lower sections. Insert your keywords and keyword phrases inyour text at least three times. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Types of Sites that won't get indexed by Search Engines.&lt;/strong&gt; -&lt;strong&gt; &lt;/strong&gt;Flash and Frame Sites - pages created this way will be avoidedby the Search Engines spiders. Dynamic Pages - any web address that contains a question mark(i.e. ASP, Perl, Cold Fusion), will not be indexed by thespiders. Password Protected Pages - Search Engines Spiders will not indexany area that is protected by a password. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Use Meta Tag Generators&lt;/strong&gt; - These are tools that can be used to automatically generate yourkeywords. Here are some resources you can use:&lt;/span&gt;&lt;a href="http://www.bcentral.com/products/metatags.asp"&gt;&lt;span style="font-family:arial;"&gt;http://www.bcentral.com/products/metatags.asp&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Webopedia(200). "Spider". Received 6th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.webopedia.com/TERM/s/spider.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.webopedia.com/TERM/s/spider.html&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Wikipedia (2009). "Metasearch engine". Received 6th May, 2009 from URL -&lt;br /&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Metasearch_engine"&gt;&lt;span style="font-family:arial;"&gt;http://en.wikipedia.org/wiki/Metasearch_engine&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Isitebuild (2006). "How to Use Keywords to Optimize Your Sitefor Search Engines-Part 2 ".Received 6th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.isitebuild.com/keywords2.htm"&gt;&lt;span style="font-family:arial;"&gt;http://www.isitebuild.com/keywords2.htm&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1216323646824210463?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1216323646824210463/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-23.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1216323646824210463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1216323646824210463'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-23.html' title='Exercise 23'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8882151800400864474</id><published>2009-05-05T13:14:00.000-07:00</published><updated>2009-05-06T06:07:53.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 22'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 22</title><content type='html'>&lt;strong&gt;Exercise 22. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Differentiate between software systems such as Customer Relationship Management (CRM) software, Business-to Business e-commerce programs and Supply-Chain Management (SCM) software.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Customer Relationship Management (CRM)&lt;/strong&gt; system includes tools, technologies and procedures that allow managing, improving and facilitating sales, support and related interactions with customers, prospects, and business partners throughout the enterprise. The main goal of a CRM system is to help sales and marketing people to analyze of customer behavior and its value for the organization by using technology and human resources. Research already made in this area states that, using CRM systems, organizations may obtain loyal and more satisfied customers by improving their business, reducing acquisition costs and gaining acknowledgment of their brand, which it is translated to a better financial performance. Some organizations only implement some functionalities of a CRM system and, although this action may limit the whole system functionality, it is a great step towards integrating the missing modules in the future to achieve a complete implementation. (Iseing, 2007).&lt;br /&gt;&lt;br /&gt;On the other hand, a &lt;strong&gt;Supply Chain Management (SCM)&lt;/strong&gt; System is a packaged technological solution that, after its deployment, it offers to the organization several advantages to coordinate their raw material acquisition, production and logistic processes, and at the same time, it improves relationship with customer and suppliers, building longterm strategic alliances. We can define a SCM system as the technological solution that manages and give support to activities related with product delivery, from raw material management until the final product reaches the end customer. It includes processes for raw material acquisition, production and assembly, storage, inventory control, order management, distribution along commercial channels and customer delivery. A SCM system will allow the organization to automate and control in a better way processes related to product acquisition, production and warehousing in order to obtain the desired benefits. (Iseing, 2007).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CRM&lt;/strong&gt; systems are usually projects whose application needs to be prepared to quickly respond to changes in the requirements, maybe one of the reasons being the dynamic and sometimes unstable environment of the commercial processes in the organizations. For example, most of the time the marketing department needs to adequate their processes to obtain new information about competitors, clients, new markets and market tendencies. &lt;strong&gt;On the other hand&lt;/strong&gt;, in the &lt;strong&gt;SCM &lt;/strong&gt;home grounds usually systems implementations require coordination of many members of the logistic chain, involving a large working team that needs a well-based and detailed plan to pursue the success of the overall SCM implementation process. Additionally, while SCM systems deal with information processing for operational transactional purposes, CRM systems concentrate more on information analysis for commercial decision support. (Iseing 2007).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Referances:&lt;/strong&gt;&lt;br /&gt;Iseing (2007). "IMPLEMENTATION APPROACHES FOR EXTENDED ENTERPRISESYSTEMS: COMPARATIVE ANALYSIS OF CRM AND SCM SYSTEMS IMPLEMENTATIONAPPROACHES". Received 6th May, 2009 from URL - &lt;a href="http://www.iseing.org/emcis/EMCIS2007/emcis07cd/EMCIS07-PDFs/704.pdf"&gt;http://www.iseing.org/emcis/EMCIS2007/emcis07cd/EMCIS07-PDFs/704.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8882151800400864474?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8882151800400864474/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-22.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8882151800400864474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8882151800400864474'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-22.html' title='Exercise 22'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6880726519698085898</id><published>2009-05-05T11:59:00.000-07:00</published><updated>2009-05-05T13:13:48.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 21'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 21</title><content type='html'>&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;Exercise 21 .Develop the class diagram for the following shopping cart specifications:&lt;br /&gt;&lt;br /&gt;A shoppingCart object is associated with only one creditCard and customer and to items in itemToBuy object, Persistent customer information such as name, billing address, delivert address, e-mail address and credit rating is stored in the customer object. The credit card object is associated with a frequentShopper discount object, if the credit rating for the customer is good. The customer can make or cancel orders as well as add and delete items to the shopping cart producti. The credit card object contains the secure method for checking that the charge is authentic.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;My class diagram is showed in the following:&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgCd0H9nk9I/AAAAAAAAAXQ/G4URim43hJg/s1600-h/ClassDiagram.png"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332435477622920146" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 314px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgCd0H9nk9I/AAAAAAAAAXQ/G4URim43hJg/s400/ClassDiagram.png" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6880726519698085898?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6880726519698085898/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-21.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6880726519698085898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6880726519698085898'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-21.html' title='Exercise 21'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SgCd0H9nk9I/AAAAAAAAAXQ/G4URim43hJg/s72-c/ClassDiagram.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8656972336539561052</id><published>2009-05-05T11:39:00.001-07:00</published><updated>2009-05-05T11:56:50.332-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part8</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;H. Deployment diagram&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;I learn the deployment diagram from sparxsystems (2009) web site&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;H1. Scope of deployment diagram&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;A deployment diagram models the run-time architecture of a system. It shows the configuration of the hardware elements (nodes) and shows how software elements and artifacts are mapped onto those nodes.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;H2. Elements of deployment diagram&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Node - A Node is either a hardware or software element. It is shown as a three-dimensional box shape. (See figure 1.) &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332414074638368130" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 130px; CURSOR: hand; HEIGHT: 140px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgCKWToc_YI/AAAAAAAAAWg/nWJZcpBWPpg/s400/deploy1.gif" border="0" /&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 1. Node symbol of deployment diagram.&lt;/span&gt;&lt;/p&gt;&lt;/ul&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Node Instance - A node instance can be shown on a diagram. An instance can be distinguished from a node by the fact that its name is underlined and has a colon before its base node type. An instance may or may not have a name before the colon. The figure 2 which shows a named instance of a computer. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332414154711777250" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 140px; CURSOR: hand; HEIGHT: 105px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgCKa97cP-I/AAAAAAAAAWo/9701TdoRUAQ/s400/deploy2.gif" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 2. Node Instance symbol of deployment diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt; Node Stereotypes - A number of standard stereotypes are provided for nodes, namely «cdrom», «cd-rom», «computer», «disk array», «pc», «pc client», «pc server», «secure», «server», «storage», «unix server», «user pc». These will display an appropriate icon in the top right corner of the node symbol. (See figure 3.)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332414224891233346" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 96px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgCKfDXhxEI/AAAAAAAAAWw/rapUbOs5m1Q/s400/deploy3.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 3. Node Stereotypes  symbol of deployment diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Artifact - An artifact is a product of the &lt;span style="font-size:+0;"&gt;software development&lt;/span&gt; process. That may include process models (e.g. use case models, design models etc), source files, executables, design documents, test reports, prototypes, user manuals, etc.&lt;br /&gt;An artifact is denoted by a rectangle showing the artifact name, the «artifact» keyword and a document icon(See figure 4.).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332414301146519170" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 130px; CURSOR: hand; HEIGHT: 100px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgCKjfcNFoI/AAAAAAAAAW4/5DD8ole8em4/s400/deploy4.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt; Figure 4. Artifact  symbol of deployment diagram.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Association - In the context of a deployment diagram, an association represents a communication path between nodes. The following diagram shows a deployment diagram for a network, depicting network protocols as stereotypes, and multiplicities at the association ends. (See figure 5.)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332414372462419730" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 363px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgCKnpHPXxI/AAAAAAAAAXA/lhQUSpiGa5c/s400/deploy5.gif" border="0" /&gt; &lt;/span&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 5. Association symbol of deployment diagram.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Node as Container - A node can contain other elements, such as components or artifacts. The following diagram shows a deployment diagram for part of an embedded system, depicting an executable artifact as being contained by the motherboard node. (See figure 6.)&lt;img id="BLOGGER_PHOTO_ID_5332414461881157570" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 370px; CURSOR: hand; HEIGHT: 181px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgCKs2OVB8I/AAAAAAAAAXI/99UXhnn_-84/s400/deploy6.gif" border="0" /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 6. Node as Container symbol of deployment diagram.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;References:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Sparxsystems (2009). "UML 2 Deployment Diagram". Received 5th May, 2009 from URL -&lt;/span&gt;&lt;a href="http://www.sparxsystems.com.au/resources/uml2_tutorial/uml2_deploymentdiagram.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.sparxsystems.com.au/resources/uml2_tutorial/uml2_deploymentdiagram.html&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8656972336539561052?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8656972336539561052/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part8.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8656972336539561052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8656972336539561052'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part8.html' title='Exercise 20-part8'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/SgCKWToc_YI/AAAAAAAAAWg/nWJZcpBWPpg/s72-c/deploy1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5603292195152498070</id><published>2009-05-05T10:33:00.000-07:00</published><updated>2009-05-05T11:39:02.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part7</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;G. Component Diagram.&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;I learn the componet diagram from developer(2009).&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;G1. Scope of component diagram.&lt;/div&gt;&lt;div align="left"&gt;The different high-level reusable parts of a system are represented in a Component diagram. A component is one such constituent part of a system. In addition to representing the high-level parts, the Component diagram also captures the inter-relationships between these parts.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;G2. Elements of component diagram.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;Component - The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined.(See figure 1.)&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5332410379375779698" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 137px; CURSOR: hand; HEIGHT: 59px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgCG_NtMn3I/AAAAAAAAAWI/CkXtTbp0qrk/s400/comp1.gif" border="0" /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="center"&gt;Figure 1. Componet symbol of componet diagram.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;Class/Interface/Object - Similar to the notations used in class and object diagrams.(See figure 2.)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332410467463297666" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 172px; CURSOR: hand; HEIGHT: 35px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgCHEV25eoI/AAAAAAAAAWQ/Myo5m0sRHoM/s400/comp2.gif" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 2. Class/Interface/Object symbol of componet diagram.&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Relation/Association - Similar to the relation/association used in class diagrams. (See figure 3.)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332410535880002466" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 184px; CURSOR: hand; HEIGHT: 21px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgCHIUuti6I/AAAAAAAAAWY/FSu-r2jdDhg/s400/comp3.gif" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 3. Relation/Association symbol of componet diagram.&lt;/p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Developer (2009). "Component Diagrams in UML". Received 6th May, 2009 from URL - &lt;a href="http://www.developer.com/design/article.php/3115721"&gt;http://www.developer.com/design/article.php/3115721&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5603292195152498070?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5603292195152498070/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part7.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5603292195152498070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5603292195152498070'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part7.html' title='Exercise 20-part7'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/SgCG_NtMn3I/AAAAAAAAAWI/CkXtTbp0qrk/s72-c/comp1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4197337852073313816</id><published>2009-05-05T10:08:00.000-07:00</published><updated>2009-05-05T10:32:54.010-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part6</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;F. Activity Diagram&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;I learn the activity diagram from visualcase (2009) web site&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;F1. Scope of activity diagram&lt;/div&gt;&lt;div align="left"&gt;An activity is the execution of a task whether it be a physical activity or the execution of code. Simply put, the activity diagram shows the sequence of activities.&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;F2. Elements of activity diagram&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="center"&gt;Start - each activity diagram has one start (see figure 1) at which the sequence of actions begins.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332392462248423970" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 24px; CURSOR: hand; HEIGHT: 24px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgB2sTNJsiI/AAAAAAAAAVY/7tezbAxuzbE/s400/act1.jpg" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 1. Start symbol of activity diagram&lt;/p&gt;&lt;ul&gt;&lt;li&gt;End - each activity diagram has one finish at which the sequence of actions ends. (See figure 2)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332392545121528722" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 24px; CURSOR: hand; HEIGHT: 24px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgB2xH7o65I/AAAAAAAAAVg/gCMwl_FupgY/s400/act2.jpg" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 2. End symbol of activity diagram&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Activity - ctivities are connected together by transitions. Transitions are directed arrows flowing from the previous activity to the next activity. They are optionally accompanied by a textual label of the form.(See figure 3)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332392640086907986" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 60px; CURSOR: hand; HEIGHT: 29px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SgB22ptJnFI/AAAAAAAAAVo/Du18JpVmiHk/s400/act3.jpg" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 3. Activity symbol of activity diagram&lt;/p&gt;&lt;ul&gt;&lt;li&gt;[guard] label - The guard is a conditional expression that when true indicates that the transition is taken. The label is also optional and is freeform.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Conditional behaviour - To show conditional behaviour use a &lt;strong&gt;branch and a merge&lt;/strong&gt;. The top diamond is a&lt;strong&gt; branch&lt;/strong&gt; and has only one transition flowing into it and any number of mutually exclusive transitions flowing out. That is, the guards on the outgoing transitions must resolve themselves so that only one is followed. (See figure 4.) The&lt;strong&gt; merge&lt;/strong&gt; is used to end the conditional behaviour. There can be any number of incoming, and only one outgoing transition. (See figure 5.)&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgB3JfUBJiI/AAAAAAAAAV4/urzMaEKihKg/s1600-h/act4.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332392963714655778" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 195px; CURSOR: hand; HEIGHT: 132px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgB3JfUBJiI/AAAAAAAAAV4/urzMaEKihKg/s400/act4.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt; Figure 4. Branch condition symbol of activity diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;Figure 5. Merge condition symbol of activity diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Parallel behaviour - To show parallel behaviour use a fork and a join. The fork (top) has one transition entering and any number of transitions exiting, all of which will be taken. The join (bottom) represents the end of the parallel behaviour and has any number of transitions entering, and only one leaving. (See figure 6.)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332393145848690946" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 114px; CURSOR: hand; HEIGHT: 121px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgB3UF0J-QI/AAAAAAAAAWA/IEO-dGdwyNE/s400/act5.jpg" border="0" /&gt; &lt;p align="center"&gt;Figure 6. Parallel behaviour symbol of activity diagram.&lt;/p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Visualcase (2009). "Visual Case Tool - UML Tutorial". Received 6th May, 2009 from URL -&lt;br /&gt;&lt;a href="http://www.visualcase.com/tutorials/activity-and-state-diagram.htm"&gt;http://www.visualcase.com/tutorials/activity-and-state-diagram.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4197337852073313816?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4197337852073313816/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part6.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4197337852073313816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4197337852073313816'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part6.html' title='Exercise 20-part6'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/SgB2sTNJsiI/AAAAAAAAAVY/7tezbAxuzbE/s72-c/act1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1249556908508528928</id><published>2009-05-05T01:31:00.001-07:00</published><updated>2009-05-05T10:01:41.251-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part5</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;E. Statechart Diagram&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;I learn the state chart diagram from Smartdraw (2009) web site.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;E1. Scope of statechart diagram.&lt;/div&gt;&lt;div align="left"&gt;A statechart diagram shows the behavior of classes in response to external stimuli. This diagram models the dynamic flow of control from state to state within a system.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;E2. Elements of statechart diagram&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;States - It represent situations during the life of an object. You can easily illustrate a state in SmartDraw by using a rectangle with rounded corners. (See figure 1)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332384371406013058" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 122px; CURSOR: hand; HEIGHT: 69px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SgBvVWeAAoI/AAAAAAAAAUw/odCL0vnJsno/s400/state1.gif" border="0" /&gt; &lt;p align="center"&gt;Figure 1. State symbol of statechart diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Transition - A solid arrow represents the path between different states of an object. Label the transition with the event that triggered it and the action that results from it. (See figure 2)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332384437042607138" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 149px; CURSOR: hand; HEIGHT: 121px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgBvZK--9CI/AAAAAAAAAU4/LdvnsKYbPv8/s400/state2.gif" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 2. Transition symbol of statechart diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Initial State - A filled circle followed by an arrow represents the object's initial state. (See figure 3)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5332384519807957778" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 99px; CURSOR: hand; HEIGHT: 50px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SgBvd_Tx-xI/AAAAAAAAAVA/hxKwgLGfnIk/s400/state3.gif" border="0" /&gt; &lt;/p&gt;&lt;p align="center"&gt;Figure 3. Initial State symbol of statechart diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Final State - An arrow pointing to a filled circle nested inside another circle represents the object's final state.(See figure 4)&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332384632901998626" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 99px; CURSOR: hand; HEIGHT: 42px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgBvkkngGCI/AAAAAAAAAVI/V3yHu89mmNs/s400/state4.gif" border="0" /&gt; &lt;p align="center"&gt;&lt;br /&gt;Figure 4. Final State symbol of statechart diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Synchronization and Splitting of Control - A short heavy bar with two transitions entering it represents a synchronization of control. A short heavy bar with two transitions leaving it represents a splitting of control that creates multiple states. (See figure 5)&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332384728366629538" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 233px; CURSOR: hand; HEIGHT: 161px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SgBvqIQCwqI/AAAAAAAAAVQ/yzYVRIuShbo/s400/state5.gif" border="0" /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt; Figure 5. Synchronization and Splitting of Control symbol of statechart diagram.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;Smartdraw(2009). "HOW TO DRAW UML DIAGRAMS ". Received 6th May, 2009 from URL -&lt;br /&gt;&lt;a href="http://www.smartdraw.com/tutorials/software/uml/tutorial_10.htm"&gt;http://www.smartdraw.com/tutorials/software/uml/tutorial_10.htm&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1249556908508528928?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1249556908508528928/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part5.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1249556908508528928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1249556908508528928'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part5.html' title='Exercise 20-part5'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/SgBvVWeAAoI/AAAAAAAAAUw/odCL0vnJsno/s72-c/state1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7047407687713547668</id><published>2009-05-05T01:09:00.000-07:00</published><updated>2009-05-05T01:31:04.147-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part4</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;D. Collaboration Diagram&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;I learn collaboration diagram from developer(2009) web site&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;D1. Scope of collaboration diagram&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;Collaboration diagram shows the objects and their association with other objects in the system apart from how they interact with each other. &lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;D2. Elements of collaboration diagram&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;span style="font-family:arial;"&gt;Object- The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined (See figure 1).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332253004264502002" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 103px; CURSOR: hand; HEIGHT: 41px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sf_32xux8vI/AAAAAAAAAUY/PeRvHfKN0Qk/s400/UML09T1.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 1. Object of collaboration diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Relation/Association - A link connecting the associated objects. Qualifiers can be placed on either end of the association to depict cardinality.(See figure 2.)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332253076569815538" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 155px; CURSOR: hand; HEIGHT: 31px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sf_36_FtefI/AAAAAAAAAUg/nbxzRv_1tq0/s400/UML09T2.gif" border="0" /&gt; Figure 2. Relation/Association of collaboration diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Messages - An arrow pointing from the commencing object to the destination object shows the interaction between the objects. The number represents the order/sequence of this interaction.&lt;img id="BLOGGER_PHOTO_ID_5332253161453586338" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 119px; CURSOR: hand; HEIGHT: 45px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sf_3_7TlB6I/AAAAAAAAAUo/1mbz9PlVcH0/s400/UML09T3.gif" border="0" /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 3. Messages of collaboration diagram.&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;Developer (2009). "Collaboration Diagram in UML". Received 5th May, 2009 from URL -&lt;/span&gt;&lt;a href="http://www.developer.com/design/article.php/10925_3102981_1"&gt;&lt;span style="font-family:arial;"&gt;http://www.developer.com/design/article.php/10925_3102981_1&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7047407687713547668?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7047407687713547668/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part4.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7047407687713547668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7047407687713547668'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part4.html' title='Exercise 20-part4'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/Sf_32xux8vI/AAAAAAAAAUY/PeRvHfKN0Qk/s72-c/UML09T1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5088225592047981755</id><published>2009-05-05T00:28:00.000-07:00</published><updated>2009-05-05T01:08:00.589-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part3</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;C. Sequence Diagram.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I learn sequence diagram from sparxsystems web site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;C1. Scope of seqence diagram&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;A sequence diagram is a form of interaction diagram which shows objects as lifelines running down the page, with their interactions over time represented as messages drawn as arrows from the source lifeline to the target lifeline. Sequence diagrams are good at showing which objects communicate with which other objects; and what messages trigger those communications. Sequence diagrams are not intended for showing complex procedural logic. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;C2. Elements of sequence diagram &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Lifelines - A lifeline represents an individual participant in a sequence diagram. A lifeline will usually have a rectangle containing its object name. If its name is "self", that indicates that the lifeline represents the classifier which owns the sequence diagram.(See figure 1). Sometimes a sequence diagram will have a lifeline with an actor element symbol at its head. This will usually be the case if the sequence diagram is owned by a use case. Boundary, control and entity elements from robustness diagrams can also own lifelines.(See figure 2)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332241872382873586" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 371px; CURSOR: hand; HEIGHT: 187px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf_tu0PYT_I/AAAAAAAAATg/TCeFKxhcXu0/s400/seq01.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt; Figure 1. Lifelines of sequence diagram. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332242035943006242" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 343px; CURSOR: hand; HEIGHT: 140px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_t4VjJ4CI/AAAAAAAAATo/ApXTdp2YV1U/s400/seq02.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt; Figure 2. More lifelines of sequence diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Messages - Messages are displayed as arrows. Messages can be complete, lost or found; synchronous or asynchronous; call or signal. In the following diagram (see figure 3), the first message is a synchronous message (denoted by the solid arrowhead) complete with an implicit return message; the second message is asynchronous (denoted by line arrowhead), and the third is the asynchronous return message (denoted by the dashed line). &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332243119246773218" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 326px; CURSOR: hand; HEIGHT: 262px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_u3ZK5i-I/AAAAAAAAATw/RLospyTafUk/s400/seq03.gif" border="0" /&gt; Figure 3. Messages of sequence diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Lifeline Start and End - A lifeline may be created or destroyed during the timescale represented by a sequence diagram. In the latter case, the lifeline is terminated by a stop symbol, represented as a cross. In the former case, the symbol at the head of the lifeline is shown at a lower level down the page than the symbol of the object that caused the creation. The following diagram shows an object being created and destroyed.(See figure 4) &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332243593319877106" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 363px; CURSOR: hand; HEIGHT: 232px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_vS_OvCfI/AAAAAAAAAT4/UJ8jOkum0Us/s400/seq05.gif" border="0" /&gt;Figure 4. Lifeline Start and End of sequence.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Duration and Time Constraints - By default, a message is shown as a horizontal line. Since the lifeline represents the passage of time down the screen, when modelling a real-time system, or even a time-bound business process, it can be important to consider the length of time it takes to perform actions. By setting a duration constraint for a message, the message will be shown as a sloping line. (See Figure 5).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332246082246557362" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 363px; CURSOR: hand; HEIGHT: 350px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sf_xj3NGPrI/AAAAAAAAAUA/cIuf9hU4K68/s400/seq06.gif" border="0" /&gt;Figure 5. Duration and Time Constraints of sequence diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Gate - A gate is a connection point for connecting a message inside a fragment with a message outside a fragment. EA shows a gate as a small square on a fragment frame. Diagram gates act as off-page connectors for sequence diagrams, representing the source of incoming messages or the target of outgoing messages. The following two diagrams show how they might be used in practice. Note that the gate on the top level diagram is the point at which the message arrowhead touches the reference fragment - there is no need to render it as a box shape. (See figure 6).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332246620181259090" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 268px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_yDLKuY1I/AAAAAAAAAUI/GbiKYVPTTuU/s400/seq12.gif" border="0" /&gt;Figure 6. Gate of sequence diagram.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Part Decomposition - An object can have more than one lifeline coming from it. This allows for inter- and intra-object messages to be displayed on the same diagram. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332247071191644290" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 375px; CURSOR: hand; HEIGHT: 392px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf_ydbT-uII/AAAAAAAAAUQ/j6ohJEeydgc/s400/seq11.gif" border="0" /&gt;&lt;/span&gt; &lt;p align="center"&gt;&lt;span style="font-family:arial;"&gt;Figure 7.  Part Decomposition of sequence diagram.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;References:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;sparxsystems (2009). "UML 2 Sequence Diagram". Received 5th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.sparxsystems.com.au/resources/uml2_tutorial/uml2_sequencediagram.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.sparxsystems.com.au/resources/uml2_tutorial/uml2_sequencediagram.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5088225592047981755?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5088225592047981755/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5088225592047981755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5088225592047981755'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part3.html' title='Exercise 20-part3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf_tu0PYT_I/AAAAAAAAATg/TCeFKxhcXu0/s72-c/seq01.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5389161222345216025</id><published>2009-05-04T10:24:00.000-07:00</published><updated>2009-05-05T00:26:27.760-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part2</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;B. Class Diagram.&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;I learn the class diagram from IBM (2004) web site.&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;em&gt;B1. Scope of class diagram&lt;/em&gt;&lt;/div&gt;&lt;div align="left"&gt;Class diagram provides an initial set of notation elements that all other structure diagrams use.&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;em&gt;B2. The elements of class diagram&lt;/em&gt;&lt;/div&gt;&lt;div align="left"&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;Class&lt;/strong&gt; - UML uses a special name for these types: "classifiers." Generally, you can think of a classifier as a class, but technically a classifier is a more general term that refers to the other three types above as well. The UML representation of a class is a rectangle containing three compartments stacked vertically, as shown in the figure 1. The top compartment shows the class's name. The middle compartment lists the class's attributes. The bottom compartment lists the class's operations. When drawing a class element on a class diagram, you must use the top compartment, and the bottom two compartments are optional. (The bottom two would be unnecessary on a diagram depicting a higher level of detail in which the purpose is to show only the relationship between the classifiers.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332232364876545442" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 288px; CURSOR: hand; HEIGHT: 128px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf_lFaBOvaI/AAAAAAAAASg/nZyDAlti4aY/s400/class1.jpg" border="0" /&gt; Figure1. Class layout of class diagram.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; - It refers to the ability of one class (child class) to inherit the identical functionality of another class (super class), and then add new functionality of its own. To model inheritance on a class diagram, a solid line is drawn from the child class (the class inheriting the behavior) with a closed, unfilled arrowhead (or triangle) pointing to the super class. (See figure 2)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332232470021035666" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 238px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_lLhtoVpI/AAAAAAAAASo/27gGONO2o74/s400/class2.jpg" border="0" /&gt;  Figure 2. Inheritance layout of class diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="left"&gt;&lt;strong&gt;Bi-directional (standard) association&lt;/strong&gt; -An association is a linkage between two classes. Associations are always assumed to be bi-directional; this means that both classes are aware of each other and their relationship, unless you qualify the association as some other type. Going back to our Flight example, the below figure shows a standard kind of association between the Flight class and the Plane class (See figure 3).&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332232554682261426" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 101px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sf_lQdGcH7I/AAAAAAAAASw/L8o5wHnKCYU/s400/class3.jpg" border="0" /&gt; &lt;p align="center"&gt; Figure 3. Association layout of class diagram&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Packages &lt;/strong&gt;- Packages enable modelers to organize the model's classifiers into namespaces, which is sort of like folders in a filing system. Dividing a system into multiple packages makes the system easier to understand, especially if each package represents a specific part of the system.(See figure 4)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332232684471227474" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 285px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_lYAmilFI/AAAAAAAAAS4/5isDvZrnQXw/s400/class4.jpg" border="0" /&gt; &lt;p align="center"&gt;Figure 4. Packages layout of class diagram.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Interfaces &lt;/strong&gt;- It is considered to be a specialization of a class modeling element, please see the below figure that is an example package element that shows its members inside the package's rectangle boundaries. (See figure 5)&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332235048791528242" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 325px; CURSOR: hand; HEIGHT: 262px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sf_nhoYbUzI/AAAAAAAAATI/icF9VnsQlH8/s400/class6.jpg" border="0" /&gt;&lt;/li&gt;&lt;p align="center"&gt;Figure 5. Interfaces layout of class diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;li&gt;&lt;strong&gt;Aggregation &lt;/strong&gt;- It is a special type of association used to model a "whole to its parts" relationship. In basic aggregation relationships, the lifecycle of a part class is independent from the whole class's lifecycle. There are 2 types of aggregation, the first one is basic aggregation that is an association with an aggregation relationship indicates that one class is a part of another class. In this kind of aggregation relationship, the child class instance can outlive its parent class (See figure 6). The second one is Composition aggregation that is the composition aggregation relationship that is just another form of the aggregation relationship, but the child class's instance lifecycle is dependent on the parent class's instance lifecycle.(See figure 7).&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332235353497911618" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 291px; CURSOR: hand; HEIGHT: 49px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf_nzXgFwUI/AAAAAAAAATQ/2KtQ3mqGkRM/s400/class7.jpg" border="0" /&gt; &lt;p align="center"&gt;Figure 6. The basic aggregation of class diagram&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5332235476366156018" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 341px; CURSOR: hand; HEIGHT: 47px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sf_n6hOKYPI/AAAAAAAAATY/KRP6A0OnWh8/s400/class8.jpg" border="0" /&gt;Figure 7. The Composition aggregation of class diagram&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p align="left"&gt;&lt;strong&gt;Referances:&lt;/strong&gt;&lt;/p&gt;&lt;p align="left"&gt;IBM (2004). "UML basics: The class diagram". Received 5th May, 2009 from URL - &lt;a href="http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/"&gt;http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5389161222345216025?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5389161222345216025/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5389161222345216025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5389161222345216025'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20-part2.html' title='Exercise 20-part2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf_lFaBOvaI/AAAAAAAAASg/nZyDAlti4aY/s72-c/class1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6233129579741597275</id><published>2009-05-04T09:35:00.000-07:00</published><updated>2009-05-04T10:23:50.592-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 20'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 20-part1</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf8jNW_53GI/AAAAAAAAASQ/YuuFW5MXMT8/s1600-h/UseCaseDiagram02.gif"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;strong&gt;Exercise 20: Modeling with UML&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Use Case, Class, Sequence, Collaboration, State chart, Activity, COmponent and Deployment diagrams are used in UML. Describe each of the eight(8) main diagrams used in UML.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;A. Use Case Diagram&lt;/strong&gt;&lt;/p&gt;&lt;p align="left"&gt;I learn the Use Case diagram from the tuturial web site, Developer(2009). &lt;/p&gt;&lt;p align="left"&gt;&lt;em&gt;A1. Objectiive of Use Case Diagram in UML&lt;/em&gt;&lt;/p&gt;&lt;p align="left"&gt;A use case diagram is quite simple in nature and depicts two types of elements: one representing the business roles and the other representing the business processes.&lt;/p&gt;&lt;p align="left"&gt;&lt;em&gt;A2. The elements of a Use Case Diagram.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Actors &lt;/strong&gt;- it portrays any entity (or entities) that performs certain roles in a given system. The different roles the actor represents are the actual business roles of users in a given system. An actor in a use case diagram interacts with a use case. See below figure. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5332016670514463474" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 153px; CURSOR: hand; HEIGHT: 81px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf8g6V55wvI/AAAAAAAAARg/xhN9HYyts7M/s400/UseCaseDiagram01.gif" border="0" /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Use Case&lt;/strong&gt; - A use case in a use case diagram is a visual representation of a distinct business functionality in a system. The key term here is "distinct business functionality."See figure.&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332019303060390898" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 259px; CURSOR: hand; HEIGHT: 65px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf8jTk5ww_I/AAAAAAAAASY/Kx9IQmip2r0/s400/UseCaseDiagram02.gif" border="0" /&gt; &lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;System boundary&lt;/strong&gt; - A system boundary defines the scope of what a system will be. functionality."See below figure.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5332017428748905266" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 328px; CURSOR: hand; HEIGHT: 243px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf8hmejFKzI/AAAAAAAAARw/9w0l6_rOtUs/s400/UseCaseDiagram03.gif" border="0" /&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;Relationships in Use Cases &lt;/strong&gt;- Use cases share different kinds of relationships. A relationship between two use cases is basically a dependency between the two use cases, for example, when a use case is depicted as using the functionality of another use case in a diagram, this relationship between the use cases is named as an &lt;strong&gt;include&lt;/strong&gt; relationship(See figure 4) ; A relationship between two use cases, the child use case adds to the existing functionality and characteristics of the parent use case, it is named as an &lt;strong&gt;extend&lt;/strong&gt; relationship; A relationship involves a parent-child relationship between use cases. The child use case in the generalization relationship has the underlying business process meaning, but is an enhancement of the parent use case, it is named as &lt;strong&gt;generalization &lt;/strong&gt;relationship.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5332017926802923170" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 264px; CURSOR: hand; HEIGHT: 102px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf8iDd8aXqI/AAAAAAAAAR4/XttVIegWTG0/s400/UseCaseDiagram04.gif" border="0" /&gt; Include relationship.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332018085518488706" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 146px; CURSOR: hand; HEIGHT: 133px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sf8iMtNJtII/AAAAAAAAASA/_c9aQbfFIRM/s400/UseCaseDiagram05.gif" border="0" /&gt; Extend Relationship&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5332018186316927650" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 212px; CURSOR: hand; HEIGHT: 149px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sf8iSktX0qI/AAAAAAAAASI/VJC7woIMA2s/s400/UseCaseDiagram06.gif" border="0" /&gt;&lt;br /&gt;Generalization relationship.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Refereance:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Developer (2009). "Creating Use Case Diagrams". Received 5th May, 2009 from URL - &lt;a href="http://www.developer.com/design/article.php/10925_2109801_1"&gt;http://www.developer.com/design/article.php/10925_2109801_1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6233129579741597275?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6233129579741597275/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6233129579741597275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6233129579741597275'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-20.html' title='Exercise 20-part1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3ceCcWCWK_g/Sf8g6V55wvI/AAAAAAAAARg/xhN9HYyts7M/s72-c/UseCaseDiagram01.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7817230670219798794</id><published>2009-05-01T13:01:00.000-07:00</published><updated>2009-05-04T09:33:48.559-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 19'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 19</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 19: TP monitors and transaction protocols&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Give a description in your own words of the ACID properties of a transaction.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;ACID is stands for Atomicity, Consistency, Isolation, and Durability. Actually ACID properties provide a high processing reliabilty to transaction. For example, Atomicity is the operation sequence which must be an atomic, either all or no operations are performed; Consistency is the the operation which must leave data consistently, and all defined relations must be maintained.&lt;br /&gt;Isolation let the transaction separate from all other transactions. Durability is the operations which are permanently placed on the system.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;TP monitor is stands for TeleProcessing monitor or Transaction Processing monitor, encyclopedia2  (2009) states that it a control program that manages the transfer of data between multiple local and remote terminals and the application programs that serve them. It may also include programs that format the terminal screens and validate the data entered.In a distributed client/server environment, a TP monitor provides integrity by ensuring that transactions do not get lost or damaged. It may be placed in a separate machine and used to balance the load between clients and various application servers and database servers. It is also used to create a high availability system by switching a failed transaction to another machine. A TP monitor guarantees that all databases are updated from a single transaction.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. What is difference in load balancing with traditional and transactional MOM, RPC and conversations?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Qusay H. Mahmoud (2004) tell me that RPC calls require more bandwidth than a similar MOM interaction. Bandwidth is an expensive performance overhead and is the main obstacle to scalability of the RPC mechanism. The RPC model is designed on the notion of a single client talking to a single server; traditonal RPC has no built-in support for one-to-many communications. The advantage of an RPC system is the simplicity of the mechanism and straightforward implementation. The advantage that has over MOM is the guarantee of sequential processing. With the synchronous RPC model, you can control the order in which processing ocurs in which processing occurs in the system. For example, in an RPC system you can be sure that at any one time all the new orders received by the system have been added to the database and that they have been added in the order of which they were received. However, with an asynchronous MOM approach this cannot be guaranteed, as new orders could exist in queues waiting to be added to database. This could result in a temporal inaccuracy of the data in the database. We are not concerned that these updates will not be applied to the database, but that a snapshot of the current database would not accurately reflect the actual state of orders placed. RPC is slow but consistent; work is always carried out in the correct order. These are important considerations for sections in a system that requires data to have 100% temporal integrity.&lt;br /&gt;&lt;br /&gt;In conclusion, the RPC model is ideal if you want a strongly typed/object-oriented (OO) system with tight coupling, compile-time semantic checking and an overall more straightforward system implementation. In contrast, if the distributed systems will be geographically dispersed deployments with poor network connectivity and stringent demandss in reliability, flexibility and scalability, then MOM is the ideal solution.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;4. Why is a two-phase commit protocol better than a one-phase atomic commit protocol?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I find useful tuturial from Agora (2007)  and it tells me that &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-family:arial;"&gt;In a one-phase commit protocol, the coordinator communicates commit or abort to all participants until all acknowledge. &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;When a client/coordinator requests a commit, it does not allow a server to make a unilateral decision to abort a transaction. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;A server may have to abort the transaction, for example, in the case of deadlock. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;In a two-phase protocol, any participant can abort its part of the transaction. Transaction is committed by consensus. &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;When the client asks the coordinator to commit the transaction, the two-phase commit protocol is executed. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;After reading that powerpoint, i find there is a serious problem in one-phase commit protocol that if a process cannot perform the operation, there's no way to tell the coordinator!   In contrast, two-phase commit protocol has a well communication that is better than one-phase commit protocol, which avoids from this scenario.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;Referances:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Encyclopedia2 (2009). "TP monitor". Received 5th May, 2009 from URL - &lt;/span&gt;&lt;a href="http://encyclopedia2.thefreedictionary.com/TP+monitor"&gt;&lt;span style="font-family:arial;"&gt;http://encyclopedia2.thefreedictionary.com/TP+monitor&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Qusay H. Mahmoud (2004). When to use MOM or RPC. Middleware for communications.John Wiley and Sons Publishers (p7)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Agora (2007). " Lecture 12 -Distributed transcations".Received 5th May, 2009 from URL - &lt;/span&gt;&lt;a href="https://agora.cs.illinois.edu/download/attachments/26989/lect-12.ppt"&gt;&lt;span style="font-family:arial;"&gt;https://agora.cs.illinois.edu/download/attachments/26989/lect-12.ppt&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7817230670219798794?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7817230670219798794/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-19.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7817230670219798794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7817230670219798794'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/exercise-19.html' title='Exercise 19'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1245568250822822172</id><published>2009-05-01T08:24:00.000-07:00</published><updated>2009-05-02T09:18:57.607-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 18'/><title type='text'>Execise 18</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 18: Threading demonstration in Python.&lt;br /&gt;&lt;br /&gt;A simple demonstration of the threading module in Python that used both a lock and semaphore to control concurrency is by Ted Herman at the University of lowa. The code and sample output below are worth a look. Report your findings.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I download the threaddemo.py script from CSU and execute it in my PC. However, when I am executing it, it prompts out many unexpected errors. Finally, I need to downgrade the version of Python from 2.5.4 to 2.3.2. And now, i can test it in my PC successfully (see figure 1), I suspect that it may be caused by different syntax between verison 2.5.4 and 2.3.2.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfstabwa9uI/AAAAAAAAARY/ji-FI-2aEw4/s1600-h/1.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5330904516073813730" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 367px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfstabwa9uI/AAAAAAAAARY/ji-FI-2aEw4/s400/1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure 1.&lt;br /&gt;&lt;br /&gt;From the source code, I get some findings which are listing as follow:&lt;br /&gt;&lt;br /&gt;Finding 1, thread ID is limited starting from 0 to 9.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Finding 2, variable named delay that is used to control the processing time of thread within 2 seconds. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Finding 3, variable named sema that is a threading semaphore and it is predefined running maximum 3 threads each time (sema = threading.BoundedSemaphore(value=3)).&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;Finding 4, variable named mutex that is used to create the read lock for the thread (mutex = threading.RLock()).&lt;br /&gt;&lt;br /&gt;Finding 5, method named acquire(), it takes an optional wait flag, which can be used to avoid blocking if the lock is held by someone else.&lt;br /&gt;&lt;br /&gt;Finding 6, variable named running that is used to count the number of running threads.&lt;br /&gt;&lt;br /&gt;Finding 7, each time when TestThread() is running, console will print out a thread ID and the expected running time. Then the method named sema.acquire() will check the thread number whether is over 3 or not, if no, mutex will create a read lock for the waiting thread, then adding 1 to the variable named running.&lt;br /&gt;&lt;br /&gt;Finding 8, when one of three thread has been running completely, mutex will release the read lock of that thread and update the value of variable named running by subtracting 1, then print out that task had been done. Afterwards, one of waiting thread will be locked. This processes are running in loop until 10 threads have run completely.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1245568250822822172?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1245568250822822172/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/05/execise-18.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1245568250822822172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1245568250822822172'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/05/execise-18.html' title='Execise 18'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfstabwa9uI/AAAAAAAAARY/ji-FI-2aEw4/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4643197749080761823</id><published>2009-04-30T03:48:00.000-07:00</published><updated>2009-05-01T08:24:24.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 17'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 17</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exercise 17: Concurrency terms Find definitions for eight terms and concepts used in threaded programming:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Thread Synchronisation&lt;/strong&gt;&lt;br /&gt;Thread synchronization requires that a running thread gain a "lock" on an object before it can access it. The thread will wait in line for another thread that is using the method/data member to be done with it. This is very important to prevent the corruption of program data if multiple threads will be accessing the same data. If two threads try to change a variable or execute the same method at the same, this can cause serious and difficult to find problems. Thread synchronization helps prevent this. (&lt;/span&gt;&lt;a href="http://wiki.answers.com/Q/What_is_Thread_Synchronization"&gt;&lt;span style="font-family:arial;"&gt;http://wiki.answers.com/Q/What_is_Thread_Synchronization&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Locks&lt;/strong&gt;&lt;br /&gt;To make a file or other piece of data inaccessible. File locking is a critical component of all multi-user computer systems, including local-area networks. When users share files, the operating system must ensure that two or more users do not attempt to modify the same file simultaneously. It does this by locking the file as soon as the first user opens it. All subsequent users may read the file, but they cannot write to it until the first user is finished. In addition to file locking, many database management systems support record locking, in which a single record, rather than an entire file, is locked. This enables different users to access different records within the same file without interfering with one another. (&lt;/span&gt;&lt;a href="http://www.webopedia.com/TERM/L/lock.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.webopedia.com/TERM/L/lock.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Deadlock&lt;/strong&gt;&lt;br /&gt;A condition that occurs when two processes are each waiting for the other to complete before proceeding. The result is that both processes hang. Deadlocks occur most commonly in multitasking and client/server environments. Ideally, the programs that are deadlocked, or the operating system, should resolve the deadlock, but this doesn't always happen. A deadlock is also called a deadly embrace. (&lt;/span&gt;&lt;a href="http://webopedia.com/TERM/D/deadlock.html"&gt;&lt;span style="font-family:arial;"&gt;http://webopedia.com/TERM/D/deadlock.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Semaphores&lt;/strong&gt;&lt;br /&gt;A hardware or software flag. In multitasking systems, a semaphore is a variable with a value that indicates the status of a common resource. It's used to lock the resource that is being used. A process needing the resource checks the semaphore to determine the resource's status and then decides how to proceed. (&lt;/span&gt;&lt;a href="http://webopedia.com/TERM/s/semaphore.html"&gt;&lt;span style="font-family:arial;"&gt;http://webopedia.com/TERM/s/semaphore.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;5.Mutex (mutual exclusion)&lt;br /&gt;&lt;/strong&gt;In computer programming, a mutex is a program object that allows multiple program threads to share the same resource, such as file access, but not simultaneously. When a program is started, a mutex is created with a unique name. After this stage, any thread that needs the resource must lock the mutex from other threads while it is using the resource. The mutex is set to unlock when the data is no longer needed or the routine is finished. (&lt;/span&gt;&lt;a href="http://webopedia.com/TERM/m/mutex.html"&gt;&lt;span style="font-family:arial;"&gt;http://webopedia.com/TERM/m/mutex.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6. Thread&lt;/strong&gt;&lt;br /&gt;In programming, a part of a program that can execute independently of other parts. Operating systems that support multithreading enable programmers to design programs whose threaded parts can execute concurrently. (&lt;/span&gt;&lt;a href="http://webopedia.com/TERM/t/thread.html"&gt;&lt;span style="font-family:arial;"&gt;http://webopedia.com/TERM/t/thread.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7. Event&lt;/strong&gt;&lt;br /&gt;An action or occurrence detected by a program. Events can be user actions, such as clicking a mouse button or pressing a key, or system occurrences, such as running out of memory. Most modern applications, particularly those that run in Macintosh and Windows environments, are said to be event-driven, because they are designed to respond to events.&lt;br /&gt;(&lt;/span&gt;&lt;a href="http://webopedia.com/TERM/e/event.html"&gt;&lt;span style="font-family:arial;"&gt;http://webopedia.com/TERM/e/event.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8. Waitable timer&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A waitable timer object is a synchronization object whose state is set to signaled when the specified due time arrives. There are two types of waitable timers that can be created: manual-reset and synchronization. A timer of either type can also be a periodic timer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;A thread uses the &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl02" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl02',this);" href="http://msdn.microsoft.com/en-us/library/ms682492(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;CreateWaitableTimer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; or &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl03',this);" href="http://msdn.microsoft.com/en-us/library/ms682494(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;CreateWaitableTimerEx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; function to create a timer object. The creating thread specifies whether the timer is a manual-reset timer or a synchronization timer. The creating thread can specify a name for the timer object. Threads in other processes can open a handle to an existing timer by specifying its name in a call to the &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl04" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl04',this);" href="http://msdn.microsoft.com/en-us/library/ms684337(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;OpenWaitableTimer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; function. Any thread with a handle to a timer object can use one of the &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl05" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl05',this);" href="http://msdn.microsoft.com/en-us/library/ms687069(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;wait functions&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; to wait for the timer state to be set to signaled.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;A thread can use the &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl08" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl08',this);" href="http://msdn.microsoft.com/en-us/library/ms681985(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;CancelWaitableTimer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; function to set the timer to the inactive state. To reset the timer, call &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl09" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl09',this);" href="http://msdn.microsoft.com/en-us/library/ms686289(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;SetWaitableTimer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. When you are finished with the timer object, call &lt;/span&gt;&lt;a id="ctl00_mainContentContainer_ctl10" onclick="javascript:Track('ctl00_mainContentContainer_ctl00ctl00_mainContentContainer_ctl10',this);" href="http://msdn.microsoft.com/en-us/library/ms724211(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;CloseHandle&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; to close the handle to the timer object.&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;(&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms687012(VS.85).aspx"&gt;&lt;span style="font-family:arial;"&gt;http://msdn.microsoft.com/en-us/library/ms687012(VS.85).aspx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4643197749080761823?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4643197749080761823/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-17_30.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4643197749080761823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4643197749080761823'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-17_30.html' title='Exercise 17'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8605933444223387094</id><published>2009-04-30T00:05:00.000-07:00</published><updated>2009-04-30T03:47:38.690-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 16'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 16-2</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;5. Get the latest PGP software from &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://web.mit.edu/network/pgp.html"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://web.mit.edu/network/pgp.html&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;; install it on two machines and encrypt a message on one machine and decrypt it on the other. Report your findings.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;When i access to the MIT web site, it displays an error that is "The version of PGP available from MIT was significantly out of date and doesn't run on newer computers (at least not reliably)." So i download the PGP softwar from PGPI web site ( &lt;/span&gt;&lt;a href="http://www.pgpi.org/products/pgp/versions/freeware/winxp/8.0/"&gt;&lt;span style="font-family:arial;"&gt;http://www.pgpi.org/products/pgp/versions/freeware/winxp/8.0/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; )&lt;br /&gt;&lt;br /&gt;Then, i apply 30 days trial license (DKLHX-P24TA-3JWW5-CAJ2W-6XGF9-DKC) in PGPI web site. When i have installed the pgp software and i find that the pgp software blocks my internet connection, so that, i can't do that test for you.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;But I can try to explain my understand for you, the procedure as follows:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;1. In your PC, use PGP software to generate a new PGP key (see figure 2 and 3).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;2. In your PC, use PGP software to encrypt a file (see figure 4) with secure user key.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;3. In your PC, use PGP software to export Key to File and transfer the Key to the recipient's computer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;4. In the recipient's PC, open PGP software and select "Import" button to import the received Key.&lt;br /&gt;5. In the recipient's PC, use PGP software for signing the imported key and input the correct passphrase for KEY verification.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;6. In the recipient's PC, open PSP software and select the encryted file, then click the "decrypt and verify" button for file decryption.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;That'all!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SfljJhqwAxI/AAAAAAAAAQ4/gFPsqDHKY10/s1600-h/3.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5330400649277342482" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 263px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SfljJhqwAxI/AAAAAAAAAQ4/gFPsqDHKY10/s400/3.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;Figure 2.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SfljJiu1g7I/AAAAAAAAARA/2RfiiYYLjlI/s1600-h/4.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5330400649562915762" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 268px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SfljJiu1g7I/AAAAAAAAARA/2RfiiYYLjlI/s400/4.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;Figure 3.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/SfljJio7HSI/AAAAAAAAARI/hZQVUw73qhQ/s1600-h/5.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5330400649538116898" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 263px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SfljJio7HSI/AAAAAAAAARI/hZQVUw73qhQ/s400/5.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;Figure 4.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;===============================================&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SfljJiu1g7I/AAAAAAAAARA/2RfiiYYLjlI/s1600-h/4.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;6. The use of digital certificates and passports are just two examples of many tools for validating legitimate users and avoiding consequences such as identity theft. What others exist?&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;Besides use of digital certificates and passports  for validating legitimate users and avoiding consequences such as identity theft, we can use (1) digital signature which is an electronic signature created using a private signing key, (2) biometrics which use physiological or behavioural characteristics to identify an individual and (3) soft token which is an e-authentication mechanism that is stored in a computer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8605933444223387094?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8605933444223387094/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-16-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8605933444223387094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8605933444223387094'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-16-2.html' title='Exercise 16-2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SfljJhqwAxI/AAAAAAAAAQ4/gFPsqDHKY10/s72-c/3.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1272955533231549523</id><published>2009-04-24T20:14:00.000-07:00</published><updated>2009-05-06T08:42:08.599-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 16'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 16-1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Visit an e-commerce website and survey the mode of payment allowed. Would you trust the site with your business?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I also visit an e-commerce website named EasyLife(&lt;/span&gt;&lt;a href="http://www.esdlife.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.esdlife.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) which is a famous online shopping website in hong kong.&lt;br /&gt;&lt;br /&gt;From its website, i find that they allow 2 kinds of payment, they are online payment and offline payment. For online payment, it accepts paying by Visa and Master Card. And for offline payment, it accepts paying by bank transfer and cheque.&lt;br /&gt;&lt;br /&gt;Yes, i trust that site, because it is a very secure site, for exampe,&lt;br /&gt;&lt;br /&gt;a.) Use double firewall.&lt;br /&gt;b.) Use anti-hacking device.&lt;br /&gt;c.) Use token based login system.&lt;br /&gt;d.) Use PKI.&lt;br /&gt;e.) Use data warehouse which has two loading monitor and Crisis Management service.&lt;br /&gt;f.) Use precise anti-virus device.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. What measures should e-commerce provide to create trust among their potential customers? What measures can be verified by customer?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The below Figure 1 (McKnight 2002) depicts the subconstructs of, and linkages among, the trust constructs. Disposition to trust should influence trusting beliefs because it tends to color interpretations of the interpersonal relationship at hand.Gefen (2000) found that disposition to trust influencestrust in vendors. Similarly, disposition to trust shouldpositively influence perceptions of the institutional setting.Figure 1 also shows disposition to trust impactingtrusting intentions directly, but this relation should beweak because it is largely mediated by trusting beliefs.The direct effect of disposition to trust on trusting beliefsis likely to be strongest when both the institutionalcontext and the specific trustee are unfamiliar to thetruster (Bigley and Pierce 1998, Rotter 1971). If one hassizeable experience with an institutional context (butnot with a specific trustee), that experience will directlyinfluence institution-based trust, and the impact of dispositionto trust on trusting beliefs will be largely mediatedby institution-based trust. If a Web user gainsexperience with a specific vendor, the experience may be the dominant influence on trusting beliefs, insteadof dispositional or institution-based trust.Institution-based trust is proposed to relate positivelyto both trusting beliefs and trusting intentions.When a situation feels safe, we tend to believe thatthose in the situation have trustworthy attributes(McKnight et al. 1998). Thus, a consumer who is comfortablewith the Web situation and the security of itsstructures is likely to have high trusting beliefs in aspecific vendor. Similarly, feelings of contextual securityentice us to have trusting intentions.Trusting beliefs will relate positively to trusting intentionsbecause a consumer with high trusting beliefsperceives the Internet vendor to have attributes that enable the consumer to hold a secure willingness todepend on the vendor. Perceptions that the vendor ishonest, for example, encourage the consumer to providepersonal information. TRA research also supportsthis link, in that beliefs strongly predict correspondingintentions (Davis et al. 1989).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfj3XIDuwDI/AAAAAAAAAQo/YNdcGhGBOAU/s1600-h/4.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5330282135665164338" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 297px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfj3XIDuwDI/AAAAAAAAAQo/YNdcGhGBOAU/s400/4.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:0;"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:0;"&gt;&lt;span style="font-size:130%;"&gt;The items used to operationalize the constructs came from a number of sources. Because negatively worded trust items tend to factor separately into distrust (Wrightsman 1991), which is conceptually separate from trust (Lewicki et al. 1998, McKnight andChervany 2001), we used all positively worded items.We did not measure trusting behaviors, a limitation future research should address. For trusting intentions willingness to depend, we adapted a scale that we had previously developed and tested (with Cronbach’s alpha 0.90) for use in organizations, with items largely from Dobing (1993). For trusting intentions-subjective probability of depending, new items were developedto measure three common trust-related Internet behaviors:provide personal information, buy from the vendor,and follow vendor advice. We felt respondents would perceive these intentions to embody vulnerability,as the definition of trusting intentions suggests(Mayer et al. 1995).The trusting beliefs items were adapted from scalesreviewed and summarized in Wrightsman (1991), especially Johnson-George and Swap (1982) and Rempelet al. (1985). In selecting items, we tried to capture the aspects of the belief that were most relevant to the Webcontext. Thus, for competence, we measured perceptions of how well the vendor did its job or how knowledgeable the vendor was (expertness/competence).We excluded dynamism (as a speaker), because it is not relevant to the Internet. The integrity items capturedperceptions of vendor honesty, truthfulness, sincerity,and keeping commitments (reliability/dependability).Finally, the benevolence items focused on the vendor acting in the customer's best interest, trying to help, and being genuinely concerned.No specific structural assurance or situational normalityitems were located. Typically, sociologists have either observed this kind of trust or, in Garfinkel’s(1963) case, experimentally created it.2 We developed situational normality items to capture the same threedimensions—competence, benevolence, and integrity—by adapting the trusting beliefs items to reflect perceptions about Web vendors in general (instead of a specificWeb vendor). For structural assurance, we utilized terms like “safeguards,” “protect,” “robust,” and “encryption”to refer to the structures making the Web safe.As with trusting beliefs, we dimensionalized faith inhumanity into competence, benevolence, and integrity.Existing items were adapted from scales compiled in Wrightsman (1991). The items refer to attributes of people in general, distinguishing them from beliefs about aspecific Web-based vendor. No items corresponding to the definition of trusting stance were found, so we createda new scale for this subconstruct with three items. Nontrust items were adapted from existing scales:Agarwal and Prasad (1998) for personal innovativenessand Cheskin (1999) for perceived site quality. Webexperience was operationalized as the frequency of useof Web newspapers, news groups, information onproducts, and shopping, based on Georgia Institute ofTechnology’s Graphics, Visualization, and Usability surveys of Web usage www.cc.gatech.edu/gvu/user_surveys/.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:0;"&gt;&lt;/span&gt;Measures can be verified by customer that can use a questionnaire that included measures of disposition to trust,institution-based trust, Web experience, and personal innovativeness.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3.Visit the Versign web site - what solutions does it offer for e-commerce?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;VeriSign, Inc. (Nasdaq: &lt;/span&gt;&lt;a href="https://investor.verisign.com/stockquote.cfm" target="_blank"&gt;&lt;span style="font-family:arial;"&gt;VRSN&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) is the trusted provider of Internet infrastructure services for the networked world. Billions of times each day, its &lt;/span&gt;&lt;a href="http://www.verisign.com/ssl/ssl-information-center/index.html"&gt;&lt;span style="font-family:arial;"&gt;SSL&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, &lt;/span&gt;&lt;a href="http://www.verisign.com/authentication/index.html"&gt;&lt;span style="font-family:arial;"&gt;identity and authentication&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, and &lt;/span&gt;&lt;a href="http://www.verisign.com/information-services/naming-services/index.html"&gt;&lt;span style="font-family:arial;"&gt;domain name services&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; allow companies and consumers all over the world to engage in trusted communications and commerce. In details, please access their commerce solutions introduction page at &lt;/span&gt;&lt;a href="http://www.verisign.com/verisign-business-solutions/commerce-enablement-solutions/index.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.verisign.com/verisign-business-solutions/commerce-enablement-solutions/index.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, it introduce how security for e-commerce service they can provide.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Visit the TRUSTe web site. Describe what services and solutions are offered.&lt;/strong&gt;&lt;br /&gt;I have visited TRUSTe web site (&lt;a href="http://truste.org/"&gt;http://truste.org/&lt;/a&gt;) and have studies all its service and solution which are listed in the following:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Service:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;TRUSTe's services support online business growth by allowing companies to communicate their &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;commitment to privacy, and letting consumers know which businesses they can trust.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;a.) Develop standards and a certification program for downloadable consumer desktop applications. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b.) Offer a “Roadmap to Trust” starter package, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;c.) In order to protect customer brand with backend solutions. Maintain a good reputation with TRUSTe's automated compliance scanning and breach alerts. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;d.)Support growing international business with the TRUSTe EU Safe Harbor Seal Use TRUSTe International Services to certify your privacy policies, resolve disputes, and communicate your privacy leadership in multiple languages. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;McKnight (2002). "Developing and Validating Trust Measuresfor e-Commerce: An Integrative Typology". Received 24th April, 2009 from URL - &lt;/span&gt;&lt;a href="https://www.msu.edu/~mcknig26/Measures.pdf"&gt;&lt;span style="font-family:arial;"&gt;https://www.msu.edu/~mcknig26/Measures.pdf&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1272955533231549523?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1272955533231549523/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-16.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1272955533231549523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1272955533231549523'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-16.html' title='Exercise 16-1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfj3XIDuwDI/AAAAAAAAAQo/YNdcGhGBOAU/s72-c/4.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6119302875227555726</id><published>2009-04-24T20:08:00.000-07:00</published><updated>2009-04-28T12:40:29.746-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 15'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 15</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. What makes a firewall a good security investment? Accessing the Internet, find two or three firewall vendors. Do they provide hardware, software or both?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Wikipedia (2009) states that a firewall is a part of a computer system or network that is designed to block unauthorized access while permitting outward communication. It is also a device or set of devices configured to permit, deny, encrypt, decrypt, or proxy all computer traffic between different security domains based upon a set of rules and other criteria.&lt;br /&gt;&lt;br /&gt;Bidgoli (2004) tells me that security is a critical aspect of extranet development, which extends to both the orgranization and its partners. Security issues must be considered through the design, implementation, and management of any extranet applications. Developing a security plan for an extranet application should begin with a risk assessment to identify the pontential sources of threat to the network, how likely these threats are to occur, and the investment (cost) in security that will be required. The level of security investment will vary depending on the nature of the extranet application, the threats of intrusion, and the sensitivity of the information shared on the extranet. Extranet security should consider authentication and access control, privacy and data integrity.&lt;br /&gt;&lt;br /&gt;As firewall is used in access control, it makes a good security investment.&lt;br /&gt;&lt;br /&gt;I have found that Cisco is a hardware firewall vendor and ZoneAlarm is a software firewall vendor. Please see the following link which introduces their famous product:&lt;br /&gt;&lt;br /&gt;For Cisco, please go to &lt;/span&gt;&lt;a href="http://www.cisco.com/en/US/products/ps5708/Products_Sub_Category_Home.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.cisco.com/en/US/products/ps5708/Products_Sub_Category_Home.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;For ZoneAlarm, please go to&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.zonealarm.com/security/en-us/zonealarm-pc-security-free-firewall.htm"&gt;&lt;span style="font-family:arial;"&gt;http://www.zonealarm.com/security/en-us/zonealarm-pc-security-free-firewall.htm&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Find our if your university or workplace has a backup policy in place. Is it followed and enforced?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I can't find any backup policy from my university and workplace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;3. Most of the antivirus software perform an active scanning of the use of activity on the internet, detecting downloads and attachments in e-mails. Hackers have readily available resources to create new viruses. How easy is it to find a virus writing kit? Search the Internet and find such a tool, For example, see what you can find at &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://vx.netlux.org/dat/vat.shtml"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://vx.netlux.org/dat/vat.shtml&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;I use a search engine named google and input the search criteria such "virus writing kit" or "virus creation kit" or "virus construction kit", i can find there is a lots of that type of tools for me to download....&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;For example: &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Virus-Maker kit (&lt;/span&gt;&lt;a href="http://pankajhackingsite.wetpaint.com/page/Virus+Kit?t=anon"&gt;&lt;span style="font-family:arial;"&gt;http://pankajhackingsite.wetpaint.com/page/Virus+Kit?t=anon&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;A Basic Virus Writing Primer (&lt;/span&gt;&lt;a href="http://www.scribd.com/doc/2530842/A-Basic-Virus-Writing-Primer"&gt;&lt;span style="font-family:arial;"&gt;http://www.scribd.com/doc/2530842/A-Basic-Virus-Writing-Primer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Virus writing (&lt;/span&gt;&lt;a href="http://www.smokinfiles.com/getfile.php?i=3979&amp;amp;dl=Virus%20Writing%20Full%20Version%20Download"&gt;&lt;span style="font-family:arial;"&gt;http://www.smokinfiles.com/getfile.php?i=3979&amp;amp;dl=Virus%20Writing%20Full%20Version%20Download&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;The Smeg Virus Construction Kit  (&lt;/span&gt;&lt;a href="http://www.ca.com/us/securityadvisor/pest/pest.aspx?id=6158"&gt;&lt;span style="font-family:arial;"&gt;http://www.ca.com/us/securityadvisor/pest/pest.aspx?id=6158&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Blue Screen Virus Creation (h&lt;/span&gt;&lt;a href="http://www.10001downloads.com/s/virus-construction-kit.html"&gt;&lt;span style="font-family:arial;"&gt;ttp://www.10001downloads.com/s/virus-construction-kit.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.pandasecurity.com/spain/homeusers/security-info/about-malware/encyclopedia/overview.aspx?IdVirus=53554&amp;amp;sind=0"&gt;&lt;span style="font-family:arial;"&gt;EMFTrojan: MS04-032 virus construction kit (http://www.pandasecurity.com/spain/homeusers/security-info/about-malware/encyclopedia/overview.aspx?IdVirus=53554&amp;amp;sind=0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;From netlux web  (&lt;/span&gt;&lt;a href="http://vx.netlux.org/"&gt;&lt;span style="font-family:arial;"&gt;http://vx.netlux.org&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) which contains a massive, continuously updated collection of magazines, virus samples, virus sources, polymorphic engines, virus generators, virus writing tutorials, articles, books, news archives etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;References:&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Wikipedia (2009). “Firewall”. Received 20th April, 2009 from URL - &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Firewall"&gt;&lt;span style="font-family:arial;"&gt;http://en.wikipedia.org/wiki/Firewall&lt;/span&gt;&lt;/a&gt;&lt;a href="http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci211838,00.html"&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Bidgoli (2004). John Wiley and Sons. "The Internet encyclopedia ", "securtiy of internet", p278.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6119302875227555726?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6119302875227555726/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-15.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6119302875227555726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6119302875227555726'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-15.html' title='Exercise 15'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6355663187781271092</id><published>2009-04-24T20:01:00.000-07:00</published><updated>2009-04-28T11:04:32.638-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 14'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 14</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. What are cookies and how are they used to improve security?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Cookie is information that a Web site puts on your hard disk so that it can remember something about you at a later time. (More technically, it is information for future use that is stored by the server on the client side of a client/server communication.) Typically, a cookie records your preferences when using a particular site. Using the Web's Hypertext Transfer Protocol (HTTP), each request for a Web page is independent of all other requests. For this reason, the Web page server has no memory of what pages it has sent to a user previously or anything about your previous visits. A cookie is a mechanism that allows the server to store its own information about a user on the user's own computer. You can view the cookies that have been stored on your hard disk (although the content stored in each cookie may not make much sense to you). The location of the cookies depends on the browser. Internet Explorer stores each cookie as a separate file under a Windows subdirectory. Netscape stores all cookies in a single cookies.txt fle. Opera stores them in a single cookies.dat file. (Techtarget, 2009)&lt;br /&gt;&lt;br /&gt;Cookies are used to improve security, for example, a cookie contains a random chain (session identification), which is unique and difficult to decipher, and valid only for a given period of time. Only the server should be able to associate the user's preferences with the session identifier. Thus, when the session cookie expires, it becomes useless and should not contain any information relating to the user. (Kioskea, 2009)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Can the use of cookies be a security risk?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Yes, they can, for example, If the cookie contains direct user information, and its lifespan don't be as close as possible to the duration of the user's session. On the other hand, the data stored in the cookie is sent to the server, to the database where the user entered his data.&lt;br /&gt;Thus, the cookie can be a potential security risk when contain user information.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Techtarget (2009). “Cookie”. Received 20th April, 2009 from URL -&lt;br /&gt;&lt;/span&gt;&lt;a href="http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci211838,00.html"&gt;&lt;span style="font-family:arial;"&gt;http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci211838,00.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Kioskea (2009). “Cookies”. Received 20th April, 2009 from URL -&lt;br /&gt;&lt;/span&gt;&lt;a href="http://en.kioskea.net/contents/securite/cookies.php3"&gt;&lt;span style="font-family:arial;"&gt;http://en.kioskea.net/contents/securite/cookies.php3&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6355663187781271092?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6355663187781271092/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-14.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6355663187781271092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6355663187781271092'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-14.html' title='Exercise 14'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4459778146468257838</id><published>2009-04-24T19:57:00.000-07:00</published><updated>2009-04-28T10:38:59.505-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 13'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 13</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. List and describe your experiences with a secure Web site. Some examples may be:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* University enrolment;&lt;br /&gt;* Online banking, auctions, real estate;&lt;br /&gt;* booking a cheap air ticket or concert ticket;&lt;br /&gt;* shopping online for a book, software or a CD.&lt;br /&gt;&lt;br /&gt;I have an experiences on using the Online banking service for checking the deposit and buying stocks. I check that the web site of that bank uses 128-bit SSL encryption, Unique user name and password to logon, Security Device and Automatic time-out to protect personal data.&lt;br /&gt;Therefore, It is very secure for us to do the online ebanking.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. What is SET and how does it compare to SSL as a platform for secure electronic transaction?Is SET in common use?&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;SET (Secure Electronic Transaction) protocol is an open industry standard developed for the secure transmission of payment information over the Internet and other electronic networks.   SET has the strong support of two major league credit card companies: Visa and MasterCard. It is apparent that SET is the more secure protocol but with this added security is added complexity and cost. The nature of the transactions, one can see that SET possesses a rather intricate nature that double checks the transaction at least three times.   This is in addition to the initial safeguard protection: the issuance of a “certificate” that enables a party to place orders in a highly secure and if needed, anonymous environment.  (Clough, 2006) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;SSL is built into all major browsers and web servers; therefore simply installing a digital certificate turns on their SSL capabilities. This of course makes SSL easier for a business to use at the outset.   These are the sorts of market advantages that perhaps develop when a protocol like SSL has been invented by and has the support of the major computer players like Microsoft and Netscape rather than “conventional” credit extending companies such as Visa and MasterCard. In the end what we have is a comparison between an old standby that performs adequately, is relatively easy to use and is widely accepted (SSL) and a possibly up and coming protocol that offers more protections for sure but at what cost (SET).   (Clough, 2006) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Yes, SET is very common because it  is an open industry standard developed for the secure transmission of payment information over the Internet and other electronic networks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;In SET, a certificate is a public key that has been digitally signed by a trusted authority (usually the cardholder's financial institution) to identify the user of the public key. SET defines the following certificate types: signature, key encipherment, certificate signature, and CRL signature. See:   &lt;/span&gt;&lt;a href="http://www.setco.org/glossary.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.setco.org/glossary.html &lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;(Clough, 2006) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;Referances:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Webopedia (2009). “SET”. Received 20th April, 2009 from URL -&lt;/span&gt;&lt;br /&gt;&lt;a href="http://e-momm.webopedia.com/TERM/S/SET.html"&gt;&lt;span style="font-family:arial;"&gt;http://e-momm.webopedia.com/TERM/S/SET.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Clough (2006). "Comparing and Contrasting SSL and SET".  Received 20th April, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.savagerun.com/SSLSET.htm"&gt;&lt;span style="font-family:arial;"&gt;http://www.savagerun.com/SSLSET.htm&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4459778146468257838?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4459778146468257838/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-13.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4459778146468257838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4459778146468257838'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-13.html' title='Exercise 13'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8008392218942247389</id><published>2009-04-24T19:54:00.000-07:00</published><updated>2009-04-28T10:23:13.306-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 12'/><title type='text'>Exercise 12</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Find out about SET and the use of RSA 128-bit encrption for e-commerce.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SET, short for Secure Electronic Transaction, Webopedia(2009) states that is a standard that will enable secure credit card transactions on the Internet. SET has been endorsed by virtually all the major players in the electronic commerce arena, including Microsoft, Netscape, Visa, and Mastercard. By employing digital signatures, SET will enable merchants to verify that buyers are who they claim to be. And it will protect buyers by providing a mechanism for their credit card number to be transferred directly to the credit card issuer for verification and billing without the merchant being able to see the number.&lt;br /&gt;&lt;br /&gt;RSA is stand for Rivest, Shamir, Adelman, Keen(1997) states that is a cryptographic system based on public keys for both encryption and authentication. Advantages of RSA over other public key cryptosystems include the fact that it can be used for both encryption and authentication. In the RSA public key cryptosystem used for securing electronic cash transactions; both encryption and decryption are done by raising the digital representation of a message by a power that is the appropriate key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. What can you find out about network and host-based intrusion detection system?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;ISS(2007) tell me that Most traditional intrusion detection systems (IDS) take either a network or a host-based approach to recognizing and deflecting attacks. In either case, these products look for attack signatures, specific patterns that usually indicate malicious or suspicious intent. When an IDS looks for these patterns in network traffic, it's network-based. When an IDS looks for attack signatures in log files, it's host-based.&lt;br /&gt;&lt;br /&gt;A next-generation IDS, therefore, must include tightly integrated host and network&lt;br /&gt;components. Combining these two technologies will greatly improve network resistance to attacks and misuse, enhance the enforcement of security policy and introduce greater flexibility in deployment options.&lt;br /&gt;&lt;br /&gt;The graphic below illustrates how network- and host-based intrusion detection techniques interact to create a more powerful network defense. Some events are detectable by network means only. Others that are detectable only at the host. Several require both types of intrusion detection to function properly.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfc29zZI-gI/AAAAAAAAAQg/jZEJ0aJvngQ/s1600-h/1.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5329789119411845634" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 302px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfc29zZI-gI/AAAAAAAAAQg/jZEJ0aJvngQ/s400/1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3. What is 'phishing'?&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;In the field of computer security, Wikipedia (2009) states that phishing is the criminally fraudulent process of attempting to acquire sensitive information such as usernames, passwords and credit card details by masquerading as a trustworthy entity in an electronic communication. Communications purporting to be from popular social web sites, auction sites, online payment processors or IT Administrators are commonly used to lure the unsuspecting. Phishing is typically carried out by e-mail or instant messaging,[1] and it often directs users to enter details at a fake website whose look and feel are almost identical to the legitimate one. Even when using server authentication, it may require tremendous skill to detect that the website is fake. Phishing is an example of social engineering techniques used to fool users,[2] and exploits the poor usability of current web security technologies.[3] Attempts to deal with the growing number of reported phishing incidents include legislation, user training, public awareness, and technical security measures.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Webopedia (2009). “SET”. Received 20th April, 2009 from URL -&lt;br /&gt;&lt;/span&gt;&lt;a href="http://e-momm.webopedia.com/TERM/S/SET.html"&gt;&lt;span style="font-family:arial;"&gt;http://e-momm.webopedia.com/TERM/S/SET.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Keen(1997), Harvard Business Press, “On-line profits”, RSA Encryption, pp. 234-235.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;ISS (2007). “Network- vs. Host-based Intrusion Detection”. Received 20th April, 2009 from URL - &lt;/span&gt;&lt;a href="http://documents.iss.net/whitepapers/nvh_ids.pdf"&gt;&lt;span style="font-family:arial;"&gt;http://documents.iss.net/whitepapers/nvh_ids.pdf&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Wikipedia (2009). “Phishing”. Received 20th April, 2009 from URL - &lt;/span&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Phishing"&gt;&lt;span style="font-family:arial;"&gt;http://en.wikipedia.org/wiki/Phishing&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8008392218942247389?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8008392218942247389/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-12.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8008392218942247389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8008392218942247389'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/exercise-12.html' title='Exercise 12'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/Sfc29zZI-gI/AAAAAAAAAQg/jZEJ0aJvngQ/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1550793982384378816</id><published>2009-04-15T01:26:00.000-07:00</published><updated>2009-04-15T05:01:29.032-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Elevator Pitch'/><category scheme='http://www.blogger.com/atom/ns#' term='Elevator Pitch 1'/><title type='text'>Elevator Pitch 1</title><content type='html'>&lt;strong&gt;Elevator Pitch 1 - Text Version&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;After I have done all the exercise and workshop in assigment1, I could understand how Ruby is good for rapid software application development. It is because...&lt;br /&gt;&lt;br /&gt;First, Ruby is used Convention over Configuration in order to lower down the programmer effort, especially reduce the program code.&lt;br /&gt;Second, Ruby supports Automated DB Model Mapping which let the programmer that need not create many connection string to access the DB to do the query, insert, update and delete.&lt;br /&gt;Third, Ruby supports full Stack of MVC Framework, it is well-defined each part of responsibility during web application development and let the code structure be more clearly. In the real case, when I am doing the online taxi booking system, I really think Ruby is very convenience for writing a program in an easy mode, for example,&lt;br /&gt;&lt;br /&gt;In ruby, I can use rake to create the table in mysql when the db schema has been pre-defined,&lt;br /&gt;moreover, I can call the data from mysql in anywhere of my web application.&lt;br /&gt;&lt;br /&gt;Also, I can use scaffolding to generate program codes dynamically which follows with the CRUD schema. Therefore, I just need to edit the View file for my web application to build up the interface and add the validation code for user input only.&lt;br /&gt;&lt;br /&gt;That's all. Honestly, Ruby increases the productivity of web application development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=============================================================&lt;br /&gt;The audio version of elevator pitch which has 220 words within 2mins has been uploaded to EASTS.&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1550793982384378816?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1550793982384378816/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/elevator-pitch-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1550793982384378816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1550793982384378816'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/elevator-pitch-1.html' title='Elevator Pitch 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5035827920835239934</id><published>2009-04-14T20:52:00.000-07:00</published><updated>2009-04-14T22:04:44.470-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FocusGroup1'/><category scheme='http://www.blogger.com/atom/ns#' term='FocusGroup'/><title type='text'>FocusGroup1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Share my encountered problem and soluton during use of Ruby and Rails.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;a.) ERROR 1045 (28000): Access denied for user &lt;/strong&gt;&lt;/span&gt;&lt;a href="mailto:"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;'-root'@'localhost'&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt; (using password:NO)&lt;/strong&gt;&lt;br /&gt;When the web application connect to mysql database, it prompts out an error "ERROR 1045 (28000): Access denied for user &lt;/span&gt;&lt;a href="mailto:"&gt;&lt;span style="font-family:arial;"&gt;'-root'@'localhost'&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; (using password:NO)"&lt;br /&gt;&lt;br /&gt;Solution: Use phpmyadmin to change the root password.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;b.) Undefined method 'scaffold' for TaxiController:Class&lt;br /&gt;&lt;/strong&gt;When i am using scaffold in my Taxi Controller [scaffold :taxi]]to dynamic generate the web application, i encounter an issue that is undefined method 'scaffold' for Taxicontroller:class.&lt;br /&gt;&lt;br /&gt;Solution: Install the scaffolding plugin by issuing the command "plugin install scaffolding"&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;c.) Undefined method 'paginate' for #&lt;/strong&gt;&lt;/span&gt;&lt;?xml:namespace prefix = taxicontroller /&gt;&lt;taxicontroller:0x3786088&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt; TaxiController&lt;/strong&gt;&lt;br /&gt;After i have successfully installed the scaffold plugin, i re-run the taxi web application in the browser, i encounter an issue that is undefined method 'paginate' for # TaxiController&lt;/span&gt;&lt;taxicontroller:0x3786088&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;so, i search the plugin from web in order to install that plugin...But..&lt;br /&gt;after issuing the command : ruby script/plugin install &lt;/span&gt;&lt;a href="http://tools.assembla.com/svn/breakout/breakout/vender/plugins/classic_pagination"&gt;&lt;span style="font-family:arial;"&gt;http://tools.assembla.com/svn/breakout/breakout/vender/plugins/classic_pagination&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;,&lt;br /&gt;that plugin still does not install properly as the classic_pagination in taxiapp\vendor\plugins\classic_pagination is an empty directory.&lt;br /&gt;&lt;br /&gt;Solution: Download classic_pagination plugin in my pc and extract it in&lt;br /&gt;"vendor\plugins\classic_pagination" under the taxi web application.&lt;/span&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;strong&gt;d.) Web application interface design issue&lt;/strong&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;It is difficult for us to build up a professional interface within a limited time using html editor.&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;Solution: Download a dreamweaver plugin named rubyweaver in order to let dreameaver support rhtml format from &lt;a href="http://rubyweaver.gilluminate.com/download"&gt;http://rubyweaver.gilluminate.com/download&lt;/a&gt;.&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;strong&gt;e.) Time is in long format after querying from mysql&lt;/strong&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;Background: In workshop 3, I define a column named time_required in mysql with the datatype that is time, when i use ruby to get resultset of that records, i find that the time_required value is in long time format like "Sat Jan 01 02:05:40 +0800 2000"&lt;br /&gt;&lt;br /&gt;Solution: use strftime to get the hour and minute in order to control the timeformat, for example, passenger.time_required.strftime("%I:%M%p")&lt;br /&gt;&lt;/span&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;strong&gt;f.) JobID does not be auto-increment during the table altering.&lt;/strong&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;br /&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;Backgroud: In workshop 3, I need to create JobID with auto-increment manner, when i alter that column attribute, mysql does not allow JobID being auto-increment, it is because the column named ID already be auto- increment, it does not allow 1 table having 2 columns that is using auto-increment.&lt;br /&gt;&lt;br /&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;p&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;Solution: Create a JobID generator which will automatically plus one after getting the last recordset of JOBID, for example&lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/p&gt;&lt;p&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;@getResultSetJobID = Passenger.find(:all).last.job_id &lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/p&gt;&lt;p&gt;&lt;taxicontroller:0x3786088&gt;&lt;taxicontroller:0x3786088&gt;@newJobID = @getResultSetJobID+1 &lt;/taxicontroller:0x3786088&gt;&lt;/taxicontroller:0x3786088&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5035827920835239934?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5035827920835239934/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/focusgroup1.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5035827920835239934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5035827920835239934'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/focusgroup1.html' title='FocusGroup1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4143878439198648262</id><published>2009-04-14T19:39:00.000-07:00</published><updated>2009-04-14T20:51:34.674-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 4'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 4-part 2</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;Challenge Problems: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;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.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;a.) Create a ruby file named dognames with the following code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SeVQXp4UW6I/AAAAAAAAAP4/3vpSYBPo8Lg/s1600-h/1.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5324750501744761762" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 253px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SeVQXp4UW6I/AAAAAAAAAP4/3vpSYBPo8Lg/s400/1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Code Explanation: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;First, create a method name dogname.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Second, print out a message to ask user for imput three dog names and store the standard input to the variable named dogA, dogB and dogC.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Third, create three varibale which declare null is used to store the order of dog name, they are named first, second and third.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Fourth, use if-elseif-else statement to sort dog name order, if the result is -1, that means the front variable is smaller, for exampe, (a &lt;=&gt; b)==-1.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Fifth, print out the order of the dog name and end the dogname method. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Sixth, execute dogname method.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b.) Execute the dognames.rb by issuing the command "ruby dognames.rb", and the result is showed as below screen dump.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SeVQX600hnI/AAAAAAAAAQA/Dy-8R6sEnMU/s1600-h/2.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5324750506293495410" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 284px; CURSOR: hand; HEIGHT: 335px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SeVQX600hnI/AAAAAAAAAQA/Dy-8R6sEnMU/s400/2.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;2. Write a Ruby program called fizzbuzz.rb that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;a.) Create a ruby file named fizzbuzz with the following code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/SeVQX9ydH0I/AAAAAAAAAQI/UbqnwAo36RM/s1600-h/3.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5324750507088879426" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 330px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SeVQX9ydH0I/AAAAAAAAAQI/UbqnwAo36RM/s400/3.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Code Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;First, declare a variable named num and set the value to 1, &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Second, use while-loop to control the looping between 1 to 100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Third, use if-elseif-else statement to set the conditon, if multiples of three print "Fizz" instead of the number, multiples of five print "Buzz" and multiples of both three and five print "FizzBuzz". &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Fourth, num will plus 1 per each looping.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b.) Execute the fizzbuzz .rb by issuing the command "ruby fizzbuzz .rb", and the result is showed as below screen dump.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SeVQYOGbRCI/AAAAAAAAAQQ/z1Wh2KtcTxk/s1600-h/4.1.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5324750511467611170" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 115px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SeVQYOGbRCI/AAAAAAAAAQQ/z1Wh2KtcTxk/s400/4.1.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/SeVQYNmpFnI/AAAAAAAAAQY/F1GoAy09n5A/s1600-h/4.2.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5324750511334299250" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 137px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SeVQYNmpFnI/AAAAAAAAAQY/F1GoAy09n5A/s400/4.2.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3.Compare the Ruby and Python versions of the dog years calculator:&lt;/strong&gt;&lt;br /&gt;#!/usr/bin/ruby&lt;br /&gt;# The Dog year calculator program called dogyears.rb&lt;br /&gt;&lt;br /&gt;def dogyears&lt;br /&gt;# get the original age&lt;br /&gt;puts “Enter your age (in human years): "&lt;br /&gt;age = gets # gets is a method for input from keyboard&lt;br /&gt;puts # is a method or operator for screen output&lt;br /&gt;&lt;br /&gt;#do some range checking, then print result&lt;br /&gt;if age &lt;&gt; 110&lt;br /&gt;puts "Frankly, I don't believe you."&lt;br /&gt;else&lt;br /&gt;puts "That's", age*7, "in dog years."&lt;br /&gt;end&lt;br /&gt;dogyears&lt;br /&gt;&lt;br /&gt;Python&lt;br /&gt;&lt;br /&gt;#!/usr/bin/python&lt;br /&gt;# The Dog year calculator program called dogyears.py&lt;br /&gt;&lt;br /&gt;def dogyears():&lt;br /&gt;# get the original age&lt;br /&gt;age = input("Enter your age (in human years): ")&lt;br /&gt;print # print a blank line&lt;br /&gt;&lt;br /&gt;# do some range checking, then print result&lt;br /&gt;if age &lt;&gt; 110:&lt;br /&gt;print "Frankly, I don't believe you."&lt;br /&gt;else:&lt;br /&gt;print "That's", age*7, "in dog years."&lt;br /&gt;&lt;br /&gt;### pause for Return key (so window doesn't disappear)&lt;br /&gt;raw_input('press Return&gt;')&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;dogyears()&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;===========================================&lt;br /&gt;&lt;br /&gt;There are some different codes syntax between Ruby and Pythob which are listed in the following&lt;br /&gt;&lt;br /&gt;1.Getting standard Input Ruby uses get, but Python uses input&lt;br /&gt;2. Printing out the messageRuby uses puts, but Python uses print&lt;br /&gt;3.The syntax of if-statement is differenta.)Ruby does not need the symbol -&gt; “:” after the if-conditonal, but Python needsb.) Ruby uses “elsif” in if-elseif-else statement, but Python uses elif.&lt;br /&gt;4.)Ruby does not need call the method in the main(), but Python needs.&lt;br /&gt;&lt;br /&gt;In the dogyear program, actually, both of them do the same thing that get the input from console and verify the input integer whether is smaller than zero, if yes , print out “Negative age?!? I don't think so” if no, verify it whether is smaller than 3 and older than 110, if yes, print out “Frankly, I don't believe you.”, and finally, if all condition is not true, it let the input integer times 7 and print out "That's", then print out the value of input integer which has been already timed 7 and finally print out "in dog years." &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4143878439198648262?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4143878439198648262/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-4-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4143878439198648262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4143878439198648262'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-4-part-2.html' title='Workshop 4-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SeVQXp4UW6I/AAAAAAAAAP4/3vpSYBPo8Lg/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7186394766172863249</id><published>2009-04-07T20:57:00.000-07:00</published><updated>2009-04-14T08:07:04.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 3'/><title type='text'>Workshop 3-part 2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Review previous work:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;From workshop 3-part1, we have already created:&lt;br /&gt;1.) A web application named taxiapp&lt;br /&gt;2.) A model named passenger&lt;br /&gt;3.) A table named passengers in taxiapp_test, taxiapp_production and taxiapp_development&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Use of Scaffolding in online taxi booking system&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I will try to use scaffolding in online taxi booking in this time.&lt;br /&gt;&lt;br /&gt;1.) Install plugin named scaffold for online taxi booking system in the taxiapp directory by issuing the command [ruby script\plugin install scaffolding ]&lt;br /&gt;&lt;br /&gt;2.) Install plug-in named paginate in the taxiapp directory by issuing the command&lt;br /&gt;[ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination]&lt;br /&gt;&lt;br /&gt;REMARK: if the web site is not available, you can download the classic_pagination package from web and place it in yourApplicationDir\vendor\plugins\., or send a package request mail to me at &lt;/span&gt;&lt;a href="mailto:samkwongfw@gmail.com"&gt;&lt;span style="font-family:arial;"&gt;samkwongfw@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;3. Install plugin named validates_date_time and date_time_text_field_helpers.&lt;br /&gt;&lt;br /&gt;4.) Code generation of explicit controller and view for customizable interface by issuing the command in the taxiapp directory - "ruby script/generate scaffold passenger".&lt;br /&gt;&lt;br /&gt;5.) Modify the controller file named passengers_controller.rb from using erb format to rhtml format, for example:&lt;br /&gt;format.html # index.html.erb to format.html # index.rhtml&lt;br /&gt;format.html # show.html.erb to format.html # show.rhtml&lt;br /&gt;format.html # new.html.erb to format.html # new.rhtml&lt;br /&gt;&lt;br /&gt;6.) Rename the view file from *.html.erb to *.rhtml.&lt;br /&gt;&lt;br /&gt;7.) Configure Dreamweaver to support rhtml format in order to create a beautiful interface.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Download Rybyweaver from &lt;/span&gt;&lt;a href="http://rubtweaver.gilluminate.com/download"&gt;&lt;span style="font-family:arial;"&gt;http://rubtweaver.gilluminate.com/download&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Install rubweaver by double-click the mxp file, then, it will be automatically started the installer.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;8.) Create a simple search engine for this web application&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;In the model, defines a fuction with following code:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;def self.search(search) &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;if search find(:all, :conditions =&gt; ['name LIKE ?', "%#{search}%"]) else find(:all) end&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;end &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;In the controller, tell it to use that search function in index page&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;@passengers = Passenger.search(params[:search])&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;In the index page of view, call the search function in the defined interface with following code&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;text_field_tag :search, params[:search] &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;submit_tag "Search", :name =&gt; nil &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;9.) Create a Job ID auto-generator with following code&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;@getResultSetJobID = Passenger.find(:all).last.job_id &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;@newJobID = @getResultSetJobID+1 %&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;10.) Define Input Validation in model&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;validates_date :date&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;validates_time :time_required&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;validates_presence_of :name,:contact_number,:suburb_origin,:street,:street_number,:suburb_destination,:message=&gt;'Error Message: Field cannot be empty'&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;11.) Test the application by&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;1. Create a new order - ok &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;a.) Auto create the job ID -ok &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;b.) Input Vaildation -k&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;2. Show the new order - ok&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;3. Edit the new order 0k&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;4. Search the new order ok&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;5. Destory the new order -ok&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Please see the video for referance&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;object width="800" height="600" class="BLOG_video_class" id="BLOG_video-21cd13f7d2bd7d75" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v2.nonxt8.googlevideo.com/videoplayback?id%3D21cd13f7d2bd7d75%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330028594%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DDF01A2936B6BBB6946A6E166D79ABFE8CEC3AD7.54D0921FB31FC8552EF0F1B349D0A34A612B4FB5%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D21cd13f7d2bd7d75%26offsetms%3D5000%26itag%3Dw160%26sigh%3D3D-GX3AxtRAt5X93aVK8US2qfRk&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="800" height="600" bgcolor="#FFFFFF"flashvars="flvurl=http://v2.nonxt8.googlevideo.com/videoplayback?id%3D21cd13f7d2bd7d75%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330028594%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DDF01A2936B6BBB6946A6E166D79ABFE8CEC3AD7.54D0921FB31FC8552EF0F1B349D0A34A612B4FB5%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D21cd13f7d2bd7d75%26offsetms%3D5000%26itag%3Dw160%26sigh%3D3D-GX3AxtRAt5X93aVK8US2qfRk&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7186394766172863249?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=21cd13f7d2bd7d75&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7186394766172863249/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-3-part-2.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7186394766172863249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7186394766172863249'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-3-part-2.html' title='Workshop 3-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-9047997651498510473</id><published>2009-04-07T20:35:00.000-07:00</published><updated>2009-04-14T19:23:39.967-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 4'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 4-part 1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;TO-DO&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Spend some time moving your way through the 46 Ruby coding examples in the Ruby Tutorial with Code from &lt;/strong&gt;&lt;/span&gt;&lt;a href="http://www.fincher.org/tips/Languages/Ruby/"&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;http://www.fincher.org/tips/Languages/Ruby/&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Partially Done!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. What are the syntax differences in the way that Ruby and Javascript use the if statement?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;The syntax of Ruby's If statement which refers to tutorialspoint(2009) at &lt;a href="http://www.tutorialspoint.com/ruby/ruby_if_else.htm"&gt;http://www.tutorialspoint.com/ruby/ruby_if_else.htm&lt;/a&gt;, that is..&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;=================&lt;br /&gt;if conditional [then]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;code...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;[elsif conditional [then]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;                 code...]...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;[else         code...]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;end              &lt;br /&gt;=================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;"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.&lt;br /&gt;&lt;br /&gt;Executes code if the conditional is true. If the conditional is not true, code specified in the else clause is executed.&lt;br /&gt;&lt;br /&gt;An if expression's conditional is separated from code by the reserved word then, a newline, or a semicolon.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/ruby&lt;br /&gt;samAge=20&lt;br /&gt;joeAge=20&lt;br /&gt;if samAge &gt; joeAge  &lt;br /&gt;puts "Sam is older than Joe"&lt;br /&gt;elsif samAge &lt; joeAge  &lt;br /&gt;puts "Sam is younger than Joe"&lt;br /&gt;else  &lt;br /&gt;puts "Sam and Joe are in same age"&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;The syntax of Javascript's If statement which refers to tutorialspoint(2009) at&lt;br /&gt;&lt;a href="http://www.tutorialspoint.com/javascript/javascript_ifelse.htm"&gt;http://www.tutorialspoint.com/javascript/javascript_ifelse.htm&lt;/a&gt;, that is&lt;br /&gt;&lt;br /&gt;=============================================&lt;br /&gt;if (expression 1){  &lt;br /&gt;Statement(s) to be executed if expression 1 is true&lt;br /&gt;}else if (expression 2){&lt;br /&gt;      Statement(s) to be executed if expression 2 is true&lt;br /&gt;}else{   Statement(s) to be executed if no expression is true} &lt;br /&gt; ==============================================&lt;br /&gt;&lt;br /&gt;It is just a series of if statements, where each if is part of the else clause of the previous statement. Statement(s) are executed based on the true condition, if non of the condition is true then else block is executed.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;!--var samAge = 20;&lt;br /&gt;      var joeAge = 20;&lt;br /&gt; if( samAge &gt; joeAge ){&lt;br /&gt;    document.write("&lt;b&gt;Sam is older than Joe&lt;/b&gt;");&lt;br /&gt;   }else if( samAge &lt; joeAge ){&lt;br /&gt;    document.write("&lt;b&gt;Sam is younger than Joe&lt;/b&gt;");&lt;br /&gt;   }else{  document.write("&lt;b&gt;Sam and Joe are in same Age&lt;/b&gt;");}&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;br /&gt;From the above "if" statement examples for Ruby and JavaScript,  there are some different between them.&lt;br /&gt;&lt;br /&gt;Ø      An if expression's conditional, Rudy is separated from code by the reserved word then, a newline, or a semicolon, but Javascript needs to use bracket( ) for condition(s) and and use a symbol { } for action(s)&lt;br /&gt;Ø      Ruby does not need to declare the data type of variable, but Javascipt needs it.&lt;br /&gt;Ø      Ruby uses “elsif”, but Javascript uses “else if”,  for handling the other condition between if -else statement.&lt;br /&gt;Ø      Ruby uses "puts" and the string needs inside double quote,  but Javascript uses document.write("&lt;b&gt; &lt;em&gt;string here&lt;/em&gt; &lt;/b&gt;") for printing out the message.&lt;br /&gt;Ø      Ruby need not use semicolon at the end of each statement, but Javascript must require.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. While Ruby and Python are quite similar, can you find some similarities between Ruby and Javascript? &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Darell(2009)(http://tore.darell.no/pages/javascript_eye_for_the_ruby_guy) stated there are some similarities between Ruby and Javascript which are listed in the following:&lt;br /&gt;&lt;br /&gt;Ø      Both languages are &lt;strong&gt;highly dynamic&lt;/strong&gt;, allowing you to change objects and methods at runtime.&lt;br /&gt;Ø      Both languages are very &lt;strong&gt;object-oriented&lt;/strong&gt;, but with different approaches. Ruby is a class-based, object-oriented language with functional aspects while JavaScript is a functional, object-oriented language with some class-like functionality.&lt;br /&gt;Ø      Variables in JavaScript, like Ruby, &lt;strong&gt;hold data&lt;/strong&gt;. In the case of basic types, they hold the value of the type itself, but in the case of objects it holds a reference to the object itself.&lt;br /&gt;Ø      JavaScript, like Ruby, is &lt;strong&gt;heavily object-oriented,&lt;/strong&gt; and objects are used everywhere.&lt;br /&gt;Ø      Functions in JavaScript, like blocks in Ruby,&lt;strong&gt; provide closure&lt;/strong&gt;. That is, the variables available in the scope where the function is defined are always available in the function, even if it’s called from another scope.JavaScript is prototype-based, but it has the concept of classes. Kind of. There is a new keyword which is very familiar to those having used class-based languages. In Ruby this is not a keyword, but a class method, but the concept is the same: It instantiates a new object from that class. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-9047997651498510473?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/9047997651498510473/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-4-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/9047997651498510473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/9047997651498510473'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-4-part-1.html' title='Workshop 4-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8612663292003407193</id><published>2009-04-07T09:38:00.000-07:00</published><updated>2009-04-11T09:12:42.279-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 3'/><title type='text'>Workshop 3-part 1</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;To DO&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;1. Set up the MySQL tools on your computer as described in section 6 above.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;a.) Download MYSQL GUI ToolsI. Download mysql-gui-tools-5.0-r17-win32.msi from &lt;a href="http://dev.mysql.com/downloads/gui-tools/5.0.htmlII"&gt;http://dev.mysql.com/downloads/gui-tools/5.0.htmlII&lt;/a&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b.) Install MYSQL GUI Tools by following the prompted instruction of MYSQL.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;2. Rails will setup a new application directory for each of your Web application projects. Get InstantRails (Windows) or Locomotive (MacOS) running on your machine. Both packages install Ruby, Rails, a Web server or one called ‘Mongrel’ or another small Ruby Web server called ‘WEBrick’, and MySQL “inside a bubble” as I call it so that others parts of your system are not modified (Similarly ZOPE does with installing its own Web server and Python versions).&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a.) Download InstantRails-2.0-win.zip from &lt;a href="http://rubyforge.org/projects/instantrails/"&gt;http://rubyforge.org/projects/instantrails/&lt;/a&gt;&lt;br /&gt;b.) Extract all zip files from InstantRails-2.0-win.zip to c:\&lt;br /&gt;c.) Check that my instantrails 2.0 covers&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ruby verison is 1.86 patch level 111&lt;/li&gt;&lt;li&gt;rails verison is 2.0.2&lt;/li&gt;&lt;li&gt;mysql version is 5.0.27&lt;/li&gt;&lt;li&gt;mongrel version is 1.1.5&lt;/li&gt;&lt;li&gt;PHP 4.3.10&lt;/li&gt;&lt;/ul&gt;d.) Create a new application by issuing the command -"rails -d mysql C:\rails_apps\taxiapp"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;3. Once Rails is running you at &lt;/strong&gt;&lt;/span&gt;&lt;a href="http://localhost:3000/"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;http://localhost:3000&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;, you need to configure database access. Connection to the database is specified in the config/database.yml file.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a.) Start the web application by issuing the command -"C:\rails_apps\taxiapp&gt;mongrel_rails start -e development" and test by accessing the web page at &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt; by internet browser.&lt;br /&gt;&lt;br /&gt;b.) First, you should create three database manually for test, development and production environments. Second, make sure the root's password does correctly input in config/database.yml file and make sure the info of database is mapping with current existed database in mysql.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;4. Generate the Passenger model by creating the MySQL database and ‘passengers’ table from the information above.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;a.) Create a model named passenger in the taxiapp directory by issuing the command "ruby script\generate model passenger".&lt;br /&gt;&lt;br /&gt;b.) Create three new schema in mysql, they are taxiapp_production, taxiapp_development and taxiapp_test by MYSQl Query Browser.&lt;br /&gt;&lt;br /&gt;c.) Edit the database.yml file which is located at C:\rails_apps\taxiapp\app\config by adding the root's password in development, test and production database configuration field. Please the below configuration:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;development: &lt;/strong&gt;&lt;br /&gt;adapter: mysql encoding: utf8 database: taxiapp_development username: &lt;strong&gt;root&lt;/strong&gt; password: &lt;strong&gt;123456&lt;/strong&gt; host: localhost&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;test: &lt;/strong&gt;&lt;br /&gt;adapter: mysql encoding: utf8 database: taxiapp_test username: &lt;strong&gt;root&lt;/strong&gt; password: &lt;strong&gt;123456 &lt;/strong&gt;host: localhost&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;production:&lt;/strong&gt;&lt;br /&gt;adapter: mysql encoding: utf8 database: taxiapp_production username:&lt;strong&gt; root&lt;/strong&gt; password: &lt;strong&gt;123456&lt;/strong&gt; host: localhost&lt;br /&gt;&lt;br /&gt;d.) Edit C:\rails_apps\taxiapp\db\migrate\001_create_passengers.rb file with following statement&lt;br /&gt;&lt;br /&gt;def self.up&lt;br /&gt;create_table :passengers do t&lt;br /&gt;t.column :name, :string&lt;br /&gt;t.column :job_id, :integer&lt;br /&gt;t.column :contact_number, :string&lt;br /&gt;t.column :suburb_origin, :string&lt;br /&gt;t.column :street, :string&lt;br /&gt;t.column :street_number, :string&lt;br /&gt;t.column :building, :string&lt;br /&gt;t.column :suburb_destination, :string&lt;br /&gt;t.column :passenger_number, :string&lt;br /&gt;t.column :taxi_type, :string&lt;br /&gt;t.column :date, :date&lt;br /&gt;t.column :time_required, :time&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;e.) Create the table in taxiapp_production database by issuing the command "set RAILS_ENV=production" and then "rake db:migrate"&lt;br /&gt;&lt;br /&gt;f.) Create the table in taxiapp_test database by issuing the command "set RAILS_ENV=test" and then "rake db:migrate"&lt;br /&gt;&lt;br /&gt;g.) Create the table in taxiapp_development database by issuing the command "set RAILS_ENV=development" and then "rake db:migrate"&lt;br /&gt;&lt;br /&gt;h.) Use MySQL query browser to check the table named passengers whether exits in taxiapp_test, taxiapp_production and taxiapp_development database.&lt;br /&gt;&lt;br /&gt;From point d to h is telling you how to use the MVC “push-based architecture” in the Ruby on Rails development environment&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;5. Further work on understanding MySQL under Rails by David Mertz:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;a. See “Fast-track your Web apps with Ruby on Rails” at &lt;/span&gt;&lt;a href="http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/"&gt;&lt;span style="font-family:arial;"&gt;http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;done&gt;In this web site, it tells me how to use "scaffolding" to work with mysql. It is exactly same as my work in workshop 1.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b. The “Rolling with Ruby on Rails” series and “Cookbook recipes by Curt Hibbs and others beginning at &lt;/span&gt;&lt;a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;done&gt;It is a good tutorial web site for teaching me how to install and work with Rails.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8612663292003407193?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8612663292003407193/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-3-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8612663292003407193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8612663292003407193'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-3-part-1.html' title='Workshop 3-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-127720479281146128</id><published>2009-04-07T06:13:00.000-07:00</published><updated>2009-04-07T07:16:46.756-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 2-part 2</title><content type='html'>&lt;span style="font-family:arial;"&gt; &lt;strong&gt;Challenge Problems: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. How is Rails structured to follow the MVC pattern?&lt;br /&gt;&lt;/strong&gt;I draw the diagram to explain how is Rails stuctured to follow the MVC patten in my taxi booking system, please refer the below diagram, by the way, you can enlarge the diagram by double-click it.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdtSeuNKifI/AAAAAAAAAPI/ewLm_BQU74k/s1600-h/ror_mvc.jpg"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5321938072421173746" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 290px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdtSeuNKifI/AAAAAAAAAPI/ewLm_BQU74k/s400/ror_mvc.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Diagram 1. MVC on ROR&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Apply the MVC design approach to our Project: Online Taxi Booking System.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;HINT: Begin with a single model, single view and single controller classes. This will give you a head start to the next workshop: Online Taxi Booking System: SQL and Database design.&lt;br /&gt;&lt;br /&gt;Step 1. Create web appliaction project named app by issuing the command "rails -d mysql C:\rails_apps\app".&lt;br /&gt;&lt;br /&gt;Step 2. Create a controller named taxi in the app by issuing the command "ruby script\generate controller taxi".&lt;br /&gt;&lt;br /&gt;Step 3. Create a model named taxi in the app by issuing the command "ruby script\generate model taxi".&lt;br /&gt;&lt;br /&gt;Step 4. Create a rhtml file name index.rhtml in C:\rails_apps\app\app\taxi\list.rhtml.&lt;br /&gt;&lt;br /&gt;Step 5. Create three databases in mysql, they are app_production, app_development and app_test.&lt;br /&gt;&lt;br /&gt;Step 6. Add the root account password of development, test and production database configuration field in the database.yml file which is located at C:\rails_apps\app\app\config\database.yml, please refer the below diagram&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sdta7bWRizI/AAAAAAAAAPQ/mdJBaOScXPo/s1600-h/b.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5321947361668336434" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 391px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Sdta7bWRizI/AAAAAAAAAPQ/mdJBaOScXPo/s400/b.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Diagram 2. Database.yml configuration&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 7. Create a migration file named taxis in the app by issuing the command "ruby script/generate migration taxis".&lt;br /&gt;&lt;br /&gt;This will create the file db\migrate\001_table_name.rb. A migration file contains basic Ruby syntax that describes the data structure of a database table.&lt;br /&gt;&lt;br /&gt;Step 8. Edit C:\rails_apps\app\db\migrate\001_create_taxis.rb and add with following code into CreateTaxis class&lt;br /&gt;&lt;br /&gt;def self.up&lt;br /&gt;create_table :taxis do t&lt;br /&gt;t.column :suburb, :string&lt;br /&gt;t.column :numpass, :string&lt;br /&gt;t.column :taxitype, :string&lt;br /&gt;t.column :time, :datetime&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def self.down&lt;br /&gt;drop_table :taxis&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Step 9. Create the table in app_production database by issuing the command&lt;br /&gt;&lt;br /&gt;"set RAILS_ENV=production" and "rake db:migrate".&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Step 10. Modify the model file of taxi which is located at C:\rails_apps\app\app\models\taxi.rb with following code:&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;validates_presence_of :suburb,:message=&gt;'Error Message, suburb cannot be null!'&lt;br /&gt;validates_presence_of :numpass,:message=&gt;'Error Message, numpass cannot be null!'&lt;br /&gt;validates_presence_of :taxitype,:message=&gt;'Error Message, taxitype cannot be null!'&lt;br /&gt;validates_presence_of :time,:message=&gt;'Error Message, time cannot be null!'&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Step 11. Modify the controller file of taxi which is located at C:\rails_apps\app\app\controllers\taxi_controllers.rb with following code:&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;def list&lt;br /&gt;@taxis = Taxi.find(:all)&lt;br /&gt;@current_time = Time.now&lt;br /&gt;end &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Step 12. Modify the view file named list.rhtml which is located at C:\rails_apps\app\app\views\taxi\list.rhtml. Please refer to the below diagram.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdtdZAjFw8I/AAAAAAAAAPY/P13iPii0g0o/s1600-h/c.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5321950068893664194" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 367px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdtdZAjFw8I/AAAAAAAAAPY/P13iPii0g0o/s400/c.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Diagram 3. List.rhtml&lt;br /&gt;&lt;br /&gt;Step 13. Insert some dummy data into app_production.taxis like this :&lt;br /&gt;mysql&gt; insert into taxis (suburb,numpass,taxitype,time) values ("Hong Kong", "2", "standard", 20090130);&lt;br /&gt;&lt;br /&gt;Step 14. Modify the route.rb which is located at C:\rails_apps\app\config\routes.rb with the following code:&lt;br /&gt;map.connect 'see/', :controller =&gt; 'taxi', :action =&gt; 'list'&lt;br /&gt;&lt;br /&gt;Step 15. Start the web application named app by issuing "mongrel_rails start -e production" in app directortory&lt;br /&gt;&lt;br /&gt;Step 16. Open the internet explorer and access the following url &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://localhost:3000/see"&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/see&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;please refer to the following diagram:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdtfvSEzafI/AAAAAAAAAPo/BX6VhC8i_ZA/s1600-h/d.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5321952650578848242" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 282px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdtfvSEzafI/AAAAAAAAAPo/BX6VhC8i_ZA/s400/d.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;Diagram 4. Result of accessing the &lt;/span&gt;&lt;a href="http://localhost:3000/see"&gt;&lt;span style="font-family:arial;"&gt;http://localhost:3000/see&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-127720479281146128?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/127720479281146128/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-2-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/127720479281146128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/127720479281146128'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-2-part-2.html' title='Workshop 2-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_3ceCcWCWK_g/SdtSeuNKifI/AAAAAAAAAPI/ewLm_BQU74k/s72-c/ror_mvc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-2965322232458464225</id><published>2009-04-06T18:05:00.000-07:00</published><updated>2009-04-07T06:16:55.420-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 2 -Part1</title><content type='html'>&lt;span style="font-family:arial;"&gt;To Do:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;1. Set up a focus group (like a study group for peer learning) to work on the Ruby on Rails workshops via Interact tools as a class.&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Join the focus group at &lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://railsfocusgroup.blogspot.com/" target="_blank"&gt;http://railsfocusgroup.blogspot.com/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;2. What is meant by “convention over configuration” and how does it reduce coding?&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;p&gt;The below Information from Beginning Rails(2007) at &lt;a href="http://books.google.com.hk/books?id=0rD_q96srHoC&amp;amp;pg=PA356&amp;amp;dq=%22convention+over+configuration%22+and+%22coding%22&amp;amp;lr=#PPA7,M1"&gt;http://books.google.com.hk/books?id=0rD_q96srHoC&amp;amp;pg=PA356&amp;amp;dq=%22convention+over+configuration%22+and+%22coding%22&amp;amp;lr=#PPA7,M1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Convention over configuration means that the programmer needs to define only configuration that is unconventional. Programming is all about making decisions. If you were to write a system from scratch, without the aid of Rails, you would have a lot of decisions to make: how to organize your files, what naming conventions to adopt, and how to handle database access are only a few. If you decided to use a database abstraction layer, you would need to sit down and write it, or at least find an open source implementation that suits your needs. You would need to do all this before you even got down to the business of modeling your domain. Rails lets you get started right away, by encompassing a set of intelligent decisions about how your program should work, alleviating the amount of low-level decision making you need to do up front. As a result, you can focus on the problems you're tying to solve and get the job done quicker.&lt;br /&gt;&lt;br /&gt;Rails ships with almost on configuration files. If you're used to other framework, this fact might surprise you. If you’ve never used a framework before, you should be surprised. In some causes, configuring a framework is nearly half the work. Instead of configuration, Rails relies on common structures and naming conventions, all of which employ the often-cited principle of least surprise (POLS). Things behave in a predictable, easy-to-decipher way. There are intelligent defaults for nearly every aspect of the framework, relieving you, the developer, from having to explicitly tell the framework how to behave. This isn’t to say that you can’t tell Rails how to behave. In fact, most behaviors can be customized to your liking and to suit your particular needs. While you can manipulate most things in the Rails setup and environment, the more you accept the defaults, the faster you can develop applications and predict how they will work. The speed with which you can develop without having to do any explicit configuration is one of the key reasons why Rails works so well.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Further work on understanding MVC:&lt;/strong&gt;&lt;br /&gt;a. See the wiki at &lt;/span&gt;&lt;/p&gt;&lt;a href="http://wiki.rubyonrails.org/rails/pages/UnderstandingMVC"&gt;&lt;span style="font-family:arial;"&gt;http://wiki.rubyonrails.org/rails/pages/UnderstandingMVC&lt;/span&gt;&lt;/a&gt; - &lt;strong&gt;Done!&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-family:arial;"&gt;b. Do the MVC tutorial at &lt;/span&gt;&lt;a href="http://wiki.squeak.org/squeak/1767"&gt;&lt;span style="font-family:arial;"&gt;http://wiki.squeak.org/squeak/1767&lt;/span&gt;&lt;/a&gt; -&lt;strong&gt; Done!&lt;/strong&gt; (Try to access the web page at &lt;a href="http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html"&gt;http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html&lt;/a&gt;, however, this website has been obsoluted.)&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;4. Got a spare hour or so? I recommend the UC Berkeley RAD lab’s Ruby on Rails Short course at&lt;/strong&gt; &lt;/span&gt;&lt;a href="http://youtube.com/watch?v=LADHwoN2LMM"&gt;&lt;span style="font-family:arial;"&gt;http://youtube.com/watch?v=LADHwoN2LMM&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; - &lt;strong&gt;Done!&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;5. Read the Flash article using ActionScript by Colin Moock titled “The Model-View-Controller Design Pattern “at&lt;/strong&gt; &lt;/span&gt;&lt;a href="http://www.adobe.com/devnet/flash/articles/mv_controller.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.adobe.com/devnet/flash/articles/mv_controller.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; - &lt;strong&gt;Done!&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-2965322232458464225?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/2965322232458464225/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-2-part1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2965322232458464225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2965322232458464225'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-2-part1.html' title='Workshop 2 -Part1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-5414065145573366822</id><published>2009-04-02T13:40:00.000-07:00</published><updated>2009-04-04T06:01:06.427-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 1'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 1-part 4</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Challenge Problems:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Make a list of all programming languages and Web development tools used by you in prior experiences. Describe what you know about Web application frameworks before we begin. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Lists:&lt;br /&gt;a.) Develop Php by using Dreamweaver MX, CSS Validator, HTML Validator andLink Checker&lt;br /&gt;b.) Develop Servlet by using java studio creator and UML.&lt;br /&gt;&lt;br /&gt;Ruby on Rails is an MVC style framework which enables rapid development of web applications using the Ruby language. The code itself is often described as 'short and elegant, yet powerful' and the concepts and features within Ruby on Rails take this elegance to a new level for web development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Ruby is “an interpreted scripting language” for quick and easy object-oriented programming”. Find out about the Ruby language and discover what this means.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Find info from &lt;/span&gt;&lt;a href="http://www.gsp.com/cgi-bin/man.cgi?section=1&amp;amp;topic=ruby"&gt;&lt;span style="font-family:arial;"&gt;http://www.gsp.com/cgi-bin/man.cgi?section=1&amp;amp;topic=ruby&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;GSP.COM states that Ruby's features are as follows: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Interpretive &lt;em&gt;(Ruby is an interpreted scripting language)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Ruby is an interpreted language, so you don't have to recompile programs written in Ruby to execute them. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Variables have no type (dynamic typing)&lt;/strong&gt;&lt;em&gt;&lt;strong&gt; ( quick and easy object-oriented programming)&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;Variables in Ruby can contain data of any type. You don’t have to worry about variable typing. Consequently, it has a weaker compile time check. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;No declaration needed &lt;em&gt;(quick and easy object-oriented programming)&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;You can use variables in your Ruby programs without any declarations. Variable names denote their scope, local, global, instance, etc. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Simple syntax &lt;em&gt;( quick and easy object-oriented programming)&lt;/em&gt;&lt;br /&gt;&lt;/strong&gt;Ruby has a simple syntax influenced slightly from Eiffel. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;No user-level memory management&lt;/strong&gt; &lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;(quick object-oriented programming)&lt;/strong&gt;&lt;br /&gt;&lt;/em&gt;Ruby has automatic memory management. Objects no longer referenced from anywhere are automatically collected by the garbage collector built into the interpreter. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Everything is an object &lt;em&gt;(object-oriented programming)&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;Ruby is the purely object-oriented language, and was so since its creation. Even such basic data as integers are seen as objects. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Class, inheritance, and methods&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;(object-oriented programming)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Of course, as an object-oriented language, Ruby has such basic features like classes, inheritance, and methods. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Singleton methods&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;(quick and easy object-oriented programming)&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;Ruby has the ability to define methods for certain objects. For example, you can define a press-button action for certain widget by defining a singleton method for the button. Or, you can make up your own prototype based object system using singleton methods, if you want to. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Mix-in by modules (&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;quick and easy object-oriented programming)&lt;/strong&gt;&lt;br /&gt;&lt;/em&gt;Ruby intentionally does not have the multiple inheritance as it is a source of confusion. Instead, Ruby has the ability to share implementations across the inheritance tree. This is often called 'Mix-in'. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Iterators &lt;em&gt;( quick and easy object-oriented programming)&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;Ruby has iterators for loop abstraction. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Closures &lt;em&gt;(quick and easy object-oriented programming)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;In Ruby, you can objectify the procedure. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Text processing and regular expression&lt;/strong&gt;&lt;br /&gt;Ruby has a bunch of text processing features like in Perl. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Bignums &lt;/strong&gt;&lt;br /&gt;With built-in bignums, you can for example calculate factorial(400). &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Exception handling&lt;/strong&gt;&lt;br /&gt;As in Java(tm). &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Direct access to the OS&lt;/strong&gt;&lt;br /&gt;Ruby can use most Unix system calls, often used in system programming. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Dynamic loading&lt;/strong&gt;&lt;em&gt;&lt;strong&gt; (Ruby is an interpreted scripting language)&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;On most Unix systems, you can load object files into the Ruby interpreter on-the-fly.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Therefore, Ruby is “an interpreted scripting language” for quick and easy object-oriented programming”. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;3. What is Rails and how does it work with Ruby?&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;p&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;From &lt;a href="http://hubpages.com/hub/What_is_Ruby_on_Rails"&gt;http://hubpages.com/hub/What_is_Ruby_on_Rails&lt;/a&gt;, it states that&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Ruby is an object-oriented scripting language which combines features of Perl and Smalltalk. The Rails framework provides a number of conventions that reduce complexity and the possibility of errors in the construction of basic client-server web applications. It uses standard libraries for client-side UI features and also for standard database structure.&lt;br /&gt;&lt;br /&gt;4. What is meant by “convention over configuration” in regards to the use of Rails in Web application development? &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Eweek.com (&lt;a href="http://www.eweek.com/c/a/Application-Development/Ruby-on-Rails-Making-Programmers-Happy/"&gt;http://www.eweek.com/c/a/Application-Development/Ruby-on-Rails-Making-Programmers-Happy/&lt;/a&gt;) tells me that "&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Convention over configuration.,Instead of telling various parts of the technology stack five, six, seven times that you have a products table thats the data source of your product object, weve institutionalized that convention in a generalized notion: &lt;em&gt;Classes are singular&lt;/em&gt;, &lt;em&gt;tables are plural&lt;/em&gt;. This may sound like a trivial notion, but it has a radical impact on the amount of work that the programmer needs to do in his daily work. Were basically taking the whole world of pain that is known as configuration and making it optional. As long as you do what most people want to do most of the time, you get a free ride. No configuration necessary. So get the 80 percent by convention, tailor the last 20 percent by hand. "&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;p&gt;&lt;br /&gt;5. When did Model-View-Controller begin and where is it used?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Wiki (&lt;a href="http://en.wikipedia.org/wiki/Model-View-Controller"&gt;http://en.wikipedia.org/wiki/Model-View-Controller&lt;/a&gt; ) tells me that MVC was first described in 1979&lt;a title="" href="http://en.wikipedia.org/wiki/Model-View-Controller#cite_note-0"&gt;[1]&lt;/a&gt; by Trygve Reenskaug, then working on Smalltalk at Xerox PARC. Model–view–controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;6. Describe the steps involved with the MVC design approach.&lt;/p&gt;&lt;p&gt;Wikipedia (&lt;a href="http://en.wikipedia.org/wiki/Model-View-Controller"&gt;http://en.wikipedia.org/wiki/Model-View-Controller&lt;/a&gt;) tells me that&lt;/p&gt;&lt;p&gt;MVC encompasses more of the architecture of an application than is typical for a &lt;a title="Design pattern (computer science)" href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)"&gt;design pattern&lt;/a&gt;.When considered as a design pattern, MVC is fundamentally the same as the Observer pattern. There are three step for MVC desigen.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The first step - Define Model&lt;/strong&gt;&lt;br /&gt;Is the domain-specific representation of the information on which the application operates. Domain logic adds meaning to raw data (for example, calculating whether today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items).&lt;br /&gt;Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the model. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;The second step - Define View&lt;/strong&gt;&lt;br /&gt;Renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;The third step - Define Controller&lt;/strong&gt;&lt;br /&gt;Processes and responds to events (typically user actions) and may indirectly invoke changes on the model. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-5414065145573366822?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/5414065145573366822/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-4.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5414065145573366822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/5414065145573366822'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-4.html' title='Workshop 1-part 4'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7731888027648856593</id><published>2009-04-02T12:54:00.000-07:00</published><updated>2009-04-02T13:36:43.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 1'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 1-part 3</title><content type='html'>3. To do.&lt;br /&gt;&lt;br /&gt;3.1. Download iTunes from &lt;a href="http://www.apple.com/itunes/download/"&gt;http://www.apple.com/itunes/download/&lt;/a&gt; and subscribe to the “Leraning Rails” Podcasts from &lt;a href="http://www.buildingwebapps.com/podcasts"&gt;http://www.buildingwebapps.com/podcasts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Attend the Lesson 9-23 from &lt;a href="http://www.buildingwebapps.com/podcasts"&gt;http://www.buildingwebapps.com/podcasts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6626-the-simplest-possible-rails-application/show_notes"&gt;Lesson 9: The Simplest Possible Rails Application&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6663-putting-the-page-contents-into-the/show_notes"&gt;Lesson 10: Putting the Page Contents into the Database&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6696-adding-user-authentication/show_notes"&gt;Lesson 11: Adding User Authentication&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6719-user-management/show_notes"&gt;Lesson 12: User Management&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6733-admin-pages/show_notes"&gt;Lesson 13: Admin Pages&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6746-using-textile-markup-plus-in-place-editing/show_notes"&gt;Lesson 14: Using Textile Markup, plus In-Place Editing with Ajax&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6762-pages-and-subpages/show_notes"&gt;Lesson 15: Pages and Subpages&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6774-clean-up/show_notes"&gt;Lesson 16: Clean-Up&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6789-resources-page-links-categories-and-habtm/show_notes"&gt;Lesson 17: Resources Page: Links, Categories, and HABTM&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6798-adding-a-contact-form-and-mailer/show_notes"&gt;Lesson 18: Adding a Contact Form and Mailer&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6806-testing-your-site-part-1/show_notes"&gt;Lesson 19: Testing your site (Part 1)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6808-testing-your-site-part-2/show_notes"&gt;Lesson 20: Testing your site (Part 2)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/6894-version-control-with-git/show_notes"&gt;Lesson 21: Version control with git&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/7098-deploying-to-a-public-web-server/show_notes"&gt;Lesson 22: Deploying to a Public Web Server&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.buildingwebapps.com/podcasts/7645-performance-analysis-with-new-relic-rpm/show_notes"&gt;Lesson 23: Performance Analysis with New Relic RPM&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3.2. Study how to creating a weblog in 15 minutes with Rails 2 from the webcast at&lt;br /&gt;&lt;a href="http://media.rubyonrails.org/video/rails_blog_2.mov"&gt;http://media.rubyonrails.org/video/rails_blog_2.mov&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3.3. Download some study guides from &lt;a href="http://guides.rubyonrails.org/"&gt;http://guides.rubyonrails.org/&lt;/a&gt;, it is very useful for referance.&lt;br /&gt;&lt;br /&gt;3.4. Try to install the Ruby 1.8.6 (stable version), however, when running some update such "gem script/install xxx", it prompts out something are failure, and finally, i just install instantRails.&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7731888027648856593?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7731888027648856593/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7731888027648856593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7731888027648856593'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-3.html' title='Workshop 1-part 3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1318527874568758484</id><published>2009-04-01T21:08:00.000-07:00</published><updated>2009-04-01T23:02:36.220-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 1'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 1-part 2</title><content type='html'>&lt;p&gt;&lt;strong&gt;2.Learn about the Model View Controller (MVC) approach to Web application design&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Some referance link for learning about Model view contoller are listed as follows: &lt;/p&gt;&lt;p&gt;1. Michael P. Peterson (2008). "International Perspectives on Maps and the Internet". Iillustrated Edition. Received 2nd April, 2009 fr0m the url - &lt;a href="http://books.google.com.hk/books?id=Uv0CZft3nEEC&amp;amp;pg=PA171&amp;amp;dq=Model+View+Controller+approach"&gt;http://books.google.com.hk/books?id=Uv0CZft3nEEC&amp;amp;pg=PA171&amp;amp;dq=Model+View+Controller+approach&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In this book, it tells me that the work flow of MVC, that is, &lt;/p&gt;&lt;ul&gt;&lt;li&gt;1. User, manipulated one or more &lt;strong&gt;contollers &lt;/strong&gt;to affect change. &lt;/li&gt;&lt;li&gt;2. Controller, one or more controllers alter the &lt;strong&gt;model&lt;/strong&gt;. &lt;/li&gt;&lt;li&gt;3. Model, one or more &lt;strong&gt;views&lt;/strong&gt; reflect the current state of the model.&lt;/li&gt;&lt;li&gt;4. View, views are perceived by the &lt;strong&gt;user.&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;5. Please see the flow figure.&lt;/li&gt;&lt;/ul&gt;&lt;img id="BLOGGER_PHOTO_ID_5319950434863087682" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 332px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SdRCu_SzAEI/AAAAAAAAAOY/2bWFFqv1W5s/s400/2-1.bmp" border="0" /&gt; &lt;ul&gt;&lt;li&gt;In this book, it tells me that a model is used for storing data about a given domain, a view which renders model information in a form which a user can sense and possibly interact with; and a controller which processes and reponds to events, such as user actions or the results of a process.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2. Serge Fdida (1997). "Multimedia applications, services, and techniques: ECMAST '97". Received 2nd April, 2009 fr0m the url - &lt;a href="http://books.google.com.hk/books?id=dJNbmJkj_jcC&amp;amp;pg=PA702&amp;amp;dq=Model+View+Controller+approach&amp;amp;lr"&gt;http://books.google.com.hk/books?id=dJNbmJkj_jcC&amp;amp;pg=PA702&amp;amp;dq=Model+View+Controller+approach&amp;amp;lr&lt;/a&gt;=&lt;/p&gt;&lt;p&gt;This book tells me that MVC is an object based approach having two basic objectives, the first one that MVC can make the development of user interface componets (views) independent from the services and data (model), and form the applications (controllers), allowing different skilled groups to develop different software levels; the second one that MVC can reuse software components, both user interface software and application software. As a result of that, immediate software integration, easy unitary tests and validation, and the possibility of having multiple different user interfaces for the same application are obtained.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1318527874568758484?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1318527874568758484/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1318527874568758484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1318527874568758484'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-2.html' title='Workshop 1-part 2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/SdRCu_SzAEI/AAAAAAAAAOY/2bWFFqv1W5s/s72-c/2-1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7868275680831952423</id><published>2009-04-01T02:19:00.000-07:00</published><updated>2009-04-01T03:31:27.072-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Workshop 1'/><category scheme='http://www.blogger.com/atom/ns#' term='Workshop'/><title type='text'>Workshop 1-part 1</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;Topic objectives&lt;/span&gt;&lt;/strong&gt; - &lt;span style="font-family:arial;"&gt;1. Install Ruby on Rails on your computer (InstantRails or Locomotive)&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;1.1. Install InstantRails 2.0&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Download InstantRails-2.0-win.zip from &lt;/span&gt;&lt;a href="http://rubyforge.org/projects/instantrails/"&gt;&lt;span style="font-family:Arial;"&gt;http://rubyforge.org/projects/instantrails/&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Extract InstantRails-2.0-win.zip to c:\&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;1.2. Install Aptana Studio &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Download Aptana_Studio_Setup_1.2.5.exe from &lt;a href="http://www.aptana.com/studio/download"&gt;http://www.aptana.com/studio/download&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Install Aptana studio by following the prompted instruction of Aptana.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;1.3. Install MYSQL GUI Tools&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Download mysql-gui-tools-5.0-r17-win32.msi from &lt;a href="http://dev.mysql.com/downloads/gui-tools/5.0.html"&gt;http://dev.mysql.com/downloads/gui-tools/5.0.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Install MYSQL GUI Tools by following the prompted instruction of MYSQL.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;1.4. Modify MYSQL root password though phpmyadmin&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;1.5. Create database and tables in MYSQL&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Create database named by issuing the SQL statement - [ create database taxi_production; ]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Create database named by issuing the SQL statement - [ create database taxi_development; ]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Create database named by issuing the SQL statement - [ create database taxi_test; ]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;Create TWO tables called passenger_origin and passenger_destination in taxi_production database with following SQL statement&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;=============================================&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;CREATE TABLE `taxi_production`.`passenger_origins`&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;(&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`id` int(10) unsigned NOT NULL auto_increment, &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`name` varchar(45) NOT NULL,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`contact` int(10) unsigned NOT NULL,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`suburb` varchar(45) NOT NULL,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`street` varchar(45) NOT NULL,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;`building` varchar(45) NOT NULL,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;PRIMARY KEY (`id`)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;"&gt;=============================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;CEATE TABLE `taxi_production`.`passenger_destinations` &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;`id` int(10) unsigned NOT NULL auto_increment,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;`suburb` varchar(45) NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;`numpass` varchar(45) NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;`taxitype` varchar(45) NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;`time` datetime NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;PRIMARY KEY (`id`)&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;===============================================&lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;span style="font-family:Arial;"&gt;1.6. Test on Ruby on Rails&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Create a booking system web application by Issuing command - [ rails -d mysql C:\rails_apps\bookingsys] &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Startup the bookingsys production web appliaction, please go to bookingsys directory and issue the command [mongrel_rails start -e production]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Test the bookingsys web application by internet explorer with the url - [ &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt; ] (listening port for new web application is 3000 by default) &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;"&gt;Configure Rails to point to a target database by editing database.yml file which is located at C:\rails_apps\bookingsys\config as follows&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;=========================&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;production: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;adapter: mysql &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;encoding: utf8 &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;database: taxi_production &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;username: root &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;p&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;assword: 123456&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;host: localhost&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;=======================&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;1.7. Create a model for taxi online booking system in the bookingsys directory by issuing the command [ ruby script/generate model passenger_origin ] &amp;amp; [ ruby script/generate model passenger_destinations]&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;1.8. Create a controller for taxt online booking system in the bookingsys directory by issuing the command [ruby script/generate controller taxicontrol ]&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Arial;"&gt;1.9. Install plugin named scaffold for taxt online booking system in the bookingsys directory by issuing the command [ruby script\plugin install scaffolding ]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;2.0. Install plug-in named paginate in the bookingsys by issuing the command [C:\InstantRails\rails_apps\bookingsys&gt;ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;2.1.Edit the controller file named taxicontrol_controller.rb and input the following statement within the class of TaxicontrolController&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;========================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;class TaxicontrolController &lt;&gt;&lt;span style="font-family:Arial;"&gt;Controller&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;scaffold :passenger_origin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;========================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;2.2. Reset the taxi booking system web application server.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;2.3. Access the taxicontrol page by browsing the url at &lt;a href="http://localhost:3000/taxicontrol"&gt;http://localhost:3000/taxicontrol&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;2.4. Click the button namely "New passenger orgin", and it will load a form, then just need fill in all fields and click create button , those field records will insert in to database (please the below figure for referance)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5319663277272846562" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 356px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdM9kN6J0OI/AAAAAAAAANw/VPFHdxJs_Jk/s400/0.bmp" border="0" /&gt; &lt;p align="center"&gt;Figure 1. &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5319663904338880370" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 342px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdM-It6WJ3I/AAAAAAAAAN4/QA86Y2rVtjU/s400/1.bmp" border="0" /&gt; &lt;p align="center"&gt;Figure 2.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5319664305338498210" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 367px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SdM-gDwGvKI/AAAAAAAAAOA/wDpGVFIKUKM/s400/3.bmp" border="0" /&gt;Figure 3.&lt;/p&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;span style="font-family:arial;"&gt;2.5. Check the data whether stores in the database by using MYSQL GUI tools, please see the below figure for referance&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;img id="BLOGGER_PHOTO_ID_5319665758944305218" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 375px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdM_0q2vIEI/AAAAAAAAAOI/igjBHV5BAHE/s400/4.bmp" border="0" /&gt;&lt;br /&gt;&lt;/p&gt;It WORKS!!!!!!!!&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7868275680831952423?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7868275680831952423/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7868275680831952423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7868275680831952423'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/04/workshop-1-part-1.html' title='Workshop 1-part 1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/SdM9kN6J0OI/AAAAAAAAANw/VPFHdxJs_Jk/s72-c/0.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7456320973992264419</id><published>2009-03-26T19:54:00.000-07:00</published><updated>2009-03-30T02:29:07.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 9'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 9-3</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;9.3. Can you modify the scripts to process the form?&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Yes, i can use the html form named ex9.html which is created in exercrise 9.1 for passing the data by the perl, python &amp;amp; javascript, and use them to print out info from ex9.html.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;A. PERL&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;First, i create a perl file named ex93.pl with the following code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScxCM8RL52I/AAAAAAAAAK4/kVxertuUSt8/s1600-h/93a.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317698050121787234" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 309px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScxCM8RL52I/AAAAAAAAAK4/kVxertuUSt8/s400/93a.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Secord, set the action attibute to "/cgi-bin/ex93.pl" in ex9.html, like this&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;( FORM METHOD="post" ACTION="/cgi-bin/ex93.pl")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Third, access ex9.html, input info in ex9.html and click submit button&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScxDc1E7qzI/AAAAAAAAALI/RDKLvOoNp54/s1600-h/91.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317699422580878130" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 389px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScxDc1E7qzI/AAAAAAAAALI/RDKLvOoNp54/s400/91.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Third, check the result in ex93.pl&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScxEHfzcfSI/AAAAAAAAALQ/ps1UlGfAUYo/s1600-h/93b.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317700155604761890" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 194px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScxEHfzcfSI/AAAAAAAAALQ/ps1UlGfAUYo/s400/93b.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It works!!!!!!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;B.PYTHON&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;First, create a python file named ex93.py with following code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA59dxHWRI/AAAAAAAAAMI/GVQlO1LnDDI/s1600-h/93333333cccccccc.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318814888049989906" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 197px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA59dxHWRI/AAAAAAAAAMI/GVQlO1LnDDI/s400/93333333cccccccc.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Second, set form method with post and hardcord the action location in ex93.html &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;FORM METHOD="post" ACTION="/cgi-bin/ex93.py"&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Third, access ex9.html, input the information and click submit button.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA7LZczZgI/AAAAAAAAAMQ/NVlR6kSyCq0/s1600-h/9333333333aaaaaaaa.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318816226920850946" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 368px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA7LZczZgI/AAAAAAAAAMQ/NVlR6kSyCq0/s400/9333333333aaaaaaaa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Fourth, check the result. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA7bXzXx_I/AAAAAAAAAMY/Z19dXUYRVKA/s1600-h/93333333333333bbbb.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318816501356546034" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 367px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdA7bXzXx_I/AAAAAAAAAMY/Z19dXUYRVKA/s400/93333333333333bbbb.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;It works!!!!!!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;strong&gt;C. Javascript&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;First, create a html file named ex93_java.html which is embedded the javascript is used for querying form data with following code.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/SdCHJj8XzOI/AAAAAAAAANI/oD4dsoyHYIY/s1600-h/933333333javaA.bmp"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdCQVnh1EhI/AAAAAAAAANo/w5hFzsiHXVI/s1600-h/933333333javaTEST1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318909860987081234" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 290px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdCQVnh1EhI/AAAAAAAAANo/w5hFzsiHXVI/s400/933333333javaTEST1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;Second, set &lt;/span&gt;form action to [ form onSubmit="return false" ] in the ex9.html and add a form submittted button with following code&lt;br /&gt;&lt;br /&gt;[ input onclick="window.location.href = 'ex93_java.html?' + 'first='+ this.form.first.value + '&amp;amp;' + 'last='+ this.form.last.value + '&amp;amp;' + 'paymethod='+ this.form.paymethod.value + '&amp;amp;' + 'cardno='+ this.form.cardno.value + '&amp;amp;' + 'cardexp='+ this.form.cardexp.value" type="button" value="Submit" ]&lt;br /&gt;&lt;br /&gt;Third, access the ex9.html, input information and click submit button.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdCKA4eUPKI/AAAAAAAAANQ/wC5DOJKLFaw/s1600-h/933333333javaTEST1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318902907688729762" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 378px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdCKA4eUPKI/AAAAAAAAANQ/wC5DOJKLFaw/s400/933333333javaTEST1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fourth, check the result!&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5318909556783419874" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 154px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdCQD6SBkeI/AAAAAAAAANg/NvBXuHVhjgg/s400/9333333333javaTest2.bmp" border="0" /&gt;&lt;br /&gt;It works!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7456320973992264419?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7456320973992264419/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7456320973992264419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7456320973992264419'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-3.html' title='Exercise 9-3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/ScxCM8RL52I/AAAAAAAAAK4/kVxertuUSt8/s72-c/93a.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-8295971945439516257</id><published>2009-03-26T09:09:00.000-07:00</published><updated>2009-03-30T01:19:34.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 9'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 9-2</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;9.2. Write the script &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Script archives exist for PERL, Python and JavaScript. Search the Web for a script that processes the HTML forms data. Read the code and list the steps involved in processing form.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A.) PERL&lt;/strong&gt; (study how to use perl for performing form data from &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.howtodothings.com/computers/a1297-how-to-access-get--post-request-data-using-perl.html"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;http://www.howtodothings.com/computers/a1297-how-to-access-get--post-request-data-using-perl.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;)&lt;br /&gt;&lt;br /&gt;A1.) Create a html page named test.html with the following code:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scwk47Ql2jI/AAAAAAAAAKQ/oeU18XIJgYw/s1600-h/921a.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317665820416268850" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 187px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scwk47Ql2jI/AAAAAAAAAKQ/oeU18XIJgYw/s400/921a.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;A2.) Create a perl fiel name test_get.pl with the following code:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScuvWzkjIEI/AAAAAAAAAKI/sQ9jEBlkqJE/s1600-h/921aa.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317536591376490562" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 284px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScuvWzkjIEI/AAAAAAAAAKI/sQ9jEBlkqJE/s400/921aa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Code Explanation:&lt;br /&gt;Line 1: Locate the path of executable perl&lt;br /&gt;Line 2: Inform internet browswer that the below info is a text in html format&lt;br /&gt;Line 4 to 14: It is a function named populatePostFields&lt;br /&gt;Line 5: hash named postFields&lt;br /&gt;Line 6: how many bytes are we supposed to receive?&lt;br /&gt;Line 7: make a list of key/value pairs&lt;br /&gt;Line 8 to 13: cycle through each part and decipher the values&lt;br /&gt;Line 9: get the name/value part strings&lt;br /&gt;Line10: ??? s/%23/\#/g ???? i don't know&lt;br /&gt;Line11: ??? s/%2F/\//g ???? i don't know&lt;br /&gt;Line12: add the part to a list keyed on the name of the variable&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A3. Real case Test - please see the below figure &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Input some text in the text box and click submit button&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/Scw2etbFeUI/AAAAAAAAAKg/lK-msXyf5lU/s1600-h/923.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317685161234889026" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 171px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Scw2etbFeUI/AAAAAAAAAKg/lK-msXyf5lU/s400/923.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;It works!!!! The tutorial is from howtodothings that is workable!!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scw2ehEelCI/AAAAAAAAAKo/wG_O_4P_Wj4/s1600-h/923b.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317685157918839842" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 171px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scw2ehEelCI/AAAAAAAAAKo/wG_O_4P_Wj4/s400/923b.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;B.) PYTHON (&lt;/strong&gt;study PYTHON how to use CGI for performing form data from &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.python.org/doc/essays/ppt/sd99east/sld041.htm"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;http://www.python.org/doc/essays/ppt/sd99east/sld041.htm&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;B.1.) Create a html named test.hml with following code:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sc4p3hD4UhI/AAAAAAAAALY/j9J_Ayy7goY/s1600-h/9222222222a.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318234243715322386" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 188px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sc4p3hD4UhI/AAAAAAAAALY/j9J_Ayy7goY/s400/9222222222a.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;B.2.) Create a python file name test.py with following codes&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sc4q_6EpN3I/AAAAAAAAALg/VKsZzyOeBZY/s1600-h/922222222222b.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318235487379994482" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 319px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sc4q_6EpN3I/AAAAAAAAALg/VKsZzyOeBZY/s400/922222222222b.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Code Explanation: &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line 1: Locate the path of executable perl &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line 3: Import CGI&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line 5-12: Define a function named main used for handling the parsed query info from test.html&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line 7 :Inform internet browswer that the below info is a text in html format &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line 8:Define a variable which is used to take care of decoding and handle POST by cgi.FieldStorage()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line9-12: if-condition for identify the field named firstname whether is null and has_key only of firstname , if yes, print out "Hello, $firstname, You are handsome", else, print out "Error! Please enter first name"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line13. execute the function namly main.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;B3. Real case Test - please see the below figure &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Input "Sam" in the first field and "Kwong" in the second field then click submit button.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sc42g4LnGAI/AAAAAAAAALo/G41ACCWC-14/s1600-h/922222222222222c.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318248148435933186" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 230px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Sc42g4LnGAI/AAAAAAAAALo/G41ACCWC-14/s400/922222222222222c.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;The below result shows the form data that can be successful passed from test.html to test.py&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;It works!!!! The tutorial is from python.org that is workable!!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sc424nHyj0I/AAAAAAAAALw/yopj57yVWw8/s1600-h/922222222222222d.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318248556173365058" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 346px; CURSOR: hand; HEIGHT: 351px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Sc424nHyj0I/AAAAAAAAALw/yopj57yVWw8/s400/922222222222222d.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;C. Javascript&lt;/strong&gt; (study from &lt;/span&gt;&lt;/span&gt;&lt;a href="http://support.internetconnection.net/CODE_LIBRARY/javascript_Parsing_Query_String.shtml"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;http://support.internetconnection.net/CODE_LIBRARY/javascript_Parsing_Query_String.shtml&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;C.1.) Create a html file named testjava.html with the followind codes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/SdBsst6fQuI/AAAAAAAAAMg/sJjFP4Mu7Mk/s1600-h/922222222javaa.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318870675419513570" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 255px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SdBsst6fQuI/AAAAAAAAAMg/sJjFP4Mu7Mk/s400/922222222javaa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;C.2.) Create a html named jvscript_tst.html which is embedded the javascript in the html page with following code.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/SdBuxUkhm8I/AAAAAAAAAMo/bQPQyfMwi74/s1600-h/922222222222javaB.bmp"&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318872953539107778" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 290px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SdBuxUkhm8I/AAAAAAAAAMo/bQPQyfMwi74/s400/922222222222javaB.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Code Explanation:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line5-29: Define a function named createRequestObject that is used to request the parsed query string from previous page of URL, simply create an array to store the data from previous url page and use while-loop for query all the data...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line5: Define a function named createRequestObject();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line6: Define an object name FORM_DATA which is an array using for store our data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line7: Define a token that is used to separate data from multi-select inputs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line8: Define a variable that stores the url info (this.location) and adding a null-string '' forces an implicit type cast from property to string, for NS2 compatibility.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line10: Use variable named query to store the info after question mark of url&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line11: if-condition that returns false when query.length is smaller than 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line12: Defines an object named keypairs to store and keep track of name and value pairs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line13: Defines a variable name numKP and set its' value to 1 which is a location flag of keypairs[]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line14-17: Use a while-loop to query all the value between each "&amp;amp;" of URL, and store the result in the array name keypairs.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line18: Define keypairs[numKP] is equal to query&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line19-24: Use a for-loop to get the URL's varible name and value from the keypairs array, also within the for-loop, there is a while-loop which is used to replace each '+' in data string with a space.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line25: Set key value to unscape non-alphanumerics&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line26: Generate a separtor-delimited string by appending to what we already have stored&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line30: Set Form_DATA to createRequestObject, which is used to retrieve information with "FORM_DAT[key]=value"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line34: set "onload" the web page and call the function named createRequestObject&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Line36-38: Define varible to store the value which is getting from FORM_DATA[key] and use document.write to print out those value.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;C3. Real case Test - please see the below figure&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;Fill in the my first name and last name in the text box and click button named "Go"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318887845954903202" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 371px; CURSOR: hand; HEIGHT: 283px" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SdB8ULJI3KI/AAAAAAAAAMw/7zN4tkpUH9o/s400/92222222222javaC.bmp" border="0" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;It Works&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdB_gIHzhwI/AAAAAAAAANA/xUt4dJ5gC28/s1600-h/92222222JavaD.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5318891349837317890" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 195px" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SdB_gIHzhwI/AAAAAAAAANA/xUt4dJ5gC28/s400/92222222JavaD.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;!!!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-8295971945439516257?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/8295971945439516257/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8295971945439516257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/8295971945439516257'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-2.html' title='Exercise 9-2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/Scwk47Ql2jI/AAAAAAAAAKQ/oeU18XIJgYw/s72-c/921a.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-2548285153187360261</id><published>2009-03-26T08:17:00.000-07:00</published><updated>2009-03-26T09:07:24.313-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 9'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 9-1</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;9.1. Design the form&lt;br /&gt;"Retrofit" the form data string above for buying some French perfume into the HTML form fields and submit button on the Web page form.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;a.) Please see the below screen dump, this is a webpage for user to input their payment infomation in order to complete transaction.&lt;br /&gt; &lt;a href="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScumEf36alI/AAAAAAAAAJw/RLB0lfkU5Nc/s1600-h/91.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317526381246704210" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 389px" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScumEf36alI/AAAAAAAAAJw/RLB0lfkU5Nc/s400/91.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;b.) Please see the below screen dump, this is a core part of html source code of above screen dump. &lt;/p&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScunE3knSjI/AAAAAAAAAJ4/iJDjhLuKzqk/s1600-h/911.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317527487119837746" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 393px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/ScunE3knSjI/AAAAAAAAAJ4/iJDjhLuKzqk/s400/911.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-2548285153187360261?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/2548285153187360261/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2548285153187360261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2548285153187360261'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-9-1.html' title='Exercise 9-1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/ScumEf36alI/AAAAAAAAAJw/RLB0lfkU5Nc/s72-c/91.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7314442925155804492</id><published>2009-03-25T20:08:00.000-07:00</published><updated>2009-03-25T20:10:34.934-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 11'/><title type='text'>Exercise 11-3</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;11.3. SMIL is an application of XML. What is the purpose of this technology? Where does it apply?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SMIL is stand for Synchronized Multimedia Integration Language as a language for choreographing multimedia presentations where audio, video, text and graphics are combined in real-time.It applys for describing multimedia presentations and the followings describes SMIL’s utilization (W3schools, 2009):&lt;br /&gt;&lt;br /&gt;a.) SMIL can be used to create Internet or Intranet presentations&lt;br /&gt;b.) SMIL can be used to create slide-show presentations&lt;br /&gt;c.) SMIL has been described as the Internet answer to PowerPoint&lt;br /&gt;d.) SMIL presentations can display multiple file types (text, video, audio...)&lt;br /&gt;e.) SMIL presentations can display multiple files at the same time&lt;br /&gt;f.)  SMIL presentations can display files from multiple web servers&lt;br /&gt;g.) SMIL presentations can contain links to other SMIL presentations&lt;br /&gt;h.) SMIL presentations can contain control buttons (stop, start, next, ...)&lt;br /&gt;i.)  SMIL has functions for defining sequences and duration of elements&lt;br /&gt;j.)  SMIL has functions for defining position and visibility of elements&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;W3schools (2009). “SMIL Introduction” . Received 25th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.w3schools.com/smil/smil_intro.asp"&gt;&lt;span style="font-family:arial;"&gt;http://www.w3schools.com/smil/smil_intro.asp&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7314442925155804492?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7314442925155804492/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7314442925155804492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7314442925155804492'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-3.html' title='Exercise 11-3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7213776621277311492</id><published>2009-03-25T19:58:00.000-07:00</published><updated>2009-03-25T19:59:19.724-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 11'/><title type='text'>Exercise 11-2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;11.2. What are the benefits of adopting a schema standardized for a business sector?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Standardized schema is really good for business development, for example, a kind of schema named “Electronic Business using eXtensible Markup Language” (EBXML) that enables the global use of electronic business information in an interoperable, secure, and consistent manner by all trading partners. Xmlone (2005) states that Gain insight into xbXML from a top-level perspective and why it is an important standard for companies to consider. Designed with business objectives in mind, the vision of ebXML is to create a single global electronic marketplace where enterprises of any size and in any geographical location can conduct business with each other through the exchange of XML based messages. ebXML is created for electronic interoperability, allowing businesses to find each other, agree to become trading partners and to conduct business. All these operations can be performed automatically, minimising human intervention. Streamlining electronic business also offers lower costs to open and standard mechanisms.&lt;br /&gt;&lt;br /&gt;Jim Green, Chief Technology Officer, webMethods (w3, 2001) said that &lt;/span&gt;&lt;a name="webmethods"&gt;&lt;span style="font-family:arial;"&gt;exchanging business information was a critical requirement for automating business processes within and between companies. webMethods wad pleased to see XML Schema approved as a Recommendation, and to have been an active participation in the development of this standard. XML Schema made describing, exchanging, and validating business information easier and more flexible. &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;References:&lt;br /&gt;&lt;br /&gt;W3 (2001). “Testimonials for XML Schema Recommendation” . Received 25th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.w3.org/2001/05/xml-schema-testimonial"&gt;&lt;span style="font-family:arial;"&gt;http://www.w3.org/2001/05/xml-schema-testimonial&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;Xmlone (2005). “Program Synopsis.” . Received 25th March, 2009 from URL- &lt;/span&gt;&lt;a href="http://www.xmlone.org/xmlasia2005/programsynopsis.shtml"&gt;&lt;span style="font-family:arial;"&gt;http://www.xmlone.org/xmlasia2005/programsynopsis.shtml&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7213776621277311492?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7213776621277311492/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7213776621277311492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7213776621277311492'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-2.html' title='Exercise 11-2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-3491763260751412896</id><published>2009-03-25T19:56:00.000-07:00</published><updated>2009-03-25T19:57:59.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 11'/><title type='text'>Exercise 11-1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;11.1. Conduct research on the Internet to find out what tools can be to parse an XML document and ensure that the document is well formed and valid.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;W3schools(2009) states that all modern browsers have a built-in XML parser that can be used to read and manipulate XML, and the tools are used to ensure that XML document is well formed and valid such as&lt;br /&gt;W3schools’s XML Validator (&lt;/span&gt;&lt;a href="http://www.w3schools.com/xml/xml_validator.asp"&gt;&lt;span style="font-family:arial;"&gt;http://www.w3schools.com/xml/xml_validator.asp&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;), &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;validome’s XML Validator (&lt;/span&gt;&lt;a href="http://www.validome.org/xml/"&gt;&lt;span style="font-family:arial;"&gt;http://www.validome.org/xml/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;) and&lt;br /&gt;PMC XML Validator (&lt;/span&gt;&lt;a href="http://www.pubmedcentral.nih.gov/utils/validate/xmlcheck.cgi"&gt;&lt;span style="font-family:arial;"&gt;http://www.pubmedcentral.nih.gov/utils/validate/xmlcheck.cgi&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;)&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;W3schools(2009). “XML Parser” . Received 25th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.w3schools.com/xml/xml_parser.asp"&gt;&lt;span style="font-family:arial;"&gt;http://www.w3schools.com/xml/xml_parser.asp&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-3491763260751412896?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/3491763260751412896/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3491763260751412896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3491763260751412896'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-11-1.html' title='Exercise 11-1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4502365801416976541</id><published>2009-03-24T20:55:00.000-07:00</published><updated>2009-03-25T01:00:08.105-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 10-3</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;10.3. What are the similarities between the object-oriented development using model-view-controller(MVC) in Ruby on Rails 2.0 and Action Script 2.0 (Flash animations)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Tutorialspoint(2008) states that the Model View Controller principle of Ruby on Rails MVC framework divides the work of an application into three separate but closely cooperative subsystems, which are Model (ActiveRecord ), View ( ActionView ) and Controller ( ActionController ). These three features are similar to actionscript 2.0.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Model (ActiveRecord ) of MVC&lt;/strong&gt;&lt;br /&gt;Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;&lt;br /&gt;Actionscript 2.0 is as same as MVC Ruby that also can maintains the relationship between Object and Database, for example ActionScript 2.0 code to link the object from results to the dataProvider of the dataset, as shown in the following OO code;&lt;br /&gt;myObject : Object = new Object();&lt;br /&gt;myObject.result = function() : Void&lt;br /&gt;{&lt;br /&gt;my_ds.dataProvider = my_ws.results;&lt;br /&gt;}&lt;br /&gt;my_ws.addEventListener(“result”, employeeObject);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;View ( ActionView ) of MVC&lt;/strong&gt;&lt;br /&gt;A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;&lt;br /&gt;Actionscript 2.0 also have a templating feature, as shown in the following figure which is from &lt;/span&gt;&lt;a href="http://ntt.cc/wp-content/uploads/2009/01/clip-image001-thumb3.jpg"&gt;&lt;span style="font-family:arial;"&gt;http://ntt.cc/wp-content/uploads/2009/01/clip-image001-thumb3.jpg&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316970452881989250" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 357px; CURSOR: hand; HEIGHT: 213px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/ScmsdNVHXoI/AAAAAAAAAJo/uUbllSnYkyg/s400/clip-image0013.jpg" border="0" /&gt;&lt;br /&gt;&lt;strong&gt;Controller ( ActionController ) of MVC:&lt;/strong&gt;&lt;br /&gt;The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data (searching, sorting, massaging it) into a form that fits the needs of a given view.&lt;br /&gt;This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;&lt;br /&gt;Adobepress (2009) states that ActionScript objects provide a means of moving graphic elements dynamically, building applications, organizing data, and more. You accomplish these tasks by using or setting object property values and invoking object methods.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Referances:&lt;br /&gt;&lt;br /&gt;Tutorialspoint(2008). “Ruby on Rails Framework” . Received 24th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.tutorialspoint.com/ruby-on-rails/rails-framework.htm"&gt;&lt;span style="font-family:arial;"&gt;http://www.tutorialspoint.com/ruby-on-rails/rails-framework.htm&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Adobepress (2009). “Introducing ActionScript Objects” . Received 24th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.adobepress.com/articles/article.asp?p=31465"&gt;&lt;span style="font-family:arial;"&gt;http://www.adobepress.com/articles/article.asp?p=31465&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4502365801416976541?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4502365801416976541/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-3.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4502365801416976541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4502365801416976541'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-3.html' title='Exercise 10-3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/ScmsdNVHXoI/AAAAAAAAAJo/uUbllSnYkyg/s72-c/clip-image0013.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-6181482768450353680</id><published>2009-03-24T18:29:00.000-07:00</published><updated>2009-03-25T00:59:56.643-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 10-2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;10.2. Why is the perception getting stronger that integration will become a critical factor in coming days? What is the role of AJAX within the enterprise software architecture?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Pauline Ratnasingam (2003) states that, in order achieve potential benefits of e-commerce, organization should follow characteristics of leaders that include being smaller and more focused on business benefits in e-commerce. Moreover, organizations should give e-commerce higher importance in their business strategies by having an aggressive cost focus and higher and more specific expectations from technology. Hence, organizations will be able to demonstrate higher levels of integration of e-commerce.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;AJAX acts a loser within the enterprise software architecture.&lt;br /&gt;According to a Backbase's research (Backbase, 2009). , it indicates that the top five problems hindering successful enterprise Ajax implementation are:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;strong&gt;a.) Unsupported Ajax projects, widgets, and toolkits&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;There are many open source Ajax projects, but these solutions are fragmented and no software company is supporting them or committed to their future. These projects are developed differently, are incompatible with each other, and it’s a safe bet that the vast majority of them won’t exist two years from now. It’s very difficult to make a safe choice here. Even if a software company is backing the project, the level of commitment is very modest. They typically don’t provide business-grade support and training, and no guaranteed roadmap for ongoing development.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;b.) Lack of established Ajax best practices&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Because Ajax is a fairly new technology, few people know the proven best practices for Ajax development. Without best practices, businesses often face expensive trial-and-error exercises, unnecessary project delays, downstream code integrity and maintenance issues, and sometimes security threats. Getting it right can waste a lot of money and time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;c.) Poor integration of Ajax in the normal development lifecycle&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Most Ajax tools available today are no more than loosely organized JavaScripts. They have no tools for rapid application development, accelerated testing and debugging, or integrating Ajax into existing application development processes and tools. Further, using these free tools proliferates “spaghetti code:” an unstructured hodgepodge of JavaScript code that makes application testing and maintenance a nightmare.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;d.) Lack of reliable external support and trainingRisk of intellectual property violations&lt;/strong&gt;&lt;br /&gt;When technology isn’t supported by a commercial business, businesses need alternatives for training and supporting their development environment. Some consulting companies offer support on open source projects, but it’s not their core business and they typically deliver it as a “one-off.” Without the economies of scale, support services become expensive and unsustainable, leaving clients “high and dry.”&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;e.) Risk of intellectual property&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Many open source Ajax projects include code from several sources on the Internet. These code snippets are licensed under different licenses with different terms of use. There is no guarantee that the code doesn’t violate patents. Developers are usually unaware of these risks; they simply use whatever code will speed up development. However, users of open source projects can be targets for patent infringement claims — especially as open source projects are hard to sue. Given these sizable problems, it's understandable that enterprises might hesitate to implement Ajax. However, with market momentum driving IT departments to deliver RIAs to customers and internal clients, avoidance isn't an answer. Enterprises need a reliable partner, whose core business is ongoing Ajax innovation, code maintenance and product support. That partner is Backbase. And the solution is Backbase Ajax 360.Backbase Ajax 360. Please refer to below figure which is from backbase. In the figure, we can find that Ajax 360 seem a complete enterprise solution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5316933669308701250" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 274px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/ScmLAH11mkI/AAAAAAAAAJg/_aAxG5SIe9c/s400/ajax360.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;Pauline Ratnasingam (2003), Idea Group Inc (IGI), “Inter-organizational trust in business-to-business e-commerce”, pp.16-17.&lt;br /&gt;&lt;br /&gt;Backbase (2009). “AJAX in enterprise whitepaper” . Received 24th March, 2009 from URL -&lt;br /&gt;&lt;a href="http://docs.backbase.com/docs/WP_Ajax_in_the_Enterprise.pdf"&gt;http://docs.backbase.com/docs/WP_Ajax_in_the_Enterprise.pdf&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-6181482768450353680?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/6181482768450353680/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6181482768450353680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/6181482768450353680'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-2.html' title='Exercise 10-2'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3ceCcWCWK_g/ScmLAH11mkI/AAAAAAAAAJg/_aAxG5SIe9c/s72-c/ajax360.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-4420046989863759178</id><published>2009-03-23T20:42:00.000-07:00</published><updated>2009-03-25T00:59:44.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 10-1</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;10.1. Go to the website of IBM, Oracle, Microsoft and Sybase. Is there any mention of e-commerce associated with their database product? What suite or partnership do they list with related e-commerce offerings? How do they compare with open source products like MySQL?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IBM(2009)&lt;/strong&gt; states that there is an e-commerce associated with their database product named DB2 that can connect with a web server to create robust, high-volume e-commerce applications. DB2 Connect provides several solutions that improve web-based application performance. Stored procedures allow DB2 Connect users to reduce the number of queries being sent to the database, furthermore, IBM offers a program suite that is DB2(R) Universal Database that supports all the key Internet standards, making it an ideal database for use on the Web. It has in-memory speed to facilitate Internet searches and complex text matching combined with the scalability and availability characteristics of a relational database. Because DB2 Universal Database supports WebSphere(R), Java(TM) and XML Extender, it makes it easy for you to deploy your e-business applications. In additional, DB2 Universal Developer's Edition has several tools that provide Web enablement support. WebSphere Studio Application Developer, Version 4, is an integrated development environment (IDE) that enables you to build, test, and deploy Java applications to a WebSphere Application Server and DB2 Universal Database. WebSphere Studio is a suite of tools that brings all aspects of Web site development into a common interface. WebSphere Application Server Advanced Edition (single-server) provides a robust deployment environment for e-business applications. Its components let you build and deploy personalized, dynamic Web content quickly and easily. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;IBM 's DB2 compares with mysql, in details, please refer IBM web site at &lt;/span&gt;&lt;a href="http://www.ibm.com/developerworks/data/library/techarticle/dm-0602tham2/"&gt;&lt;span style="font-family:arial;"&gt;http://www.ibm.com/developerworks/data/library/techarticle/dm-0602tham2/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;a.) Container comparision between DB2 and MySQL&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Depending on the table type being used, MySQL stores data in either single files, multiple files, or tablespaces.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316605049722499458" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 248px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SchgH8fB8YI/AAAAAAAAAJY/hurtrp0Jjs8/s400/mysql_container.gif" border="0" /&gt;&lt;br /&gt;In contrast to MySQL, DB2 Express stores everything in tablespaces. Tablespaces are logical representations of physical containers in filesystems, DB2 database structure is laid out in this fashion, with each layer in the hierarchy to represent the following that is better than MySQL.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316605042991733730" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 293px; CURSOR: hand; HEIGHT: 282px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SchgHjaSm-I/AAAAAAAAAJQ/KlsuoVsNX0A/s400/db2Structure.jpg" border="0" /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;b.) Availabilty comparision&lt;/strong&gt;&lt;strong&gt; between DB2 and MySQL&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;MySQL supports user-defined functions, store procedure, views, updateable views, triggers and DB2 supports user-defined table, user-defined functions, user-defined data types, store procedure, views, updateable views, triggers, recursive SQL, squences. So DB2 is more powerful than MySQL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Oracle(2009) &lt;/strong&gt;states that there is an e-commerce associated with their database product , that is using “Oracle E-Business Suite On Demand” which offers business benefits that give you enhanced security and compliance as well as improved system scalability, performance, and availability. It also provides change management services, including product updates and upgrade processes that are engineered to give you access to the latest product innovations and capabilities. Oracle experts use Information Technology Infrastructure Library (ITIL)–based processes and automation to manage your software on proven configurations across the entire Oracle technology stack.&lt;br /&gt;Oracle On Demand delivers the following core services designed specifically for Oracle E-Business Suite:&lt;br /&gt;• Infrastructure management—Provides, manages, and maintains hardware, network&lt;br /&gt;connections, and facilities for customers&lt;br /&gt;• Software management—Uses a closed loop process with Oracle experts to solve&lt;br /&gt;customer problems quickly, along with rootcause analysis to avoid problems altogether&lt;br /&gt;• Security management—Manages the security tools, processes, and precautions&lt;br /&gt;that protect the privacy and security of customer data and solutions&lt;br /&gt;• Service level management—Provides a service-desk escalation process, meets service levels, and then measures and reports results directly through customer portals&lt;br /&gt;• IT governance—Provides a service delivery manager to work closely with customers, resolve problems, plan and execute changes, and keep customer IT solutions aligned with the business.&lt;br /&gt;&lt;br /&gt;There are many points of comparison between Oracle and mysql, in detail, please refer oracle web site at &lt;a href="http://download.oracle.com/docs/cd/E12151_01/doc.150/e12155/oracle_mysql_compared.htm"&gt;http://download.oracle.com/docs/cd/E12151_01/doc.150/e12155/oracle_mysql_compared.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;a. Database Authentication Comparsion between Oracle and MySQL&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;MySQL is unlike Oracle (when set up to use database authentication) and most other databases that use only the user name and password to authenticate a user, MySQL uses an additional location parameter when authenticating a user. This location parameter is usually the host name, IP address, or a wildcard (Ò%Ó). With this additional parameter, MySQL may further restrict a user access to the database to a particular host or hosts in a domain. Moreover, this also allows a different password and set of privileges to be enforced for a user depending on the host from which the connection is made. Thus, user scott, who logs on from abc.com may or may not the same as user scott who logs on from xyz.com. It seems MySQL that is flexible but it’s not secure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;b. Privileges Comparsion between Oracle and MySQL&lt;/strong&gt;&lt;br /&gt;MySQL is unlike in Oracle, there is no concept of role in MySQL. Thus, in order to grant a group of users the same set of privileges, the privileges have to be granted to each user separately. Alternately, though less satisfactory for auditing, users performing tasks as a role may all share a single user account that is designated for the "role" and with the required privileges granted. So Oracle is easy to define the privileges by role than MySQL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Microsoft (2009)&lt;/strong&gt; states that there is an e-commerce associated with their database product named Microsoft® SQL Server™ that is a database management and analysis system for e-commerce, line-of-business, and data warehousing solutions. SQL Server 2008, the latest version, includes enhanced XML support, integration of .NET Framework objects in databases, improved integration with Microsoft Visual Studio and the Microsoft Office System, as well as improved analysis, reporting, and data integration services, that offers a comprehensive suits for e-commerce development. Refer to Microsoft official web site (&lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#partner"&gt;http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#partner&lt;/a&gt;) that has an article titled “Compare SQL Server to MySQL”,&lt;br /&gt;states that Microsoft SQL Server 2008 outperforms MySQL as a database platform in all business-critical areas. It provides a &lt;a title="large resource network" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#partner"&gt;large resource network&lt;/a&gt;, &lt;a title="industry-leading performance and enterprise-ready scalability" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#scalability"&gt;industry-leading performance and enterprise-ready scalability&lt;/a&gt;, the &lt;a title="highest level of security" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#security"&gt;highest level of security&lt;/a&gt;, the &lt;a title="highest availability" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#highavail"&gt;highest availability&lt;/a&gt;, a comprehensive &lt;a title="Business Intelligence (BI) platform" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#bi"&gt;Business Intelligence (BI) platform&lt;/a&gt;—all at a low &lt;a title="total cost of ownership" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#tco"&gt;total cost of ownership&lt;/a&gt; (TCO). Moreover,Microsoft SQL Server 2008 has fully compared with MySQL with the following points:&lt;br /&gt;&lt;br /&gt;· &lt;a title="Partner Ecosystem " href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#partner#partner"&gt;Partner Ecosystem &lt;/a&gt;&lt;br /&gt;· &lt;a title="Scalability" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#scalability#scalability"&gt;Scalability&lt;/a&gt;&lt;br /&gt;· &lt;a title="Security" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#security#security"&gt;Security&lt;/a&gt;&lt;br /&gt;· &lt;a title="High Availability" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#highavail#highavail"&gt;High Availability&lt;/a&gt;&lt;br /&gt;· &lt;a title="Business Intelligence" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#bi#bi"&gt;Business Intelligence&lt;/a&gt;&lt;br /&gt;· &lt;a title="Total Cost of Ownership (TCO)" href="http://www.microsoft.com/sqlserver/2008/en/us/compare-mysql.aspx#tco#tco"&gt;Total Cost of Ownership (TCO)&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Sybase (2003)&lt;/strong&gt; states that there is an e-commerce associated with their database product named Sybase Communications e-Business Solution (CeBs) is a suite of e-Care and e-Commerce applications with a vertical focus in Communications. With Communications e-Business Solution, Communications Service Providers can tap the cost savings, personalization, and efficiency of Web-based self-service through simplified browser-based access to business support systems for customers, channel partners, and employees. However, Sybase Communications e-Business Solution (CeBs) is no longer offered by Sybase. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Sybase does a performance Comparison between their product named ASE 15 and MySQL 5.0, and it states that Adaptive Server® Enterprise (ASE) is a highly scalable, mission critical database server that provides a portable, multi-platform system for high performance data management. The new features of ASE 15.0 deliver an operational advantage with lower cost and risk, and they achieve higher performance on mixed workload systems. Testing with ASE 15.0 has shown an advantage in overall performance for transaction processing over MySQL 5.0, and many complex queries show significant improvements. For more details, please refer to Sybase official article at &lt;a href="http://www.sybase.com/detail?id=1045499"&gt;http://www.sybase.com/detail?id=1045499&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;IBM (2009). “DB2 Connect and web applications”. Received 24th March, 2009 from URL - &lt;a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/wareh/getsta06im.htm"&gt;http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/wareh/getsta06im.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ORACLE (2008). “Improve Your Business Performance with Oracle E-Business Suite On Demand” . Received 24th March, 2009 from URL - &lt;a href="http://www.oracle.com/ondemand/collateral/oracle-e-business-suite-on-demand-brief.pdf"&gt;http://www.oracle.com/ondemand/collateral/oracle-e-business-suite-on-demand-brief.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft (2009). “Microsoft SQL Server” . Received 24th March, 2009 from URL -&lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/library/bb545450.aspx"&gt;http://technet.microsoft.com/en-us/library/bb545450.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sybase(2003), “Communications e-Business Solution”. Received 24th March, 2009 from URL -&lt;br /&gt;&lt;a href="http://www.sybase.com/products/archivedproducts/communicationse-businesssolution"&gt;http://www.sybase.com/products/archivedproducts/communicationse-businesssolution&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/_3ceCcWCWK_g/Sche-HQLzFI/AAAAAAAAAJA/rBRZrp5ZW9k/s1600-h/ibm3.bmp"&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-4420046989863759178?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/4420046989863759178/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4420046989863759178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/4420046989863759178'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-10-1.html' title='Exercise 10-1'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/SchgH8fB8YI/AAAAAAAAAJY/hurtrp0Jjs8/s72-c/mysql_container.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-1882239634847471229</id><published>2009-03-23T18:53:00.001-07:00</published><updated>2009-03-25T00:59:27.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 8'/><title type='text'>Exercise 8</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;8.1. Start with a simple table in the database:&lt;/strong&gt;&lt;/span&gt; &lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;mysql &gt; select * from employees;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;a.) create a table named employees as the below screendumps.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316566757256471794" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 224px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg9TB7sJPI/AAAAAAAAAHY/TvAfRj0tIX4/s400/8.1a.JPG" border="0" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;b.) Insert a record to the emloyees tables and select the data from it as the below screendump:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg9TQ3rv9I/AAAAAAAAAHg/CXnteKx1uqo/s1600-h/8.1b.JPG"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316566761266200530" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 176px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg9TQ3rv9I/AAAAAAAAAHg/CXnteKx1uqo/s400/8.1b.JPG" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;8.2. Create a web page with the following php:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5316568052102721970" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 192px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Scg-eZnF8bI/AAAAAAAAAHo/DsAkwiX0jG0/s400/8.2a.JPG" border="0" /&gt;&lt;br /&gt;When we execute ex82.php, the output is showed as follows:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316568049573201378" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Scg-eQMAheI/AAAAAAAAAHw/uGVbeYbXqoc/s400/8.2b.JPG" border="0" /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;8.3. This is how we can add a record and is part of a file to create called add_record.html&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;a.) Create a html file name add_record.html, please see below screendump.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316568894314145938" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Scg_PbF8aJI/AAAAAAAAAH4/9f5EOlL77gU/s400/8.3.JPG" border="0" /&gt;b.) Input something in the textbox and click button named "Enter information".&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;c.) Check that new data can be found in employees table, please see the following screendump;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316568907062251762" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 169px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/Scg_QKlVEPI/AAAAAAAAAIA/2TOQOBYOv1E/s400/83c.JPG" border="0" /&gt;&lt;strong&gt;8.4. The corresponding PHP file is add_record.php used with the POST method:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;strong&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Arial;"&gt;a.) Create a html file named add_record.html with POST method.&lt;/span&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316570611032599410" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/SchAzWXhK3I/AAAAAAAAAII/txGUFAYhwjY/s400/8.4a.JPG" border="0" /&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;b.) Create a php file named add_record.php in order to receive the variables of add_record.html with POST method.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5316570624111521138" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SchA0HFxrXI/AAAAAAAAAIQ/jr5F5pqcMiM/s400/8.4b.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;8.5. The last code example shows how to get multiple records:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Arial;"&gt;a.) create a php file named ex85.php&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316571110112527346" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 508px; CURSOR: hand; HEIGHT: 327px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3ceCcWCWK_g/SchBQZlcg_I/AAAAAAAAAIg/NGkOyil_Kfc/s400/8.5a.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;b.) Success to get multiple records, please see the following screendump.&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316571104188550658" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 265px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/SchBQDhDzgI/AAAAAAAAAIY/oLJYDDBAnHA/s400/8.5b.JPG" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-1882239634847471229?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/1882239634847471229/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-8.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1882239634847471229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/1882239634847471229'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-8.html' title='Exercise 8'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg9TB7sJPI/AAAAAAAAAHY/TvAfRj0tIX4/s72-c/8.1a.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-3814620767942470896</id><published>2009-03-23T18:47:00.000-07:00</published><updated>2009-03-25T00:59:16.818-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 7</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;7.1 Create an HTML page with the form:&lt;/strong&gt; &lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;The output is showd as follows:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316566029401499682" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg8oqdiqCI/AAAAAAAAAHI/HggV832MV3o/s400/test71.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;form action="submit.php" method="get"&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;7.2 Then, create a PHP file named submit.php with the following code:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;The output is showd as follows:&lt;/span&gt;&lt;/p&gt;&lt;/form&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316566027767037538" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 273px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg8okX2vmI/AAAAAAAAAHQ/uyxGH_E2yeo/s400/test72.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;form action="submit.php" method="get"&gt;&lt;/form&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-3814620767942470896?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/3814620767942470896/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-7.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3814620767942470896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/3814620767942470896'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-7.html' title='Exercise 7'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg8oqdiqCI/AAAAAAAAAHI/HggV832MV3o/s72-c/test71.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7271384292270388232</id><published>2009-03-23T18:23:00.000-07:00</published><updated>2009-03-25T00:59:07.250-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 6'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 6</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;6.1. In this exercise with can call up and examine some environment variables on the server. The code below has the unix environment variable for storing your remote Internet address. UNIX environment variable are recognised by the use of upper case letters. Try the same code by replacing with $ REMOTE_ADDR $SERVER_NAME, or $PHP_SELF&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;The below screendump shows some php code which is replaced by $REMOTE_ADDR. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316560261320365026" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg3Y6r1U-I/AAAAAAAAAGo/EN0mgMSqnS0/s400/test61.JPG" border="0" /&gt;The below screendump shows some php code which is replaced by $SERVER_NAME.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5316560705197740802" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Scg3ywQckwI/AAAAAAAAAGw/r5vC_CMtwvQ/s400/test611.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;The below screendump shows some php code which is replaced by $PHP_SELF. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316561011961779826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3ceCcWCWK_g/Scg4EnCsVnI/AAAAAAAAAG4/o4fJYtroOcI/s400/test612.JPG" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;6.2. Create a web application called "hello_world.php" which contains in the body:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;"&lt;?php &lt;/span&gt;&lt;span style="font-family:arial;"&gt;$myvar = "Hello World!";&lt;/span&gt; &lt;span style="font-family:arial;"&gt;echo $myvar;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;?&gt; &lt;/span&gt;&lt;br /&gt;The result is showed in the following:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316562953530878258" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_3ceCcWCWK_g/Scg51n81qTI/AAAAAAAAAHA/2OIoxEJ0CXU/s400/test62.JPG" border="0" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-7271384292270388232?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/7271384292270388232/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-6.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7271384292270388232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/7271384292270388232'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-6.html' title='Exercise 6'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3ceCcWCWK_g/Scg3Y6r1U-I/AAAAAAAAAGo/EN0mgMSqnS0/s72-c/test61.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-2039861591281064701</id><published>2009-03-23T17:36:00.000-07:00</published><updated>2009-03-25T00:58:56.934-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 5'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 5-3</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;"&gt;5-3. Framework for development. Compare and contrast any Two of:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;a. Java&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;b. .NET&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;c. Ruby on Rails&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;d. Turbo Gears&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;e. Google Gears&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-family:arial;"&gt;f. AJAX frameworks.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;I would like to compare and contrast the framework between Java and .NET based on c-charpcorner (2001). &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;I.) &lt;strong&gt;Object-oriented approach&lt;/strong&gt; - Both of them use an object-oriented approach for design.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;II.) &lt;strong&gt;CLR vs JVM&lt;/strong&gt; - The .NET framework's Common Language Runtime (CLR) is much similar to Java Virtual Machine (JVM), in terms of garbage collection, security, just in time compilation (JIT).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;One of the fundamental differences between Java Virtual Machine (JVM) instruction sets and Common Intermediate Language (CIL) is that JVM is big endian ( most significant byte first) and CIL uses little endian ( least significant byte first) binary representation. This difference will not be apparent to most of the programmers. Only system level programmers would have to deal with it. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;III.) &lt;strong&gt;Multiple platform vs multiple languages&lt;/strong&gt; - Java platform views the Internet world as one language running on different operating systems (OS), whereas .NET framework views the world running on one OS with a programmers having choice of multiple languages. Therefore Java platform interpolates multiple operating systems, and .NET framework interpolates multiple languages. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;IV.) &lt;strong&gt;Assemblies&lt;/strong&gt; - An assembly is the functional unit of sharing and reuse in the Common Language Runtime. It is the equivalent of JAR (Java Archive) files of Java. The Microsoft documentation stress that assemblies are "logical dlls". This may be a reasonable paradigm for VB or C++ programmers, but Java programmers will find it easier, if we visualize assemblies as an extension of JAR concept. However, unlike JAR, each assembly can have only one entry point defined, which can be either DllMain, WinMain, or Main. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;V.) &lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Conclusion - &lt;/strong&gt;.NET is definitely an improvement over Java framework, but it is NOT going to displace Java any time soon. Though in coming years Java and .NET will converge.&lt;br /&gt;It currently lacks support for other platforms. Since .NET has been architected by Microsoft, it is less likely to find the open source support base of free thinking programmers, which was one of the main reasons of Java's popularity. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;References:&lt;br /&gt;c-charpcorner (2001). “.Net framework comparsion with Java Architecture”. Received 20th March, 2009 from URL - &lt;/span&gt;&lt;a href="http://www.c-sharpcorner.com/UploadFile/abanerjee/DotNetforJava11292005023419AM/DotNetforJava.aspx"&gt;&lt;span style="font-family:arial;"&gt;http://www.c-sharpcorner.com/UploadFile/abanerjee/DotNetforJava11292005023419AM/DotNetforJava.aspx&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;This blog is created at March of 2009, which is powered by Sam Kwong!&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5837873896111880182-2039861591281064701?l=samkwong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://samkwong.blogspot.com/feeds/2039861591281064701/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-5-3.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2039861591281064701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5837873896111880182/posts/default/2039861591281064701'/><link rel='alternate' type='text/html' href='http://samkwong.blogspot.com/2009/03/exercise-5-3.html' title='Exercise 5-3'/><author><name>Sam Kwong</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_3ceCcWCWK_g/SbaT5DNQeuI/AAAAAAAAAAM/LZ7Ew1Wb1Fk/S220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5837873896111880182.post-7884545016038682922</id><published>2009-03-22T20:03:00.000-07:00</published><updated>2009-03-25T00:58:47.156-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exercise 5'/><category scheme='http://www.blogger.com/atom/ns#' term='Exercise'/><title type='text'>Exercise 5-2</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;5.2. Describe the important and distinguishing properties of Peer to Peer computing and the Grid. How is this peer to peer and the Grid architecture changing work flow and service-oriented applications?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Peer to Peer computing is important for distributed computing, data/content sharing, communication and collaboration, or platform services.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;HP(2003) states that the term “peer-to-peer” refers to a class of systems and applications that employ distributed resources to perform a function in a decentralized manner. The resources encompass computing power, data (storage and content), network bandwidth, and presence (computers, human, and other resources). The critical function can be distributed computing, data/content sharing, communication and collaboration, or platform services.&lt;br /&gt;Furthermore, peer-to-peer(P2P) enables valuable externalities, by aggregating resources through low-cost interoperability, the whole is made greater than the sum of its parts escalator, it also lowers cost of ownership and cost sharing, by using existing infrastructure and by eliminating or distributing the maintenance cost, moreover, it enables anonymity/privacy, by incorporating these requirements in the design and algorithms of P2P systems and applications, and by allowing peers a greater degree of autonomous control over their data and resources&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Grid computong is important for support various business processes.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;HP(2009) states resources can be dynamically provisioned to users or applications that need them in grid computing. Resources can be shared within a workgroup, department or enterprise; among different organizations and geographies; and even with groups outside the enterprise in collaborative projects. Grids can be designed to support various business processes. Grid technologies use emerging Web services standards such as XML, SOAP and WSDL and have long been used for scientific and technical work, where dispersed computers are linked to create virtual supercomputers that rapidly process vast amounts of information. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Domenico Talia (2003) states that Grid and P2P can be distinguished by the following points:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;First, Security is a central theme in grids, and several efforts are devoted to integrating relevant mechanisms for authentication, authorization, integrity, and confidentiality in grid platforms. In contrast, P2P systems originate in "open communities," in which users share more generic goals such as retrieving music from the Internet, rather than specific objectives such as participating in high-energy physics simulations.&lt;br /&gt;&lt;br /&gt;Second, Connectivity, Grids generally include powerful machines that are statically connected through high-performance networks with high levels of availability. On the other hand, the number of accessible nodes is generally low because access to grid resources is bonded to rigorous accounting mechanisms. Conversely, P2P systems are composed mainly of common desktop computers that are connected intermittently to the network, remaining available for a limited time with reduced reliability. The number of nodes connected in a P2P network at a given time is much greater than in a grid. Thus, the grid connectivity approach is still too stiff for new nodes and user access and accounting; it could benefit from the more flexible connectivity models used in P2P networks today. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Third, Fault Tolerance, the dynamic nature of grids necessitates some level of fault tolerance—especially for highly distributed code, such as parameter-sweep applications, which can fork numerous similar, independent jobs on many nodes.&lt;br /&gt;Beyond simple checkpointing and restarting, reliability and fault tolerance are largely unexplored in grid models and tools. The Globus information system allows fault detection, for instance, but developers must implement fault tolerance at the application level. For greater reliability, designers of fault-tolerance mechanisms and policies for grids should consider using decentralized P2P algorithms, which avoid centralized services that can represent critical failure points.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Peer to peer is changing the work flow and service-oriented applications, firstly i want to describe how is traditional work flow and service-oriented application, please see the below figure:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5316380338003231330" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 243px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3ceCcWCWK_g/SceTwAGNwmI/AAAAAAAAAGQ/wddZclZgDaM/s400/clientServer.bmp" border="0" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;The traditional work flow and service-oriented application are one-to-many, that's one server serves many clients, for example, one FTP server can allow many ftp client to download / upload online files.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Conversely, P2P's work flow and service-oriented application are many-to-many, please refer to the below figure, you can find that all nodes are multi-connected between each others, this design allows for scalable incremental growth and aggregates tremendous amount of comp
