什么是Web框架?与LAMP相比如何? [英] What is a Web Framework? How does it compare with LAMP?

查看:129
本文介绍了什么是Web框架?与LAMP相比如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从LAMP/WAMP开始进行Web开发,这对我来说是合乎逻辑的. 有一个名为Apache的Web服务器程序,该程序负责在端口80(公用端口)上设置服务的网络部分.如果请求是常规HTML,它将使用HTTP进行处理.并且如果请求是PHP资源,则有一个mod_php,Apache使用该mod_php调用PHP解释器来处理该文件,并返回HTML,该HTML又像通常的HTML一样传输了.

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.

现在的问题是什么是Web框架?我遇到了基于Python的网站创建过程,其中包含Flask.什么是烧瓶,它与LAMP相比如何. Django/Ruby on Rails是否与flask不同?

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?

LAMP比这些通用框架还要慢-多数人声称使用它们的框架部署Web应用程序容易吗?

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.

推荐答案

引用维基百科:

Web应用程序框架是 设计用于 支持动态发展 网站,Web应用程序和Web 服务.该框架旨在 减轻与 在Web中执行的常见活动 开发.

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.

基本上,Web框架使您可以更轻松地开发应用程序.大多数网站都有一套通用的功能(例如处理会话,数据验证等),并且框架阻止您每次创建网站时都重写框架.

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)是一个包含 Web服务器(Apache)的软件包.这是一个实际运行您的Web应用程序的软件.简而言之,框架是可帮助您更快开发的库.

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是一个微框架,基本上意味着它是一个占地空间较小的框架(根据其文档,该框架适用于小型站点).

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也是框架. Django和Flask都是Python的框架,而Rails是Ruby的框架.

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

我建议您在没有框架帮助的情况下构建应用程序,然后跳入使用框架(这要求您了解Model-View-Controller,ORM等原理).

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

这篇关于什么是Web框架?与LAMP相比如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