For a project where I wanted to measure outside temperature and humidity I deciced to use a DHT22 sensor as it's fairly cheap and precise enough for my needs - As part of the project i designed a SMD breakout board and a 3D printable housing to fit the board in.
To avoid problems from corroded contacts I decided to solder the cable directly to the board instead of using a connector. I also added a 4K7 pulldown resistor on the datapin and the 100 nF capacitor across the suply as the datasheet recommends. To stabilize everyting mechanicly there is a hole for bolting the sensor to the PCB.
The housing needs to protect the sensor from the elements while allowing air to get to it, this was done by making the sides a ventilation grill that lets air through but protects against rain/snow to some degree. The housing also has a hole for mounting the sensor to a wall as well as mounting the PCB to the housing and cable stress relief.