旅行者 问题_Web开发向十年前的时光旅行者解释

旅行者 问题

by Ivan Zarea

通过伊万·扎里亚(Ivan Zarea)

我如何向2007年的时间旅行者解释十年的Web开发 (How I would explain a decade of web development to a time traveler from 2007)

Hello friend! I hope you like this new world of ours. It’s a lot different than the world of 2007. Quick tip: if you just got a mortgage, go back and cancel it. Trust me.

你好朋友! 希望您喜欢我们这个新世界。 与2007年的世界大不相同。快速提示:如果您刚获得抵押贷款,请回去取消抵押贷款。 相信我。

I’m glad that you’re still interested in computers! Today we have many more of them than we did 10 years ago, and that comes with new challenges. We wear computers on our wrists and faces, keep them in our pockets, and have them in our fridges and kettles. The cars are driving themselves pretty well, and we’ve taught programs to be better than humans at pretty much every game out there — except maybe drinking.

很高兴您仍然对计算机感兴趣! 今天,与十年前相比,我们拥有更多的人,这带来了新的挑战。 我们将计算机戴在手腕和脸上,将其放在衣袋中,并将其放在冰箱和水壶中。 这些汽车的自我驾驶状况非常好,而且我们教过的程序在几乎每场比赛中都比人类做得更好,除了喝酒。

(网络)应用 ((Web) Apps)

You might have seen the release of the iPhone just before you stepped into the time booth. Apple is the biggest and richest tech company, mostly due to the iPhone and its operating system, iOS. Google has this competing thing called Android, and Microsoft tried to get a slice of the ever-growing pie with Windows Phone. It didn’t work out.

您可能在踏入考勤室之前就已经看到了iPhone的发布。 苹果是最大和最富有的科技公司,这主要归功于iPhone及其操作系统iOS。 谷歌有一个名为Android的竞争产品,而Microsoft试图通过Windows Phone获得不断增长的市场份额。 它没有解决。

We started calling programs apps, and some websites are calling themselves web apps. In 2008, Google released a new browser called “Chrome.” Nine years later it’s the most popular way to get on the Web.

我们开始调用程序应用程序,有些网站称自己为网络应用程序 。 Google在2008年发布了一款名为“ Chrome”的新浏览器。 九年后,这是最流行的上网方式。

The Chrome team invested a lot in working with JavaScript, and the code gets better every month. Web apps are written using a lot of JavaScript, and they resemble the desktop interfaces of your time.

Chrome团队在使用JavaScript方面投入了大量资金,并且代码每个月都会变得更好。 Web应用程序是使用许多JavaScript编写的,它们类似于您当时的桌面界面。

Companies have also invested in JavaScript to make it better—it now supports classes and modules. We use languages that compile to JavaScript, like TypeScript (from Microsoft, they’re cool now) or Flow.

公司还对JavaScript进行了投资,以使其变得更好-它现在支持类和模块。 我们使用可编译的语言 到JavaScript,例如TypeScript (来自Microsoft,现在很酷)或Flow

We write a lot of JavaScript these days, since nobody supports Flash anymore. We even run JavaScript on the server, instead of Perl, using a thing called Node. It sounds easier than it is.

如今,由于没有人支持Flash,因此我们编写了很多JavaScript。 我们甚至使用称为Node的东西在服务器上而不是Perl上运行JavaScript。 听起来比它容易。

Remember Swing, SWT and the likes of wxWidgets? We had to reinvent them for the browser world. Several new UI programming models emerged, which mostly focused on components.

还记得Swing,SWT和wxWidgets之类的东西吗? 为了浏览器世界,我们不得不重新发明它们。 出现了几种新的UI编程模型,这些模型主要集中在组件上

We had to find a way to design, build, and test apps while keeping them responsive (a term we use to describe a website that doesn’t look like crap on a mobile phone). We also needed to keep it slim — not everybody has a fast connection, but everybody has a browser in their pockets.

我们必须找到一种设计,构建和测试应用程序的方法,同时保持应用程序的响应速度(我们用来描述一个看起来不像手机上废话的网站的术语)。 我们还需要保持苗条-并不是每个人都有快速的连接,而是每个人的口袋里都有一个浏览器。

To help with all this, there are now component frameworks. The term is vague, since it includes the likes of Angular by Google, React by Facebook, and Vue by the community. But it’s the best term we have.

