Which should I learn: Mithril, Vue, or Angular?
Disclaimer: I am the author of Vue.js. It kind of annoys me that many answers jump right into the technical comparisons or "Go with framework X" verdicts without even asking what the OP is trying to achieve. So let's ask that question first: what are you trying to achieve by picking a framework?
If your goal is solely (1),then you are most likely better off going with Angular or React (Note: not Angular 2,at least for now),since these two are the most mature,most widely used,and gives you the best "hire-ability" on the market. Angular 1 being a bit more enterprise-y while React being more startup-y. For goal (2),it further depends on the type of app you are building. Is it a largely backend-rendered app or a pure SPA? For the former,you'd be better off with something that is lighter,less-intrusive,requires no specific tooling,and plays nicely with HTML (hint: Vue). For SPAs,then we have to dive into actual technical comparisons on performance,features,API friendly-ness,tooling support,ecosystem maturity and all that. But that's a fairly large topic in itself,and it can also be subjective and highly project-dependent. For goal (3),you are again better off starting with something lighter-weight,because full-solution frameworks like Angular/Ember throws too many concepts upfront,and since you cede control to the framework,you end up mostly learning about framework-specific APIs and conventions rather than universally-applicable skills. On the other hand,smaller libraries,due to their smaller API surfaces,forces you to take more control and understand how different pieces actually fit together (which in fact helps you pick up larger frameworks later). --- Now here's the actual suggestion: learn JavaScript itself first,and learn it damn well. That is the safest bet. With solid basics you should be able to pick up the basics of Vue/React/Mithril/Riot in a matter of days. You should then build a small app with each,without complex tooling,just to (1) understand what problems these frameworks solve; (2) understand your own preference - i.e. what API style makes you more productive. From there you can then try out larger frameworks because you are now much better prepared for them. This whole process will probably take some time,but it's going to be a worthwhile investment,way better than diving deep into a single framework for a few months and then realizing it's not for you. On the other hand - you should also learn about framework-agnostic skills like ES2015,basic Node.js,how NPM works,module systems/bundlers (Browserify/Webpack/Syste The core idea isdon't put all your eggs in a single basket.Picking a JavaScript framework is not a one-or-the-other scenario; you don't have to stick with one forever. And no matter what others say,it's impossible to make the best decision for yourself without trying them out and get first-hand experience with it. If you just go with one and ignore the others,you are almost certainly doing it wrong. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |