Do you guys even bother with frameworks when coding?

mason

New member
Aug 13, 2006
872
6
0
say you're coding something big in php that only you would use. Do you guys bother even using a framework like codeigniter?
 


I don't but these days I seem like the minority.

BTW this is the wrong forum.
 
It depends on whether or not I'd plan on adding it to something bigger. One good thing about frameworks is that you can use the same codebase.

If the framework gets upgraded, everything gets upgraded by replacing one directory and all the code you wrote does not have to be touched (unless you know about deprecated items well in advance).

I use Codeigniter for a lot of stuff, and basically just keep adding my own libraries to it as I come across things I need that I don't already have.

Just make sure you use some type of system for documentation like phpdoc, or you'll end up writing stuff you forgot you already wrote 6 months ago.
 
It depends on whether or not I'd plan on adding it to something bigger. One good thing about frameworks is that you can use the same codebase.

If the framework gets upgraded, everything gets upgraded by replacing one directory and all the code you wrote does not have to be touched (unless you know about deprecated items well in advance).

I use Codeigniter for a lot of stuff, and basically just keep adding my own libraries to it as I come across things I need that I don't already have.

Just make sure you use some type of system for documentation like phpdoc, or you'll end up writing stuff you forgot you already wrote 6 months ago.

I'm the same, unless It's just a small system that won't need the whole framework to work. I've made my own classes to use on smaller systems.

Codeigniter saves a lot of time, but I still prefer to work in my own code from start to finish. But time is money.
 
I mainly use my own classes, but Codeigniter is said to be amazing by several people on here as well as those I've asked about it in my master's program who do web development for a living. Though, all say what Ryan just said about making their own classes to extend functionality.

I mainly use ExpressionEngine on client's sites since I can ramp out a site pretty quickly with it and it's easy for them to maintain. CodeIgniter is used on that.

It's mainly about what you need though. Is it a system that is totally custom? You will probably be coding a lot of stuff by hand. If it's something that is pretty generic like a basic website, you can probably reuse a ton of stuff in Codeigniter and your past classes.
 
I wish I knew complex PHP, but I do have a solid custom HTML/CSS/PHP framework that I've put together from the best pieces of some of the other frameworks out there (Tripoli, 960.gs, Typogridphy, Baseline, Eric Myers reset, etc.) that I use as the starting point for ALL my websites now. Saves a lot of time.
 
I wish I knew complex PHP, but I do have a solid custom HTML/CSS/PHP framework that I've put together from the best pieces of some of the other frameworks out there (Tripoli, 960.gs, Typogridphy, Baseline, Eric Myers reset, etc.) that I use as the starting point for ALL my websites now. Saves a lot of time.

Hook it up bro! :xmas-smiley-016:
 
Yeah, this.

Me 3. I have sort of a rough framework that I use for this, basically a set of folders called "blank site" (/css, /images, /js and a blank index.html). In CSS I have the 960 framework stuff and a global reset loosely based on the Eric Myers one. In JS I have minified jQuery, which sometimes I end up yanking out. Whenever I make a new site, I just copy this structure and rename the folder to whatever the project is. Saves me some time, but not a ton. Curious to see what you're doing though.
 
Sometimes. Just be practical about it. Pre-optimization and over-architecting will just get in the way of what you're really trying to do. The keyword is "big" here, and the larger a project gets the more you need to have consistent conventions ... which frameworks can provide.
 
Sometimes. Just be practical about it. Pre-optimization and over-architecting will just get in the way of what you're really trying to do. The keyword is "big" here, and the larger a project gets the more you need to have consistent conventions ... which frameworks can provide.

Exactly. A lot of people associate framework with "overgeneralizing". Use the framework, do it quick and dirty, and then clean up as you go.
 
Me 3. I have sort of a rough framework that I use for this, basically a set of folders called "blank site" (/css, /images, /js and a blank index.html). In CSS I have the 960 framework stuff and a global reset loosely based on the Eric Myers one. In JS I have minified jQuery, which sometimes I end up yanking out. Whenever I make a new site, I just copy this structure and rename the folder to whatever the project is. Saves me some time, but not a ton. Curious to see what you're doing though.

I have something similar which I use on all of my sites.

fiksie.com/blank-site.zip

It contains index.html which has nicely written head part, contains all the basic divisions like wrapper, header, content and footer, links to style.css file in style folder that contains basic site info and css reset with defined division for clearing and empty styles for divisions that already exist in html file.

Images folder is also in there, empty and ready to be populated with images.

This saves me at least 20% of time on smaller sites :)

I also threw in there my wordpress-commands.php file, which is gibberish for most of you guys but it should come in handy for those that code wordpress themes on regular basis. All sort of ready-to-go stuff is in there. I use it all the time.
 
  • Like
Reactions: jordanj77
Most of my PHP coding now is just CLI so I re-use classes I've built up over the years. Thank god I finally switched to putting stuff in classes. Looking at some code from 2006, I basically copy and pasted functions if I wanted to use them again! Like 10 copies of the same code in 10 different files.

For actual websites I reuse bits of code of open source projects that I'm really familiar with. Like Project Gazelle, a torrent tracker, I like the way the code stuff in that so just use it the whole time.

Just make sure you use some type of system for documentation like phpdoc, or you'll end up writing stuff you forgot you already wrote 6 months ago.

grrr, hate this. I've code spread around 4 servers, sometimes I miss stuff I already coded.
 
CodeIgniter is fucking amazing. Layered Links is built on it, and I was able to do all of that coding in about 5 weeks because of CodeIgniter. It's MVC based, but not a picky bitch like Rails so you can hack at it a bit if you need to.

Frameworks are a smart decision when coding. They're generally created by coders who are way fucking smarter than me so I prefer to follow in someone else's footsteps rather than pursue some janky coding path I dreamed up.

I have built multiple large systems using CI, things powering dozens of sites and handling hundreds of users, and it is great for rapid development. It's also easy to get started with, so I recommend it to anyone who wants to move forward a bit with PHP.
 
Yep, codeigniter is great.

You've got to play to your strengths, and if coding isn't one of them, then something like codeigniter is definitely something worth looking at.
 
Definitely, if the size and complexity of the project is anything more than "simple", I always use Zend Framework, but only for the admin UI. For things where speed matters, , e.g., tracking a million clicks a day through an IM management system, you definitely don't want the overhead of a full MVC framework.
 
if you think you'd need to scale it later on with caching, optimization, etc, then def go with a framework

if its a quick stand alone script, i usually just custom program it and include a file containing all my commonly used functions
 
One of my problems has been my reluctance to learn a framework.. I'm always building from scratch, so I know that probably is a bit of time waster.