[RESOLVED] Does using a framework hamper layout and design?
I know the discussion of which framework to use has been covered before. I'm not really here to ask that, but if it's relevant feel free give recommendations. The road that has led me the consideration of a framework started with my lack of use of a front controller for the sites I develop. I've always used more of a static front controller when developing sites. The sites I've worked on have grown, and they have outgrown this method. Not to mention this method is fairly rudimentary to begin with.
I've toyed around with building my own little front controller that sends everything to a central index.php and routes everything from there. Nothing new really. It's probably been done thousands of times. I've also been looking at CodeIgniter. As I've been working on my home made version and then looking under the hood at CodeIgniter mine pales in comparison. As it should.
Which, brings me to my questions. It seems why reinvent the wheel. I should use what has already been done and never mind how it works (mostly). If I go down the frameworks path I would gain more than just the addition of a front controller obviously. But, will I lose anything? Such as control over the complete design and functionality of the sites I create? Or, is this handled like any other html within the view and there is no limit?
I just want to make sure before I start down the path of getting more acquainted with a new approach to php. Typically I have always just built from the ground up. Thanks for any insights.
Its not all one or other, you can use a framework AND add non framework code when necessary. But i'm personally not a big framework fan, accept when looking at job sites as more and more jobs ask for experience on one or another frameworks.
High Energy Magic Dept.
Are there any other caveats I should be aware of? Will a framework ever potentially get in the way (e-commerce comes to mind here)? Or, does that where Dagon's statement of all or nothing come into play? It seems like the framework would provide a more secure path. And, much of the leg work has been done. I'm not sure how you guys work, but I'm typically a one man show. My experience seems to always lead me to jobs where no experience existed before. I'm not necessarily looking for the easy route. I don't mind putting in the time to get things right. I was mostly hoping the framework path might be like having extra experienced eyes for things I might not see?
High Energy Magic Dept.
The main issue with a framework is learning it. Just like anything else in the programming world (maybe learning a complex API to access a credit card processing company, for example?), the first time you use it it will likely add some time. But the next time you use it, it's easier and faster. When you get used to it, then when you need to add some functionality, your mind just automatically thinks: "Okay, let's create a controller for ThisNewAction. I'll need a Foo() and a Bar() method, for sure. Let's see, the ThisNewActionModel will need to access these two tables, so let's set that up. Okay, let's set up a simple view to test those initial methods...."
So, it can help you organize your design thoughts and keep things in a manageable structure -- but you always want to keep your eyes open regardless of what tools you are using to make sure you are using the right tool for the job and not just using the first tool that is at hand.
My view on frameworks is that they can be absolutely amazing for certain projects. Even if you never end up working on a project that they are amazing for you should learn one of them at a minimum in my mind. Learning to use CI and ZF has improved my coding abilities 10 fold. Even tho I haven't used them in a production project, they have increased my productivity in all my projects and improved my coding habits.
They help force you to learn to separate business logic from data abstraction from layout. They help you to learn to write cleaner code, because you start learning to use functions and classes better and you end up with less repeated code. Because you learn to use a controller to do repetitive logic instead of having the same switch statement every where, you learn to use the methods and style inherent of the framework instead of making your own. You learn how agile a method can be and how to then make your own methods that handle different situations as opposed to here do this one tiny thing.
Just my two cents.
TLDR: Learn a framework to improve your abilities, even if you don't use it on a project.
Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmail
I'd rather be a comma, then a full stop.
User Authentication in PHP with MySQLi
- Don't forget to mark threads resolved - MySQL(i) warning
Thanks all. Most of what was said is kinda what I was already thinking. I'm going to take the current project I'm working on and migrate it into the CodeIgniter framework. I'm just going to do this slowly locally and see what I learn. If all goes well and I feel like it's the right direction, I will push towards a production environment. Thanks again.
Last edited by gwerner; 04-18-2012 at 10:09 AM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)