tags:

views:

140

answers:

5

Duplicates:

Anyone NOT using a Web Framework? Why?

Do most web ‘programmers’ (not designers) use wysiwyg editors or hand code their HTML?

Whats better using HTML/CSS edited by hand or using design programs? and why?


Now before I continue I feel more comfortable coding by hand without using a PHP type framework. What will be the benefits of using a framework vs. hand coding and vice versa when designing a large scale site?

A: 

I would suggest a framework especially when working with something large scale. The amount of time it should save you should be worth it in itself, as well as the consistency of the output, functionality such as search, AJAX support, and localization will be easier and more than likely less buggy than doing it by hand.

I imagine you will be using JavaScript as well and a framework IMO is a no-brainer due to compatibility issues between browsers.

RC
+3  A: 

A Framework basically provides you with a lot of stuff (functions / classes) that you will probably need. Rather than writing your own function to, say, load a view from a controller, the framework has this already written for you.

The benefits of this are:

  • Faster to develop - some of it is already written for you
  • Easier for new hires to learn (if they know the framework) - they will know where things are, how things are structured
  • Less of "your" code - less to write, less to debug, less to maintain

The drawbacks of frameworks are:

  • Might not do exactly what you want in exactly the way you want
  • More to learn. You know the language, now learn the framework
  • Can bloat your project. Some frameworks come with a lot of stuff - if you're not using it then it's just bloat. Pretty minimal though - what's 10MB or so these days?
  • Can be slow. Some frameworks have a significant overhead
Greg
A: 

Coding by hand you get to do what you want how you want it, and using a framework requires a mindest change from “how do I do this”, to “how should I do this in the framework”. Sometimes the framework will drive you crazy as something which seems easy can seem to take forever but there are many advantages:

  • You get lots of functionality for free
  • You get lots of bug testing and security testing for free
  • The software gets maintained and upgraded by many people
  • You get loads of third party plug ins for free.
  • There is a community of people using it and they may have faced the same problems you will face in the past.
  • You can get commercial support for some frameworks
  • People can be hired who already know what to expect
  • People learn a skill which is transferable which makes them happy.

Take a test drive of something like Drupal. See what it can do and look at the plug ins that are available.

I have worked on 3 bespoke CMS systems, and now work with Drupal, and while it has it’s quirks it is a much better experience. Nine times out of ten the functionality you need already exists as a module. The core functionality is done for you and is updated by other people, and the community makes learning it fairly easy.

Jeremy French
A: 

Maybe the only good time i would use a framework is when the project is too large otherwise its usually safer to hand code your own stuff cause it gives you an edge over what you are doing. Frameworks can also help if you are integrating many different projects at the same time and you save your time instead of hand coding something over and over again. So frameworks are good but one should just decide when and why to use them as the situation requires.

renilative
A: 

A lot of people seem to think that using a framework requires you to learn more than if you roll your own. This is only true if you already know how to architecture web applications, in which case you are probably familiar with one or more frameworks anyway.

Learning software architecture is more art than science and all the pattern books in the world will not teach you the things you will learn by working with a good web framework and reading the source.

When I started programming, I wrote all my code myself and in low level languages too. I learned a lot from it, but my programs could have been finished sooner and with better quality if I had used other tools.

When I started writing programs in Rails, I really learned a lot about architecture and programming in general, which I could probably only have learned by reading other people's code. Having to learn how to use the framework correctly forced me to read a lot of code and understanding why it was written that way.

I would recommend that you pick out a good framework and use that (Rails comes to mind). Even if you roll your own, I would recommend that you learn how to use a framework anyway. Inventing things yourself will take much longer than using existing ideas.

Jørgen Fogh