My barn currently has no electricity. I want to install few lights and a fan. I have seen 5w solar panels that can trickle charge a 12v battery which can be hooked up to something called an "inverter." My understanding of the inverter is that it can take 12v power, convert it to use as 110v so that I could run a few lights and a fan. Am I understanding the setup correctly. Has anyone done this?

TIA
Rick