Last Sept., I built my woodshed on the side of my already existing pole barn. Specs are roughly 10'x22' wide with the posts 9' from the pole barn.
I used 2x8's doubled as my header and 2x6' on 24" centers for my joists. I centered the 2x8s on top of the posts. I did not notch the 2x6's, just set them on top, then used those galvanized joist hangers to keep them in place. My 4x4 posts were roughly 7'-8' apart, depending on what side I lined them up to the existing 6x6's of my pole barn.
Pics:
Sorry, I didn't realize you where asking me about this. From what I can see in your pictures, you a pretty good job. I don't know how you attached your ledger board to the existing barn, but really like that you have your rafters resting on top of it. That's a really good way to do it. Ideally you would want your ledger board attached with bolts. Lags will work, but depending on the size and style that you use, there is a pattern and spacing that is recommended by the manufacturer. In some places there is also a code on this. Biggest mistake is running them down the center of the ledger board, but in your case, it looks like you have solid wood behind it, which adds a lot to your strength.
Your rafters are sized and spaced correctly. Same with your beam. Nicely done putting all the weight on the top of your posts. How did you anchor your beams to the posts? I like those extra heavy metal T brackets myself, but there are some special brackets that wrap around the top of the posts to hold the beams in place too. I can't tell by the pictures what you used.
There are four directions of force on your posts. In and away from the building. And side to side of your building. In your case, the posts are held in place from going in towards, or away from your building by the roof. The roof will help some holding your posts from wanting to move side to side by it's sheer strength, but that's also where roofs fail. You are using the fasteners through the metal to stop it from moving side to side. Ideally you would want a solid wall there to hold a wall in position. Without the sheer strength of the wall, you need to provide another source of strength to hold the wall in place. Diagonal bracing is the most common way of doing this. In most cases, going down 2 feet and over 2 feet is plenty. Creating that triangle locks the wall into place. For more strength, adding gussets over the diagonal bracing works, or building a sort of top wall across the top two feet of the wall for extreme weather is needed.
4x4 posts are not what they used to be. They are plenty strong for supporting the weight, but they are horrible at remaining straight over time. Even 4x6s will bend on you more often then ever before. I only use 6x6's for post now, and even then, I have to look real close at every one I buy to make sure I'm getting a straight one. You might be fine, but in my experience, I wouldn't be shocked if half of them started to bow on you in a year or so.