为了帮助解决所有这些问题,现在有了组件框架 。 这个词含糊不清,因为它包括Google的Angular ,Facebook的React和社区的Vue之类的东西。 但这是我们最好的名词。

By the way, I’m not sure you remember Facebook from 2007. It was getting big in the US around that time, and now it’s bigger than huge. Boasting more than a billion users, it’s also one of the largest codebases in the world.

顺便说一句,我不确定您还记得2007年以来的Facebook。在那时,它在美国变得越来越大,而现在却大于规模。 它拥有超过十亿的用户,也是世界上最大的代码库之一。

The Facebook development team writes a lot of great code and publishes it online. They have their own conference, F8. Most big companies have their own conferences.

Facebook开发团队编写了大量出色的代码,并将其在线发布。 他们有自己的会议F8。 大多数大公司都有自己的会议。

CSS also had to evolve, since the new apps require more intricate layouts. We don’t use tables with images anymore. Frames are gone as well. Instead, we have created new standards, like CSS Floats, Flexbox, and CSS Grid.

CSS也必须发展,因为新的应用程序需要更复杂的布局。 我们不再使用带有图像的表格。 框架也消失了。 相反,我们创建了新的标准,例如CSS Floats,Flexbox和CSS Grid。

People had to iterate on these standards, and they’ve built libraries to make things look consistent, like Bootstrap, Foundation and many more. Similar to JavaScript, we have created languages that compile to CSS. They make up for some of the things that CSS misses, like variables or modules. It’s still hard.

人们必须迭代这些标准,并且他们已经建立了使事物看起来一致的库,例如BootstrapFoundation等。 与JavaScript相似,我们创建了可编译为 CSS的语言。 它们弥补了CSS遗漏的某些东西,例如变量或模块。 还是很难。

可以迷路了 (It’s okay to be lost)

Don’t feel bad if you’re confused. The truth is that we’re all a little confused — and it’s okay to be so. There are many more developers on the planet now, and tech companies are becoming more successful. For a while we used the term “startup” to describe companies that grew quickly and didn’t know what to do. But even this term has become old.

如果您感到困惑,不要难过。 事实是,我们都有些困惑-可以这样。 现在,地球上有更多的开发人员,而科技公司正变得越来越成功。 一段时间以来,我们使用“创业公司”一词来描述那些快速成长但不知所措的公司。 但是,即使这个词已经变老了。

数据 (Data)

There are more programmers, more programs, and more devices. We have more data now. Computers had to grow powerful enough to process it all, and we have developed several techniques to turn that data into insight.

有更多的程序员,更多的程序和更多的设备。 现在我们有更多数据 。 计算机必须强大到足以处理所有这些的能力,并且我们已经开发了多种技术来将数据转化为洞察力。

First, we created a field called Data Science, which aims to learn about and extract information from data.

首先,我们创建了一个名为“数据科学”的领域,该领域旨在了解数据并从中提取信息。

For example, a startup called Waze let people install an app on their phones that would track their movements while they were in their cars. Because many people installed the app, Waze got a lot of data about how cars move. They used it to develop programs that understood where traffic jams were.

例如,一家名为Waze的初创公司允许人们在手机上安装一个应用程序,该应用程序可以跟踪他们在车上的活动情况。 由于安装了该应用程序的人很多,因此Waze获得了有关汽车行驶方式的大量数据。 他们使用它来开发了解交通堵塞位置的程序。

Now, when you open Waze on your phone, you see traffic jams on the map in real time and choose another route.

现在,当您在手机上打开位智时,您会在地图上实时看到交通拥堵并选择其他路线。

Waze has since been bought by Google. This happens a lot with startups.

Waze已被Google收购。 创业公司经常发生这种情况。

There were three main challenges with Data Science — storing data, understanding data, and acting on data. We’ve improved in all of these areas. Let’s look at each one.

数据科学面临三个主要挑战-存储数据,理解数据以及对数据采取行动。 我们在所有这些方面都进行了改进。 让我们看看每个。

存储 (Storage)

We now need to store a lot more information and then find out which part is important. We needed to invent new databases. The likes of MySQL and PostgreSQL weren’t fit to store terabytes of data (we called it Big Data).

现在,我们需要存储更多的信息,然后找出哪一部分是重要的。 我们需要发明新的数据库。 MySQL和PostgreSQL之类的文件不适合存储TB级的数据(我们称之为Big Data )。

Big, internet-first companies typically faced these challenges, and so they were on the forefront of developing the technologies. Most of the time, technologies were first used internally and then open-sourced.

