Galaxy formation and Hubble sequence