I use el' cheapo craft-store picture frames for a base. You need to pick the ones that have a convex profile, or flat, when laying down, not the typical concave ones you would use for mounting a picture, otherwise your diorama will look like it is sitting in a bowl, not a desirable appearance. I just use white glue to bond the foam directly to the glass, but there is a trick. I very carefully measure the inside dimensions of the frame and use my table saw to VERY ACCURATELY cut the foam to fit the frame, leaving just enough room for the side-boards which cover the vertical edges of the foam around the base. Plaster bandage is used to cover the raw-cut foam, to smooth the contours and fill in cracks. As I cover the bandage with a soupy plaster mix, I use a tea strainer to sift dry plaster over the still wet plaster, this creates a granular texture over the smooth plaster surface. I use white glue to add sand, rocks, rubble, etc. I usually cut or drill into it while it is still wet if I want to plant trees, posts, etc. I paint this both while wet and after it dries. I use cheap craft-store or tempera paint while it is hardened, but still wet, to block out large areas of color. Doing this while wet allows the colors to bleed into each other and blend seamlessly. I then come back with the AB to fill in other shades and finish with the usual washes, dry-brushes, etc.
Here you can see the frame and side-boards;
BTW, I test fit the foam and side-boards to the base, but all work is done without the base attached. Forget masking off the base, this is much too messy to survive any masking job, you're just asking for trouble if you do, IMHO. One last point; a lot of guys build great dioramas, but they choke when it comes to the edges, that is why I always add perfectly executed side-boards for a well-groomed, professional appearance.
Thanks for the complements.