Depends on what you want to power during an outage. If you want to power everything in your home for a few days, a portable one will not be big enough. If you just want to power a fridge and a few other devices, a portable one will work. But you will need to have an electrician install a transfer switch (~$1k) so you can safely disconnect the grid and power your devices. Alternatively, you can just run extension cords from the generator to your fridge and other devices but that will be pretty messy. If your concern is having heat and you have a gas furnace, you will have another issue. Your furnace needs electrical power for the controls and they rarely come with a plug that you can use to connect to the generator. You would need an electrician so best to go the transfer switch route.
Another consideration is the type of generator. I have one that can run off propane. I have three propane tanks and just rotate those via my gas grill. Gasoline goes bad so storing gas for emergency is a lot of work (you'd have to rotate gas tanks into your car every few months). Propane has a longer shelf life.
Solar is a bigger expense up front but eliminates the gas/propane storage issue. However, you don't have power when the sun is not out. In winter storms, its cloudy for days. You would need a huge battery bank (more $) to store energy.
As you can see, i have thought about this a lot. The least hassle is a whole house generator connected to your gas line. But the up front cost is high. I'm an electrical power engineer and one who is notably cheap, so I went the portable gas generator route with a bunch of extension cords. If I need to, I'll figure out something on the fly. I haven't had to worry about it for the 10 years I have had it, but it is a nice peace of mind. I do start it once a year to make sure its still working. Hope this helps.