Solenoid valves are the recommended release mechanism because the air is instantly released whereas a ball valve trickles then releases. Solenoid valves don't need to be modified, all that's needed is a momentary switch with a 9 Volt battery wired in series.
The barrel can be long or short but you do lose energy using a long barrel but gain accuracy and vice versa with a short barrel. As an added special feature you can make an enclosure for the release switch (like mine) and use the same pipe as a holder.
I recommend checking out (https://www.instructables.com/id/Spud-zooka/)
I vaguely followed this instructable (http://www.youtube.com/watch?v=7Z-L4GliAts&feature=c4-overview-vl&list=PLbDYIZ0o1HPJScdEdZ-39n6Am4HyJnmve) by the King Of Random
I also found when firing it's good to use wadding behind whatever your shooting out and you can also make a very cool explosion simulator. For more details follow this link (https://www.instructables.com/id/How-to-Make-an-Air-Powered-Explosion-Simulator/)
Note- THIS IS NOT A TOY, IT'S A WEAPON, NEVER AIM AT ANYTHING YOU DON'T WANT TO KILL OR DESTROY