大型,互联网优先的公司通常会面临这些挑战,因此它们处于开发技术的最前沿。 在大多数情况下,技术首先在内部使用,然后开源。

There was a movement we called NoSQL. This new class of databases took some of the conventions of traditional Relational databases and turned them around.

我们称之为NoSQL。 这类新的数据库采用了传统关系数据库的一些约定,并将它们转过来。

There’s Hadoop, which deals with how the data is stored on many hard computers. It defines a way of processing the data called MapReduce (inspired by a paper from Google — big companies write good scientific papers these days).

Hadoop负责处理如何将数据存储在许多硬盘计算机上。 它定义了一种处理数据的方法,称为MapReduce(受到Google的一篇论文的启发-如今,大公司写出了很好的科学论文)。

Then there’s Cassandra, which looks at data not as tables, but as sets of keys and columns which can be stored on different computers. It also makes sure that any of these computers can go offline without causing data loss.

然后是Cassandra ,它不将数据视为表,而是将键和列存储在不同的计算机上。 它还可以确保所有这些计算机都可以脱机而不会导致数据丢失。

And we have MongoDB, a database that is easy to install and use for prototyping apps. In 2017, we’re treating technologies the same way we treated pop stars ten years ago — we zealously defend some of them and vehemently hate others. MongoDB — like the band Nickelback — belongs to the latter group.

我们有MongoDB ,一个易于安装并用于原型设计应用程序的数据库。 2017年,我们对待技术的方式与十年前对待流行歌星的方式相同-我们热心捍卫其中的一些,并强烈讨厌其他人。 像Nickelback乐队一样,MongoDB属于后者。

学习 (Learning)

In the “understanding data” camp, most of the focus has been in an area called Machine Learning. There have been many new techniques, from naive classification to deep learning, that are now in every Data Scientist’s toolbox. They mostly write Python and work alongside developers to put machine learning pretty much everywhere.

在“了解数据”阵营中,大多数关注点都集中在称为机器学习的领域。 每个数据科学家的工具箱中都有许多新技术,从幼稚的分类到深度学习。 他们主要编写Python,并与开发人员一起将机器学习应用于几乎所有地方。

For example, with the help of Data Scientists, a lot of web apps use A/B testing. This technique serves two slightly different versions of the app to different, but similar, groups of users. It is used to see which version leads quicker to our desired goal, whether that’s a sign-up or a purchase.

例如,在数据科学家的帮助下,许多Web应用程序都使用A / B测试。 该技术为不同但相似的用户组提供了两个略有不同的应用程序版本。 它用于查看哪个版本更快地达到我们期望的目标,无论是注册还是购买。

A lot of big companies like Airbnb (pronounced air-bee-en-bee), Uber, and Netflix are running hundreds and thousands of A/B tests at the same time to make sure their users get the best experience. Netflix is an app where people can binge-watch TV shows on all their devices. ¯\_(ツ)_/¯

Airbnb(发音为air-bee-en-bee ),Uber和Netflix等许多大公司正在同时运行成千上万的A / B测试,以确保其用户获得最佳体验。 Netflix是一个应用程序,人们可以在其所有设备上狂饮观看电视节目。 ¯\_(ツ)_/¯

微服务和云 (Microservices and The Cloud)

Companies like Netflix are enormous. Because they serve a lot of people, they have to make sure they are up and running at all times. That means they have to manage their computers pretty well. They can add hundreds of new servers when they’re needed.

像Netflix这样的公司非常庞大。 因为他们为很多人服务,所以他们必须确保他们一直都在运行。 这意味着他们必须很好地管理计算机。 他们可以在需要时添加数百个新服务器。

This is difficult to achieve in a traditional data center, so the amazing engineers at Netflix use virtual machines. Remember Amazon Web Services, which launched back in 2006? Back then, they started offering Elastic Cloud Compute, known as EC2, to help people get virtual computers in Amazon’s data centers.

这在传统的数据中心中很难实现,因此Netflix出色的工程师使用虚拟机。 还记得2006年推出的Amazon Web Services吗? 那时,他们开始提供称为EC2的Elastic Cloud Compute ,以帮助人们在Amazon数据中心中获得虚拟计算机。

Today, they have almost 80 similar services, all built to help companies grow quickly. We used to have a trendy name for that — “The Cloud” — but this term is as difficult to define as NoSQL.

