3 layer architecture explained for beginners