Friday, May 15, 2009

Workshop 8: Ruby on Rails Workshops Report and Evaluation

Evaluation and Report

Please answer each question in this evaluation section. In your answer, please consider content/topics presented and the technologies and teaching strategies used during the Ruby on Rails Workshops. Results will be collated and used to modify the workshop series.
This form is just a format guide to you evaluation and report. Thank you for your time to complete workshop 8.

1. List what you consider to be the three strengths of Ruby on Rails workshop series


I consider the 3 strengths to be:
  1. Learn RoR from background concept to programming code, then application deployment gradually.
  2. Provide suitable materials and resources.
  3. Good in learning programming coding in Workshop 4 and 5.
2. List what you consider to be the three weaknesses of Ruby on Rails workshop series:

I consider 3 weaknesses to be:
  1. No enough time to complete the whole application.
  2. Each workshop is separated not strongly related.
  3. The work load may be too large for a part time student.
3. List what aspects of Ruby on Rails workshop series that you found to be most difficult.

The most difficult aspects were:
  1. Installation of RoR and setup of MySQL in my Mac for different versions, and too many methods.
  2. The integration use of Method, View and Control (MVC).
  3. Workshop 6: use of AJAX
  4. Need a lot of time to complete the workshops.
4. List what improvements could be made to the Ruby on Rails workshop series:

Improvements you would make include:
  1. If the course duration can be longer, it may has enough time to learn better.
  2. Improve the relation between workshops.
  3. Delivery the workshops early
Free response and reflective questions:

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?

I only have a little experiences in Web framework (PHP and .Net). I think PHP and .Net are more suitable in business world nowadays. It may be better to learn the business software for the student easy to apply the knowlege in their working enrionment. Mircosoft provides 3 months learning edition or free Express edition in SQL server and Visual Studio for us to study.

6. Did the Developer’s or IT managers 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.

As I use a lot of time to complete my exercises and workshops, I can only spend a little works in the focus group of RoR workshop.

7. Further comments to add?


As the tutor in Hong Kong cannot get all the materials directly from CSU, he cannot help us much. It may be better if he can get extra materials to guide us to complete the exercises and workshops.

Workshop 7: End of the Line: production site migration and maintenance

Developers conclude their work with the OTBS and look at the options for deployment of the site. Examine the various platforms/software tools used for deployment such as UNIX environment suggested in the Discussion Notes, Mongrel or Mongrel cluster, Nginx, Subversion or Capistrano (during development stage), JRuby in the Java environment.

Which way?


The choice is 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

The OTBS is developed using Ruby on Rails (RoR). RoR is a new development language for me. I need to learn the implementation of Model-View-Controller (MOV) pattern in RoR, and code that controls or manipulates the MySQL database associated with my OTBS application. The stores business logic for validating or formatting of data that be stored in the model layer. RoR is good in it's principle of Don't Repeat Yourself (DRY). Rails attempts to impose many best practice techniques and conventions on the developer in order to create web applications that composed both elegantly and correctly (Alameda 2008).

RoR provide the modern database-driven web application, but nothing is perfect (Alameda 2008):
  • The performance of RoR is a bit slower than other web technologies.
  • Rails is a bit more demanding to deploy when compared to other solution such as PHP.
  • The rapidly changing of the Rails, makes the Rails developers to continuously improve both the framework and the development practices.
  • Not really understanding the code by the developers when they commonly use the tools (scaffolding) to generate their applications. It is a risk when something goes wrong with the application or need to modify the code to handle a special circumstance.
If I need to develop a web application for my company, I will select Microsoft ASP .Net. ASP .Net is most commonly used in business environment. It provide a easily use graphic tools for us to develop of our application. We could find a lot of resource without difficultly on the Web or other aspect such as supporting from Microsoft, books, training course and developer certificate. The business feels more confident to develop their Web site by ASP .Net, than using other open source tools such as RoR.

Can you get the OTBS Running in production mode as a minimal production server?

When deploy applications for development or testing environment, we need to (Hartl & Prochazka, 2008):
  • Configure the production database connection in the file named database.yml.
  • Create database in the production server
  • Run the migration in Rails by using of 'rake' to construt tables in it
  • Stop the development server and start a new server in production environment by using the -e flag (>ruby script/server -e production)
