Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Web Framework? How does it compare with LAMP?

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.

like image 546
Nishant Avatar asked Dec 22 '10 08:12

Nishant


People also ask

What is meant by web framework?

A web framework is a software library that enables developers to write software that runs on the web. Common areas where developers use web frameworks are: Backend: The software that runs on servers and serves web sites, web apps, and also APIs for the exchange of data.

Is lamp a framework?

LAMP (Linux, Apache, MySQL, PHP/Perl/Python)is a software development framework that is open source using the operating system Linux, the Software-Server Apache, the partnership database management system MySQL, and the object-oriented scripting language Perl / PHP /Python.

Is LAMP stack a framework?

LAMP stack provides web frameworks for some popular websites such as Joomla and Drupal. The Wikimedia Foundation uses customized LAMP stack to host its services and to improve its site infrastructure. Due to its huge community and availability to a vast amount of source codes, it can provide a secure framework.

What is the difference between Web framework and web server?

As we saw in the last article, web servers and browsers communicate via the HTTP protocol — servers wait for HTTP requests from the browser and then return information in HTTP responses. Web frameworks allow you to write simplified syntax that will generate server-side code to work with these requests and responses.


2 Answers

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).

like image 183
RabidFire Avatar answered Oct 07 '22 00:10

RabidFire


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.

like image 29
Quentin Avatar answered Oct 07 '22 01:10

Quentin