摘要:本文僅用于學(xué)習(xí)和交流目的,不得用于商業(yè)目的。今年,我們依然會(huì)組織。隨著語(yǔ)言的發(fā)展,這種情況將不再適用。本系列主要討論如何獲得這些高度模塊化的應(yīng)用程序。這一系列內(nèi)的后續(xù)圖書(shū)會(huì)討論測(cè)試及部署等內(nèi)容。更多精彩,加入圖靈訪談微信
訪談嘉賓:本文僅用于學(xué)習(xí)和交流目的,不得用于商業(yè)目的。非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/art...
Nicolas Bevacqua,阿根廷人,是一位富有激情的JavaScript工程師,熱衷于打造健壯的構(gòu)建流程和清晰的應(yīng)用架構(gòu)。喜歡談?wù)撽P(guān)于JavaScript、性能、可維護(hù)代碼和開(kāi)放互聯(lián)網(wǎng)的所有內(nèi)容,曾多次在技術(shù)大會(huì)上發(fā)表web性能、ES6方面的知識(shí)分享。
2017年6月24日,Nicolas作為重量級(jí)嘉賓參加了“騰訊web前端大會(huì)”,分享《JavaScript的未來(lái)編寫(xiě)方式》并參加圖書(shū)簽售活動(dòng)。
訪談實(shí)錄: 什么時(shí)候開(kāi)始編程的?大概10歲的時(shí)候,我上過(guò)一些學(xué)習(xí)Flash的課,也做些網(wǎng)站但純屬是為了樂(lè)趣。到了高中的時(shí)候,我開(kāi)始做一些更有趣的項(xiàng)目,比如玩一款多人在線的角色扮演游戲——網(wǎng)絡(luò)創(chuàng)世紀(jì)。運(yùn)行自己開(kāi)發(fā)的服務(wù)器,實(shí)現(xiàn)游戲的特征。這段時(shí)間里,我學(xué)會(huì)了C#。大概做了兩年的時(shí)候,一個(gè)朋友告訴我“嘿,人們是愿意花錢(qián)讓你做這些事情的。”這對(duì)于我來(lái)說(shuō)太酷啦!是的,我想,這就是我如何開(kāi)始編程的。
你有沒(méi)有想過(guò),把愛(ài)好變成職業(yè)以后,會(huì)破壞愛(ài)好帶來(lái)的那份樂(lè)趣?不,恰恰相反。我從來(lái)沒(méi)有覺(jué)得它是某種工作。我也不會(huì)因?yàn)榘褠?ài)好變成了工作,就不再享受這份愛(ài)好。做自己喜歡的工作,這一點(diǎn)很重要。只有這樣,你工作的時(shí)候才不會(huì)感到痛苦。
所在居住地的技術(shù)圈是什么樣子的?五年前的技術(shù)社群要小得多。不過(guò),現(xiàn)在我們有了Node.js大會(huì)、有了JS大會(huì)等,確實(shí)在慢慢變大。我所聯(lián)合創(chuàng)辦的Node.js大會(huì)是去年開(kāi)始的。今年,我們依然會(huì)組織。我們希望把它變成一個(gè)定期舉辦的大會(huì),人們才可以更多地參與到技術(shù)社區(qū),而不僅僅是每年來(lái)那么一次,然后就完全忘了。
JavaScript中有很多的框架。如何才能跟上趨勢(shì),不被技術(shù)落下?我們談話的這個(gè)時(shí)候,可能就有一個(gè)框架出現(xiàn)。重要的是,我們的主要任務(wù)不是跟隨那些耀眼的事物,而是更多地了解趨勢(shì),什么是對(duì)我有用的、有幫助的。
如果兩年前開(kāi)始的一個(gè)項(xiàng)目還在使用Angular,我就不需要認(rèn)為Angular比React落后,Angular肯定會(huì)糟糕一些。是否使用某個(gè)框架取決于你的要求,總是去追求最新的技術(shù)是件很危險(xiǎn)的事情。在一段時(shí)間內(nèi)堅(jiān)持使用同一種工具,講究工具的一致性是很有價(jià)值的。
此外,不被新技術(shù)落下也是很重要的。你可以,但是不建議你還在使用jQuery和HTML做網(wǎng)站。
關(guān)鍵是找到合適的平衡點(diǎn)。不斷豐富自己的知識(shí),如果有時(shí)間就去嘗試一下。千萬(wàn)不要因?yàn)槭切录夹g(shù)就盲目嘗試。
你能按照時(shí)間順序給我們提供一些JavaScript的學(xué)習(xí)建議嗎?首先,要弄清楚你適合哪種學(xué)習(xí)方式。有些人喜歡看知識(shí)截屏或者視頻演講。對(duì)于我來(lái)說(shuō),我在視覺(jué)學(xué)習(xí)方面的能力很差勁。我需要自己研讀。如果讓我看一段視頻,我會(huì)想要了解任何一種細(xì)節(jié)性的知識(shí),反反復(fù)復(fù)看四遍。換做一本書(shū)或是一篇文章,我就可以很快掌握。我想說(shuō)的是,你應(yīng)該弄清楚自己是一個(gè)視覺(jué)型學(xué)習(xí)者,還是喜歡文本型內(nèi)容的學(xué)習(xí)者。
然后,你就可以開(kāi)始真正地學(xué)習(xí)JavaScript的基礎(chǔ)知識(shí):句法、語(yǔ)法,等等。有了堅(jiān)實(shí)的基礎(chǔ),你就應(yīng)該進(jìn)入ES6的學(xué)習(xí),掌握些特征。與此同時(shí),你可能專(zhuān)注于某個(gè)單一的框架,Angular或者React或者其他任何一個(gè)框架,但一定要做到精通。你可以閱讀所有的文檔并瀏覽文件直到完全了解它的工作原理。
我用自己編寫(xiě)的框架來(lái)學(xué)習(xí)事物是如何工作的。這是一個(gè)相當(dāng)有效的方法,可以驗(yàn)證些東西、編寫(xiě)些技術(shù)工具。如果非要推薦一種學(xué)習(xí)資源,它應(yīng)該是https://12factor.net。這是一個(gè)網(wǎng)站,它列出了從安全性、可擴(kuò)展性等方面出發(fā)的12種不同的應(yīng)用程序設(shè)計(jì)原則。我認(rèn)為,人們應(yīng)該了解它。
目前,你正在編寫(xiě)《模塊化的JavaScript》系列圖書(shū)。為什么會(huì)關(guān)注模塊化?早期的時(shí)候,JavaScript基本上就是復(fù)制粘貼“如何做”。人們?cè)诰W(wǎng)上找到一些代碼片段,復(fù)制粘貼到他們的網(wǎng)站,然后結(jié)束一天的工作。隨著語(yǔ)言的發(fā)展,這種情況將不再適用。
人們變得更加專(zhuān)業(yè),開(kāi)始開(kāi)發(fā)一些JavaScript應(yīng)用程序?,F(xiàn)在的JavaScript應(yīng)用程序中有很多的模塊。起初,這些模塊都是相當(dāng)大的?,F(xiàn)在,編寫(xiě)小模塊變得簡(jiǎn)單得多。
在我的系列叢書(shū)中,我試著教大家如何編寫(xiě)出簡(jiǎn)潔的、單目的模塊。原因是,人們希望編寫(xiě)出專(zhuān)業(yè)的模塊,這樣就可以重復(fù)使用、測(cè)試,甚至在需要的時(shí)候給它提供官方文檔。最重要的是保證架構(gòu)方面的可擴(kuò)展性。當(dāng)你有5個(gè)不同的模塊,每個(gè)模塊有5000行代碼的時(shí)候,事情會(huì)很難處理。如果你有5000個(gè)模塊,每一個(gè)都是100行的代碼長(zhǎng)度,那么這就簡(jiǎn)單多了。
本系列主要討論如何獲得這些高度模塊化的應(yīng)用程序。這一系列內(nèi)的后續(xù)圖書(shū)會(huì)討論測(cè)試及部署等內(nèi)容。
How did you get started in programming?
When I was around 10, I had some classes using Flash. Also, I made websites for fun. In high school, I did a couple of more interesting projects, like playing the game called Ultima Online. I used to run my own server and implement features for the game. That"s how I learned C#.
After doing that for 2 years, a friend told me, “Hey, people actually pay you to do this.” It"s too cool to get paid. Yeah, that"s I guess how I begin.
Have you ever thought that turning love of role-playing games into a career will spoil your fun?
No, it"s the other way around. I never felt it like work to me. I would also never fall out of love with hobbies because I"m doing it for work. But it"s important to work on something you like. Then it won"t feel like torture when you’re doing it for days.
What does the tech community of your living place look like?
It"s much smaller 5 years ago. Nowadays, we have Node.js Conf, JS Conf and so on. It"s definitely growing. Node.js Conf started last year. This year, we will still run it. We plan to make it a regular thing so that people could engage more with the community, not just coming to this event once a year and then completely forget it.
There are lots of frameworks in JavaScript. How to keep up with the state?
There"s probably a framework coming out right now as we speak. The important thing is to know that the theme is not to follow those shiny stuffs. It’s more about figuring out the trends, what"s useful and helpful for me.
If I started one project 2 years ago, it"s still using Angular. I don’t really need to feel that Angular is a little bit lower than React and it must be worse. It depends always on your requirements. It"s very dangerous to go after the newest thing. The consistency of using the same tool for a while is valuable.
Also, it"s important to not be fallen behind. You can, but it’s not advisable to be still using jQuery or HTML for websites.
It"s about finding the right balance. Stay informed but try them if you have time. Be sure not to jump into everything just because it is.
Could you give us some learning steps of JavaScript in chronological order?
It"s really important to figure out how you learn things best. Some people love to read screen cuts or videos. I"m really bad at learning anything that I see. I need to read it. If I watched a video, I want to understand anything until I go over it like 4 times. When I read a book or article, I could get it. What I"m trying to say is that you should figure out whether you are a visual learner or if you prefer written contents.
Then you could start to really understand the basics of JavaScript: syntax, grammar, etc. Once you have a solid foundation, you should move into ES6 and learn features. At the same time, you might focus on a single framework, Angular or React, but be sure to be specialized on that. You could read all its documentations and browse files to figure out how it works.
I implemented my own frameworks to learn how things work. I think it"s an effective way to experiment and build things for yourself. If there were one source I would recommend, it should be https://12factor.net , which is a website that lays out 12 different principles for robust application design in terms of anything from security, scalability, etc. I think people should know it.
Currently, you are writing the Modular JavaScript book series. Why do you focus on modularity?
In the early days, JavaScript was basically on copy paste of "HOW". People find snippets of code on the internet that would give them comments for websites. They go to copy paste them into their site and call it a day. As the language developed, the case will not match any more.
People become to be more professional and started developing JavaScript applications. Now, JavaScript applications have lots of modules. At first, those were pretty big modules. It"s now much simpler to write small modules.
In my book series, I"m trying to teach people how to write concise and single-purpose modules. The reason is that people want modules to be specialized so that they can reuse them, test them, and even document them if needed. But the most important thing is scalability in terms of architecture. When you have 5 different modules, each one with 5,000 lines of code, it would be really hard to work with them. If you have 5,000 modules and each is 100 lines of code in length, it"s much easier.
The series basically discuss how to obtain these highly modular applications. Then the later books in the series will talk about Test and Deployment.
更多精彩,加入圖靈訪談微信!文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/84409.html
摘要:不久,傳說(shuō)中的月影大大進(jìn)入了視線。目前擔(dān)任奇虎副總監(jiān)技術(shù)委員會(huì)委員兼前端技術(shù)委員會(huì)主席,前端最大團(tuán)隊(duì)奇舞團(tuán)負(fù)責(zé)人,顧問(wèn)。圖靈訪談我知道月影大大在前端方面特別有名,圖靈社區(qū)的好多留言也都感嘆終于有機(jī)會(huì)訪談到月影大大了。 本文僅用于學(xué)習(xí)和交流,不用于商業(yè)目的。非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/Art... 編者語(yǔ) 通往...
摘要:不久,傳說(shuō)中的月影大大進(jìn)入了視線。目前擔(dān)任奇虎副總監(jiān)技術(shù)委員會(huì)委員兼前端技術(shù)委員會(huì)主席,前端最大團(tuán)隊(duì)奇舞團(tuán)負(fù)責(zé)人,顧問(wèn)。圖靈訪談我知道月影大大在前端方面特別有名,圖靈社區(qū)的好多留言也都感嘆終于有機(jī)會(huì)訪談到月影大大了。 本文僅用于學(xué)習(xí)和交流,不用于商業(yè)目的。非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/Art... 編者語(yǔ) 通往...
摘要:不久,傳說(shuō)中的月影大大進(jìn)入了視線。目前擔(dān)任奇虎副總監(jiān)技術(shù)委員會(huì)委員兼前端技術(shù)委員會(huì)主席,前端最大團(tuán)隊(duì)奇舞團(tuán)負(fù)責(zé)人,顧問(wèn)。圖靈訪談我知道月影大大在前端方面特別有名,圖靈社區(qū)的好多留言也都感嘆終于有機(jī)會(huì)訪談到月影大大了。 本文僅用于學(xué)習(xí)和交流,不用于商業(yè)目的。非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/Art... 編者語(yǔ) 通往...
摘要:圖靈社區(qū)看來(lái),移動(dòng)互聯(lián)網(wǎng)開(kāi)發(fā)會(huì)成為下一行業(yè)焦點(diǎn),你覺(jué)得呢移動(dòng)互聯(lián)網(wǎng)開(kāi)發(fā)已經(jīng)是焦點(diǎn)了。圖靈社區(qū)現(xiàn)在有很多基于改進(jìn)的語(yǔ)言,比如,等等。熱愛(ài)跨瀏覽器開(kāi)發(fā)帶來(lái)的挑戰(zhàn)熱愛(ài)互聯(lián)網(wǎng)技術(shù)的種種異端,熱愛(ài)業(yè)內(nèi)的同行,熱愛(ài)你的工具。 非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/article/1791 尼古拉斯·澤卡斯(Nicholas...
摘要:年加入微軟中國(guó)有限公司,任職軟件開(kāi)發(fā)測(cè)試工程師,負(fù)責(zé)微軟在線業(yè)務(wù)與商業(yè)智能產(chǎn)品的測(cè)試工作。目前,史亮正從事下一代產(chǎn)品的研發(fā)工作。在他們的熱心幫助下,我獲得了去北京面試微軟測(cè)試開(kāi)發(fā)工程師,簡(jiǎn)稱的機(jī)會(huì)。 非商業(yè)轉(zhuǎn)載請(qǐng)注明作譯者、出處,并保留本文的原始鏈接:http://www.ituring.com.cn/article/114546 史亮,東南大學(xué)計(jì)算機(jī)軟件與理論專(zhuān)業(yè)博士,研究...
閱讀 525·2023-04-26 00:33
閱讀 3549·2021-11-24 09:39
閱讀 2953·2021-09-22 15:34
閱讀 2324·2019-08-23 18:07
閱讀 2921·2019-08-23 18:04
閱讀 3710·2019-08-23 16:06
閱讀 2902·2019-08-23 15:27
閱讀 1620·2019-08-23 14:32