...

View Full Version : framework vs a simple collection of classes



hernantz
04-27-2011, 07:35 PM
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.

Fumigator
04-27-2011, 08:07 PM
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)

Brandoe85
04-27-2011, 10:20 PM
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...

hernantz
04-28-2011, 01:01 AM
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.


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?

Brandoe85
04-28-2011, 04:12 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum