Sunteți pe pagina 1din 16

CmpE 131 Final Project

SJ Social

Submitted By:
Amru Eliwat Claudia Carrasco Juan Sebastian Arturo Montoya mr.eliwat@gmail.com claudia__156@hotmail.com jssalcedot@hotmail.com montoya332@hotmail.com (510)329-1918 (650)839-3807 (831)454-6867 (650)814-7939 007393711 007200765 007093268 005711576

Table of Contents

1.0 Phase 1: CustomerSpecifications

Page nn

2.0 Phase 2: Our Approaches

Page nn

3.0 Phase 3: Design and Implementation

Page nn

4.0 Phase 4: Testing and Validation

Page nn

5.0 Phase 5: Results/Conclusion

Page nn

Phase 1: Customer Needs / Specifications Our customers are the students, employees, and alumni of San Jose State University (SJSU). SJSU has a population of about 30,448 students. More than 3,400 students live in campus and an estimated 5,000 additional students live within walking distance or an easy bike-ride to SJSU. The high population of students makes downtown San Jose a very profitable and busy area for the different businesses around school. And not just that, SJSU has a high diversity of races/ethnicities which makes the preferences of the students more complex and diversified which increases the variety of restaurants, cafes, etc. Students at SJSU seem to have a problem with finding proper businesses around school to either study, eat, relax, or hang out. The main problem is that there are too many options to choose from, but there is not too much information about these options to give the students an insight of which one would be the best fit for their needs. To address this problem, we propose the creation of a SJSU student social network. The specifications for the SJSU student social network are: The web application needs to be easy to access. It needs to allow the students for searching, reviewing and discussing the different businesses around campus such as restaurants, clubs, cafes, etc. It needs to allow students to narrow their searches bases on the location, operation hours, reviews, and price.

Functional and Non Functional Specifications Functional Food/drinks Our search engine has to be able to tell the customer what kinds of drinks and food are served at the restaurants. Noise Based on reviews from the customers our system will provide information on what the noise is at the different locations. Search option The search option will have advanced options that will let the customer have a better search result. Student reviews The system lets the customer write their own reviews from the different restaurants that can be viewed by any person using our system. Campus maps Our system will also display a picture of a map with the location of the restaurants. Operation hours The system will also show the customer what are the operational hours of the different restaurants.

Non functional Limited to SJSU students and faculty. The system will ask for SJSU id in order to verify that the customer is related to San Jose State. Privacy policy The information that we are providing will only be used for informational purposes only. Copyright/ patent The information that we are providing belongs to another party and is being used according to established parameters.

Phase 2 : Our Approaches Software Process The approach we took in order to complete this project is a Plan driven process where all of the process activities were planned in advance. This process was seemed to be the best approach for our group because most of the work was assign individual and progress was measured as

assignments were completed. The process of the Plan Driven approach helped us coordinate the work by implementing the phase of the water fall model into our project.

Figure 1 Water Fall Model At the early stages of the project we were able to make commitments in order to guide our progress. Many groups were made in order to understand the requirements for the project with the understanding that very little changes should be changed during the design process. The phases that were used were requirement specification, system and software design, implementation coding, integration, and maintenance. Homework assignments helped us maintain of Plan driven approach since phases were completed before moving onto the next phase.

Figure 2 Sequence Diagram The sequence diagram in a Unified Modeling Language help the developers understand what needed to be done in order to communicate with the Yelp database. This Sequence diagram

shows the objects and classes involved in the view and review scenario. It also shows the message exchanges between the objects in order to carry out their function. One of the usages of the sequence diagram in our meeting was as a bridge to communicate with other group members that didnt have software experience by clearly showing how a user will receive information from our server and Yelps database.

Figure 3 Case Diagram

Figure 5 UML Search Function Activity Diagram

Figure 4 UML Review Function Activity Diagram:

Requirements Specification

Requirements modification

Component analysis

System design with reuse

Development and Integration System Validation

Figure 2 Reuse-oriented software engineering Once the specifications were given about what is needed from the service that we were planning on delivering, our group decided, after brainstorming, that we could use a Reused oriented software engineering approach by using the database of yelp in order to get information about location around the college. The components that were offered by the yelp

database were free information and user reviews of much location around campus. Once we were able to understand what modifications needed to be made in order to provide a website that will display information from student and faculty and other users from Yelp, we made modification according.

Phase 3: Design and Implementation Our next phase in our Plan driven approach is the software development with Pair Programming, two of us sat down and began coding. The first and most important step to us was establishing the connection to Yelps API to use their database of restaurants. Next, we needed to design a web page that students could use to begin their search. Finally, we needed to be able to display the results of the search in an organized fashion with all the necessary information. Yelps API is structured in a way that made it easy for us as developers to access information about restaurants quickly and accurately. After authenticating with our token and OAuth consumer key, we were able to make calls to the API such as: http://api.yelp.com/v2/search?term=Chinese+Food&location=San+Jose+State This would return JSON that needed to be grabbed and parsed. To create the front-end that the user sees, we used HTML with CSS for styling. Twitter has a framework called Bootstrap.css which is designed for startups who need help with styling, but cannot afford to hire a designer. We used this framework for our design to add basic shadows behind our search box, and allow us to display the search results in an organized manner. Using

