160 likes | 267 Vues
Introducing "JogLog," a front-end focused iPhone application that utilizes MongoDB for backend database development. This jogging utility allows users to track and map their jogs, providing email summaries of jogging statistics. The app's architecture is built on an AWS instance running Ubuntu with a LAMP stack. It features a simple user interface and robust server-side scripting for data handling. Users can create accounts, log their runs, and retrieve their jogging history with ease. The project aims to enhance personal fitness tracking through streamlined data management. ###
E N D
“JogLog”A Database-Dependent iPhone App Matthew Ragonese University of Miami
The Motivation • My Strength • Frontend iPhone development • My Weakness • Backend Database Development
The Objective • Study: Backend Database Development • Virtual/web server selection and formatting • Server-side scripting • Implement: A Database-Dependent iPhone App • A simple yet functional user interface • HTTP request and response handling
My Application • “The Advice App” “JogLog” • Jogging utility that allows users to track and map their jogs • Users can receive their jog stats in an email summary This app could use a database!
Formatting My Server • Hardware: AWS instance launched • Running Ubuntu OS • Installed LAMP stack • Software: MongoDB • Installed distribution package • Installed PHP driver
Learning MongoDB • The “NoSQL” database • Open source document-oriented DB • Data stored in collections of “documents” • Data stored in JSON-like documents • BSON “Binary JSON” • BSON supports the insertion of documents and arrays within other documents and arrays
Learning MongoDB (cont.) • General topics studied • Database/collection creation • Document insertion • Condition-based querying • With limits, sort orders, and projections • Cursor management • Document updating
Mongo and JogLog • The Mongo PHP driver • Accesses all Mongo features within PHP • App-to-Database Communication • AWS instance’s HTTP web service (“/var/www”) • In-app PHP script requests
Data Objects USER RUN *Relational Model
My PHP Scripts • Login.php • Parameters: UUID User • CreateUser.php • Parameters: firstName, UUID User • CreateRun.php • Parameters: ownerID, distance, seconds, pace Run • RetrieveRuns.php • Parameters: ownerID Array of Runs
PHP Sample Script http://54.200.27.11/RunLog/DeleteRun.php?runID=1234&ownerID=5678
Handling URL Requests • Apple NSURLConnection • Open-source AFNetworking • Built atop NSURLConnection • Utilizes “CocoaPods” • Used by: • Pinterest • Github • Heroku
Parsing URL Responses { "_id”:46, "ownerID":"123", "distance":"2.0", "seconds":"320", "pace":"2.0", "dateString":"2013-12-04 08:09:22” } “JSONModel” Neat open-source parsing tool which maps JSON documents to object instances
The New JogLog (cont.) • Modified UI • User Authentication • UUID-based • “My Jogs” Page • Tableview of Past Jogs • Cumulative Jog Stats The future of JogLog?
The End Questions?