How three-tier architecture works? Which components are required at middle-tier and the third-tier(enduser side) ?