Minimal production server (Hartl & Prochazka, 2008):
  • Using Mongrel / Linux OS / Apache Web server, as the Rails application server
  • Setup the same softwares (such as Ruby, Rails, database and plugins) on the server like the development computer
  • Upload the Rails project to the server, follow the deploy application steps at the above to create and configure the production database
  • Install and configure the application server and webserver
A single server running a single Mongrel process is probably sufficient for most Rails application. A single server can be kept adding new Mongrels until you run out of CPU time, at that stage a new servers need to be added. Although caching can minimize database hits, the database may eventually become the application botttleneck. When that point reach, an extra database server need to be added in a master-slave setup (Hartl & Prochazka, 2008).

Reference
  1. Alameda, E. (2008), Foundation rails 2, Apress and fiends of ED books.
  2. Hartl, M. and Prochazka, A. (2008), Railsspace: building a social networking website with ruby on rails, Person Education, Inc.

Tuesday, May 5, 2009

Workshop 6: Enjoying the Ride: Web framework alternatives, scalability and flexibility

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).

o generate a controller and an action by adding a method(s) to a controller;
o create a view template for each action and to link to actions from views;
o use AJAX to improve the user experience;
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.


By following the example of the e-book "RailsSpace", I create the Home page of OTBS in my computer:


By clicking on the link: 'Register', The screen redirected to the user registration page:


The fields validation check for user registration:


Typing valid user information into the User Registration form, then submit it by clicking on 'Register!' button:


The return result of new user created successfully:


The user record in the database OTBS:


It is not easy to complete the above user registration page. I follow all the steps from charter 2 to charter 4 in the e-book 'RailsSpace', modify the contents to fit the need of the OTBS. Repeat of the debugging process by review the charters again and again.

I have learn from charter 2 to 4 in the e-book 'RailsSpace' for user registration:
  • Changing the route for home page display
  • The uses cascading style sheet (CSS)
  • Do repeat yourself (DRY) works in Ruby on Rails (ROR)?
  • The uses of migration to create and modify table
  • The uses of model validations
  • Form debug
  • Integrate uses of MOV in ROR
By following the charter 6 to 7 in the e-book "RailsSpace", I create the advanced login page of OTBS in my computer. By clicking on the link: 'Login', The screen redirected to the user login page:


Input of invalid user name and password, and select remember me option:


Input of valid user name and password, then redirect to 'Welcome' page:


The database record of the user:


The database record of the user's session:


I have learn from charter 6 to 7 in the e-book 'RailsSpace' for advanced login :
  • Test programs
  • Handle of login session
  • Protecting pages
  • Login forwarding
  • Logout & clear password
  • Use of cookie functions to remember user passward
  • More secure cookie by a secure hashing algorithm
AJAX stands for Asynchronous JavaScipt and XML. AJAX includes several technologies:
  • XHTML for the markup of Web pages
  • CSS for styling
  • Dynamic display and interaction using DOM
  • Data manipulation and interchange using XML
  • Data retrieval using XMLHttpRequest
  • JavaScript as the glue that meshes all this together
The Web page without being refreshed the contents of the entire page, when you retrieve data for a Web page by AJAX. In basic web architecture, when user clicks a link or submits a form, the form is submitted to the server. Then the server sends back a response new page to the user.
When AJAX is used, it loads an AJAX engine in the background. The engine is written in JavaScipt and its responsibility is to both communicate with the web server and display the results to the user. The server returns an HTML fragment that contains the server's response and displays only the data that is new or changed as opposed to refreshing the entire page.

Rails has a simple, consistent model to implements AJAX operations. Once the brower has render and displayed the initial web page different user actions trigger an AJAX operation:
  • Some trigger fires: by user clicking on a button or link, user making changes to the data on a form or in a field
  • The web client calls the server: A JavaScript method, XMLHttpRequest, send data associated with the trigger to an action handler on the server.
  • The server does processing: The server-side action handler does something with the data and returns an HTML fragment to the client.
  • The client receive the response: The client-side JavaScript, which Rails creates automatically, receives the HTML fragment and uses it to update a specified part of the current pages.

Exercise 26:

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.

1. Choose ONE of the four ways to manage and develop integrated systems as listed below
I choose the 3. Federated databases
These are multi-tiered systems for load balancing and improving performance across a set of cooperative database servers by horizontally partitioning tables. Member servers can be at separate business sites and are configured to cooperate in processing database SQL requests, similar to clustered systems. Most large database vendors all have database products for implementing a federated system. Consider a comparison of federated vs fault tolerant clustered architectures as used by MySQL database products.

