What you need is a surface-mounted ceiling fan box, either of the saddle or the pancake types. Wiring a fan without a box is a great way to drop a ceiling fan on the head of an unsuspecting guest, as well as a fire hazard if a splice ever fails! Just make sure the box you get is rated for the fan load you have...
I was able to get a hold of the electrician who built my house. He said that in Chicago, they use steel for grounding throughout so there is no grounding wire. He said the yellow and purple wires hook up to my switches (though the purple is just hanging loose in my switch box). The grey is neutral and the red is always on (if I wanted to not use the switch and only use the pull strings).
Best Answer
I am with you, the first one is much more attractive.
The jct box must be mounted on a cross member, 2x4?, and then they added boards with a hole for the jct box.
It would be just same as if it was in ceiling and drywall except the box would need to be set at the correct depth for the thickness of the wood.