可通过管理面板网站模板进行编辑(HTML、CSS、JS..)好还是坏?

发布于 2024-07-26 23:23:08 字数 458 浏览 6 评论 0原文

这个问题是针对网络开发人员和架构师的。

您认为拥有一个可以直接从管理面板编辑所有模板(HTML、CSS、JS、图像..)的网站是好是坏?

在这种情况下,如果您经常更新网站,则不需要在开发计算机上搜索网站的本地版本、搜索特定页面、进行修改、将其提交到源代码控制服务器、进行部署。相反,您所需要的只是右键单击该页面或该页面上的任何元素,单击“编辑”,更新一段 HTML,然后单击“保存” - 最多 30 秒 - 全部来自您的浏览器;)

您仍然可以通过这种方法拥有版本控制系统,并且回滚因在网站上点击两次鼠标而错误修改的任何模板。

我个人喜欢这种方法,并且需要了解您的意见。 所以你怎么看?

请注意,我们谈论的是必须经常更新的大型网站、多语言网站等。

使用这种方法的现实世界网络应用程序:

  • Wordpress
  • vBulletin

This question is for web developers and architects.

How do you think is it a good or bad idea to have a website where you're able to edit all the templates (HTML, CSS, JS, images..) right from the admin panel?

In this case if you update website often, you don't need to search for a local version of your website on you development machine, search for a specific page, make modifications, commit it to source control server, make deployment.. Instead, all you need is just right click on the page or any element on this page, click Edit, update a piece of HTML and click SAVE - 30 seconds maximum - all from your browser ;)

You still can have version control system with this approach and rollback any template which was modified by mistake by 2 mouse clicks on a website.

I personally like this approach and need to know your opinion. So what do you think?

Note, we are talking about big websites which have to be updated often, multilingual ones etc.

Realworld web-applications which use this approach:

  • Wordpress
  • vBulletin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

年华零落成诗 2024-08-02 23:23:08

就我个人而言,我认为这取决于网站的复杂程度。

您在这里谈论的是直接编辑实时网站的结构(以及潜在的行为)。 当然,在推出之前在开发服务器上进行更改可能需要更长的时间,但如果有任何可能破坏网站的外观或功能,那么我认为一定要三思而后行。

Personally, I think it would depend on the complexity of the website.

What you're talking about here is directly editing the structure (and potentially behaviour) of a live website. Sure, it may take longer to make the changes on your development server before rolling them out but if there's any chance of breaking either the appearance or functionality of the site then I'd think definitely think twice.

爱情眠于流年 2024-08-02 23:23:08

在我看来,您不应该被允许通过网站本身修改网站的整个布局。 原因是缺乏版本控制并且无法预览您正在做的事情,这意味着无法返回到旧版本。 另外,如果您在本地修改它,您可能会犯下破坏一切的错误,如果您直接通过网站进行修改,那么这种奢侈是您无法承受的。

能够通过网站添加/删除内容固然很棒,但每次通过修改 HTML 来更新博客会非常痛苦!

You shouldn't be allowed to modify the entire layout of your site through the site itself in my opinion. The reasons being the lack of version control and the inability to preview what you are doing, which translate into the inability to come back to an older version. Plus if you modify it locally, you are allowed to make errors that break everything, a luxury you can't always afford if you're doing it directly through the website.

Being able to add/remove content through the website is great though, it would be very painful to update a blog by modifying your HTML each time!

岁月如刀 2024-08-02 23:23:08

我曾经创建过一个网站,正是这样做的。 (好吧,没有任何源代码控制选项 - 必须以艰难的方式学习那个......)回顾我在那里所做的事情,我想到了一些事情:

  • 这是一个传统的网站,关于我的体育俱乐部的信息,只是偶尔发生变化,而不是现代意义上的网络应用程序。
  • 我希望能够应用修复程序,即使我无法访问我的开发机器(因为它是一个私人项目,我正在工作,并且公司代理不允许 ftp 连接)。

出于这些具体原因,该方法是一个很好的解决方案。 今天,我将使用众多优秀框架之一(Joomla、Drupal 等)来实现此目的,而不是自己编码。

重要的是:我能够编辑用于生成主站点的页面,但不能编辑生成程序或我的管理页面。 对于这些,我必须使用我的开发机器并通过 ftp 上传文件更改。

我认为如果做得正确的话,这是一个很好的方法(我的实现当然不是)

I once created a site that did exactly that. (Well, without any option for source control - had to learn that one the hard way...) Looking back at what I did there, a few things come to mind:

  • It was a traditional website with information about my sports club, that only changed occasionally, not a web app in the modern sense.
  • I wanted to be able to apply fixes even though I had no access to my dev machine (because it was a private project, I was at work, and ftp connections were not allowed by the comapny proxy).

For those specific reasons, the approach was a good solution. Today I would use one of the many good frameworks for this purpose (Joomla, Drupal etc) instead of coding it myself.

On important item: I was able to edit the pages that were used to generate the main site, but not the generation program or my admin pages. For those, I had to use my dev machine and upload file changes by ftp.

I think it is a good approach, if done correctly (my implementation certainly wasn't)

凉风有信 2024-08-02 23:23:08

通过 Web 浏览器编辑 HTML/CSS/JS 文件可以让事情变得更容易,只要编辑实现整洁、有组织、防白痴并跟踪修订即可。

要考虑的一个主要问题是安全性。 大多数软件包中无法从内容管理系统修改实际文件是一种安全预防措施。

学习有效且高效地使用版本控制系统。 像 git 或 bzr 这样的工具可以自动处理很多繁琐的事情,比如包构建、上传等。

Editing HTML/CSS/JS files through your web browser can make things easier, as long as the editing implementation is neat, organized, idiot-proof, and keeps track of revisions.

A major issue to consider is security. The inability to modify actual files from the content management system in most software packages is a security precaution.

Learn to use a version control system effectively and efficiently. Tools like git or bzr can take care of a lot of the tedious stuff automatically, like package building, uploading, etc.

尽揽少女心 2024-08-02 23:23:08

我恨它。 Web 开发,就像 Web 服务器本身一样,不应该是“舒适的”。 Web开发应该是一种母亲温柔爱抚的恐怖体验。 它听起来、看起来、甚至尝起来都应该很危险。

新手网络开发人员在被允许打开网络浏览器之前,应该先了解他们所选择的文本编辑器的微妙方面; 在仅使用 lynx 进行调试的 6 个月之前,不得靠近图形 Web 浏览器。

懒惰是我们的祸根。 不用了,我说。

编辑:这也许与当前的问题有点无关。 还应该提到的是,过于简单而无法更改的视觉标识会经常更改,从而导致用户感到困惑和沮丧。

I hate it. Web development, much like the web servers themselves, shouldn't be "comfortable". Web development should be a mother gentle caressing scary experience. It should sound, look, even taste dangerous.

Neophyte web developers should be put through their paces learning the subtler aspects of their chosen text editor before they are even allowed to open a web browser; and not be allowed near a graphical web browser before 6 months of working only using lynx for debugging.

Laziness is our bane. No more, I say.

Edit: This is, perhaps, a bit tangential to the issue at hand. It should also be mentioned that visual identity that is too simple to change will change too often, leading to confused and frustrated users.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文