web后端开发学习路线_学习后端Web开发的最佳方法
web后端開發(fā)學(xué)習(xí)路線
My previous article described how you can get into frontend development. It also discussed how the front end can be a place filled with landmines – step in the wrong place and you'll be overwhelmed by the many frameworks of the JavaScript ecosystem.
我以前的文章描述了如何進(jìn)行前端開發(fā) 。 它還討論了前端如何成為一個(gè)充滿地雷的地方-進(jìn)入錯(cuò)誤的地方,JavaScript生態(tài)系統(tǒng)的許多框架會讓您不知所措。
In this blog article, let's see how you can get into back end development. Along the way, I'll answer some of the most common questions people ask me about it.
在這篇博客文章中,讓我們看看如何進(jìn)行后端開發(fā)。 在此過程中,我將回答人們問我的一些最常見問題。
什么是后端開發(fā)? (What is Backend Development?)
Front end development involves what a user sees on the screen when they open a specific URL owned by you. Even in a completely static environment (with only HTML/CSS), when someone opens a website, some server on the planet needs to respond to you with those HTML and CSS files.
前端開發(fā)涉及用戶打開您擁有的特定URL時(shí)在屏幕上看到的內(nèi)容。 即使在完全靜態(tài)的環(huán)境(只有HTML / CSS)中,當(dāng)有人打開網(wǎng)站時(shí),地球上的某些服務(wù)器也需要使用這些HTML和CSS文件來響應(yīng)您。
That server is just a computer, just like the one you use yourself to browse the internet. But it has been tuned for performance, and doesn't have unnecessary components like a mouse or keyboard attached. And it sits with tons of other computers probably in a data warehouse.
該服務(wù)器只是一臺計(jì)算機(jī),就像您自己用來瀏覽互聯(lián)網(wǎng)的計(jì)算機(jī)一樣。 但是它已經(jīng)過性能調(diào)整,并且沒有多余的組件,如鼠標(biāo)或鍵盤。 它與數(shù)以千計(jì)的其他計(jì)算機(jī)一起放置在數(shù)據(jù)倉庫中。
Programming those computers in some special way is called back end development.
以某種特殊方式對這些計(jì)算機(jī)進(jìn)行編程稱為后端開發(fā) 。
You may think that backend development is called what it is because it runs behind the user's back. A visitor to your website never really "accesses" the back end completely. They just communicate with your server, either directly through ports for very limited access (like transferring HTML/CSS files) or not even that – buried deep under CDNs or firewalls (like Cloudflare).
您可能會認(rèn)為后端開發(fā)就是所謂的,因?yàn)樗谟脩舯澈筮\(yùn)行。 您網(wǎng)站的訪問者永遠(yuǎn)不會真正完全“訪問”后端。 它們只是直接通過端口與您的服務(wù)器進(jìn)行通信,以進(jìn)行非常有限的訪問(例如傳輸HTML / CSS文件),甚至不進(jìn)行通信–將它們深深地埋在CDN或防火墻(如Cloudflare)下。
Now that we have a raw understanding of what back end development means, let's get into some real questions.
現(xiàn)在,我們對后端開發(fā)的含義有了一個(gè)初步的了解,讓我們進(jìn)入一些實(shí)際的問題。
后端需要前端編程知識嗎? (Is front end programming knowledge required for the back end?)
TLDR; No.
TLDR; 沒有。
Back end development, as mentioned above, involves the programming of a computer sitting probably on the other side of the planet responsible for responding to what your users say from their own computers.
如上所述,后端開發(fā)涉及對計(jì)算機(jī)的編程,該計(jì)算機(jī)可能位于地球的另一側(cè),負(fù)責(zé)響應(yīng)用戶從其自己的計(jì)算機(jī)發(fā)出的信息。
If you're a full-time backend developer, you do not really need to care about what goes on inside those HTML, CSS and JavaScript files you send to the user's browser. Instead, you've to focus more on the performance of the server, the server code, and throughput.
如果您是一名全職后端開發(fā)人員,那么您實(shí)際上不必關(guān)心發(fā)送到用戶瀏覽器HTML,CSS和JavaScript文件中的內(nèi)容。 相反,您必須更多地關(guān)注服務(wù)器的性能,服務(wù)器代碼和吞吐量。
后端開發(fā)有哪些內(nèi)容? (What goes into back end development?)
Well, going by the books, you may say that a person who codes an application that can respond to HTTP requests is a back end developer.
好吧,按照這些書,您可能會說,編寫可以響應(yīng)HTTP請求的應(yīng)用程序的人是后端開發(fā)人員。
But in reality, sometimes back end developers are able to do much more than just writing server scripts. They have the knowledge to set up reverse proxy servers (NGiNX/HAProxy), enable compression and other ways to speed up the site, and set up a production docker environment.
但是實(shí)際上,有時(shí)后端開發(fā)人員不僅可以編寫服務(wù)器腳本,還能做更多的事情。 他們具有設(shè)置反向代理服務(wù)器(NGiNX / HAProxy),啟用壓縮和其他方式以加快站點(diǎn)速度以及建立生產(chǎn)docker環(huán)境的知識。
To qualify as a back end developer, I'd say the bare minimum skills you need are:
要成為合格的后端開發(fā)人員,我想說的是,您需要的最低技能是:
Just like every game comes with minimum and recommended specifications, for back end developers, my recommend specifications would be (inclusive of the minimum skills):
就像每款游戲都有最低要求和推薦規(guī)格一樣,對于后端開發(fā)人員,我的推薦規(guī)格將是(包括最低要求):
Alright, too much talking about what goes into back end development. But how do you become one?
好吧,過多地討論了后端開發(fā)的內(nèi)容。 但是你如何成為一個(gè)?
從最低要求開始 (Start with minimum requirements)
Like I said, for the back end, just like games, we have a set of minimum requirements and recommended requirements. The minimum requirements consists of 3 things:
就像我說的那樣,對于后端,就像游戲一樣,我們有一組最低要求和建議要求。 最低要求包括三件事:
學(xué)習(xí)后端編程語言 (Learn a backend programming language)
When people learn by themselves, they usually do not have a team or anyone who can do front end development. They're all on their own. So you'll often have to create webpages and servers all by yourself, at least in the beginning.
人們自己學(xué)習(xí)時(shí),通常沒有團(tuán)隊(duì)或任何可以進(jìn)行前端開發(fā)的人。 他們?nèi)孔约骸?因此,至少在開始時(shí),您通常必須自己全部創(chuàng)建網(wǎng)頁和服務(wù)器。
Although there are a lot of choices for back end programming languages, and I cannot think of any popular system language which doesn't support HTTP servers out of the box. The advantage of choosing Node is that your front end JavaScript skills are transferrable to the back end.
盡管后端編程語言有很多選擇,但我想不出任何不支持HTTP服務(wù)器的流行系統(tǒng)語言。 選擇Node的好處是您的前端JavaScript技能可以轉(zhuǎn)移到后端。
Nonetheless, you can choose from a variety of languages like Java, C++, C#, Python, PHP, etc.
但是,您可以從多種語言中進(jìn)行選擇,例如Java,C ++,C#,Python,PHP等。
How do you pick one, you might ask. The answer is the same as it was in the front end development article: you have gotta try everything initially and see which one clicks the best with you.
您可能會問,如何挑選一個(gè)。 答案與前端開發(fā)文章中的答案相同:您必須首先嘗試一切,然后看看哪個(gè)點(diǎn)擊最適合您。
Node is easy as you might have already done JS programming for the front end. But if you're a Python or Java developer, you might find those easy to pick up. It depends on your profession and taste completely.
Node很容易,因?yàn)槟赡芤呀?jīng)為前端完成了JS編程。 但是,如果您是Python或Java開發(fā)人員,則可能會發(fā)現(xiàn)它們很容易上手。 這完全取決于您的職業(yè)和品味。
了解有關(guān)管理托管的信息 (Learn about managing hosting)
Gone are the days when you'll have to manually purchase servers and set them up in your home, connect to your ISP, do all that stuff yourself. This is the era of cloud computing. Now, when hosting your website, you have mainly 2 options:
您將不得不手動購買服務(wù)器并在家里設(shè)置它們,連接到ISP,自行完成所有這些工作的日子已經(jīng)一去不復(fù)返了。 這是云計(jì)算的時(shí)代。 現(xiàn)在,在托管網(wǎng)站時(shí),主要有兩種選擇:
What is the difference between the two? In both cases, the servers are owned and operated by the respective companies. But the major difference is that managed hosting is more GUI friendly, has a rich set of tools for seeing the filesystem, monitoring usage, managing your official domain emails, uploading/downloading files from your server, and so on. It's basically a setup for people with less technical skills.
兩者有什么區(qū)別? 在這兩種情況下,服務(wù)器均由各自的公司擁有和運(yùn)營。 但是主要的區(qū)別是托管托管更易于使用GUI,具有豐富的工具集,可用于查看文件系統(tǒng),監(jiān)視使用情況,管理官方域電子郵件,從服務(wù)器上載/下載文件,等等。 基本上,它是為技術(shù)技能較弱的人準(zhǔn)備的。
For that reason, I do not recommend managed sites like HostGator or GoDaddy for seasoned developers. Still, it might be a good platform to make mistakes and learn on, primarily because you usually have prepaid plans for them. You'll also have a nice UI for managing things, which doesn't allow you to accidentally shoot up your bills.
因此,我不建議經(jīng)驗(yàn)豐富的開發(fā)人員使用托管網(wǎng)站如HostGator或GoDaddy。 盡管如此,它仍然可能是犯錯(cuò)和學(xué)習(xí)的好平臺,主要是因?yàn)槟ǔ樗麄冾A(yù)先準(zhǔn)備好計(jì)劃。 您還將擁有一個(gè)不錯(cuò)的用戶界面來管理事情,這不允許您意外地付賬。
But when you start picking up speed, I recommend that you switch to a cloud provider. This takes away all the nice tools from cPanel that you used to manage files and folders on servers. But at the same time, it will challenge you to level up your skills a lot.
但是,當(dāng)您開始加快速度時(shí),建議您切換到云提供商。 這消除了cPanel中用于管理服務(wù)器上文件和文件夾的所有漂亮工具。 但是與此同時(shí),它將挑戰(zhàn)您大量提高您的技能。
Today, a lot of cloud providers offer a decent free trial, too, so that you can actually try out their platform before going full in. I host my website for developers - codedamn - on DigitalOcean and find it to be at a sweet balance of site complexity and features.
如今,許多云提供商也提供了不錯(cuò)的免費(fèi)試用版,因此您可以在全面試用之前實(shí)際試用他們的平臺。我在DigitalOcean上為開發(fā)人員托管了我的網(wǎng)站-Codedamn,并發(fā)現(xiàn)它與網(wǎng)站的復(fù)雜性和功能。
You can use this link to signup on DigitalOcean and get free $100 credits. DigitalOcean instances are as cheap as $5 a month, so you have a runway of about 20 months on that instance, great deal, huh?
您可以使用此鏈接在DigitalOcean 上注冊并免費(fèi)獲得$ 100的信用 。 DigitalOcean實(shí)例的價(jià)格低至每月5美元,因此您在該實(shí)例上的運(yùn)行時(shí)間約為20個(gè)月,是嗎?
Anyway, you can choose any cloud provider. Then it's important to learn to manage the server using just the command line by ssh'ing into it.
無論如何,您可以選擇任何云提供商。 然后,重要的是學(xué)會通過僅使用命令行來管理服務(wù)器。
了解版本控制系統(tǒng) (Learn about Version Control Systems)
There are other solutions apart from Git for VCS. But Git is the most used and simplest to understand.
除了適用于VCS的Git之外,還有其他解決方案。 但是Git是最常用和最容易理解的。
As an individual, you might not appreciate it right away. But you'll understand why it is so important the moment you start working either in a team on multiple features simultaneously in your project.
作為個(gè)人,您可能不會立即欣賞它。 但是當(dāng)您開始在一個(gè)團(tuán)隊(duì)中同時(shí)在項(xiàng)目中同時(shí)處理多個(gè)功能時(shí),您就會理解為什么如此重要。
Git allows you to manage your workflow using commits and branches. Commits are like checkpoints in your codebase - the ones you can always revert to if you screw up.
Git允許您使用提交和分支來管理工作流。 提交就像代碼庫中的檢查點(diǎn)一樣-如果您搞砸了,可以隨時(shí)恢復(fù)到這些檢查點(diǎn) 。
Branches are like alternate realities of your project, where something completely different could happen. These alternate realities can be created from any point in time and can be merged back again at any time.
分支就像項(xiàng)目的替代現(xiàn)實(shí) ,其中可能會發(fā)生完全不同的事情。 這些替代現(xiàn)實(shí)可以在任何時(shí)間點(diǎn)創(chuàng)建,并且可以隨時(shí)重新合并。
If those realities can be merged together with compatibility, then it's fine. But if there's a conflict (like if you're alive in one reality and dead in other), then you have to manually make a choice. Other changes can be merged automatically.
如果可以將這些現(xiàn)實(shí)與兼容性合并在一起,那就很好。 但是,如果存在沖突(例如,您在一個(gè)現(xiàn)實(shí)中還活著而在另一個(gè)現(xiàn)實(shí)中死了),那么您必須手動做出選擇。 其他更改可以自動合并。
Git is super interesting, and once you get hang of it, you'll want to use it in every project. You get to keep a history of your work in an efficient manner (it compresses and stores only the difference between commits).
Git非常有趣,一旦您掌握了它,就可以在每個(gè)項(xiàng)目中使用它。 您可以高效地保留工作歷史記錄(它僅壓縮和存儲提交之間的差異)。
It also allows you to create online git repositories on sites like GitHub, which acts as a central source of truth for your website. Sites like GitHub can be configured with special webhooks that can actually update your website whenever you add a new checkpoint (a new commit) without you ever needing to manually go to the server and update it yourself.
它還允許您在GitHub之類的網(wǎng)站上創(chuàng)建在線git存儲庫,這是網(wǎng)站真相的主要來源。 可以像GitHub這樣的網(wǎng)站配置特殊的Webhook,這些Webhook實(shí)際上可以在您添加新的檢查點(diǎn)(新的提交)時(shí)更新您的網(wǎng)站,而無需手動轉(zhuǎn)到服務(wù)器并自行更新。
尋求推薦技能 (Go for recommended skills)
I'm a big believer in learning by doing. And the best way to do something comes out of necessity or interest. Once you consider yourself good enough with the minimum requirements, it's time to acquire the recommended skills. This includes all the tools like Docker and NGiNX mentioned above.
我堅(jiān)信邊做邊學(xué)。 而做某事的最好方法是出于必要或興趣。 一旦您認(rèn)為自己的最低要求足夠好,就可以開始學(xué)習(xí)推薦的技能。 其中包括上述所有工具,例如Docker和NGiNX。
DevOps is also something which fits in super nicely with back end developers. You could try and explore TravisCI or CircleCI for automated build deployments. Continuous Integration and Deployment (CI/CD) is a topic that could take another whole blog post, so I'll not get into that. In fact, once it is set up correctly, it'll save you a ridiculous amount of developer time!
DevOps也非常適合后端開發(fā)人員。 您可以嘗試探索TravisCI或CircleCI進(jìn)行自動構(gòu)建部署。 持續(xù)集成和部署(CI / CD)是一個(gè)主題,可能需要撰寫另一篇完整的博客文章,因此我不再贅述。 實(shí)際上,一旦正確設(shè)置,它將為您節(jié)省大量的開發(fā)時(shí)間!
Then comes databases, which I placed in recommended skills. But you're gonna need databases for pretty much any application which involves some sort of data persistence generated by the user.
然后是數(shù)據(jù)庫,我把這些數(shù)據(jù)庫放在推薦的技能上。 但是,幾乎所有涉及用戶生成的數(shù)據(jù)持久性的應(yīng)用程序都將需要數(shù)據(jù)庫。
Databases are usually easy to begin working with, but harder to maintain and tweak properly. The best way to start working on a back end tech stack is to have everything together on a single server - the code of your application, the reverse proxy servers, the database, etc. Then as you become more proficient in each thing, you can decouple it from the existing business logic.
數(shù)據(jù)庫通常很容易上手,但是很難維護(hù)和正確調(diào)整。 開始在后端技術(shù)堆棧上工作的最佳方法是將所有內(nèi)容整合到單個(gè)服務(wù)器上-您的應(yīng)用程序代碼,反向代理服務(wù)器,數(shù)據(jù)庫等。然后,當(dāng)您精通每件事時(shí),您可以將其與現(xiàn)有業(yè)務(wù)邏輯分離。
By doing this, you're enabling an architecture that can be highly scaled. A database-operation intensive application could have an optimized solution for databases. And a heavy traffic bound site should have a good CDN mechanism to offload static assets, and so on.
通過這樣做,您可以實(shí)現(xiàn)高度可擴(kuò)展的體系結(jié)構(gòu)。 數(shù)據(jù)庫操作密集型應(yīng)用程序可能具有針對數(shù)據(jù)庫的優(yōu)化解決方案。 流量受限的站點(diǎn)應(yīng)該具有良好的CDN機(jī)制來卸載靜態(tài)資產(chǎn),依此類推。
結(jié)論 (Conclusion)
There's so much to learn, but it's all achievable if you don't give up. Let me know what you think about this post through my twitter and Instagram handles. It'll mean a lot to me if we connect over there!
有很多東西要學(xué),但是如果您不放棄,這一切都是可以實(shí)現(xiàn)的。 讓我知道您對我的Twitter和Instagram句柄的看法。 如果我們在那里連接對我來說意義重大!
Also, if you're interested, checkout codedamn - a developer-focused platform for learning technologies like backend development! I even posted a YT video on spinning up your own simple website server in 2 minutes! Check that out and let me know what you think!
另外,如果您有興趣,請簽出codedamn-一個(gè)面向開發(fā)人員的平臺,用于學(xué)習(xí)后端開發(fā)等技術(shù)! 我什至在2分鐘內(nèi)發(fā)布了一個(gè)YT視頻,介紹了如何旋轉(zhuǎn)您自己的簡單網(wǎng)站服務(wù)器 ! 檢查一下,讓我知道您的想法!
Peace!
和平!
翻譯自: https://www.freecodecamp.org/news/learn-backend-development/
web后端開發(fā)學(xué)習(xí)路線
總結(jié)
以上是生活随笔為你收集整理的web后端开发学习路线_学习后端Web开发的最佳方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: css 动画使用_如何在CSS中使用动画
- 下一篇: node缓冲区_Node.js缓冲区介绍