The roads, post (rest) stations and watchtowers that increase [unit replenishment], increase the distance you can see into neighbouring provinces, improve army and agent movement capacity, and increase trade income can be upgraded like buildings on the construction tab that appears in the bottom left-hand corner of the campaign map when a castle town or other settlement is selected.
Ports enable the construction of ships for both war and trade, and as such are positioned on the coast. They also provide income and enable Christian clans to engage in trade with their European partners.
Farms are positioned in the fields outside their castle towns. They provide an income and are an essential source of food, so not upgrading them will eventually lead to food shortages.