SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some Logical Questions

    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.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm still waiting answers.

  3. #3
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,813
    Mentioned
    141 Post(s)
    Tagged
    0 Thread(s)
    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.
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    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.
    Thanks for beautiful answer.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •