Demonic Posted June 11, 2008 Share Posted June 11, 2008 Well I been messing with PHP for some time now and I'm just trying to figure out how some developers code so fast, so well. Currently I want to rebuild my portfolio site into a cms, but I don't want to waste any time as I have side projects that need to be done. So lets say I wanted to build a basic CMS with these features: Add News (Edit,etc) Add Sidebar Widgets (You could think of this as iGoogle Home Page Widgets, just for the sidebar) Add Custom Pages (Edit,etc..) Free Downloads (Just free things I have available for DL, add,edit,del) Portfolio Projects (All the things I did recently, add,edit,etc..) Manage Comments for news User System I have a hard time (a slow start up putting things together) starting the actual php because I think to hard to make the code small, easy to edit and fast. What are some good practices to help me create code faster as in organizing code. (Yes I want to use oop, that makes things also a little slower, yet its cleaner and easier to read.) Quote Link to comment Share on other sites More sharing options...
TravisJRyan Posted June 11, 2008 Share Posted June 11, 2008 Try Zend Framework, or your choice in php frameworks for rapid OOP/MVC development Quote Link to comment Share on other sites More sharing options...
Demonic Posted June 11, 2008 Author Share Posted June 11, 2008 Try Zend Framework, or your choice in php frameworks for rapid OOP/MVC development Why Frameworks? Wouldn't it take longer for me to learn the framework then actually doing the code? Quote Link to comment Share on other sites More sharing options...
keeB Posted June 11, 2008 Share Posted June 11, 2008 OOP is slower? That's new to me! In fact, I think it'd be faster, considering you have less code bloat. How would you rate yourself, on a scale from 1-10, in PHP knowledge? I think people the people you see design so quickly are playing to their strengths, and not worrying about little details. Set realistic goals. Make a deliverable to yourself every X amount of time, and ensure there's measures in place to make up for any miscomings. I think that will go a long way in to helping you code quickly and efficiently. Everything else is a matter of taste/style. Quote Link to comment Share on other sites More sharing options...
Demonic Posted June 11, 2008 Author Share Posted June 11, 2008 OOP Slower? No, Setting up the right amount of classes, and planning out the classes efficiently is what gets me. Theres different ways to do the same thing, I think I just think to hard on the basics. I'd rate my self a 5/6 out of 10 in php. Quote Link to comment Share on other sites More sharing options...
TravisJRyan Posted June 11, 2008 Share Posted June 11, 2008 Why Frameworks? Wouldn't it take longer for me to learn the framework then actually doing the code? Have you tried one yet? Zend is probably the easiest. . a few hours reading and im sure you will be a 5-10 in php knowledge AND zend framework, its well documented. and has a cool search documentation feature. OOP Slower? No, Setting up the right amount of classes, and planning out the classes efficiently is what gets me. Theres different ways to do the same thing, I think I just think to hard on the basics. I'd rate my self a 5/6 out of 10 in php. Dont worry about the planning out all the classes. . there are tons of people who did that for you. CodeIgnitor Symfony Zend Framework CakePHP Quote Link to comment Share on other sites More sharing options...
keeB Posted June 11, 2008 Share Posted June 11, 2008 I think those frameworks are a bit heavy for a basic portfolio. Honestly, you should have a prototype up in less than 5 hours. I think everyone has their weak point. I could have a solid back end but, ask me to write the UI and I could spend years perfecting it and it'd still look like a 5 year old took a shit on a piece of paper and handed it in as a drawing. Quote Link to comment Share on other sites More sharing options...
Demonic Posted June 11, 2008 Author Share Posted June 11, 2008 and it'd still look like a 5 year old took a shit on a piece of paper and handed it in as a drawing. lmfao Thanks for the reply Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted June 12, 2008 Share Posted June 12, 2008 I think those frameworks are a bit heavy for a basic portfolio. Why would they be too heavy? Just use the things you need and leave the rest. Quote Link to comment Share on other sites More sharing options...
keeB Posted June 12, 2008 Share Posted June 12, 2008 Daniel, I was speaking mostly of something like symphony, I honestly have no idea about Zend. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted June 12, 2008 Share Posted June 12, 2008 Well, doesn't that go for mostly all frameworks? I haven't touched symfony very much, but I suppose you can just take what you want with that one as well. Anyways, for frameworks I'd recommend Zend Framework (no surprise). Quote Link to comment Share on other sites More sharing options...
keeB Posted June 12, 2008 Share Posted June 12, 2008 Symphony includes propel, and is based on command line interaction like PEAR is for generating model/database layer code. Quote Link to comment Share on other sites More sharing options...
trq Posted June 12, 2008 Share Posted June 12, 2008 Symphony is allot different to Zend. Zend IMO is more like a library than a framework, you can simply pick and choose what you want to use and ignore the rest. Heck, you don't even need to use there controllers to create your MVC. Symphony and most other frameworks force you into using there MVC implementation. Quote Link to comment Share on other sites More sharing options...
TravisJRyan Posted June 13, 2008 Share Posted June 13, 2008 Symphony is allot different to Zend. Zend IMO is more like a library than a framework, you can simply pick and choose what you want to use and ignore the rest. Heck, you don't even need to use there controllers to create your MVC. Symphony and most other frameworks force you into using there MVC implementation. I think that is why I like Zend over the others I have used. You dont HAVE to use everything it offers or even use their MVC. Just like you said tho, its mor eof a library. . hell, isnt the folder name its packaged with named library? haha. Zend all the way. I do like cake and symphony for its ability to create a basic template to start with. "Scaffolding" but really only useful for administrative type sites, well for what I have done with them. Quote Link to comment Share on other sites More sharing options...
Darklink Posted June 13, 2008 Share Posted June 13, 2008 I code very quickly with very efficient code. I use my own framework. For a portfolio you will want to use other frameworks and there are plenty out there. If you ever get the chance, try and build your own framework. You understand it better and if you ever need to make any changes you know where to look. Everything is so much quicker! Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted June 24, 2008 Share Posted June 24, 2008 Coding with speed and coding with structure are 2 different things. I type 120 words per minute and can knock "Code" out lightning fast. But that does me no good when it comes to organization and correct structure. In order to be able to work code up fast..as well as accurately it requires a certain level of what is called "Re-usability". Needing to do something 10 times but only having to write it once is really good Re-usability. Thus the idea of frameworks come into place. A way for you to have classes that you might end up re-using throughout a given project (and future projects if you carry the framework with you) is very important. Not having a framework requires you to have to redo the initial setup everytime. If you have a good framework then it's simply work up a layout for the site/application..integrate it into your templating system..and your done. Site setup and you can just start filtering in content and thrownig in programming (in an organized manner. Look up Cakephp, Codeigniter, and google some stuff like "PHP, Correct programming structure"...and "Fast PHP development". You'll get enough content to give you reading material for a month but really digging in and breaking some of those programs up and seeing how major companies with giant applications that are years in the making..that's what is going to really sink in what it means to keep code organized, re-usable, and easily accessible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.