Here is my Elevator Pitch 2 for ITC565 Business Applications Development.
Here is my Elevator Pitch 2 for ITC565 Business Applications Development.
Explore some of the problems associated with mobile technology or their suppliers.
1. What is meant by a location based service.
A wireless-IP service that uses geographic information to serve a mobile user. Any application
service that exploits the position of a mobile terminal. (Steiniger. S., Neun. M., & Edwardes. A., n.d.)
2. Visit an airline website 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?
Jetstar: “lets customers change flights through the mobile Internet”, the following services are available via WAP and SMS:(Cian, 6 February 2009)
The Commonwealth Bank uses SMS to send a security code to customers using their online banking service in order to authorise certain transactions.:
“NetBank now provides access to NetCode SMS, a free service which allows customers with a mobile phone to receive a one-time code to authorize certain transactions”(Gedda, 27 March, 2007).
“Two-factor authentication — soon to be rolled out by St George Bank, and currently used at Commonwealth, NAB, and ANZ — has a limited lifespan, however.” and “SMS two-factor authentication will become redundant within three years, according to NAB’s Blair as increased mobile banking will render the SMS verification less secure.” (Tung, 07 March 2008)
The article goes on to further state that voice barometrics will replace SMS authorisation: “Voice biometrics is still considered an ‘early stage technology’ according to Commonwealth Bank’s spokesperson.” (Tung, 07 March 2008)
Using these two examples as a yardstick you could say that SMS and WAP in the banking sector is getting used for verification and authorisation, whereas in the travel industry it is getting used to provide information, update and change travel details.
3. Lucent Technologies designs and delivers the systems, services and software that drive next-generation communications networks at: http://www.lucent.com
I visited Lucent Technologies website and reviewed the services, the following mobile services are available: (Alcatel Lucent, n.d.)
4. 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?
Wikipedia describes VoiceXML as a “standard XML format for specifying interactive voice dialogues between a human and a computer”.(Wikipedia, n.d.)
Initially I thought that the project was stalled, as the first version came out in May 2000. On further examination they are now up to version 3, with a draft released June 2009.(W3C, 2009)
It seems to be gaining in use for accessibility services that help people, the Delaware officials in 2002 launched the initial phases of Access Delaware: “using VoiceXML that lets citizens access state Web sites and receive basic information over the phone that was otherwise unavailable.” (Thormeyer, 03 November 2006)
There are also companies that provide hosting and support solutions for developers who want to build and deploy VoiceXML applications like Nuance Cafe. (Nuance Cafe, n.d.)
Accessibility services are often seen as last resort by businesses but government organisations usually have to comply with standards so I can see more use in VoiceXML as people expect better support services and businesses find there is another way to reach people.
5. Investigate CDMA, GSM or other network technologies for mobile phones and circuit switched and packet switched data capabilities.
CDMA stands for Code Division Multiple Access, and GSM stands for Global System for Mobile Communications, they are two competing mobile network technologies. (Wisegeek. n.d.)
GSM has worldwide over 1 billion subscribers, whereas CDMA networks support over 270 million subscribers.(Wisegeek. n.d.)
GSM carriers, however, have roaming contracts with other GSM carriers, allowing wider coverage of more rural areas.(Wisegeek. n.d.)
CDMA networks may not cover rural areas as well as GSM carriers, and though they may contract with GSM cells for roaming in more rural areas, the charge to the customer will generally be significantly higher.(Wisegeek. n.d.)
CDMA has been traditionally faster than GSM.(Wisegeek. n.d.)
One of the major advantages of GSM over CDMA is international use: “Because GSM is used in more than 74% of the markets across the globe, users of tri-band or quad-band handsets can travel to Europe, India, and most of Asia and still use their cell phones. CDMA offers no multiband capability, however, and therefore you can’t readily use it in multiple countries.” whereas CDMA is used widely mainly in “the United States, Canada, and North and South Korea”. (Peacock, January 2006)
6. Why is a company like Nokia described as having end-to-end expertise?
Nokia describe their end-to-end offering as containing: “five key steps to create competitiveness through end-to-end innovation” (Nokia Siemens Networks, n.d.)
My understanding of this: It is because they are large enough, have the technology and experience to offer a complete service, from research through to implementing and then further evolving an idea, that they are regarded and state themselves as having “end-to-end” expertise.
References
Search the web for a site that uses a cyber character or cyber agent to host a business site.
A good example is NewsHub as it uses agents to compile lists of related news information.
1 Describe what software agents are.
Wikipedia describe a software agent as: “a piece of software that acts for a user or other program in a relationship of agency”. (Wikipedia, n.d.)
2. Differentiate the various types of software agents.
Have the capabilities of adaptation and learning. They have sensory algorithms that allow them to adapt and artificial intelligence that allows them to learn through trial and error.(Wikipedia, n.d.)
Are self-contained and capable of making independent decisions, and taking actions to satisfy internal goals based upon their perceived environment.(Wikipedia, n.d.)
Can be loosely coupled and it becomes easy to have them executed as independent threads and on distributed processors.(Wikipedia, n.d.)
Occurs when many agents “collaborate with other agents” to share data.(Wikipedia, n.d.)
Agent code that moves itself, including its execution state, on to another machine, to continue execution there. (Wikipedia, n.d.)
A fuzzy agent is a software agent that implements fuzzy logic. (Wikipedia, n.d.)
3. Decribe how techniques such as artificial intelligence and statistical techniques are used in software agents.
They are used in intelligent agents to enable the capabilities of adaptaion and learning and they are used in data mining agents to compile trends.
4. List popular software agents currently in use in the commercial world.
5. Identify various activities in e-commerce where software agents are currently in use.
A common agent in use on Amazon.com is a shopping bot that provides feedback on your shopping habits when compared to other shoppers, to give you an idea of similar buying patterns.
Other agents include those used by search engines to track users and data mine there results to produce trends or key indicators.(Wikipedia, n.d.)
References
1. How do search engines such as Alta Vista differ from information directories?
I used to use Alta Vista, before the year 2000. It was and probably still is a good service. I may start to go back and use it again, because I have concerns about the privacy implications of using some other search engines. Nope just tried it and didn’t like it.
Doctorow, describes AltaVista and Lycos as ranking “documents that matched our keywords”.(Doctorow. 08 March, 2002)
He also goes on to say: “AltaVista tried to get computers to do both the repetitive parts (capturing billions of documents) and the creative parts (figuring out what the documents are about). This yielded the largest collection of randomly organized documents in the world, a Web-accessible version of a library where all the books have been re-shelved by axe-grinding illiterates who wanted to make sure that no matter what you were looking for, you’d find porn.” (Doctorow. 08 March, 2002)
“Altavista is a hybrid engine. It independently gathers results from its own index of 550 million pages, and supplements this with data from LookSmart and listings from Overture.” (Metamend., n.d.)
Search engines offer different ways of cataloging websites and articles, the following list summarises many of those ways:
2. What is a spider? What does it do?
In the context of search engines it is an automated searching mechanism that downloads content or pages within a site for later indexing by a search engine which then indexes the text and media within websites. This indexed text and media is then cataloged and the information used to pinpoint searches based on keywords contained within the search.
Wikipedia describe a spider as “Web crawler is a computer program that browses the World Wide Web in a methodical, automated manner”.(Wikipedia, n.d.)
3. Describe a search situation where the requirement for recall is high ?
The health services would require a service that uses large amounts of statistical evidence and specific diagnostic information that requires correct dosages, in order to diagnose a problem or support insightful analysis.
Law, would require a large database of past cases as well as laws and regulations outlining cases and approaches.
Engineering would require specific information about strengths and weaknesses of certain structures.
4. What is a meta-search engine? Provide examples.
Wikipedia describes it as: “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”. (Wikipedia, n.d.)
Examples: (UC Berkeley n.d.)
5. What is spamming?
My understanding of spamming is that in many countries it is illegal including Australia. It is the process and application of taking email addresses from businesses and individuals and sending those users email messages or some other forms of messages without their prior consent. It is an ethical privacy issue because unless that company or individual has provided you with their details, then obtaining their email addresses without their consent and sending them unsolicited email’s can be regarded as spam. The problem is that many people display their email’s for others to freely use, in the past spammers have argued that they obtained email addresses legally, but the law now regards this farming of email addresses as illegal unless you are sending information that can be regarded as related to their business in some way.
How can you get your site listed at major search sites; and how could you improve your site ranking?
Actually its a black art, in that nobody knows because the search engine companies keep their secrets closely guarded or closed source. Therefore a lot of SEO sites will provide you with techniques but those techniques tend to change.
The following ways help, but cannot guarantee success:
References
1. Use the coordination theory framework to describe the contribution of ERP software to organisational goals such as efficiency and flexibility.
I really found this question hard to follow and find relevant information that links the two concepts together.
Malone and Crowston (1994), define coordination as “managing dependencies”. The coordination theory framework is used to describe the dependency between a task and a resource. Tasks are either goals or activities and according to the simple model of actions, activities have preconditions and effects. Goals are considered as having effects but no preconditions. The preconditions and effects are the resources, required, consumed or created by an activity. (Crowston, n.d.)
In order to assign resources to a task, the following steps must be performed: (Crowston, n.d.)
ERP stands for Enterprise Resource Planning. ERP is a way to integrate the data and processes of an organization into one single system. Usually ERP systems will have many components including hardware and software, in order to achieve integration, most ERP systems use a unified database to store data for various functions found throughout the organization. (tech-faq.com, n.d.)
I was unable to find a reference that links the concepts ERP and Coordination Theory Framework, so I therefore will have a “stab” at the question trying to link the various topics together.
The Organisational goals of efficiency and flexibility are sometimes at odds with each other or at different ends of the scale, so to speak. Usually an organisation that is extremely efficient is also inflexible. The reason is because efficient systems tend to be strictly controlled, brittle, strongly led, and follow a set of protocols or rules that are adhered to. In contrast a flexible system may not have the strictness or the rules and may be open to interpretation and creativity, however this often leads to inefficient use of resources because the assignment of resources is not strictly controlled and monitored.
Using the tasks mentioned earlier, ERP would do the following in order to find a balanced medium between the organisational goals of efficiency and flexibility, so that resources could be assigned and removed easily thus achieving a balance of flexibility and efficiency:
Therefore the coordination theory framework within ERP provides a basis for resources to be allocated with controlled efficiency to ensure the highest prioritised resources are used, and with flexibility to enable switching between resources as they become unavailable or available.
2. Differentiate between software systems such as Customer Relationship Management (CRM) software, Business-to-Business e-commerce programs and Supply-Chain-Management (SCM) software.
Customer Relationship Management or CRM is a combination of enterprise strategies, business processes and information technologies used to learn more about customers’ needs and behaviors in order to develop stronger relationships with them.(bNet, n.d.)
CRM includes many aspects which relate directly to one another: (Wikipedia, n.d., Customer relationship management)
Business-to-Business (B2B) e-commerce includes transactions between businesses, such as between a manufacturer and a wholesaler, or between a wholesaler and a retailer. (Wikipedia, n.d., Customer relationship management)
So if we compare B2B and CRM the main difference is that B2B refers to interactions with businesses only, whereas CRM overlaps to include clients who are businesses and clients who are retail customers as well.
Supply-Chain-Management (SCM) refers to software which is used to manage a network of interconnected businesses. Supply Chain Management spans all movement and storage of raw materials, work-in-process inventory, and finished goods from point of origin to point of consumption. (Wikipedia, n.d., Supply chain management). Ince, also describes the supply chain as having a symbiotic relationship, with each member in the chain reliant on the other for some of its resources.
As stated B2B covers business relationships only, CRM covers all clients both business and consumer, and if we include Supply Chain Management it would include both CRM software to track clients and B2B in order to submit and process transactions between businesses within the supply chain..
What are the limitations of the EDI platform? How does a web-based platform for inter-enterprise communication rectify these limitations?
EDI stands for Electronic Data Interchange and refers to the structured transmission of data between organisation’s by electronic means. (Wikipedia, n.d., Electronic Data Interchange)
The limitations of the EDI platform:
The limitations of the EDI platform from Samtani, Healey, Samtani, 2002.
How does a web-based platform for inter-enterprise communication rectify these limitations (EDI basics, n.d. ):
Describe the CRM lifecycle and the different segments of the CRM software.
Customer Relationship Management or CRM is a combination of enterprise strategies, business processes and information technologies used to learn more about customers’ needs and behaviors in order to develop stronger relationships with them. (Zhang, 2005)
CRM consists of three phases – customer acquisition, customer relationship enhancements and customer retention. (Zhang, 2005)
CRM software streamlines CRM activities at each phase of customer relationship management. (Zhang, 2005)
Customer Acquisition:
Customer Relationship Enhancements:
Customer Retention:
Upon completing Exercise 22 I’ve since found out that it wasn’t required.
References.
Develop the class diagram for the following shopping cart specifications:
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, delivery 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 rating for the customer is good. The customer can make or cancel orders as well as add and delete items to the shopping cart product. the Credit Card object contains the secure method for chaecking that the charge is authentic.
Assumptions: The attributes and operations not mentioned in the specifications above will not be displayed.
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.
Use cases are text stories, used to discover and record requirements. They are primarily functional or behavioral requirements that indicate what the system will do.(Larmen, 2005.)
A Use Case Model Diagram is distinct from a Use Case. A Use case model diagram is represented by one or more Actors, one or more Use Cases and the System the use case or cases are describing. Interconnecting lines between the Actors and the Use Case make up the a use case model. The following illustration describes the relationship of the three elements that make a Use Case Model diagram: (Schmuller, 2004.)
A Class is a blueprint of an object that contains attributes and operations. A Class diagram describes the relationship between two or more classes. (Schmuller, 2004.)
A Sequence Diagram is a picture that shows, for one particular scenario of use case, the events that external actors generate, their order and inter-system events. All systems are treated as a black box.(Larmen, 2005.)
A Collaboration or Communication diagram is an extension of the object diagram.(Schmuller, 2004.)
Whereas an Object diagram shows how instances of classes are linked together in an instant of time, a Collaboration diagram shows interactions among those instances over time.(Schmuller, 2004.)
A State Chart diagram is used to model the way objects change their state in response to events and time.(Schmuller, 2004.)

