Im designing a MVC framework but I dont know where should I put my utility classes. I read somewhere where it said utility classes are Model Classes. Is this line of thinking correct or are they some separate type of class?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on what these Utility classes are doing. The main idea of MVC is to separate the presentation layer (V and C) from the remaining application (M). If your Utility classes handle things related to the presentational layer, place them in an appropriate package, for instance ViewHelpers or InputHandlers. If the Utility functions relate to anything else, see to which layer in your model they best fit into, for instance DataAccess Utilities go into the DAO package while a a MailHelper might go into the the Services package, and so on.