I am currently working on 3D world generation (but it also applies for 2D i guess). I personaly only want to generate cities but not the less. What I do is is the following:
1) Generate the world itself (just a simple world with some mountains)
2) Randomly select locations I would like to place a city (random numbers basically).
3) Verify if there location I selected isn't 2 rough (checking 'x' locations around my selected location)
4) Generate a city layout
5) Encase the border of the city with mountains (with another bit of random generation magic)
6) Override world data for that part of the map
7) Generate accesspaths
You could do the same with 2d generation just generate a location for the dungeon surround the location with mountains and if it is a low level dungeon generate access paths if it's a high level dungeon don't generate.
Hope this helps, With kind regards,