自我更新PHP + MySQL应用程序的最佳实践是什么? [英] What are best practices for self-updating PHP+MySQL applications?

查看:79
本文介绍了自我更新PHP + MySQL应用程序的最佳实践是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于桌面应用程序,自更新是一种非常标准的做法.在Mac上,我的书中使用 Sparkle 的每个非Apple程序都是立即赢得胜利的.对于Windows开发人员,对此已进行了详细讨论.我尚未找到有关自动更新Web应用程序的信息,希望您能提供帮助.

我正在构建一个打算像Wordpress或Drupal一样安装的Web应用程序-将其解压缩到目录中,单击某些安装页面,即可开始使用.为了具有广泛的服务器兼容性,有人要求我使用PHP和MySQL-那是** MP吗?无论如何,它必须广泛地跨平台.就上下文而言,这基本上是面向小型企业的统一Web消息传递应用程序.网络邮件,这不是另一个CMS平台.

我想了解有关自我更新Web应用程序的信息.首先,(1)这是一个坏主意吗?从Wordpress 2.7开始,自动更新是一个按钮,这似乎很容易,但是我可以想象有很多方法可能会发生极其严重的错误.而且,是否认为Web进程可写Web文件是一个安全漏洞?

(2)值得花时间开发吗?世界上可能有数以百万计的WP安装,因此值得花费WP团队简化工作并节省全世界数百万工时的时间.我只能想象有几千次安装我的软件–值得花时间投资进行自我升级,还是可以假设足够精通下载和安装Web软件的用户可以通过升级清单? >

如果这不是安全灾难或浪费时间,那么(3)我正在寻找以前做过的任何人的建议.您是否在数据库中保留了版本表?您如何管理数据库升级?在自我更新的Web应用程序的上下文中,您使用什么方法回滚部分升级?使用ORM层会使它变得更容易或更难吗?您是保留版本变更的增量还是每次都炸毁整个内容?

感谢您对此的想法.

解决方案

坦率地说,它确实取决于您的用户群.有大量的PHP应用程序无法自动升级.他们的用户具备足够的技术来处理升级过程,或者只是不升级.

我打算执行两个步骤:

1)认真地问自己,您的用户可能真正需要什么.自我更新是否会为采用提供足够的动力,以证明额外的工作是合理的?如果您确信答案是肯定的,那就去做吧.

由于您在这里询问,我想您可能还不知道.在这种情况下,我打算使用步骤2:

2)发行没有该功能的1.0版.等待用户反馈.您的用户可能会立即要求更简单的升级过程,在这种情况下,您应该优先考虑它.或者,您可能会发现您的用户对其他某些功能的关注更大.

在不询问用户的情况下猜测用户的需求是一种在人们实际上不需要的东西上浪费大量开发时间的好方法.

It is pretty standard practice now for desktop applications to be self-updating. On the Mac, every non-Apple program that uses Sparkle in my book is an instant win. For Windows developers, this has already been discussed at length. I have not yet found information on self-updating web applications, and I hope you can help.

I am building a web application that is meant to be installed like Wordpress or Drupal - unzip it in a directory, hit some install page, and it's ready to go. In order to have broad server compatibility, I've been asked to use PHP and MySQL -- is that **MP? In any event, it has to be broadly cross-platform. For context, this is basically a unified web messaging application for small businesses. It's not another CMS platform, think webmail.

I want to know about self-updating web applications. First of all, (1) is this a bad idea? As of Wordpress 2.7 the automatic update is a single button, which seems easy, and yet I can imagine so many ways this could go terribly, terribly wrong. Also, isn't the idea that the web files are writable by the web process a security hole?

(2) Is it worth the development time? There are probably millions of WP installs in the world, so it's probably worth the time it took the WP team to make it easy, saving millions of man hours worldwide. I can only imagine a few thousand installs of my software -- is building self-upgrade worth the time investment, or can I assume that users sophisticated enough to download and install web software in the first place could go through an upgrade checklist?

If it's not a security disaster or waste of time, then (3) I'm looking for suggestions from anyone who has done it before. Do you keep a version table in your database? How do you manage DB upgrades? What method do you use for rolling back a partial upgrade in the context of a self-updating web application? Did using an ORM layer make it easier or harder? Do you keep a delta of version changes or do you just blow out the whole thing every time?

I appreciate your thoughts on this.

解决方案

Frankly, it really does depend on your userbase. There are tons of PHP applications that don't automatically upgrade themselves. Their users are either technical enough to handle the upgrade process, or just don't upgrade.

I purpose two steps:

1) Seriously ask yourself what your users are likely to really need. Will self-updating provide enough of a boost to adoption to justify the additional work? If you're confident the answer is yes, just do it.

Since you're asking here, I'd guess that you don't know yet. In that case, I purpose step 2:

2) Release version 1.0 without the feature. Wait for user feedback. Your users may immediately cry for a simpler upgrade process, in which case you should prioritize it. Alternately, you may find that your users are much more concerned with some other feature.

Guessing at what your users want without asking them is a good way to waste a lot of development time on things people don't actually need.

这篇关于自我更新PHP + MySQL应用程序的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