AllJoyn is an higher level framework that does most of the plumbing for you, basically you define an interface, register it, create a session and your good to go. It works over IP (so WiFi with an AP for example) and has special code for wifi direct (buy not officially supported now) and there's a partial Bluetooth LE implementation (but which currently requires a rooted android phone).
There's a description of what's officially supported in this forum post : https://allseenalliance.org/developer-resources/forum/developers/how-alljoyn-works-mobile-devices
You can do all of this by yourself over WiFi or WiFi direct, but it would a lot more work (you'll have to implement discovery, marshaling, etc yourself).