如今,他们拥有将近80种类似的服务,所有这些服务都旨在帮助公司快速发展。 我们曾经有个时髦的名字-“云”-但是这个术语很难像NoSQL一样定义。

Google and Microsoft offer their own clouds, creating a market for cloud services. And when smart people compete with each other, all sorts of crazy innovation starts happening.

Google和Microsoft提供了自己的云,从而为云服务创造了市场。 当聪明人相互竞争时,各种疯狂的创新开始发生。

First of all, we started thinking more about our infrastructure as code. Previously, you had to buy a new server, plug in a keyboard, and install dependencies.

首先,我们开始更多地考虑将我们的基础架构作为代码。 以前,您必须购买新服务器,插入键盘并安装依赖项。

Now we use configuration management tools like Puppet, Chef, and Ansible to automate our servers. You write actual code, in languages like Ruby, and provision servers based on the configurations. If a change is needed, you edit the configurations and then update the servers. No more SSH.

现在我们使用配置管理 PuppetChefAnsible之类的工具来自动化我们的服务器。 你写实际的代码,在基于配置像Ruby语言,并提供服务器。 如果需要更改,请编辑配置,然后更新服务器。 不再需要SSH。

Then we started looking more at containers. Because it was possible to provision machines on EC2, we needed to develop on similar environments as our production ran in.

然后我们开始更多地关注容器。 因为可以在EC2上配置机器,所以我们需要在生产运行时在类似的环境中进行开发。

We started with virtual machines, using tools like Vagrant to automate them. But then we got Linux containers and, eventually, Docker. We found a way to run Linux on our MacBooks without running a full virtual machine, sharing some of the OS-related operations.

我们从虚拟机开始,使用Vagrant之类的工具将其自动化。 但是后来我们有了Linux容器,最终有了Docker。 我们找到了一种在MacBooks上运行Linux的方法,而无需运行完整的虚拟机,而是共享一些与OS相关的操作。

Using Docker, we could create descriptions of systems that matched exactly what we were running on production. Developers called these descriptions images, and started running their apps in somewhat-virtual instances called containers.

使用Docker,我们可以创建与生产环境完全匹配的系统的描述。 开发人员将这些描述图像称为“ 图片”,并开始在称为容器的某种虚拟实例中运行其应用程序。

Then cloud providers caught up to this and let us run our containers directly on their clouds. They gave us tools like Marathon and Kubernetes, called orchestration frameworks. These frameworks let developers run apps inside containers without worrying about scaling, fault-tolerance, monitoring and discovery. The servers became disposable, and we don’t give them clever names anymore.

然后,云提供商赶上了这一步,让我们直接在其云上运行容器。 他们给了我们诸如MarathonKubernetes之类的工具,称为编排框架 。 这些框架使开发人员可以在容器内运行应用程序,而不必担心扩展,容错,监视和发现。 服务器变成了一次性的,我们不再给它们起聪明的名字了。

This also allowed developers to build small apps, called services or microservices, and then run them independently. Because these microservices have few external dependencies, we started looking into using new programming languages, like Go (which was created to make concurrency bearable) and Java. Yes, Java is still around and it got better.

这也使开发人员可以构建称为服务或微服务的小型应用程序,然后独立运行它们。 由于这些微服务几乎没有外部依赖关系,因此我们开始研究使用新的编程语言,例如Go (旨在使并发可以承受)和Java。 是的,Java仍然存在并且它变得更好。

There are also languages like Scala and Clojure that let us use the Java Virtual Machine and all related libraries. A website like AirBnB runs hundreds of microservices using several programming languages and databases.

还有诸如ScalaClojure之类的语言,使我们可以使用Java虚拟机和所有相关的库。 像AirBnB这样的网站使用多种编程语言和数据库来运行数百种微服务。

Because of these microservices, we had to revisit some of our programming models. We now have much more, much smaller apps that we have to coordinate.

由于这些微服务,我们不得不重新访问一些编程模型。 现在,我们有更多,更小的应用程序需要协调。

As a result, there are tools like Apache Kafka, Google PubSub, and RabbitMQ that aim to help with chatty computers that talk to each other a lot. Kafka was created by LinkedIn, a social network where people advertise their professional life. It was later open-sourced.

结果,就有诸如Apache KafkaGoogle PubSubRabbitMQ之类的工具旨在帮助聊天频繁的聊天计算机。 Kafka由LinkedIn建立,这是一个社交网络,人们在其中宣传自己的职业生涯。 后来它是开源的。