2. Summarise your understanding and describe its relevance (250 words max) in either your study at university or in your work environment

The utility goals of develop integrated system are greater efficiency, effectiveness and competitiveness in organizations. But the term of integration in another way means complex construct in technical, systems, organizations and strategic aspects. Most systems fail due to the lack of complex organizational factors. Most of the planning and resource focus on technical and strategic aspects of the information systems (IS). Today we implement an integrated system more balanced between technical, strategic and organizational analysis.

Taken from Below (1987) and adapted by Thomas (1991):

Before start of multi-tiered systems project, we need to collect and analysis:
• Historical documents – any related project, pass experience
• Organization culture – project handling, resource, budgeting

Project start:
• Define objectives and scopes
• Select suitable solution and database vendors
• Grant approval from top management
• Budget
• Schedule
• Resource arrangement
• Detail project plan

Implementation:
• Monitor project progress
• Review the performance and budget regularly
• Testing and evaluation
• Continue operation plan

MySQL Database cluster allows us to set up a database shared between a number of machines in federated and fault tolerant models. The federated cluster in distributed architecture allows for load balancing, provides benefit in scalability. The cluster servers spread the load in almost linear fashion. The system can handle more transactions and faster response time. The fault tolerant clustered servers provide high availability. The redundant copies of data allow the system stay up, if one or some of machines go down.

3. Edit TWO similar versions (include bibliography) of that summary to CSU Interact:
a. post version A as a wiki page contribution
The first post:


b. add version B as a final entry to close your developer’s blog.
The final entry:


Reference
  1. Below, L. J. (1987). The meaning of integration. In proceedings of the third european conference on automated manufacturing. UK: IFS publications.
  2. Thomas, P. S. (1991). Implementing computer integrated manufacturing technology - an integrative framework. Ph.D. Thesis, University of Northumbria, Unpublished.

Monday, May 4, 2009

Exercise 25: M-commerce and the e-wallet: Innovation and mobile devices

Explore ONE of the problems associated with mobile technology or their suppliers, from 1 to 4 below:
1. What is meant by a location based service?
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?
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?
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 – http://www.nokia.com – described as having end-to-end expertise?

I select the problem: 1. What is meant by a location based service?
Location based service (LBS) is by knowledge of the location of the end user, to deliver relevant, timely and engaging content and information. LBS is an additional stream of revenue that can be generated from their investments in the fixed infrastructure for mobile network suppliers. The end user also advance in helping them to reduce confusion, improve the consumption experience and deliver high-quality service options (Rao & Minakakis, 2003).

The location of the user traditionally is difficult to pinpoint and use due to its inherent dynamism and unpredictability. Today the new technologies integrated into lightweight mobile devices and terminals, pinpointing location become quickly dominant. The quick-moving technologies like GPS, mobile cell phone identification techniques and network triangulation allow carriers to zoom in on customer activity in defined physical location. Because of these capabilities going on more accessible, accurate and real-time, different service like LBS become possible (Rao & Minakakis, 2003).

Different platforms such as PDAs and mobile phones integrated with the wireless network infrastructure, connect to different types of servers to back-end database with serveral technologies. LBS providers need to play attention on mixed solution in software, hardware, and wireless connectivity into a plan for serving LBS content (Rao & Minakakis, 2003).

Mobile network platforms for identification (Rao & Minakakis, 2003):


Deliver focused services using information about customer location is extremely appealing. LBS is full of risks and caveats (Rao & Minakakis, 2003):
  • There has been much of infeasible and overstate advertising
  • Limitations of the technologies and LBS is not widespread
  • Potentially intrude privacy of the customer
  • Not a proved effort in developing maintainable business models that sufficiently address and enhance the customer experience.
LBS provide a new source of revenue opportunity for multiple stakeholders in the mobile area. Under the existing technical limitations like device form factors and the speed of data access, and combined with human restriction like reduced consideration sets and the need for speed and convenience, LBS must deliver relevant, targeted, and timely information to consumers at right time and place of their choice. The competitive advantage between the providers will enhance the grow in LBS. They would focus on superior customer experiences, distinctive, secure and high quality service and their branding (Rao & Minakakis, 2003).

Reference
  1. Rao, B. and Minakakis, L. (2003), Evolution of mobile location-based services, Communications of the ACM, 46, 61-65.