简体   繁体   English

前端设计第一,还是后端开发第一?对于Ruby on Rails站点

[英]Front-end design first, or back-end development first? For Ruby on Rails site

I am doing everything on my own: front-end and back-end. 我自己做的就是:前端和后端。 I am proficient with HTML and CSS, but a noob in Ruby on Rails. 我精通HTML和CSS,但是Ruby on Rails中的菜鸟。 Now that I want to develop the site, I wonder if I should start from front-end first, or back-end. 既然我想开发这个网站,我想知道我是应该从前端开始还是从后端开始。 Cos what I am doing for front-end now are all static. 我现在为前端做的事情都是静态的。 I am afraid that I have to change a lot of my front-end coding when I do my back-end. 当我做后端时,我担心我必须改变很多前端编码。

As a general rule of thumb (language agnostic), you should first determine what you exactly want the site to do/provide first. 作为一般经验法则(语言不可知),您应该首先确定您希望站点首先执行/提供的内容。 From this work out what actions the user can do and what responses they can expect. 从中可以了解用户可以执行的操作以及他们可以期待的响应。

From this you should be able to determine your data (models) and be able to play out the design/layout of your site (start rough sketches views). 通过此,您应该能够确定您的数据(模型)并能够播放您网站的设计/布局(开始粗略的草图视图)。

Now you are ready to code how the user modifies and retrieves the information from the site (your now doing the controllers). 现在,您已准备好编写用户如何修改和检索站点信息(您现在正在执行控制器)的代码。

Finally, you can convert your sketches and rough drafts of the user interface into the real user interface work (views) 最后,您可以将用户界面的草图和粗略草图转换为真实的用户界面工作(视图)

tldr; tldr;

Design the system from the user to the front-end to the back-end (View then Controllers then Models). 设计从用户到前端到后端的系统(查看然后是控制器,然后是模型)。

Now implement the system from the back-end back to the user ( Models then Controllers then Views ). 现在实现从后端到用户的系统( 模型然后控制器然后视图 )。

Note: This is of course my humble opinion and your mileage may vary. 注意:这当然是我的拙见,你的里程可能会有所不同。 Also, just in case, I am also not a lawyer... 另外,为了以防万一,我也不是律师......

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

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