Pipe Dream: Difference between revisions

From CS486wiki
Jump to navigationJump to search
Content deleted Content added
 
(8 intermediate revisions by the same user not shown)
Line 51: Line 51:


Before we begin developing the project, we designed a wireframe to clearly show us what to do, which way to lead
Before we begin developing the project, we designed a wireframe to clearly show us what to do, which way to lead

To create best user experience, we tried to create a simple user interface, we embraced the flat-style design principles, and tried our best to implement those principles




Line 99: Line 101:
----
----


[[File:Screen_Shot_2015-04-08_at_9.56.11_AM.png |200px|thumb|left|alt text ]]
[[File:Pipe_Dream_Controller.png]]


===Network Architecture===
===Network Architecture===
Line 123: Line 125:
[[File:JSON_API.png]]
[[File:JSON_API.png]]
----
----



====Controls====



We use git version control via BitBucket and SourceTree and Terminal

[[File:Screen_Shot_2015-04-08_at_9.46.42_AM.png |left|alt text]]
[[File:Screen_Shot_2015-04-08_at_9.47.18_AM.png | left |alt text]]
[[File:Screen_Shot_2015-04-08_at_9.47.30_AM.png | left | alt text ]]
[[File:Screen_Shot_2015-04-21_at_1.22.47_AM.png]]
[[File:Screen_Shot_2015-04-21_at_1.29.26_AM.png]]

Latest revision as of 14:04, 8 May 2015

Introduction

Pipe Dream is Binghamton University's oldest and largest student newspaper. Pipe Dream is published independently by an Executive Board composed entirely of undergraduate students. The paper is published on Tuesdays and Fridays and the website is updated with the new content.

Purpose of the project

The purpose of this project is to create an iOS application for reading the published articles on a mobile device. The application will be available for all devices running iOS as their operating system.

The goal is to:

  • Improve reader experience for Pipe Dream on mobile devices
  • Keep the readers up-to-date with campus news
  • Lower the running costs for printing paper

Scope

The scope of this project will mainly be within the realm of the JSON API which will allow us to retrieve and manipulate WordPress content using HTTP requests. The inputs for the application will originate from both the user, such as requesting an article, searching an article or commenting on articles, and also from the Pipe Dream’s article database as it sends the user new articles or other information. Outputs will include the application interface as it displays the information to the user and data uploads generated by the user such as comment submission.

Technical Details

Development Environment

Programming Language: Objective-C

Development Tool: Xcode

Frameworks:

  • AFNetworking
  • Mantle
  • Core Data
  • UI-Kit


AFNetworking

AFNetworking is a third party networking framework for iOS and Mac OS X, built on top of the Foundation URL Loading System. The framework is used to retrieve JSON objects from the WordPress JSON API.

Mantle

Mantle is another third party framework that makes it easier to write a simple model layer for Cocoa Touch applications. The data retrieved from the WordPress JSON API is passed to these models and mapped to the required properties. The data is then passed to the Core Data objects.


Design

Internal Software Data Structure

The controller will pass data from the screen to the model. The model will then return necessary data to the controller from the database. The data from the database will then be displayed to the user on the screen based upon their initial request.

Before we begin developing the project, we designed a wireframe to clearly show us what to do, which way to lead

To create best user experience, we tried to create a simple user interface, we embraced the flat-style design principles, and tried our best to implement those principles


Here is the App Icon Set :

Global Data Structure

The data acquired by the application will be stored within iOS Core Data. Core Data is available for use in this project because the programming is being implemented using version of Xcode that is compatible. The Core Data will allow to save model objects to a file and then retrieve those objects whenever needed. Core Data also automatically handles any changes that are made to a model, which helps with versioning and editing.

User Interface

The interface for the view will be what the user will see on every screen. When the user runs the application, the view component will be displayed. Each view will be controlled by the user except when the view is refreshed for the latest articles.

Screeonshots

Architecture

The application is based on Model-View-Controller architecture which helps us to write an organized thus maintainable code.


Model Architecture

The models are created using Mantle framework. The data is first transformed into required format and then mapped to the corresponding properties in these models.

Controller Architecture

Controller is the middle man between the model and the view. It updates the view when the model changes. It also updates the model when the user manipulates the view.


alt text

Network Architecture

Network architecture is solely based on HTTP GET requests by AFNetworking to WordPress JSON API. The data is then passed to the models crated. AFNetworking is one of the most widely used open source projects for iOS and OS X development. It powers thousands of popular and critically acclaimed apps, and serves as the foundation for dozens of other great open source libraries and frameworks. For details : http://nshipster.com/afnetworking-2/ The data fetched from JSON is also retained and managed by Core Data. The Core Data framework provides generalized and automated solutions to common tasks associated with object life-cycle and object graph management, including persistence. We used managed object model to manage main queue for objects fetched from the JSON. Managed Object Models describes the features of a managed object model.

Web Service (API)

Pipe dream’s website is maintained in WordPress. There are two ways to fetch the data from the website. First one is to use WordPress JSON API but it requires to install extra plug-ins to the current site. Second one is to fetch the data from the currently available RSS Feed. For the first one, we are required to discuss this with the Pipe Dream staff since they hold the admin rights. If the staff can not provide us a JSON API, as a back-up plan, we will create a back-end service and we will parse the RSS data and create our own JSON API. If we are to create a back-end service, we will build the service with Django web framework. We will use Django-yarr to parse the RSS data and create JSON API using Django REST framework For the client, we will be using AFNetworking to fetch the data from JSON API. Then, we will adapt this data to our models using Mantle. After creating views with the UI Kit, we will adapt the data from models to views. To cache and use the data when needed again, we will use Core Data.

What web service is doing is that, it gets requests via HTTPS and the specific urls to pointing which resource is being requested and provide the necessary info with making necessary calls to the database. Every request must be done via an authorized API-KEY which will be sent as basic-authentication username and a secret as a password. And it will process the request and returns a JSON response to be executed on the frontend with needed HTTP Response Status Codes.


WordPress JSON API

The API is reached with a base URL followed by controller commands. Only the core controller is activated, application users are not allowed to manipulate the data.



Controls

We use git version control via BitBucket and SourceTree and Terminal

alt text
alt text
alt text
alt text
alt text
alt text