markyoung1984 Posted May 29, 2008 Share Posted May 29, 2008 I have created an MVC site before as part of my degree and didn't like it, but now I see its actually quite a powerful concept. Despite this, I'm not actually sure how to proceed. So far in my design I have the following classes: - DBGateway: Connects to the MySQL database, this is the only class with SQL specific functions. Its functions receive the SQL query syntax and then generates exceptions or returns the data (in the form of an instance of DBResult). - DBResult: This is a special object that houses the results in various arrays etc from the database (through DBGateway). - user: Holds all information regarding user, including output of HTML when appropriate function called. - product: Holds all information regarding product, including output of HTML when appropriate function called. Additional classes include shoppingItem and shoppingCart, although these won't be implemented yet. I recall in my degree project I had some form of controller class. I'm not quite sure how to use this though. Any ideas what a controller class could be for? Quote Link to comment Share on other sites More sharing options...
trq Posted May 29, 2008 Share Posted May 29, 2008 None of the classes you listed are in any way related to MVC, however a controller would be the C in MVC. What kind of degree was it? Did you miss the part about what an MVC is? Quote Link to comment Share on other sites More sharing options...
markyoung1984 Posted May 29, 2008 Author Share Posted May 29, 2008 It was computer science. To be fair, it didn't actually mention "MVC" in the course material but from what I read about MVC, it sounded similar. In that case, I don't necessarily want to create a MVC site. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
dbo Posted May 30, 2008 Share Posted May 30, 2008 If you're interested in leveraging MVC, I'd suggest taking a look at CodeIgniter. It's a pretty well documented implementation. I'd demo it and see how you like it... worst case scenario you should get some ideas for how you might implement your own. Quote Link to comment Share on other sites More sharing options...
trq Posted May 30, 2008 Share Posted May 30, 2008 I'll second that. As well as being pretty well documented the code is quite simple and easy to follow. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.