A deck can be just about anywhere on a house. In fact, I have one on the side of my house build on a flat roof above an extension of the house. And, my next door neighbor has one on the front of his house just beside his porch.
The keys are that a deck is (1) attached to the building and (2) does not have a roof. (A deck is "a flat roofless structure attached to a building." See http://www.merriam-webster.com/dictionary/deck.)
A porch onMerriam Webster defines them as mentioned below:
A deck is a flat roofless structure attached to a building.
On the other hand is a "a structure attached to the entrance of a building that has a roof and that may or may not have walls." See http://www.merriam-webster.com/dictionary/porch.,
A porch is a structure attached to the entrance of a building that has a roof and that may or may not have walls.
I, however, would refer to any raised area immediately adjacent a main entrance to a house as a porch, whether or not it has a roof.
Another example of a deck is a rooftop deck that is commonly found on top of condominium apartments.
Also, the area around a pool (both in-ground and above-ground kinds) is called a deck, but this may be getting into other definitionsother definitions of the word, such as the floors on a ship.