Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    29
    Thanked 1 Time in 1 Post

    framework vs a simple collection of classes

    HI, im pretty new to this mvc pattern.

    So when trying to catch up with a framework i found that I don't like anyone.

    Just looked to codeingniter, kohana, cakephp and symfony.

    What i did not like were:

    The code generators, the static access to classes, singletons, many global variables, and not pure OOP desing.

    So, why not just use a simple skeleton with

    an mvc pattern
    a caching class
    sanitizer class
    templating class
    router class
    database abstraction layer class
    an user authentication class
    maybe a loader class (that includes some classes by default and other classes when required)

    plus other app specific classes.

    And inside the controller you declare your classes you need and just work with them. If you need to sanitize a form, just declare the FormSanitazer() class and work with it, not $this->lib->blah blah, where you don't know where things are coming from or how they work.

    Is there something like this? if not does is worth it to write this custom structure of is better to get to use a framework like codeigniter.

    What is your suggestion / opinion.

    Thanks in advance.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Fine go ahead, reinvent the wheel... I'm just going to use a wheel that's already been invented. I don't want to waste my time re-creating something that is already done for me.

    p.s. I'm not an OO guy so none of the reasons you mentioned why you don't want to use CodeIgniter held any significance to me. (I admit this is my weakness)

  • #3
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Do whatever makes you more efficient. In the end that'$ all that really matter$. I think a lot of developers probably do what you mentioned in their own way. Once you build so many generic objects you'll use them in multiple projects as well as creating specific objects that are tailored to the specific project.

    I do not use any framework that you mentioned nor do I use any of the buzz word frameworks. I don't code much php anymore either, but just in general...

  • #4
    Regular Coder
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    29
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Fumigator View Post
    Fine go ahead, reinvent the wheel... I'm just going to use a wheel that's already been invented. I don't want to waste my time re-creating something that is already done for me.

    p.s. I'm not an OO guy so none of the reasons you mentioned why you don't want to use CodeIgniter held any significance to me. (I admit this is my weakness)
    Fumigator, my idea was not to re-invent the wheel, because this would be (i guess), much simpler than a framework. You would include a couple of classes and run the app.

    Quote Originally Posted by Brandoe85 View Post
    Do whatever makes you more efficient. In the end that'$ all that really matter$. I think a lot of developers probably do what you mentioned in their own way. Once you build so many generic objects you'll use them in multiple projects as well as creating specific objects that are tailored to the specific project.

    I do not use any framework that you mentioned nor do I use any of the buzz word frameworks. I don't code much php anymore either, but just in general...
    Interesting, how did you structure your projects? where they OO?
    Last edited by hernantz; 04-28-2011 at 02:04 AM.

  • #5
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    They are OO, I fall into the group who code N-Tier structure. You can re-use a lot of your classes that are generic like your data layer etc. Then follow up with a business logic layer and presentation layer.

    Just like this:
    http://en.wikipedia.org/wiki/Multitier_architecture


  •  

    Posting Permissions

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