Where I live the garbage disposers are connected to a outlet and a appliance cord is used. It is a motor so it needs to be able to be disconnected.
Dishwashers are fed with romex to the junction box as common practice. Best check with your local authorities.