简体   繁体   English

RoR如何用于前端?

[英]How is it possible to use RoR for front-end?

I was reading an article titled The Secret Behind Twitter's Growth , and I noticed something that made me a little confused: 我读了一篇标题为《 Twitter成长背后的秘密》的文章,发现有些让我有些困惑的东西:

The third paragraph which gives some background began with this: "The popular Web programming language Ruby on Rails is responsible for the look and feel of Twitter's user interface ..." Now, I know that RoR is for back-end development, so how is it possible to use it in the user interface aka the “front end”? 第三部分从背景开始:“流行的Web编程语言Ruby on Rails负责Twitter 用户界面的外观和感觉……”现在,我知道RoR用于后端开发,因此如何是否可以在用户界面(也称为“前端”)中使用它?

link to the article: https://www.technologyreview.com/s/412834/the-secret-behind-twitters-growth/ 链接到文章: https : //www.technologyreview.com/s/412834/the-secret-behind-twitters-growth/

You can display data from your database in your views. 您可以在视图中显示数据库中的数据。

You can use ERB(embedded ruby) inside of your HTML to display cool ruby coded front end stuff (the current date for example). 您可以在HTML内使用ERB(嵌入式红宝石)来显示很酷的红宝石编码前端材料(例如当前日期)。

You can use all kinds of cool gems like(pagination) which sorts long lists into multiple pages etc. 您可以使用各种很酷的宝石,例如(分页),将长列表分类为多个页面等。

And also; 并且; Ruby On Rails is not just backend, it's a framework where you can use practically any front-end languages/tools(Javascript, Coffeescript, HTML5, CSS, XML, AJAX, Angular.js, React.js, SCSS, LESS, you name the rest) aswell. Ruby On Rails不仅是后端,它是一个框架,您可以在其中使用几乎任何前端语言/工具(Javascript,Coffeescript,HTML5,CSS,XML,AJAX,Angular.js,React.js,SCSS,LESS,其余)。

In short; 简而言之; The list is endless, you can do a lot to improve the user experience. 列表是无止境的,您可以做很多事情来改善用户体验。

If you are really interested in this exact stuff, you can read the book 'The Ruby On Rails Tutorial' by Michael Hartl where you can build a copy of the Twitter website along with him. 如果您真的对这些确切的东西感兴趣,可以阅读Michael Hartl的书“ The Ruby On Rails Tutorial”,在那里您可以与他一起构建Twitter网站的副本。 Then you will see exactly how Ruby on Rails helps improve the user experience. 然后,您将确切了解Ruby on Rails如何帮助改善用户体验。 And you will learn a lot aswell :) 您还将学到很多东西:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM