Kidney is derived from the mesoderm which lies in the middle of the three germinal layers and appears in the third week of embryonic development whereas the urinary bladder is dervied from the endoderm which is the innermost layer among the three germ layers.