this framework was simpleall we had to do was call the Bootstrap.css stylsheet from within our index.php page, and the rest was done in HTML: <link rel="stylesheet" href="css/bootstrap.min.css"> This framework also makes our Web Application mobile friendly, and if the user is using his or her mobile phone, the Web Application is resized to fit the smaller screen: <meta name="viewport" content="width=device-width"> There are four major parts to our application: searching, database lookup, displaying results, and leaving reviews. For the demo we have changed how each of these parts work, but they still occur in the same order. These diagrams showcase how these parts work together:

Search function UML Activity Diagram:

User-Reviews UML Activity Diagram:

The code to connect to the Yelp API and retrieve information based on the searches conducted on our home page is as follows:

<?php $name = $_GET['name']; // Get search term from previous page $ts = time(); // Enter the path that the oauth library is in relation to the php file require_once ('lib/OAuth.php'); // For examaple, search for 'tacos' in 'sf'

$unsigned_url = "http://api.yelp.com/v2/search?term=".$name."&location=San+Jose+State+University"; // Set keys here $consumer_key = "jyPMnnxjE609A543iUn8uA"; $consumer_secret = "hhPS9XbuPJ93iYoki-mciZD1HbU"; $token = "wZHLy74Dh64U6eEujHLp6mtwMSEYP_Hj"; $token_secret = "U5pzYwcUKArtNkCanvIwYlzddsc"; // Token object built using the OAuth library $token = new OAuthToken($token, $token_secret); // Consumer object built using the OAuth library $consumer = new OAuthConsumer($consumer_key, $consumer_secret); // Yelp uses HMAC SHA1 encoding $signature_method = new OAuthSignatureMethod_HMAC_SHA1(); // Build OAuth Request using the OAuth PHP library. Uses the consumer and token object created above. $oauthrequest = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET', $unsigned_url); // Sign the request $oauthrequest->sign_request($signature_method, $consumer, $token); // Get the signed URL $signed_url = $oauthrequest->to_url(); // Send Yelp API Call $ch = curl_init($signed_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, 0);

$data = curl_exec($ch); // Yelp response curl_close($ch); // Handle Yelp response data and display results to user $obj = json_decode($data); foreach($obj->businesses as $business): echo "<div class='span2'>"; echo "<h3>".$business->name."</h3>"; echo "<a href=".$business->url."><img border=0 src='".$business>image_url."'></a><br/><br/>"; echo "<img border=0 src='".$business->rating_img_url."'><br/>"; echo $business->phone; echo "</div>"; endforeach; ?> To write this code we utilized Pair-Programming. Between the two of us and our discussions throughout the coding process, we ended up with very few logical flaws. The few logical flaws we found were easy to fix. Also, it allowed us to finish coding quickly because when one person couldnt remember a function or a command, the other would pitch in and give his opinion. Pair-Programming is definitely an efficient way to build and deliver a software product to a client.

Server Up Time As this is a web application, it must be hosted on a server. For hosting we opted to use a popular cloud hosting solution that is widely used among startup companies, called Heroku. Heroku is ideal for this project as it helps guarantee application uptime. Heroku engineers do server maintenance whenever there is an issue, and keep backups of all application databases running on their servers. As can be seen in the following diagrams, Heroku uptime trend has been above 98%, with the last problem being resolved in 10 minutes. Because of this, we can guarantee that our service will be available to students and staff alike as much as possible.

Phase 4: Testing The testing process is one of the most important parts of the design of software engineering. The testing will determine if the first iteration of the software developed will be ready for customer release. Since our code was based on PHP we relied on users feedback for the testing of our software. The testing method used was simple. The team gathered 5 different students and asked them to use the teams software. The students were told to go into the website of our software and to type into the search box the name of a type of food that they were interested in. Furthermore, we asked all of the students to fill in a survey designed to help the team determine the possible mistakes of our software. The survey included the questions: Did you find the results related to the food you were looking for? How far away from campus were the restaurants located? Did you think the search helped you identify where to go to eat? Any comments that could help us improve our software?

After the students had filled the surveys we analyzed the results and found some interesting information. Most of the students found the results related to the kind of food they looked for in the search box. There was one outlier in which a person wrote they wanted ramen and the search box found some places for sushi. But with further analysis the team was able to identify the problem was not from our software but rather from the people at Yelp! who organized the database.

Other important feedback was that one person got a restaurant that was 2 miles away from campus. This made us realize that our code was still providing results that were not walking distance from the University. Thanks to that, the team updated the code to avoid showing locations too far away from campus. In the end, most of the comments told us that we had to make the webpage nicer and more attractive. Due to time constraints and to the nature of the project the issue of the webpage attractiveness was not addressed by the team. One of the most important results from the testing was when the team tried to test the mobile version of the software. The testing showed that we had not adjusted the image scaling for the mobile device, hence the image on the mobile devices was too big and difficult to understand. The problem was addressed and our software is capable of resizing to mobile devices accordingly.

Phase 5: Results / Conclusion Designing a software is a delicate and complicated process that requires to understand and analyze many elements. During the process of creating the software the team identified many important characteristics needed to develop a successful software. Such characteristics included the customer, our goals, the functional and non functional requirements, the code, the ethical concerns, etc.

All the different requirements that are needed to develop a successful software also require a specifically designed clear direction. It was challenging for the team to be able to gather all the requirements and create a clear direction in which we could achieve superior results. Regardless, the methods and ideas that were taught in the class and setting clear and specific and real goals during every week were essential for the creation of the final product. In the end, the team managed to create the software that was originally planned at the beginning of the semester: a web based service that will help students and staff in the San Jose State community to find a place to go to eat or drink that is within walk distance from the university.

S-ar putea să vă placă și