tags:

views:

53

answers:

4

I have been programming for around 6months and currently learning PHP/Mysql. I can create basic functionally sites starting from a plain sheet of paper. Is it necessary I use frameworks to create sites?

Currently, everything I do is from scratch. I'll borrow codes from old codes, ask people for help, etc. Are frameworks going to help me much more?

Is it alright if I put a site public without using a framework?

(I have not looked a lot into frameworks, so my knowledge is limited, but I'm just curious)

+3  A: 

Frameworks are not required. Frameworks can:

  • Take care of annoying "plumbing" or "glue code"
  • Can help you structure your code in a way that makes it more maintable
  • Provide tools to help you do common things faster
  • Provide certain conventions which make it easier to bring another developer on board
blockhead
For "plumbing or "glude" codes, wouldn't functions help? Or does framework do a lot better of a job? I'm going to research a lot more on frameworks...
ggfan
A framework can be a set of functions. Nothing says a framework has to be object oriented. Just that object oriented programming tends to be more maintainable.
blockhead
+2  A: 

It's perfectly fine to create basic functional sites from scratch. The problem is that approach will not scale as well when you need to build a site with hundreds of pages, dynamically generated from a database. A framework will really help you there.

If you plan on building websites of substantial sites eventually, it will benefit you to learn some frameworks. Frameworks will also teach you development best practices (if they're well-written frameworks).

Robert Harvey
+2  A: 

The more you get into building sites, the better off you are using a framework. Everyone starts off pretty much the same, straight up html, css, javascript, php and all from scratch in a small directory structure. Personally, I would never go back to building sites without a framework because without one, you are required to re-write the wheel every time. A framework takes care of a lot of redundant work for you, allowing you to focus on the specifics of the site and new functionality not yet built.

That being said, not using a framework isn't horrible either (for small sites). A small five page site with no data storage, form submission or heavy back-end use, really doesn't need a php framework behind it.

Good Open Source Framework: http://framework.zend.com/

Good luck and welcome to the web community!

Calvin
+2  A: 

As mentioned in the other posts, a framework can help with making your code more maintainable and scalable. I personally feel (feel free to flame away..) it is important to have a solid understanding of the underlying technologies to a framework before using one. You can jump straight into Symfony or Zend for example, using an ORM to generate all of your CRUD classes and never worry about the inner workings of it, however I think it helps greatly if you do have a good knowledge of how to write something similar manually.

For me, the greatest value I have got from frameworks is when I have discovered something that I used to write for each web project is simplified / automated / made so much easier

Macros