开发者

Is it bad practice to commit placeholder/design text into source control?

Is it bad practice to have placeholder data in your source control repository? For example, when building a view is it ok to commit something like this:

...
<span id="username">LoremIpsum</span>
<span id="karma">999</span>
...

...or should I put the variable names in during design, and only view the work-in-progress view via some sort of test:

...
<span id="username"><?php echo $username; ?></span>
<span id="karma"&开发者_Go百科gt;<?php echo $karma; ?></span>
...

 

...
//test file kept in a repository/tests directory
$username = "LoremIpsum";
$karma = 999;
$page = new Page($username, $karma);
$page=>render();


Put the placeholder data in test directories/files completely seperate from the code. You will not remember to take the placeholders out before production.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