Code as per MVC Architecture