技术控

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

[其他] Dividing React Work Between Designers and Developers

[复制链接]
空心荡 发表于 2016-10-5 20:33:53
142 3

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
“Who writes the HTML code in a React app? Should it be the frontend developer, or should it be the designer’s responsibility?”
  Ah, the age-old question: how to divide work between the developers and the designers?
  Both sides want to contribute toward an awesome end product, and the fastest way to get there is to play to your respective strengths (or so the thinking goes).
  So people get this idea that the designer will do the HTML and CSS while the developer writes the JS, and then you’ll just marry the two together and it’ll be happily ever after.
  But that’s likely to lead to disaster. Developers can’t write all the JavaScript code without ever touching HTML. There’s too much interaction between the two. Some degree of hopping-back-and-forth is almost always necessary.
  This rosy ideal was one of the selling points of Angular: templates are written in real HTML in separate files, so the idea of dividing the work cleanly at the HTML-file boundary was built right in.
  Compare this to React, where “HTML” written is written inline with the JavaScript, and you can see why designers might be apprehensive if they’re not used to JS.
  Now, technically, there isn’t any “HTML” in a React app. It’s called JSX, and though it looks similar, there are a few differences. For the most part, though, valid XHTML (close every tag!) is valid JSX. Biggest difference for designers: the “class” attribute becomes “className” (even if there are multiple classes to specify).
  Ways of Working

  Here are a few different ideas for how developers and designers can divide and conquer to build apps quickly:
  Workflow 1

  
       
  • [Designer] Create mockups for whole page(s)   
  • [Designer/Dev] Create a static page (HTML+CSS) from the mockups   
  • [Dev] Cut up the static page into React components, add necessary logic  
  Good if:Designer doesn’t know JS and can’t (or doesn’t want to) learn.  
  Watch out for:More iterations might be required if the static pages don’t adequately describe the feature(s).  
  Workflow 2

  
       
  • [Dev] Build an ugly-but-functional implementation based on feature spec   
  • [Designer] Work with the React components (JSX) to add styles  
  Good if:Designer is comfortable modifying pre-written JSX, working with CSS, and probably has some knowledge of using the browser dev tools.  
  Watch out for:The “ugly” implementation may turn out to be lacking in more than just style. If a more complicated user experience is needed, substantial re-work could be necessary.  
  Workflow 3

  
       
  • [Designer] Learn Enough JSX to be Dangerous (TM). Create the static components in React with JSX.   
  • [Dev] Add the necessary logic to the React components, wire up the server calls, and make it all interactive.  
  Good if:Designer is willing (or happy!) to learn some new skills.  
  Watch out for:Simple components will fit this flow nicely, but complex ones with a lot of conditional logic will be harder to approximate with plain JSX that doesn’t include any JavaScript.  
  Wrap Up

  Hopefully this gives you some ideas for how to structure work within your own team.
  If you’re already following one of these workflows (or even something entirely different), let’s have a discussion in the comments below.
  And if you’re interested in learning React, I have abook for that which you can read abouthere. While I recommend some knowledge of JavaScript, I’ve been told by folks with very little JS experience that it’s easy to follow (and there’s an easy money-back guarantee if it turns out to be too hard).
友荐云推荐




上一篇:Modern Swift Networking with Swish
下一篇:Tetros: Tetris that fits into the 512 byte MBR
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

葡萄麻麻 发表于 2016-10-7 20:39:54
楼主的帖子实在是写得太好了。文笔流畅,修辞得体!
回复 支持 反对

使用道具 举报

royzhong 发表于 2016-10-10 13:29:01
纯粹路过,没任何兴趣,仅仅是看在老用户份上回复一下
回复 支持 反对

使用道具 举报

276776523 发表于 2016-11-3 06:39:13
明星脱一点就能更出名,我脱的光光的却被抓起来了
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表