derpost — 2012-08-30T11:18:56-04:00 — #1
Hı I need to ask some question.
For example I want to code a new system like twitter, is MVC pattern neccesary? Or do you suggest any pattern?
What is the patterns like MVC?
Thanks for reply for now.
derpost — 2012-08-31T17:23:51-04:00 — #2
I'm still waiting answers.
cpradio — 2012-08-31T18:35:39-04:00 — #3
Well first of all MVC isn't a pattern, it is a framework (or at least I don't think of it as a pattern). A pattern usually relates to how you write your classes to tackle a business problem, creating singletons, async operations, etc to be implemented in a specific way.
That is because your question is vague and really doesn't make a difference. You can use any pattern you feel like or none at all. I'll be the first to argue that MVC is a good practice, but there is cost to it (granted not a lot of cost, but those that worry about every ounce of performance would care). The best features of MVC is that it helps you separate content from your data from your business logic from your data access (if you wish to take it that far). You can then quickly change your UI without having to change a lot of the business logic (assuming you don't need to rearrange the data or query it differently).
Do you have to use MVC for a twitter type system, nope, can you? Yep. Will you want to use a pattern in your project, maybe. Depends on what your need is. A lot of places I know utilize a singleton pattern for their database interactions.
Hope this helps. Personally I'd choose whether to use MVC or not, and then start your project and as you better define the components you need, to then ask whether using a pattern for that component would make sense. You will get a lot more feedback that way.
derpost — 2012-09-01T08:21:26-04:00 — #4
Thanks for beautiful answer.