Pipe Dream
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.
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.
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.
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.



