This is a simple barn that took me about 15 minutes which is fairly short compared to rest of my builds. It can be used for all animals.
Step 1: 1. Yay the Rectangle Rule!
Woah another rectangle!!!! Yes, pretty much all of my builds start with "build a rectangle." Well my friend, this rule has served me well. Anyway, let's start building build a red clay rectangle about 4 blocks high, build a white line all the way around then continue building up about 15-20 blocks up then stop. Next you'll need a roof. Do it log cabin style with having it come up from the left and right side as opposed to from the front side meeting the back. Only got up about 6 blocks more than stop and have a flat roof from there.
Step 2: 2. Doors, Gates, and Lofts Oh My!
Make a large door for cattle or pigs or whatever you choose to fit through. I used gates for doors and it works well. Next create a pathway to the back of the barn (I used brick). Put fences to the side for the animals and glowstone lamps on the walls for light (Glowstone on top of a fence post). Next build a loft about 4 blocks below the roof. This is where you or guests can stay. Decorate however you like.
Step 3: 3. Animal Pen
This step is pretty easy. Place a few hay bales around (Not too close to the fence or the animals will escape) maybe windows if you so desire. Add a ladder up to the loft for easy access.
Thanks for reading, hope you enjoy!