翻译于 2018/08/06 23:02
0 人 顶 此译文
Before we begin with this post, just to give you an idea about me and about this roadmap; I have been doing the Fullstack Development for the past 5 years and currently working as a lead engineer at tajawal where I have to wear many different hats. It is not only my hobby but also one of my job responsibilities to keep an eye on the trends and to keep the other developers well trained. I see a lot of confusion among the beginners (and experienced alike) when it comes to staying up to date. I had lots of friends and emails asking me for guidance back in 2017 on what should they learn if they want to be in this career. So to save myself the hassle and to help the others, I decided to prepare these charts once and for all, so that whenever somebody would ask, I would just share the link to these charts. And this is how these charts were born.
developer-roadmap GitHub - Roadmap to becoming a web developer in 2018
Initially they were just flat out recommendations for the tools but I decided yesterday to give them a bit more structure, add details and design them in the steps form so to give you a better idea about what to pick and in what order.
I am still working on the Backend and DevOps parts but the frontend part is ready and you can have a look at it below.
Before I go about explaining different sections in the roadmap, let me take the time to put this disclaimer here:
The purpose of this roadmap is to give you an idea about the landscape and to guide you if you are confused about what to learn next and not to encourage you to learn what is hip and trendy. You should grow some understanding of why one tool would be better suited for some cases than the other and remember hip and trendy never means best suited for the job
在我们开始这篇文章之前,先给你一个关于我和这个路线图的想法;在过去的5年里,我一直在做全栈开发,现在在 tajawal 担任首席工程师,在那里我不得不戴上不同的帽子。这不仅是我的爱好,也是我的工作职责之一,我要密切关注趋势,并让其它开发者保持接受良好的培训。我看到初学者(和类似的经验的人)为了跟上时代有很多困惑。在2017年,我有很多朋友来发邮件问我,如果他们想要从事这个职业,他们应该学习什么。因此为了避免麻烦和帮助其他人,我决定一次性为所有人准备这些图表,因此无论谁来问我的时候,我都会将这些图表的连接分享给他们。这就是这些图表的由来。
开发者路线图 GitHub ——2018年成为 web 开发者的路线图
起初他们只是平铺对工具的推荐,但是我昨天决定给他们更加结构化一些,增加细节,而且以步骤的格式来设计他们,以便让你更好的了解选择什么以及以什么顺序来选择。
我仍然在做后端和 DevOps 部分,但是前端部分已经准备好了,你可以在下面看一下。
在我解释路线图中不同的部分之前,让我花点时间提出这个免责声明:
这个路线图的初衷是给你关于蓝图的想法,并且如果你对之后学什么有所困惑,来做出一些引导,并不是鼓励你去学什么东西时髦或者趋势。你应该理解为什么一个工具在某些情况下比其他的更加适合,同时记住时髦和趋势从不意味着是最适合这个工作的。
So let’s get started —you can find the detailed image below, however in this article I will explain each step in the roadmap one by one also.
First thing that you would want to do is learn the basics which includes learning the basics of HTML, CSS and some familiarization with JavaScript syntax.
HTML is what gives structure to your pages. Its like the human skeleton that keeps you standing. First thing that you would want to do is learn the syntax and learn everything that it has to offer. You should focus on learning the below:
Learn the basics and how to write semantic HTML
Understand how to divide page into sections and how to structure the DOM properly
**Task — **Once you have learnt the basics of HTML, make at least 5 HTML pages. I would recommend you to pick any website e.g. look at any github profile page or twitter’s login page. And focus on structuring the content properly. It is going to be ugly, but don’t worry about that for now and keep your main focus on proper structure.
Now that we have learnt how to prepare the skeleton for the page, its time to add some skin on top of it and to make it look beautiful. CSS — Cascading stylesheets are used to add beauty to your HTML pages.
First thing that you will have to do is learn about the syntax and familiarize yourself with the common CSS properties.
Learn about the box model and how to prepare layouts using Grid and Flexbox
Once you are done with that, learn how to make your websites responsive with media queries.
**Task –– **Once you have the basics out of the way, next thing that you should do is style the HTML pages that you made in the last step. For example if you wrote the HTML page for the Github profile, its time to apply the CSS and make it actually look like the actual Github profile page. Do so with all the 5 pages that you wrote in the previous step.
现在我们已经学会了如何为页面准备骨架,是时候在上面添加一些皮肤并让它看起来更漂亮了。CSS —— 用来美化你 HTML 页面的级联样式表。
你首先要做的是学习语法并熟悉常见的 CSS 属性。
了解 box 模型以及如何使用 Grid 和 Flexbox 来准备布局。
一旦你完成了这个任务,再来学习如何让你的网站对媒体的查询做出回应。
任务 —:一旦你掌握了基本的东西,你接下来要做的就是在最后一步中完成你所设计的 HTML 页面。例如,如果你为 Github 的概要文件编写了 HTML 页面,那么是时候应用 CSS 并让它看起来就像实际的 Github 页面。在前面的步骤中所写的5个页面都应该这样做。
JavaScript is what lets you make your HTML pages more interactive. For example all these sliders, popups and toast notifications that you see on websites and when it reloads certain parts of the pages without having to reload the page, it is all done with JavaScript. In this step, you are going to learn the basics of JavaScript to prepare you for the Journey –
Learn the syntax and the basic constructs of the language.
Learn how to manipulate DOM with JavaScript e.g. how to remove some element from the page, how to add some element, adding and removing classes, applying CSS styles etc with JavaScript.
After you are done with that learn and understand the topics such as scopes, closures, hoisting and event bubbling etc.
Learn how to make HTTP calls with XHR or Ajax. Ajax is what lets you perform certain actions without reloading the page.
After you have learnt that now it is time to learn about all the new features in ES6+. ES6 is just a version of JavaScript which introduced lots of interesting updates to the language e.g. classes, different ways to declare variables, added new methods to arrays, string concatenation etc. Most of the articles that you will find online, they will use Babel to explain ES6 which is a transpiler that converts the new JavaScript to _old _JavaScript since it is not supported by the old browsers. But don’t worry about Babel for now, just get the idea about the concepts and use them in any of the latest browser which support ES6 for practicing. We will revisit ES6 later on.
You should now be feeling that the things are getting real. You need a pat on the back if you have been following along. These were some of the most important things that you have just learnt.
JavaScript 可以让你添加更多的交互到 HTML 页面。例如你可以在网站上看到的所有这些滑块,弹出和显示提醒,还有重新加载页面的特定部分而不用刷新整个页面,都是使用 JavaScript 完成的。这一步,你将要学习 JavaScript 为旅程做准备——
学习它的语法和基础框架。
学习如何使用 JavaScript 操作 DOM ,例如如何使用 JavaScript 将页面中的一些元素删除,如何添加元素,添加或者删除类,应用 CSS 样式等等。
在完成了这些之后,学习并理解像范围,闭包,提升机制,以及事件冒泡等这些概念。
学习如何用通过 XHR 或者 Ajax 调用 HTTP 。Ajax 可以执行特定的操作而不用刷新整个页面。
学习了之后,现在该学习 ES6+ 中的所有新特性。ES6 只是 JavaScript 的一个版本,它引入了大量语言方面的有趣的更新,例如类,声明变量的不同方法,向数组添加新函数,字符串连接等。由于老式浏览器不支持,你在网上可以找到的大部分文章会用 Babel 来解析 ES6 ,它是一个将新 JavaScript 转换到老式 JavaScript 的转换器。但是现在不用担心 Babel ,只要了解这个概念,在实践的时候在任何支持 ES6 的最新的浏览器使用它就可以。我们之后会重提 ES6 的。
你现在应该感觉这些东西越来越真实了。如果你紧跟步伐,你值得表扬。这些是你刚学到的最重要的东西。
There was a time when every one was crazy about jQuery and for good reasons; it was a powerful library that provided a wrapper on top of JavaScript and let you perform anything in a browser compatible way. But long gone are those days now, it isn’t being used that much for the new projects but there are still people using it. You don’t have to learn it but it is really easy and it would be beneficial for you if you want to have a look.
I say this a lot and I will say it here again, you don’t learn anything without practice. You might have a momentary feeling that you understand something but it would soon go away if you don’t practice. Make sure that you practice as much as you can, while you are following this roadmap.
Go ahead and make some responsive website and add interactivity with JavaScript. You can copy any existing webpage that you might find interesting online but remember to use everything that you have learnt till this point.
Once you have made some of the websites, its time to get into the real business now. So go to github.com and search for some projects and try to open some pull requests on some open-source projects. Some of the ideas for pull requested are listed below :
Enhance the UI, make any demo pages responsive or improve the design
Look at any of the open issues that you can solve
Refactor any of the code that you think can be improved
Link this repo, tell them you are learning and ask for feedback on your PR and how you can improve.
While I would recommend this Github part, it needs some knowledge of git and is optional. You don’t have to do this but if you do, you will find it really beneficial — you will be amazed that how many people are willing to help you if you just ask. You can find many free resources for git, try this one.
有一段时间每个人都热衷于 jQuery ,而且理由充分;它是一个很强大的库,为 JavaScript 的上层提供了一个封装,让你可以用浏览器兼容的方式执行任何操作。但是那段时间已经过去了,在新的项目中现在用它没有那么多了,但是还有一些人在用。你不用必须学习它,但是它真的很简单,而且如果你想去看看,它会对你有好处。
我说了很多次,而且在这我再次提起了它,如果没有实践,你什么也学不会。短时间内你可能感觉你都明白了,但是如果你不实践,就会忘记。确定你尽可能多的实践,虽然你跟着路线图。
继续使用 JavaScript 为一些响应式网站添加交互。你可以复制当前你能在网上找到有趣的 web 网页,但是记住要把至今所有学到的东西都用上。
一旦已创建了一些网站,该进入到真实的业务中了。去 github.com 搜索一些项目,然后在一些开源项目中开启一些拉取请求。以下列出一些建议:
加强 UI ,编写响应式页面 demo 或者改善设计
查看任何你可以解决的开放话题
重构任何你觉得可以改进的代码
链接这个库,告诉他们你正在学习,然后从你的 PR 得到反馈,以及你可以怎样提升。
虽然我会推荐这个 Github 部分,但是它需要一些 git 的知识,它也是可选的。你不用必须去做这些,但是如果你做了,你会发现真的很有好处——你会觉得惊讶,如果你提问的话有多少人愿意帮助你。你可以在 git 上找到很多免费资源,试试这个。
You have got the basics out of the way. If you have learnt everything well, you can find yourself some freelance work or maybe a full time job. However, don’t stop here, there is still a long way to go if you want to have a better career.
Before this point, if you were to use some external library e.g. a plugin or any external widget, you have to download the JavaScript and CSS files manually and put them in the project, and then those libraries or plugins release new versions, you have to download the newer files and put them in your projects again, which is an extreme hassle. Package managers take this hassle away from your workflow. They help you bring external libraries and plugins into your projects, so that you don’t have to worry about copying the libraries manually or go through the hassle of updating them when they release new versions. There is yarn
and npm
available. Both are almost same, there are only implementation, you can pick any of them and once you learnt to use one the other would be just the same.
你已经掌握了基础知识。如果你把每个东西都学好了,你可以成为自由职业者或者找个全职工作。然而,不要止步于此,如果你想有一个更好的职业,还有很长的路要走。
这之前,如果你要用一些外部库,例如插件或者外部部件,你必须手动下载 JavaScript 和 CSS 文件,并将它们放入项目,然后当那些库或者插件发布新的版本,你必须下载新的文件,再次将他们放入项目,这非常麻烦。包管理可以让你的工作流避免这个麻烦。他们帮助你将外部库和插件引入到项目,因此你不用担心手动复制库,或者当他们发布新版本的时候遇到更新的麻烦。现在可以使用 yarn 和 npm 。他们两个几乎相同,除了实现,你可以选择他们中的任何一个,一旦你学会了其中一个的用法,另一个也是差不多相同的。
After you have got the basic understanding of package managers, go ahead and install some external library in the webpages that you made above e.g. install some toast plugin and when user clicks a button, show him the toast message or create a login form and do the form validation using some form validation library and play with different options and see how to install different versions.
While you are at it, make sure to read about semantic versioning
Preprocessors enrich CSS with the functionality that it isn’t capable of by default. There are different many options Sass, Less, Stylus etc. If I were to pick one, I would go for Sass. However, PostCSS has been gaining a lot of traction lately, it is a nice-to-have and is sort of “Babel” for CSS. You can use it stand-alone or on top of Sass also. I would recommend you to learn Sass for now and revisit PostCSS later when you have time.
You don’t need to learn CSS frameworks any more, however if you would want to pick any, there is one under every rock. The ones that I liked the most among the ones that I tried are Bootstrap, Materialize and Bulma. But if you look at their demand in market I would pick **Bootstrap **if I was starting today.
As your applications grow, CSS start to become messy and unmaintainable. There are multiple ways to structure your CSS better for scalability e.g. there is OOCSS, SMACSS, SUITCSS, Atomic and BEM. You should know about the differences between them but I prefer BEM.
在你对包管理有了基本的了解,可以在之前创建的 web 页面中安装一些外部库,例如安装那些当用户点击按钮的时候弹出提示插件来展示提示信息,或者创建一个登陆表单,然后使用一些表单验证库来做表单验证,并使用不同选项,看如何安装不同的版本。
在阅读本文时,请务必阅读语义版本
预处理器使用 CSS 默认不具备的功能来丰富 CSS 。有很多不同的选项如 Sass,Less,Stylus 等等。如果要我选一个,我会选择 Sass 。然而,PostCSS 最近获得了很多关注,它对 CSS 来说是有则更好的,与“Babel”是一类。你可以单独使用它,或者用在 Sass 之上。我建议你现在学 Sass ,有时间再回头再看看 PostCSS 。
你不需要学习任何 CSS 框架,然而如果你想选择任何一个,在哪都可以找到。我用过的之中最喜欢的是 Bootstrap, Materialize 和 Bulma 。但是如果你看了他们在市场中的需求,而且如果我今天刚开始,我会选择**Bootstrap**。
随着应用的成长,CSS 开始变得混乱且难以维护。很多方法可以更好的构建可扩展的 CSS ,如 OOCSS, SMACSS, SUITCSS,Atomic,以 及 BEM。你应该了解他们之间的区别,但是我更喜欢 BEM 。
Tools to help you in the building/bundling and development of JavaScript applications. This category includes linters, task runners and bundlers.
For task runners, there used to be different many options including npm scripts, gulp, grunt etc. But at this time, since webpack lets you handle most of the stuff that we used to do with gulp, there is only npm scripts in the task runners now which you can use to automate the tasks that webpack might be capable of doing. You don’t need to learn Gulp, however later on if you find some time, feel free to have a look at it and see if it can help you in your application.
For the linters, again there used to be many options including ESLint, JSLint, JSHint and JSCS. But currently there is mostly ESLint so go for it.
For the module bundlers, again several different options including Parcel, Webpack, Rollup, Browserify etc. If you have to pick one, close your eyes and pick Webpack for now. Rollup is quite common also but it is recommended to be used mostly for the libraries; when it comes to apps, there is webpack. So teach yourself webpack for now and revisit this section for Rollup later on if you want to.
工具是来帮助你编译/打包以及开发 JavaScript 应用。这类包含 linters,任务处理和打包。
对于任务处理来说,头许多不同的选择,包括 npm 脚本,gulp, grunt 等等。但是现在,由于 webpack 让你处理以前使用 gulp 处理的大部分东西,所以任务处理现在只有 npm 脚本,你可以用他们来自动完成 webpack 可以完成的任务。你不需要学习 Gulp ,然而以后如果你有时间,你可以看看它是否能在你的应用中帮助你。
对于 linters ,同样有很多选择包括 ESLint,JSLint,JSHint 和 JSCS 。但是当前大多使用 ESLint 。
对于模块打包,也有不同的选择,包括 Parcel,Webpack,Rollup,Brwoserify 等等。如果你要选择一个,闭上眼现在选择 Webpack 。Rollup 也很常见,但是建议主要在库中使用;当涉及到应用,用 webpack 。所以,现在就自学 webpack ,如果你想的话,以后为了 Rollup 再来看这部分。
Congrats! You can call yourself 75% modern JavaScript developer now. Now go ahead and create something with all that you have learnt. Maybe create some sort of library in which you have to use Sass and JavaScript. Then use Webpack to convert Sass to CSS and use babel in it to transpile ES6 code. Once you are done with, release it on Github and npm.
In the old roadmap, this section used to be next to the basics but I changed it to be after Sass, build tools and package managers because you will be using all of that in the frameworks and without the knowledge, it might seem scary to you.
Again in frameworks, there are several options. But commonly used one these days are React, Vue and **Angular. **There is more and more demand for React.js these days. However, you can pick any of the listed ones and you will be fine. Personally I would pick React or Angular. Just a quick note here, as a beginner you might find Angular to be a bit easier comparatively, probably because it supports almost everything out of the box e.g. powerful router with support for lazy loading, HTTP client with support for interceptors, dependency injection, component CSS encapsulation etc without having to worry about picking external libraries. But React definitely has an upper hand looking at the community around it and the way team at facebook has been working to improve it. Just make sure to not pick anything because of the hype of it, google it, compare and see what suites you best.
I will leave the comparison and my personal experience with both for another post but since this post is about learning, here is how you might find the learning curves for Angular and React
_Learn curves in the graph below consider the fact that you already have an understanding of TypeScript and basic idea of Rx.JS. For the “why” I will cover that in some future post but mainly it is because of some of the standardization and some of the key features that angular provides out of the box. But _that doesn’t mean React is bad, both have their own place, I will cover that extensively in some upcoming post.
Have a look at both and see what suites you best.
Once you have made your choice for framework, there are certain other things that you might have to learn. For example if you decided to go with React; you might have to learn Redux or Mobx for the state management, depending upon the size of application that you will be working. Mobx is suitable for small to mid-sized applications, Redux is more suitable for larger scale applications. And you might even not need any of them and depend upon the native state management in React if your app allows that.
If you pick Angular, you will have to do TypeScript (you can develop angular applications without it also but it is recommended to use it) and Rx.js which will also benefit you out of your Angular applications. It is a really powerful library and is also suitable for functional programming.
And if you pick Vue.js, you might have to learn Vuex which is sort of similar to Redux but for Vue.
You should note that, Redux, Mobx and Rx.js are not just bound to these frameworks, you can use these out in your vanilla JavaScript apps also. Also, if you pick Angular from the list, make sure it is Angular 2+ and not Angular 1+
实践的时候到了 - 创造一些东西
恭喜!您现在可以称自己为75%的现代JavaScript开发人员。现在继续用你所学到的东西创造一些东西。也许创建某种类型的库,你必须使用Sass和JavaScript。然后使用Webpack将Sass转换为CSS并在其中使用babel来转换ES6代码。完成后,在Github和npm上发布它。
选择一个框架
在旧的路线图中,这一部分曾经是基础知识的下一部分内容,但我将其更改为Sass,构建工具和包管理器之后,因为您将在框架中使用所有这些并且没有掌握这些知识,这对您来说可能看起来很可怕。
在框架中,有几种选择。但是这些天常用的是React,Vue和** Angular。**如今,对React.js的需求越来越多。但是,你可以选择任何列出的那些,你会没事的。我个人会选择React或Angular。这里只是一个简单的注释,作为一个初学者,你可能会发现Angular比较容易一些,可能是因为它支持几乎所有开箱即用的东西,例如:功能强大的路由器,支持延迟加载,支持拦截器的HTTP客户端,依赖注入,组件CSS封装等,无需担心选择外部库。但React肯定会优先考虑周围的社区以及facebook的团队一直致力于改善它的方式。只要确保不要选择任何东西,因为炒作,谷歌搜索,比较来看看哪一款最适合你。
我将把比较和我的个人经历留给另外一篇文章,但由于这篇文章是关于学习,这里是你如何找到Angular和React的学习曲线
在下图中学习曲线考虑您已经了解TypeScript和Rx.JS的基本概念。对于“为什么”我将在未来的某篇文章中介绍,但主要是因为一些标准化和角度提供的一些关键功能开箱即用。但是_这并不意味着React很糟糕,两者都有自己的应用场景,我会在即将发布的帖子中广泛报道。
看看两者,看看最适合你的。
一旦您选择了框架,您可能还需要学习其他一些内容。例如,如果你决定使用React;您可能必须学习Redux或Mobx以进行状态管理,具体取决于您将要使用的应用程序的大小。Mobx适用于中小型应用,Redux更适合大规模应用。如果您的应用程序允许,您可能甚至不需要其中任何一个并依赖于React中的本机状态管理。
如果你选择Angular,你将不得不做TypeScript(你可以不使用typeScript而是自己开发angular应用程序,但建议你直接使用它)和Rx.js,这也将使你的Angular应用程序受益。它是一个非常强大的库,也适用于函数式编程。
如果你选择Vue.js,你可能需要学习Vuex,它类似于Redux和Vue的关系。
您应该注意,Redux,Mobx和Rx.js不仅仅绑定到这些框架,您也可以在您的vanilla JavaScript应用程序中使用它们。此外,如果从列表中选择Angular,请确保使用Angular 2+而不是Angular 1+