Breakdown of MyRides - a CfWheels app for displaying MyTracks data
I mentioned in a previous post that I want to do a series of posts that breakdown and explain the CfWheels app that I'm working on that I'm calling MyRides. The app allows me to collect the data from the Android phone based MyTracks app that I use while riding my bicycle for exercise and for commuting to work. This is my first attempt at writing an app using CfWheels so I figured that these posts might be a good reference for someone new to the framework or frameworks in general. It might be a bit boring for those of you that have experience with CfWheels or other MVC frameworks, but if those of you can stick with me I would appreciate any feedback you have on how I built the app in the comments of this or proceeding posts. If you are completely new to CfWheels or MVC frameworks I would highly suggest taking the time to read the following link on the CfWheels documentation.
MyRides can currently be broken down into the following components:
- a homepage that shows that aggregation of all of my rides this season in a data grid. As I'm running the site on Railo, I was not able to use the cfgrid that is implemented in Adobe ColdFusion so I opted instead to use a jQuery based data grid instead. The homepage also shows some general statistics such as the total number of rides currently in the system, total mileage, average mileage, average speed, etc...
- a detail view of each specific ride. The detail view includes statistics about that individual ride and a map view of the ride. The map view uses google maps and displays the overlay that is built by MyTracks and stored on the google maps servers. I needed to use RailoAjax to allow for the use of the cfmap tag on Railo and Andrea Campolonghi was a great help as he implemented the ajaxOnLoad function to RailoAjax that I needed to use in my example.
- a CRUD (create, read, update, and delete) interface for making adjustments to certain fields such as ride title, ride description, map center location, and initial zoom level. I decided to not allow the editing of the actual data that is coming from the gps unit on the Android phone itself. I found that building a CRUD interface with CfWheels is one of the areas where the framework really shines.
- the final current piece of the app is the import routine that graps the data from a google docs spreadsheet and imports it into my own database. The import routine uses the ColdFusion Google api and the cfpoi project to import ride date from the spreadsheet and insert it into the database table I'm using to store the rides.
I hope to break down each of these sections in future blog posts. I also have a growing list of enhancements and features that I would like to add to the app as time allows. I'm also looking forward to learn more about CfWheels and how it can help me to write better web apps faster in the future.
Comments
@Erik - Have not put much thought in that part as it is working fine for me. Is there a specific error that your running into? Are you doing something similar in cfwheels or just in general without a framework?
Hi, I really like what you have done. I was curious about the function you wrote to get the data into your grid. Do you have any thoughts on how to simplify the json and coldfuson query? This is where I get stuck. Great job, Erik