The context of your question is too vague and the the answer depends on dozens of factors.
IMO, the best approach is to avoid custom code in Infopath forms and I could not find anything that cannot be done without coding. Also, the coding in Infopath is not hard or manually written but constructed through Infopath Designer GUI.
For example, I have a filled ClientList with ClientName column
Fig.1. ClientList with ClientName column (screenshot from browser)
In Infopath Designer I create an Infopath form and put on designer surface Drop-Down List Box control, click on it and press Alt+Enter to open it properties.
There, under Data tab, against I choose "Get choices from an external data source" and press add press "Add..." button against "Data Source:"
Fig.2. Starting data connection wizard for Drop-Down List box in Infopath Designer 2010
Note that data connection can be created separately by a dozen of variants
Note that you could have selected different sources including:
- REST Web Service
- SOAP Web Service
Fig.3. Step2 of Data Connection Wizard "Select the source of your data"
Fig.4. Step3 of Data Connection Wizard "Sharepoint site details"
Fig.5. Step4 of Data Connection Wizard "The Sharepoint site site that you slected has the following lists and libraries you can use as your data connection"
Fig.6. Step5 of Data Connection Wizard "The Sharepoint list has the following fields you can can select from"
Fig.7. Running Infopath form with Drop-Down List Box linked to a column ClientList of ClientList list