请选择 进入手机版 | 继续访问电脑版

技术控

    今日:237| 主题:57266
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] How it actually feels to write JavaScript in 2016

[复制链接]
い明 媚 发表于 2016-10-5 18:02:10
122 1

How it actually feels to write JavaScript in 2016

How it actually feels to write JavaScript in 2016-1-技术控-additional,Android,something,actually,planning
         Yeah, it’s a piece of cake.      Hey, I need to create a page that displays the latest activity from the users, so I just need to get the data from the REST endpoint and display it in some sort of filterable table, and update it if anything changes in the server. I was thinking maybe using jQuery to fetch and display the data?
  -Sure, you could still use jQuery. But if you’re ever planning to do something more complicated on the frontend you should probably try React. It will be a big benefit for you in the future.
  -Sounds great. How can i start with React?
   -The easiest way is to run npm install create-react-app -g in your    terminal and you can start with a project right away.
  -Cool, so you’re telling me that I don’t need any additional setup?
  -Nope.
  -Do I need to install any special IDE like Visual Studio, Android Studio, or XCode?
   -Nope, just create your app with create-react-app my-cool-app and you’re good to go.
  -But what about extra dependencies? Do I maybe need to install Java on my machine? Maybe I also need Maven, Gradle, CocoaPods, or maybe I need to download some extra 20gb SDK?
   -Nope, just cd into your app and start it with npm start. That’s it.
  -But do I have to build my app and wait for a long rebuild every time i change something?
  -Nope. If you do a change the page will automatically refresh for you. If you change some CSS it will be live-reloaded for you, without doing a full page refresh.
  -Sounds very useful! I think it can speed up my development process a bit. But wait, what do i do if i ever want to deploy a production version of my website? Because no one is *actually* deploying an unminified version of index.html, app.css, and main.js in production anymore, right?
   -Yup, you’re right. If you ever want to deploy a production version of your site just run npm run build and everything that you need will be in your /build folder. Minified, optimised, and ready for deployment.
  -Thanks dude, that was very helpful.
  *curtain falls down, applause and cheers from the audience, our 2 developers take a bow, shake hands, and ride off on dragons into the sunset*



上一篇:QingStor™ 对象存储最佳实践之初探云端数据仓库
下一篇:Alternative Text and Images
舍不了的悲伤 发表于 2016-10-7 02:41:28
很有品味!
回复 支持 反对

使用道具 举报

我要投稿

回页顶回复上一篇下一篇回列表
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表