规划可扩展的 Web 应用程序开发

发布于 2024-07-20 18:20:58 字数 47 浏览 8 评论 0原文

在开始开发可扩展的 Web 应用程序之前,应该考虑哪些语言、框架和托管注意事项?

What language, framework, and hosting considerations should one make before starting development of a scalable web application?

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

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

发布评论

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

评论(5

暮光沉寂 2024-07-27 18:20:59

不必将自己与一种语言或框架结合起来。 您网站的某些部分可能比其他部分更适合使用不同的语言和框架。 例如,37signals 的所有站点都基于 Ruby on Rails,但他们最近写了一篇博客文章,介绍了如何使用 Erlang 实际编写一个站点的底层技术,因为这种方式更容易实现并发。

显然,事情在一定程度上会变得混乱,但使用正确的工具来完成工作——即使这意味着不同的工作需要不同的工具——可以简化事情。

Don't necessarily marry yourself to one language or framework. It may be that some parts of your site work better with different languages and frameworks than others. For example, all of 37signals' sites are based on Ruby on Rails, but they recently wrote a blog post about how the underlying technology of one is actually written in Erlang now because it's much easier to do concurrency that way.

Obviously there's a level of complexity where things turn into a mishmash, but using the right tool for the job — even if that means different tools for different jobs — can simplify things.

与酒说心事 2024-07-27 18:20:59

首先就语言而言,这在很大程度上并不重要。 PHP、Java 和 .Net 可能是最大的三个,它们都运行着 Web 上一些最大的网站,因此,不要听任何人告诉您其中一个比其他任何一个更适合的说法。

有些人可能还会将 Ruby 和 Django/Python 放入此列表中。 我并不反对他们,但我不知道有任何大型(比如前 50 名)网站使用其中任何一个。

托管注意事项取决于您想要启动的级别,但基本上顺序是:

  1. 共享;
  2. 虚拟专用服务器;
  3. 投入的。

可扩展性很大程度上取决于应用程序的设计,而不是任何语言、框架或提供商。 高效的数据库模式、Javascript/CSS 的高效交付和使用以及内存中的缓存都是任何语言或框架所共有的问题。

Firstly on language, it largely doesn't matter. PHP, Java and .Net being probably the biggest three are all proven in the sense that they run some of the largest sites on the Web so don't listen to anyone who tells you one is more suited than any of the others.

Some might also put Ruby and Django/Python in this list. I have nothing against them but I'm not aware of any big (say top 50) sites using either.

Hosting considerations depend on how low you want to start but basically the order is:

  1. Shared;
  2. Virtual Private Server;
  3. Dedicated.

Scalability will largely be about your application's design than any language, framework or provider. Efficient database schema, efficient delivery and use of Javascript/CSS and in-memory caching are all issues common to any language or framework.

岁吢 2024-07-27 18:20:59

语言 - 我推荐一些具有良好框架和测试库的语言,例如 Perl 或 Java。

框架——这取决于你打算做什么。 如果您从不允许 FastCGI 的主机开始,最好避免使用 Catalyst 或 Rails 等框架。 这就是我喜欢 CGI::Application(主要是 Perl,但也移植到其他语言)的原因 - 它可以作为 CGI、FastCGI 或 mod_perl 运行。 对于开发来说,它可以从它自己的网络服务器运行。

托管 - 没有什么比您拥有的服务器更好的了。 它可以是您自己的服务器、租用的服务器或虚拟服务器。 但您可以从最便宜的托管开始,当您需要更多托管时,您应该能够负担得起。

Language - I'd recommend something with good frameworks and good testing libraries like Perl or Java.

Framework - it depends on what do you plan to do. If you start with a hosting that does not allow FastCGI, it is best to avoid such frameworks like Catalyst or Rails. That's why I love CGI::Application (primarily Perl, but ported to other languages too) - it can run as CGI, FastCGI or mod_perl. For development it can be run from it's own web server.

Hosting - nothing is better than you own server. It can be your own server, leased server or virtual server. But you can start with cheapest hosting and when you need more, you should be able to afford it.

伪心 2024-07-27 18:20:59

这取决于。

首先查看您的需求(功能或用户定义)(非功能 - 描述您所需系统的方面链接文本

接下来我将澄清拥有可扩展的 Web 应用程序意味着什么。 将其定义为可以明确测试的测试用例(必须支持 X 页面浏览量/秒,响应时间 < Y 秒)。

一旦我把这些部分准备好,我就会看看我的开发团队可以支持什么类型的技能(对于初始项目和正在进行的维护)。 然后找到一些使用类似语言或框架的应用程序案例研究。 如果其他人已经制定了特定的语言/框架规模,那么您很有可能也可以。

最后出去寻找一些支持您选择的语言、框架和要求的托管提供商。

It depends.

Start by looking at your requirements (Functional or user defined) (Non Functional - aspects that describe your desired system link text)

Next I would clarify what it means to have a scalable web application. Define it as test cases that can be clearly tested (must support X page views / second with response time < Y seconds).

Once I had those pieces in place I would look at what type of skills my development team can support (for the intial project and on going maintenance). Then find some case studies of applications out in the wild that use similar language or framework. If someone else has made a specific language / framework scale then chances are good that you can too.

Finally go out and look for some hosting providers that support your chosen language, framework and requirements.

好听的两个字的网名 2024-07-27 18:20:58

最重要的考虑因素是不要过度设计以至于妨碍构建和启动某些东西。 分析瘫痪是生产力、进度和结果的最大阻碍。

是的,做一些计划。 选择一个框架。 完美的框架是不可能找到的,因为它不存在,部分原因是在你构建它之前你不知道你需要什么。 很有可能,如果你选择一些东西,总比什么都不选择要好。

是的,尝试根据您的目标选择灵活的、可互操作的工具。

是的,寻找一个良好的内置功能集,您希望自己在接下来的 6-18 个月内能够使用它。 无论如何,试图超越这一点并不现实,因为大多数项目在第一个版本发布时都会发生很大的变化。

所以,选择你觉得舒服或熟悉的东西。 不要随波逐流,做那些能让你最快、最频繁地获得最好结果的事情。 了解您将来可能必须改变。 因此,无论您现在构建什么,请尝试使用单元测试,以便您可以在需要时进行重构。

如果你正在构建的东西将会非常成功,那么这将是一个很大的问题,而且一旦它赚钱了,就很容易解决这个问题,因为你将能够得到其他人才的帮助。

分享您最终选择的内容以及为什么适合您的情况 - 这也有助于我们向您学习!

The most important consideration is not to over-engineer to the point that it gets in the way of building and launching something. Analysis paralysis is the single biggest inhibitor to productivity, progress and results.

Yes, do some planning. Pick a framework. Perfection in a framework will be impossible to find because it doesn't exist, partially because you don't know what you need until you build it anyways. Chances are, if you pick something, it will be better than picking nothing.

Yes, try to pick flexible, inter-operable tools for where you see yourself going.

Yes, look for a good built-in feature set where you see yourself going in the next 6-18 Months. Trying to look beyond that is not really realistic anyways as most projects change so much anyways going towards the first release.

So, pick what you're comfortable with or what is familiar. Don't follow the crowd, do what gets you the best results, quickest, and often. Understand that you might have to change in the future. So, whatever you build now, try to use unit testing so you can re-factor if ever needed.

If what you're building is going to be super successful, it will be a great problem to have, and an easy one to work on once it's making money as you'll be able to get other talent to help you.

Share what you end up picking and why for your situation -- it helps the us learn from you too!

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