A UML Activity Diagram shows sequential and parallel activities in a process. They are useful for modelling business processes, workflows, data flows and complex algorithms. (Larmen, 2005.)

Component modelling diagrams are used to emphasise that the interfaces are important and its modular, self-contained and replaceable. They are a design level perspective that map to concrete artifacts such as files.(Larmen, 2005.)

A Deployment Diagram shows how artifacts are deployed on system hardware, and how the pieces of hardware connect to one another. The main hardware item is a node.(Schmuller, 2004.)

References.
Topic objectives
Upon the completion of this workshop, developers or managers should be able to:
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.
Free response and reflective questions:
1. List what you consider to be the three strengths of Ruby on Rails workshop series.
Despite the fact that we didn’t use the online tools for the workshop series and we didn’t have an online production server I found the workshop series to be a good introduction to the Ruby on Rails framework. I enjoyed the RailsSpace book we had to read in Workshop 6, Hartl, M & Prochazka, A, (2008). RailsSpace. I believe the online tutorials were helpful and insightful as well.
Strengths of the Ruby on Rails workshop series:
2. List what you consider to be the three weaknesses of Ruby on Rails workshop series.
3. List what aspects of Ruby on Rails workshop series that you found to be most difficult.
4. List what improvements could be made to the Ruby on Rails workshop series
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?
Apart from the fact the we never looked in any great detail at any other web framework other than Ruby on Rails, I’m not sure if I can answer this question. We looked briefly at PHP, Perl, Java and Python in the exercises. We discussed MVC design patterns and how Ruby on Rails has kick started a move in that general direction from all the players including those mentioned but we didn’t build anything significant with any other framework or language.
I think a more effective approach would have been to take three languages and an associated MVC framework like PHP with Cake or CodeIgniter, Python and Django and Ruby with Ruby on Rails and build a blogging engine with each, then compare the processes. Then get the students to develop other small applications with a language of their choice, or continue with Ruby on Rails.
I think the approach taken so far was moderately effective and needs to be improved. As I’ve mentioned Workshop 6 was a pivotal learning point that significantly raised my level of understanding of Ruby on Rails, and as I believe a better approach would be to move the Workshops ahead to give the students more time practice what they’ve learnt and absorb the information they’ve gained.
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.
Again this is another question that cannot be answered deeply. The Answer is we didn’t use any of the online collaboration tools other than the forum. I believe this to be for the following reasons:
The Forum has been used with moderate success but again there was just too much exercise work and workshop work that had to be completed so that online collaboration was a lower priority. Topics dicussed included Convention over Configuration and Security features of Rails.
7. Further comments
I have enjoyed the course and learning Ruby on Rails and the MVC design pattern. I think the next step would be to continue learning Rails and setup a production environment on Ubuntu so I cant test deployment correctly. From there develop small applications and build on my understanding of Rails.
I would also like to look at other MVC frameworks, specifically Django as seems to have a strong focussed community similar to Ruby on Rails.
Topic objectives
Upon the completion of this workshop, developers or managers should be able to:
Topic reading from Safari Books Online
Hartl, M & Prochazka, A, (2008). RailsSpace: Building a Social Networking Website with Ruby on Rails, Pearson Education
Both teams of developers and IT managers examine the Rails application deployment considerations as described at http://rubyonrails.org/deploy and in Chapter 17 of ‘RailsSpace’. This raises issues around which advice to follow in the migration of the Online Taxi Booking Service to the production site. Both teams consider which deployment and maintenance procedures to adopt.
Focus Question
As either a developer or as an IT manager, what are the options available when deploying and maintaining the Ruby on Rails application online?
DEVELOPER’S THREAD (RED team)
To Do:
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
Can you get the OTBS Running in production mode as a minimal production server?
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.
As either a developer or as an IT manager, what are the options available when deploying and maintaining the Ruby on Rails application online?
2. Phusion Passenger
According to the rubyonrails.org site this is the “The preferred deployment setup for Rails”. (rubyonrails.org. (n.d.). Deploying Ruby on Rails is Easy.)
If there is one thing that at this stage bothers me (although I am starting to get used to it) it is the hype and marketing of Ruby on Rails. The community makes a lot of claims and uses noisy marketing techniques to stand out, I question if it’s really that necessary. I assume they want to gain market share in the web dev sphere this way, but some sites seem overly bloated with hype and less concerned with trying convey information in a readable way.
I watched the online screencast movie passenger.mov to get an understanding of the deployment option Phusion Passenger. After seeing it I felt that I would probably use this application as it seems relatively hassle free and only requires minor modifications to the apache web server. The screencast also mentions the location of the documentation which I will now review and see if it is more helpful than the Phusion Passenger home page.
After reviewing the documentation I found that it does not support windows so I can’t use this option.
2. JumpBox for Ruby on Rails Deployment
JumpBox is described as an application that, “allows you as the developer to concentrate on your development rather than having to accommodate the potentially infinite number of configuration possibilities that one might otherwise encounter in attempting to distribute Rails applications to end user systems.” (JumpBox, n.d., JumpBox for Ruby on Rails Deployment.)
JumpBox works in the following way: “The JumpBox for Ruby on Rails is a self-contained Ubuntu Linux environment that, upon startup, immediately hosts fully functioning Apache, Ruby, MySQL, and Ruby On Rails environments. With only a minimal amount of preparation, you can use your favorite deployment method to install and host your Rails application on the JumpBox.” (JumpBox, n.d., JumpBox for Ruby on Rails Deployment.)
Looks like a good option, but not one I would consider because I don’t have Ubuntu running.
3. Proxy setups
Not sure what this is but is was on the list of the rubyonrails.org
I found these instructions on the mongrel site, regarding “A simple single mongrel configuration” with Apache. Basically what you are doing is configuring your apache web server to act as a proxy for any requests that are sent to the web server. The apache web server, acting as the proxy, then passess those requests through to the mongrel web server.
Now I just have to test this proxy method on my machine.
This is also the option described in Hartl, M & Prochazka, A, (2008), Chapter 17. Looks similar to the tutorial above and also the tutorial by Brian Hogan.(4 May 2006). Serving Multiple Rails Applications on Windows with Apache and Mongrel, I will try this at a later stage.
4. Apache and FastCGI
I set the Apache configuration as outlined in the following document, Brian Hogan. (4 May 2006.). Integrate Rails into an Existing IIS Web infrastructure using Apache and FastCGI, unfortunately I followed the I got a 403 Forbidden error. Back to the drawing board.
Next I tried the tutorial by Brian Hogan.(4 May 2006). Serving Multiple Rails Applications on Windows with Apache and Mongrel, so far seems overly complex.
My conclusion at this stage is that the windows os is hardly considered as important for Ruby on Rails production deployment. Being an open source community who can blame them in some respects. However I think that if more development was directed at making this part of their main strategic goals or roadmap, more windows centric developers would start using Ruby on Rails. I probably would. My next step going forward is to set up Ubuntu, it seems I have no other choice.
5. JRuby for J2EE using Glassfish and Warbler.
I’m looking at this in conjunction with using Netbeans, as Netbeans allows you use JRuby natively.
6. Capistrano
Capistrano is described as a “tool for automating tasks on one or more remote servers. It executes commands in parallel on all targeted machines, and provides a mechanism for rolling back changes across multiple machines.” (Capistrano, n.d.)
I’m not sure I need it at this stage worth a look at, later once I get a production site up and running.
Ruby in Rails deployment options:
| Deployment Option | Operating System | Web Servers supported | Environment | Download Size |
|---|---|---|---|---|
| Phusion Passenger | Any POSIX-compliant operating system:
Does not work on Microsoft Windows. |
Apache Nginx |
- | - |
| JumpBox | Ubuntu Linux 8.04 LTS | Apache | Apache, Ruby, MySQL, and Ruby On Rails | 186 MB |
| NetBeans | Windows, Linux, Mac OS X | Nginx | NetBeans 6.0 or greater | - |
Evaluate and devise how to integrate a new Rails site into an existing or future e-commerce structure.
If I were to use Ruby on Rails in the future I would consider integrating into an e-commerce structure from the very beginning. Rails is a framework that requires the developer to adhere to the conventions otherwise you can’t take advantage of the framework abstractions that automate boilerplate tasks.
One of the areas I have noticed where Ruby on Rails seems deficient or less advanced than other more recent MVC frameworks is in the area of web content management. I beleive this is important when considering any option for web development because in my own experience clients will request and want to test the CMS being used. Therefore if I was to use Ruby on Rails I would need to develop a CMS or find an existing open source Ruby on Rails CMS that could be incorporated into the application seemlessly.
The other application to consider would be an existing open source e-commerce system rather than building your own. Why?, because there are thousands of projects out there and to build your own would be wasting time and money and would not be tested to the same degree as an existing open source project.
Conclusions.
I’ve looked at and tried a couple of options, the one that stands out at the moment as the the most likely way of getting a production site running is to use a proxy web server with Mongrel, the tutorial “Serving Multiple Rails Applications on Windows with Apache and Mongrel” outlines this process. Yet to look at the Netbeans/JRuby option hopefully I can get back to this at some stage. (I having a few problems installing the JRuby plugins into Netbeans.)
If I were to develop an application for a client I would not bother with testing it on a windows environment for the deployment of Ruby on Rails. It’s just not supported well enough and to test a production deployment you have to overcome to many obstacles. The next best option would be to get it working on Ubuntu Linux using either Phusion Passenger or Jumpbox.
References.
Along with auto-generated application controller, controllers were created for passengers, site, and user:
The site contorller is used to for the static view templates such as the Home, About Us and Help.
The user controller is used for the registration views. It is the following actions:
The passengers controller is used by the CRUD operations generated through the scaffolding process. Even though I’ve left the original scaffold generated model, controller and views I’ve had to make modifications so that the users table is linked to the passengers table. The passengers controller has the following methods:
Here is the code for the passengers controller:
class PassengersController < ApplicationController # GET /passengers # GET /passengers.xml def index @user = User.find(session[:user_id]) @passengers = Passenger.find_all_by_user_id(session[:user_id]) respond_to do |format| format.html # index.html.erb format.xml { render :xml => @passengers }
end
end
# GET /passengers/1
# GET /passengers/1.xml
def show
@passenger = Passenger.find(params[:id])
if @passenger.user_id == User.find(session[:user_id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @passenger }
end
end
end
# GET /passengers/new
# GET /passengers/new.xml
def new
@user = User.find(session[:user_id])
@passenger = Passenger.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @passenger }
end
end
# GET /passengers/1/edit
def edit
@passenger = Passenger.find(params[:id])
end
# POST /passengers
# POST /passengers.xml
def create
@passenger = Passenger.new(params[:passenger])
@passenger.user_id = session[:user_id]
respond_to do |format|
if @passenger.save
flash[:notice] = ‘Passenger was successfully created.’
format.html { redirect_to(@passenger) }
format.xml { render :xml => @passenger, :status => :created, :location => @passenger }
else
format.html { render :action => “new” }
format.xml { render :xml => @passenger.errors, :status => :unprocessable_entity }
end
end
end
# PUT /passengers/1
# PUT /passengers/1.xml
def update
@passenger = Passenger.find(params[:id])
respond_to do |format|
if @passenger.update_attributes(params[:passenger])
flash[:notice] = ‘Passenger was successfully updated.’
format.html { redirect_to(@passenger) }
format.xml { head :ok }
else
format.html { render :action => “edit” }
format.xml { render :xml => @passenger.errors, :status => :unprocessable_entity }
end
end
end
# DELETE /passengers/1
# DELETE /passengers/1.xml
def destroy
@passenger = Passenger.find(params[:id])
@passenger.destroy
respond_to do |format|
format.html { redirect_to(passengers_url) }
format.xml { head :ok }
end
end
end
In the first method, index, is where the main adjustment has been made the line:
@passengers = Passenger.find_all_by_user_id(session[:user_id])Passes the user_id which is the foreign key to the passengers to do the lookup for all entries whith that user_id.
The other notable additions to the code occur in the model, the following line is added to the user model:
class User < ActiveRecord::Base
has_many :passengers
.
.
.
And to the passenger model:
class Passenger < ActiveRecord::Base
belongs_to :user
end