To keep it simple the frame is from dimensional lumber and attached by lap and butt joints and I spent a good deal of time determining their optimal placement and making sure I'd have screws in the right places to maximize the strength and long-term durability of this work bench. Check out the pictures for details as it'd be too confusing to explain.
Some math to determine the depth for the top and shelf
I intentionally placed the front 2x6 legs inside of the top frame so that I'd have a perfect rectangle on all edges of the bench top. This also means the top frame is flush with the walls where I placed the bench.
The shelf is not as deep as the top so that when you stand in front of it you won't hit your shins on the shelf
The are 4 legs so that the bench can stand on its own should I need to move it for any reason.
The overall dimensions for this bench are: 96 inches wide, 27.5 inches deep, 40 inches high. Make it as wide as is comfortable for your space, like in a kitchen: there's no such thing as too much 'counter space.'
Whatever width your MDF (or plywood) is you'll want to find two numbers that have a difference of 7 and together add up to the total. Based on this you'll know where to cut (rip) your 4x8 piece in two.
48" = 27.5" top + 20.5" shelf
49" = 28" top + 21" shelf
The reason for this is the "6 inch side" of the 2x6 is actually 5 1/2 inches and "4 inch side" of the 2x4 is 1 1/2 inches, which totals ... 7 inches. Hopefully from this explanation and the pictures you can decipher what I mean. I broke a cardinal rule of carpentry by not measuring first. I assumed the 4ftx8ft piece of MDF I bought was 48x96 but it was actually 49x97. I think they do this so that if you drop the MDF on it's edge in transport you can still strip it down an inch on any side.
My 2 cents about how to choose the right overall bench height:
Your purpose for the bench - do you want things at hip height so you don't need to bend over? OR will you need to get weight/leverage with what may be on the bench top?
Obviously the answer to #1 changes based on your personal height.
I'm about 6' 2" so I choose a height of 40 inches (+MDF & Hardboard thickness < 1") which is right about at my hips and is perfect for my needs. The placement of the shelf depends on what you have to store. Find the tallest thing you may want to put ontop of or below the shelf and plan accordingly.