未加星标

Some depressions on the chaos of JavaScript

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二04 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏
javascript is not a language, it’s a platform.

It’s becoming more and more tough to learn JavaScript. People are complaining. You probably have seen this post joking about how prosperous JavaScript is, meanwhile how overwhelming people feel about them. It’s popular.

How it feels to learn JavaScript in 2016

Edit: Thanks for pointing typos and mistakes, I’ll update the article as noted. Discussion in HackerNews and Reddit. hackernoon.com

People in China hate it too. We have Anguar and React, we also have small libraries like react-lite (React and light) and Avalon (MVVM but now virtual DOM like Vue). And this year Vue 2 is rising quickly and a lot people are talking about it. We also have Weex (React Native in Vue) and WeChat App (in JavaScript). It’s chaotic. Yesterday I saw someone complaining on it, so did I.

2016 年做前端开发是什么体验?混乱+开倒车,这是我的体验 - V2EX

程序员 - murmur - 有人说,你有什么资格发表这种高谈阔论,实际上是这样的,我在看 lol 比赛直播的时候,有个很有名的主播说过,打到 2400 以上的都去做职业玩家了, 1800-的还在挣扎,只有 2000 徘徊的才出来 www.v2ex.com

Well, I’m in Shanghai and I’m still building a front-end MVC library called Respo . Hopefully it will make the situation more chaotic. Personally I’ on the React side. But due to the doubts on React community I started learning ClojureScript even though it’s a bad choice for a job.

Clojure is a well designed language, much better compared to Babel. There’s immutability by default, no need of JSX to write HTML with the language, we don’t have to update the compiler to add new syntaxes thanks to macros, and it’s not controlled by Facebook. The language is also quite stable and platform agnostic. We were trying to do a lot in JavaScript in the React community to make JavaScript better, it was a lot of efforts. However, even with the efforts, ClojureScript is still superior in some aspects, without aggressively bumping the version numbers.

And in some degree, I don’t like Facebook’s tempers. In my last company we were using CoffeeScript and React is becoming more and more unfriendly to it. We used Flux at first to build a large app with more than 100 components, and it become hard to migrate. Then the React community prefers to use Redux, a lot of tools are built around Redux. react-router is incompatible with Redux so there’s redux-router. Then, Redux updates. Also react-hot-loader updated to something I can never use in CoffeeScript. It’s like we were abandoned.

That problem comes to Webpack 2 as well. One of my workmates used it as a dependency. Then it broke after an update. You could say Webpack is still in beta and we need to be careful from the beginning. Yeah, we should. But seems Vue 2 is using it somewhere, we thought it’s already stable enough. And Webpack 2 was said to be release by the end of August. How its October, there must be issues.

Surely Facebook is very kind to share lots of it tools to the community. Those tools saved us small companies and medium-sized companies a lot of time. We don’t have to stay in the jungle of jQuery and template engines. It’s great improvement to us when I can migrate our app from Backbone to React and gain benefits in developing and maintaining. The problem is, it updates.

While Facebook is large, there’s a lot of small ones doing different businesses. My previous company aims to provide realtime collaboration tools with html5 and native apps. It ends with a very large simple page app looks like combining the webpages of Trello, Sunrise, Dropbox and Asana. And my teams was working on a chat app(like Slack). Those works requires lots of skills on building single pages apps. To make it faster, we need code splitting, basic server side rendering, memory control and a lot of stuffs. And also there are companies integrating HTML5 pages into native apps in China, which requires techniques to make mobile pages loaded instantly. Some of them are different from large company, some are not.

Server side rendering is an old thing in React community. But as I was learning Vue’s SSR, I found SSR code for React is not even merged. Actually no updates for months. That’s strange when React is such a friendly and active community. After React updated to 15.x, suddenly we have no official solution for SSR. I don’t know what’s happening there.

Facebook evolves JavaScript. It was great. And slowly we have type system like Flow, we have more and more ES6 features to power up our apps. It takes long time to wait for Google and Microsoft finish supporting ES, with Facebook, it’s a lot faster. The part I don’t like is we still run into problems, and some of them are likely created by Facebook. Type system is very nice for making apps robust, however, does everyone need it? I was a big CoffeeScript fan since I was enjoying prototyping of small apps. Then one day people started talking “CoffeeScript is dead, use ES6”.

I don’t use CoffeeScript often now, since my new work prefers ES6. But you guess what, people are still downloading coffee-script every day. That number even succeeded babel-core at this moment, which can be confirmed on npm.

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

分页:12
转载请注明
本文标题:Some depressions on the chaos of JavaScript
本站链接:http://www.codesec.net/view/485621.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(31)