Digital Mapping Examples
WARNING: when you make changes to a project or data at Mapbox, it can take up to an hour (usually like 15 minutes) for the server to create your new tiles. So if you are loading your own tiles from tilemill into a map on your own webpage, keep this delay in mind as you make updates.
Using Mapbox and Tilemill
For our purposes, the best use of TileMill (and Mapbox to access the results) is to style your basemap if you don't want to use one of the standards like Bing, OSM, Stamen, or whatever. You can heavily create/customize a basemap in TileMill to create a very unique looking map onto which you can overlay your data. These two CAN be used to style your own data layers that you can display via own webpage and map, but this process creates an extra and rather time-consuming step whenever you want to update your data or layers (see warning above), since you have to keep re-doing everything in TileMill and uploading your data to Mapbox. There are also more limits to the interactivity you can create as well.
If you have spent time styling your data in TileMill, it is not wasted. But you'll have to copy the style info from TileMill into your javascript and style the data you load there. A basic tutorial for styling data with leaflet is here.
For the most nimble development workflow, I recommend that you load your data layers directly onto your map with javascript (as exampled below), and not by going through mapbox (as the mapbox examples do, just to show different ways of doing things). If you want to use a basemap that you make in TileMill, that's fine, since you won't need to be changing it often, and you won't be doing much debugging on that layer.
A note about the examples
There are lots of ways of doing the same thing. I've tried to illustrate the diversity by loading maps and loading data in slightly different ways across the examples. DO NOT fixate on 1 or 2 examples---understand the different techniques found in each. This will save you TONS of time when looking for code online.
All associated files (data, javascript, etc) can be viewed by finding and clicking on the file names in the HTML source code.
If you don't understand something in any of the code, or you need an example of something else, tweet at me (@fredgibbs) and use the #digmaps hashtag so everyone can follow the thread.
Mapbox/TileMill Examples
Generic Loading Data Examples
D3 Examples