本文共 4105 字,大约阅读时间需要 13 分钟。
You surely came across the term JAMstack in the last couple years.
您肯定在最近几年遇到过术语JAMstack 。
It defines a group of technologies used together to achieve a goal, like LAMP and MEAN if you are familiar with does.
它定义了一组共同用于实现目标的技术,例如LAMP和MEAN(如果您熟悉的话)。
What does JAMstack mean?
JAMstack是什么意思?
JAM stands for JavaScript, API, Markup.
JAM表示对于j avaScript,A PI, 男 arkup。
It describes a trend in creating Web Applications and Web Sites that have those key characteristics:
它描述了创建具有以下关键特征的Web应用程序和网站的趋势:
There is a “dumb” web server (or ) sending the HTML needed to run the app, typically generated using a static site generator. The HTML is not generated
有一个“哑” Web服务器(或 )发送运行应用程序所需HTML,通常是使用静态网站生成器生成的。 不会生成HTML
This new approach is a new kind way, compared to
与之相比,这种新方法是一种新的方式
It’s also different than client-side rendered websites (for example built with React) with a server-side rendered part. The JAMstack does not involve server rendering at all.
它也不同于带有服务器端渲染部分的客户端渲染网站(例如,使用React构建)。 JAMstack完全不涉及服务器渲染。
The traditional approach of server-rendering websites application dynamically, like it happens with WordPress, Laravel and Rails, is being superseded in many cases by a lighter approach.
动态地呈现服务器应用程序的传统方法(如WordPress,Laravel和Rails所采用的方法)在许多情况下已被更轻松的方法所取代。
A typical WordPress site can make 30-100 requests to a database for every page load, depending on the amount of plugins installed. Unless heavily cached, you can recognize a WordPress site when it gets popular on Hacker News, Reddit or any other big site because you get a blank page - which means something crashed on the server, as the site cannot support all that traffic. Many times this is a lost opportunity, because when the site is at its peak in popularity, it does not work.
一个典型的WordPress网站可以在每次页面加载时向数据库发出30-100个请求,具体取决于安装的插件数量。 除非缓存严重,否则您可以在WordPress站点在Hacker News,Reddit或任何其他大型站点上受到欢迎时识别出该站点,因为您会得到一个空白页-这意味着服务器上发生了崩溃,因为该站点无法支持所有流量。 很多时候,这是一个失去的机会,因为当该网站达到顶峰时,它就无法工作。
Serving a static HTML page instead of much, much more efficient than that, and dynamic data can still be fetched when needed, using separate API calls once the HTML is loaded.
为静态HTML页面提供服务的效率远不止于此,效率更高,而且在加载HTML之后,仍可以使用单独的API调用在需要时获取动态数据。
and more.
和更多。
Many apps can fall under the JAMstack umbrella, and the possibilities are endless, ranging from simple blogs to e-commerce websites (for example with ) to more complex Web Apps.
许多应用程序都可以归入JAMstack的范畴,并且可能性无限大,从简单的博客到电子商务网站(例如,使用 ),再到更复杂的Web应用程序。
My blog falls under the JAMstack umbrella. All the HTML is generated at deploy time, and there is nothing else going on.
我的博客隶属于JAMstack。 所有HTML都是在部署时生成的,没有任何其他操作。
翻译自:
转载地址:http://fxqgb.baihongyu.com/