我们构建软件的方式 (The way we build our software)

The extra complexity introduced by the orchestration frameworks is mostly relevant for larger teams. Remember — we currently have more people building software than ever before, and every programmer wants to ship their code right away. If you have a company with hundreds of developers working together on a website, you need to make sure they don’t have to coordinate their releases.

业务流程框架引入的额外复杂性主要与大型团队有关。 请记住-我们目前拥有比以往更多的开发软件的人员,并且每个程序员都希望立即发布他们的代码。 如果您的公司中有数百个开发人员在网站上一起工作,则需要确保他们不必协调其发布。

So we build software in small teams. The teams usually have some DevOps skills, and members know enough about operations to be able to deploy their software. They use some form of an Agile process, where they release software continuously in short iterations. Organizations also experiment with other forms of hierarchy, like Squads, Chapters, Tribes, and Guilds, as Spotify (that’s a new music streaming service) does.

因此,我们在小型团队中构建软件。 团队通常具有一些DevOps技能,并且成员对操作有足够的了解,能够部署他们的软件。 他们使用某种形式的敏捷过程,在此过程中以短迭代不断地发布软件。 组织还尝试使用其他形式的层次结构,例如Squad,Chapter,Tribes和Guilds ,就像Spotify(这是一种新的音乐流服务)一样。

All these projects (and many others that were mentioned before) are developed publicly by a community of people. Sometimes they’re sponsored by a company. Most of the time, development goes on a website called GitHub. There, people can talk about software, build it publicly, and approve contributions by replying with a ? emoji. An emoji is a special character we now use to express an emotion, such as approval. :-)

所有这些项目(以及之前提到的许多其他项目)都是由一个社区公开开发的。 有时,它们是由公司赞助的。 大多数时候,开发都在一个名为GitHub的网站上进行 。 在那里,人们可以讨论软件,公开构建软件,并通过回答?来批准文稿。 表情符号。 表情符号是我们现在用来表达情感(例如认同)的特殊字符。 :-)

There are many more communities now, and they are all experimenting with ways to build software in the open. For example, a web framework called EmberJS uses a community-driven, 6-week release cycle. Other languages and popular open source software (like GitLab and Visual Studio Code, a code editor from Microsoft) use a monthly release cycle to make sure they don’t deliver fully breaking changes. The packages break just a little every release.

现在有更多的社区,他们都在尝试开放式构建软件的方法。 例如,一个名为EmberJS的Web框架使用社区驱动的 6周发布周期。 其他语言和流行的开源软件(例如GitLabVisual Studio Code ,Microsoft的代码编辑器)使用每月发布周期来确保它们不会提供完全的重大更改。 这些软件包在每个发行版中都会中断。

Oh, and the editor wars are still there. We’re writing our code in desktop apps that run a browser that shows a text field. And it’s great. It performs pretty well (gets better with every release) and is heavily customizable. It even has some support for VIM mode!

哦,编辑之战仍然存在。 我们正在运行运行显示文本字段的浏览器的桌面应用程序中编写代码。 太好了 它的性能非常好(在每个发行版中都会变得更好),并且可以高度自定义。 它甚至还支持VIM模式!

Conferences are held on every topic. They’re fun, and they’re everywhere. Go to one — you’ll see all sorts of people! Make some friends, goof around, get inspired, speak out. Maybe go to an algorave show — what they do with music, images, and code is breathtaking.

会议就每个主题举行。 它们很有趣,而且无处不在。 转到一个-您将看到各种各样的人! 结交一些朋友,四处游荡,获得启发,大声说出来。 也许去参加一次algorave表演-他们对音乐,图像和代码的处理令人叹为观止。

还有更多! (There’s more!)

There’s more people, software, and innovation out there. I hope you’re still as excited about computers — you have all the reasons to be.

那里有更多的人,软件和创新。 我希望您对计算机仍然感到兴奋-您有充分的理由。

Let’s go get a Club Mate and I’ll tell you about this Bitcoin thing. Also, the US has a new president now…

让我们去一个Club Mate,我会告诉您有关比特币的事情。 而且,美国现在有一位新总统…

If you enjoyed this article, please give me some claps so more people see it. Thanks!

如果您喜欢这篇文章,请给我一些鼓掌,以便更多的人看到。 谢谢!

翻译自: https://www.freecodecamp.org/news/web-development-explained-to-a-time-traveler-from-ten-years-ago-600fad81170d/

旅行者 问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值