54

I started web development in LAMP/WAMP and it was logical to me. There is a Web Server program called Apache which does the networking part of setting up a service on port 80 (common port). If the request is regular HTML it serves it using HTTP. And if the request is a PHP resource, there is a mod_php with which the Apache invokes the PHP interpreter to process the file and it gives back HTML which is again transferred as usual HTML.

Now the question is what is a Web Framework? I came across Python based website creation and there is Flask. What is a flask, how does it compare with LAMP. Further are Django/Ruby on Rails different from flask?

Further is LAMP slower than these common frameworks - most claim that it is easy to deploy web apps using their framework?

Can someone answer me and also give some good places to read on these. Thanks for your answers in advance.

0

3 Answers 3

53

To quote Wikipedia:

A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development.

Basically, a web framework makes it easier for you to develop your application. Most sites have a common set of functionality (like handling sessions, data validation, etc) and a framework is something that prevents you from re-writing this each time you create a website.

LAMP (Linux, Apache, MySQL, PHP/Perl/Python) is a package that contains a web server (Apache). This is a piece of software that actually runs your web application. Frameworks are, in short, libraries that help you develop faster.

Flask is a microframework, which basically means that it is a framework with a small footprint (and meant for small sites, according to its docs).

Django & Ruby on Rails are also frameworks. Django and Flask are both frameworks for Python, but Rails is a framework for Ruby.

I would suggest that you build applications without the help of frameworks, and then jump into using frameworks (which require you to understand principles such as Model-View-Controller, ORM, and so forth).

3
  • Hah, right! Let me edit that to make it more specific. Although, I'm not sure if it'll only add to the confusion.
    – RabidFire
    Dec 22, 2010 at 8:56
  • 2
    Sorry for the delay but in essense , LAMP is the thing what runs the Website usually and I can extend my functionality using Web Framework ( which gives libraries to support the web app and interacts with LAMP or any Web Server / MySQl and Language - HTML converter ) Is that right ?
    – Nishant
    Dec 22, 2010 at 17:41
  • ORM is not a requirement for all frameworks. I use Flask for no-DB apps. I have built frameworks to parse MD/use GIT as data store. As for M-V-C, what the M, V, and C parts "do" changes a little from framework to framework but are generally similar. There are many variations like HMVC, MVT, PAC, etc, all similar but having various features you may want or not need. I agree on learning w/out a framework, but in general a developer will lean on a few distro to get all the work done.
    – Marc
    May 13, 2016 at 19:19
26

what is a Web Framework?

A bunch of libraries that do common tasks in web development that are designed to work together.

What is a flask

A web framework.

how does it compare with LAMP

In roughly the same way that a factory making components for car engines compares to a road.

Further are DJango / Ruby on Rails different from flask ?

Yes. Rails is written in a different language for a start.

3
  • 1
    Haha i liked your response, esp about the road and factory Sep 11, 2016 at 9:11
  • 3
    @Quentin I don't get your analogy about road and factory. Can you please elaborate? Aug 10, 2017 at 17:37
  • @QuaziIrfan The point of the analogy is that they don't directly have anything to do with each other
    – Amr Ojjeh
    Oct 9, 2022 at 18:20
4

You seem to be a bit confused. I suggest you read from the below link :

How To Choose The Perfect Technology Stack For Your Web Development?

to get the correct answers. In the meantime, let me clear your doubts step by step.

A web framework is a software framework that is designed to support the development of dynamic websites, web applications, and web services.

Flask is a Python web framework.

LAMP is a complete web development stack. So comparing flask (a web framework) to LAMP (a web development stack) is simply not accurate. In a non-technical example, imagine comparing a fishing rod string to an entire fishing equipment kit.

If you are comparing Flash to LAMP then it can be only done in one way. LAMP uses PHP, and so this stack is compatible with all the frameworks of PHP. So you should compare Flask to various PHP frameworks like Laravel, Codeigniter, CakePHP, etc.

For further information on web frameworks and web development stacks, I would suggest you read this blog on

The Best Technology Stacks for Web Development

.

Not the answer you're looking for? Browse other questions tagged or ask your own question.