开发者

Why should i learn a PHP framework? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved开发者_开发问答 and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I dont mean that petulantly, but is there anything wrong with hand coding all of your PHP? I see alot on this site/many others that to go for PHP jobs, etc that its essential to learn a framework like Zend, CakePHP or similar?


I would say that before you learn any kind of PHP framework you first understand PHP as well as you possibly can, it pros and cons and its nuances. Many will argue that using a framework straight off means you are learning the framework not the language.

Edit-

Once you become comfortable with PHP then go ahead and learn a framework, you're right, a lot of PHP development jobs do require prior framework experience.


It depends on what you want. If you want a job, you should also look at demand vs supply. for example rails & android being new, the ratio is good to get a job. I had read some statistics where they say

  1. For every java opening there are atleast 623 resumes

  2. For even .NET opening there are atleast 567 resumes

  3. For every rails opening there are atleast 11 resumes.

You can see rails is a better option to learn too in that case. Again this is much of a personal preference & what opportunity is knocking at your door right now with a trade off with what you want to learn.


At some point, writing all your PHP by hand will become difficult to maintain. So you should be comfortable with using libraries in Object form. This will save you 100s or 1000s of hour from re-inventing a wheel on how to do common operations you'll run into such as Form Validation, File Uploading, Database Saving, and the like.

A framework is somewhat a collection of libraries to do all these tasks for you. However, some frameworks restrict you and without properly understanding OOP your skills may be limited by relying totally on a framework.

My suggestion is to learn some OOP and practice writing a few libraries if you don't understand that yet.


There is nothing like using a framework, to learn all the good practices. That's why any coder should be familiar with at least one framework in their language.

The companies use the other good side of frameworks - it helps to save time. In a framework many things are just ready to use.


You should learn it I guess

  1. It increases your knowledge.
  2. Its very easy to use
  3. Lots of community support


you should learn frameworks as it allows you to write the applications quickly and easily. It saves your time also.Everything has its pros and cons but it doesn't mean that you should not go for it. Before learning PHP framework you must understand PHP properly. To be good programmer you should have better understanding of PHP.


It depends on the size of the job and the size of the team. The biggest benefit of a framework is for teams to make sure that the code of each member is going to be similar by the following the rules of the framework. If you work alone, the benefit can be ready solutions / libraries for usual problems.


If you can, try writing a few simple frameworks yourself. Most frameworks out there are generic so that masses can use it for different needs. Learn to write a couple of frameworks that is particularly useful for your specific needs. In the real world, you need to be disciplined about how you go about doing it. No one will give you time to first write your framework, then your app. Do it both at the same time; but in your mind, be very clear which part is your framework and which part is your app.

For example, if you have a very thin backend layer and your php is used for database retrieval, then write a simple php database framework for your specific needs. Use your framework to enforce structures such that you always retrieve and update in a certain way (in reality, that's one of the benefits of frameworks - you do things in a certain, consistent way so that changing your code is easier; especially after you are away from it for a while).

After you have done that, you'll be able to appreciate frameworks and eventually know how to choose one that you enjoy using. Incidentally, even if you don't use any formal frameworks, you'll need to provide some principles and structures in approaching your programming anyway, and that's actually your 'framework'; just not a very well thought-out and consistent one.


A framework can easily be implemented if you learn it and it saves time and gives community support. So you should learn a PHP framework. But remember that you should first learn how to do a raw PHP implementation. Otherwise you won't be able to understand how it works.


well there are many advantages of learning php ... you can see its advantages at :

http://latesthub.in/2010/12/12/why-should-i-learn-php/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