[英]《JavaScript快速全棧開發》作者Azat Mardanov:現在是擁抱Node技術棧的最佳時機(圖靈訪談)

盼盼姐發表於2015-03-31

Azat Mardanov是一位有著12年開發經驗的資深軟體工程師,他曾涉足web、移動、軟體開發領域。他著有9本JavaScript和Node.js技術領域相關書籍,其中的Express.js Guide, Practical Node.js,以及《JavaScript快速全棧開發》在 Amazon.com專業類別中成為了#1的暢銷書。作為技術作者,其個人部落格webAppLog.com一度成為谷歌搜尋“express.js tutorial”結果中排名第一的教程站點。

Azat現在在DocuSign任高階工程師,他利用由Node.js, Express.js, Backbone.js, CoffeeScript, Jade, Stylus以及Redis組成的技術棧,帶領團隊重構了具有5000萬使用者的DocuSign。Azat還是科技聚會和程式設計馬拉松活動的常客,他曾和FashionMetric.com團隊一起在AngelHack活動上12次入圍決賽。長期以來,他都是General Assembly、Hack Reactor、pariSOMA和Marakana等機構的講師,其技術課程獲得一致好評。另外,他還開發了很多Node.js開源專案(如ExpressWorks、mongoui以及HackHall等)。

[英]《JavaScript快速全棧開發》作者Azat Mardanov:現在是擁抱Node技術棧的最佳時機(圖靈訪談)

1. Io.js has been separated from Node, how does this influence Node? What are io.js and Node’s advantages respectively?

In my opinion, the Node by Joyent will have to catch. It will need to pick the speed in release cycles. Also, it’ll need to attract new contributors. In other words, Node will have to change something to improve its overall trajectory and pace.

The main reason behind the Io.js creation was the slowness of decision making in Joyent’s Node.

Io.js is more cutting-edge (as of March 2015). It has more contributors with faster release cycles. Io.js is already at version 1.6.2 while Node is still at 0.12.1 (as of March 2015).

Of course, in general the version numbers is not an absolute measure of maturity. This is because some project might bump major version numbers for minor patches.

2. Do you think Node.js camp being separated is a good thing (since many early successful companies in Silicon Valley were separated from Fairchild)?

Yes. I think the separation is a good thing. The more great forks we have the better they will be.

It might be a bad example, but look at the Linux distributions: Debian, Fedora, openSUSE, Red Hat, Ubuntu, etc. They help to spread Linux-based systems and the competition drives each of them to be better.

I am not 100% in on the whole topic, and the reasons. I tend to focus on my own project more.

I recommend to stay away from politics and drama. This is due to the fact that only the time will tell what will happen. The separation can be a bad thing, if Io.js turns out to be mediocre and turns people away from Node/Io.js in general.

However, if I have to make bets. I think the future is bright and this is the best time to jump on the Node/Io.js/JavaScript stack.

3. PayPal’s migration from Java to Node is quite successful. Do you think Node is going to replace Java in the back end?

Yes. Node is already replacing Java.

Most of Java apps are monolithic apps, so the companies break down those giant apps into small web services implemented in Node. Other companies use Node for the front-end layer. This layer act like middleman between old APIs in Java or .NET. The advantage is that it’s easier to iterate (fast release cycles), easier to build (one language), and better to scale (faster apps).

I recommend this article titled Monolithic Node.js.

On the other hand, enterprises and big companies need some reputable company and tooling behind a technology. StrongLoop is helping big companies with Node.js/Io.js.

Startups already love Node/Io because it’s cheaper, more scalable. Also, it’s easier to hire developers.

4. It seems that Node.js is much more popular than Python’s framework Twisted, why is that? What are Node.js and Python’s advantages disadvantages as programming languages for back-end services?

I’m not an expert on Python or its frameworks. However, based on what I’ve heard from other people: Python’s framework Twisted is more complex when you write the non-blocking I/O code.

This is because Python wasn’t design from the ground up to be a non-blocking platform. While Node, from the beginning, was designs for non-blocking and asynchronous type of code and architecture.

Node has more modules in NPM than Python. Python comes with richer standard library than Node. Python is harder to learn for JavaScript developers. At the same time, Node is easier to learn for JavaScript developers and front-end developers.

Python has a rigid structure where white space and indentation are parts of the language.

5. Node.js combined with NoSQL has generated some tools which enable the developers to respond to the demands of the front-end more quickly, such as Parse. In this agile innovation process, what area in the future will receive more innovations like this?

It’s hard to make predictions, but I think mobile development will become easier. Just take a look at Ionic and Swift!

On the desktop-side, I think programming will be more focused on the front-end with frameworks like Twitter Bootstrap, LESS and services like Webflow, WordPress, etc. becoming more popular.

The back-end will require less and less coding. Node/Io/JS will continue to capture hearts and mind of new back-end developers as well as capture “the markets” away from PHP, .NET and Java worlds. Maybe there will be some visual drag-and-drop framework for back-end.

For deployment, Docker approach is becoming popular because you develop in the production environment (no discrepancies).

In the beginning of 2015, I wrote a list of predictions. Not all of them related to technology. But you might find my list entertaining: http://webapplog.com/my-predictions-for–2015.

6. What design choices have made JavaScript live and thrive in its own development and widely used in applications on enterprise level?

In JS, you can go directly to solving your problems. This is because JavaScript is a very expressive language, meaning you don’t have to spend a lot of time setting things up, i.e., on overhead.

Contrast that with Java where a lot of time spent by architects just on the creation of interfaces, classes, build steps and environments. The bottom line is that: JavaScript is easier and more fun to work with.

With Node/Io, you can use JavaScript API / language on back-end and the database layer. So there is no context switch between browser and server code. If you have no context switch, then you can be more productive.

NPM made enterprise to switch faster because they saw that they are a lot of good modules to use.

The main reason though, is scalability. With non-blocking I/O enterprise apps can serve more pages with less resources (servers, memory, CPU).

7. As a programming languages, JavaScript also have some ‘bad parts”, what do you think of CoffeeScript, the language being developed on the basis of JavaScript?

CoffeeScript is amazing. It’s even better for enterprises. The ECMAScript 6 standard borrowed a lot from CoffeeScript.

If you need a good structure now, then use CoffeeScript.

You enroll into my FREE online course on CoffeeScript at https://www.udemy.com/coffeescript.

8. There are lots of frameworks and libraries of JavaScript, how can one select among such vast resources and develop one’s own technology stack?

NPM is rapidly developing and it should be a good place to start your selection process. In addition, I created Node Frameworks website where I hand pick the best modules. Check Node Frameworks and opt in for the following newsletters:

9. Nowadays, mobile internet has become more and more important, what are front-end engineers’ opportunities and challenges under such circumstances?

The early challenge was platform segmentation which developers tried to solve with HTML5. The problems with HTML5 were that the tooling was poor comparing to native platforms.

Right now framework like Ionic allow you to use front-end skills and frameworks like Angular and Backbone along with some native capabilities. I think this is a very good trend. (Node and JS is used in desktop development too, as well as in robots and embedded systems.)

10. What would you suggest your readers to know before reading your book? And what would you recommend them to read or do after reading your book?

After reading Rapid Prototyping with JS which is a beginner’s book on the Node stack, I recommend reading Practical Node.js. This book will give you a good solid overview of the whole development process: template engines, deployment, code organization, security, databases, etc.


更多精彩,加入圖靈訪談微信!

相關文章