Technologies
This page lists and discusses the various technologies used (and that we plan to use) in building the trip planner.
- All of the back end (the byCycle core library) is written in Python
- Address normalization, geocoding, routing
- Single-source, shortest-paths algorithm
- Routing matrices are simple (built-in) Python objects serialized to disk
- Database interaction
- Web back end (i.e., the framework the Web browser interacts with)
- and everything else
- For the front end we use XHTML, CSS, and JavaScript
- We try to avoid tables, but sometimes it's just so much easier to use them than floating divs (or maybe I just don't know all the tr1x)
- JavaScript is actually pretty cool. It has been derided for years by many, but it's making big comeback these days, with the likes of Google Maps, etc. Also, it's a lot more like Python than Java. Libraries like jQuery, which we'll be using in the next version of the UI, make it even better.
- Data is stored in a PostgreSQL/ PostGIS database
- Data is a crucial component of the system; without good data, a trip planner is nearly useless and most cities don't have data that would be suitable for generating bike routes
- We receive the data as ESRI Shapefiles, which we convert to database format and normalize; dealing with a database is a lot easier and faster for most things, and it uses less disk space because the data is normalized (repitition is reduced or eliminated)
- GNU/Linux
- My development machine is running Ubuntu; Ubuntu is excellent both for software development and personal use and there's all kinds of cool, free software available just a few clicks/keystrokes away (sudo apt-get install xyz)
- Our production server, graciously provide by Metro, is running Fedora Core 9
- Subversion version control system
- Subversion (AKA SVN) rawks
- Everyone (even non-developers) should use version control all the time
- rsync for fast, secure, incremental backups
- rsync also rawks; I wish I had found it sooner
- Instead of (S)FTP and having to remembering which files you changed, it finds the changes for you and only sends the changes
- http://www.apache.org/Apache Web server
- Firefox Web browser
- All Web development is done with Firefox and then "adjusted" for other browsers (most notably that stinking pile called Internet Explorer)
- The Firebug extension is invaluable for Web development
- QGIS, a most excellent user-friendly GIS viewer and editor
- Reads and can do some editing of Shapefiles, PostGIS databases, and other formats
- I do most of my Python programming in
EmacsWing IDE; KomodoEdit? is also pretty nice (not Python specific)
- Google Maps map interface
- MapServer as a Web Mapping Service (WMS) for creating custom maps within the Google Maps interface
- Currently, we have implemented a hybrid bike map for the Portland area; the base map is a standard Google street or satellite map and the BikeThere network is overlayed
- JSON
- There is actually no XML in use in the trip planner even though we use "AJAX"
- AJAX is more a name for a technique than the use of specific languages/technologies, or so I've heard (OTOH, I would wager that JavaScript is the majority AJAX language, and I wouldn't be surprised if JSON is more popular than XML; AJAJ isn't quite as catchy though)
- JSON is a lightweight alternative to XML that use JavaScript object notation, which makes it a natural choice for a Web application (not that I'm an XML-hater or anything)
- Pylons Web framework