Why Do I Need to Use a Popular Framework

Why do I need to use a popular framework?

Frameworks have several advantages:

  • You don't have to write everything. In your case, this is less of a help because you have your own framework which you have accumulated over the years.

  • Frameworks provide standardized and tested ways of doing things. The more users there are of a given framework, the more edge cases that have been encountered and coded for. Your own code may, or may not, be battle hardened in the same way.

  • Others can be recruited onto a project with a standard framework and have access to the documentation, examples and experience with that framework. Your own snippets may or may not be fully documented or have examples of use... but isn't much chance that others are comfortable with them initially.

EDIT:

With regards to your idea of packaging up your own framework, the benefit of cleaning it up for public consumption can be larger than the benefit of getting others to use it.

The reason is simple: you will have to re-evaluate your assumptions about each component, how they fit together and how clear each piece is to understand. Once you publish your framework, your success will be strongly dependent on how easy it is to get up and running with.

Big wins with little effort are essential for adoption (those wins will encourage people to delve further into the framework). Ruby on Rails in an example of a framework that gives such big wins with little effort, and then has hidden layers of features that would have overwhelmed someone just getting started. (The question of the quality of RoR apps is not the point, the point is about adoption speed).

After people adopt a framework, it is about the ease of continued use. Little details like consistent parameter use patterns make all the difference here. If one class has many parameters on every method, while another has setters that are expected to be called before invoking methods, you will lose users because they can't get a "feel" for what is expected in a given case without resorting to the documents.

If both ease-of-adoption and ease-of-living-with issues are addressed properly, you only have to get lucky for people to adopt your framework. If those issues are not addressed properly, even an initial interest in the framework will wane quickly. The reason is that there are many frameworks: you will need to stand out to gain the advantages of having others using your kit (as they rightfully are as wary of your framework as you are of others).

What is the purpose of a web framework?

Frameworks are like incomplete / partial applications. They solve most of trivial tasks for you and allow you to focus on business logic directly. You stuff your business logic into it to make it complete.

For example, web frameworks like Spring or Struts, solve most of the request / response related trivial tasks like getting parameters from a request and populating model beans from it, rendering responses depend on model values, security, request dispatching etc. So you can utilize these structures to quickly develop applications.

php frameworks , when and why do i need them?

Frameworks are created to make your work easy.

Advantages of using framework

  1. There are a lot of functions that are already written
  2. There are some good programic patterns. You have good code and file organisation.
  3. There are a lot of libraries and plugins.
  4. There is MVC pattern already implemented.
  5. They give you advantage of faster develompent.
  6. There is community support
  7. They are mostly fast and secure.

Why use a framework with PHP?

Why do I need to use a popular framework?

Using framework in the begining may seem to be hard, but when you learn it, it makes coding a lot faster!

Disadvantages of using framework:

  1. You will learn a lot by writing your own.
  2. If you need it for small project like portfolio, there is no need for giving yourself more work to set the framework to work.
  3. There is a lot of things in framework that you don't need and they take its space on server.

https://softwareengineering.stackexchange.com/questions/49488/when-not-to-use-a-framework

It's not about frontend project, if you have big project you should use framework if it's little it's not worth. That is my opinion.

I'd suggest you Zend Framework or Symfony if you decide to use Framework.

Do I need to use a web framework for a simple website?

It depends on what kind of website you are planning to come up with. If the website is going to be just a set of static HTML files, then you don't really need a framework. But if your website will have lots of dynamic content that will get updated on regular basis, you should go with some framework. That will make your life maintaining the website much more simpler.

Django is the most popular framework written in Python. It has very good documentation and a strong community base too.

What are the main differences between the popular web frameworks?

I am going to briefly address each area for three popular Python frameworks. This is only based on my personal experiences and observations.

Development speed and convenience

For TurboGears, Pylons, and Django, development speed is roughly equal. Being modern frameworks, it's easy to get started on a new site and start throwing together pages. Python is famously fast to develop and debug and I would put any Python framework as having a shorter development time than any other setup I've worked with (including PHP, Perl, Embedded Perl, and C#/ASP.Net).

Barriers to entry - developer training and infrastructure

If you know Python and are willing to watch a 20 minute video tutorial, you can create a fairly complete wiki-type site from scratch. Or you can walk through a social-bookmarking site tutorial in 30 minutes (including installation). These are TurboGears examples but the other two frameworks have nearly identical tutorials as well.

The test/development infrastructure that comes out of the box with these frameworks is generally enough to complete most sites. At any point, you can swap out components to meet your production environment requirements. For example, SQLite is fine for setting up your models and loading test data, but you will want to install MySQL (for example) before going live or storing large amounts of data.

In all cases, the requirements are very low and dictated entirely by your scalability requirements and not any peculiarities of the framework. If you are comfortable with a certain template language or ORM, it will probably plug right in.

Lock-in

This is a generalized problem across all frameworks. When you select a language, you limit your code-reuse options. When you select a templater, you are again locked in (although that's easier to change, in general, than other things). The same goes for your ORM, database, and so on. There is nothing these frameworks do specifically that will help or hinder lock-in.

Flexibility

It's all about MVC with these three frameworks. As you said, that's a very different discussion!

Performance, scalability, and stability

Well, if you write good code, your site will perform well! Again, this is a problem across all frameworks addressed by different development techniques and is probably way outside the scope of this answer.

Do you need a framework to write Ruby or Python code for the web?

The short answer is no, they are not necessary. In ruby you have .erb templates that can be used in a similar way as you use PHP pages. You can write a site in ruby or Python using several technologies (Rails-like frameworks, Templates or even talking directly with the HTTP library and building the page CGI-style).

Web frameworks like Python's Django or Ruby's Rails (there are many) just raise the level of abstraction from the PHP's or ASP's, and automate several process (like login, database interaction, REST API's) which is always a good thing.

Reasons to NOT use a PHP Framework?

There are many reasons that people will suggest not to use a framework.

  • You will learn a lot by writing your own. I have been working on my own and I have learned a lot of different things about PHP that I did not know before. Overall it is a great learning experience that can be used in an interview or on your resume. It shows that you have a big interest in the language and most importantly the theory behind it rather than just the mindless implementation.
  • There are a lot of things in frameworks that you do not need and by making your own you can get only whatever you want. The framework is tailored to your own needs specifically. I for one did not like how any of the frameworks handled templates which was the biggest trigger for me to make my own.
  • Also, I am not positively sure about this one, but thinking of it logically...your own framework that is tailored to only your needs will be much faster than any of the other frameworks. Think about all of the settings that the other frameworks have to go through when loading and the database queries that involves. You save yourself all of that loading.
  • If you are going to be making a small project that will not need to be expanded on, such as a simple portfolio website, then a framework would just be more work than necessary.

There is also a very good article here that goes into other details. The author of this article starts out by talking about how he always was such a big proponent of frameworks.

http://jpst.it/jiYX

I am always going to push towards making my own frameworks unless I start doing some freelance work. I am constantly updating my framework and learning more and more. You will never hear anybody say definitely use or definitely do not use a framework because it all depends on the use.

Edit: There is also a question over at the Programmers site on this: https://softwareengineering.stackexchange.com/questions/49488/when-not-to-use-a-framework

Edit #2: One last article about why frameworks are not necessary: http://www.amberweinberg.com/you-dont-need-a-framework-if-you-have-a-good-developer/



Related Topics



Leave a reply



Submit