如何将应用程序扩展到多个公司

时间:2021-12-30 20:12:19

The company I'm working for has an ERP software, or better, a home incident management application, for repair companies which in turn attend to requests from insurance companies.

我正在为之工作的公司有一个ERP软件,或更好的家庭事件管理应用程序,用于维修公司,后者又负责保险公司的请求。

There are a lot of repair companies using our application, which was copied from a standard and customized for their particular needs.

有很多维修公司正在使用我们的应用程序,这些公司是从标准中复制而成,以满足他们的特定需求。

That's a nightmare for updating and scaling it!

这是更新和扩展它的噩梦!

I'd like to know about good approaches to optimizing this: same application instance with inherited classes for each company? would interfaces fit here? How could we deal with a centralized application in different servers? We don't want to use only one server for all.

我想知道优化这个的好方法:每个公司都有继承类的相同应用程序实例?接口适合这里吗?我们如何处理不同服务器中的集中式应用程序?我们不想只使用一台服务器。

1 个解决方案

#1


0  

I use Java, Spring and OO for configurability & extensibility. Applications normally have "config" tables with properties, but the need for configurability normally extends beyond what properties can easily configure.

我使用Java,Spring和OO来实现可配置性和可扩展性。应用程序通常具有带有属性的“配置”表,但对可配置性的需求通常超出了属性可以轻松配置的范围。

This is really the domain where OO programming languages, full control of the container, and powerful frameworks -- such as Spring, for configuration/dependency injection & Hibernate for ORM mapping -- come into their own.

这实际上是OO编程语言,容器的完全控制以及强大的框架(例如Spring,用于配置/依赖注入和Hibernate用于ORM映射)的领域。

You can "try" to do all this in PHP, but with 20+ years experience in all languages -- and no disrespect intended -- for a serious product you might need to consider moving towards a serious language.

您可以“尝试”在PHP中完成所有这些工作,但是在所有语言方面拥有20多年的经验 - 并且没有任何不尊重的意图 - 对于一个严肃的产品,您可能需要考虑转向严肃的语言。

As to what you'll actually need to do:

至于你真正需要做什么:

  1. Configuration table & admin UI for it. These are essentially key-value properties, which your application will use rather than constants, where variability is needed. Caching these is essential for performance, so having control of the webapp at the server-level is important here.

    配置表和管理员用户界面。这些本质上是键值属性,您的应用程序将使用它而不是常量,需要可变性。缓存这些对性能至关重要,因此在服务器级别控制webapp非常重要。

  2. Strategy Pattern. Algorithms such as calculating tax, building an invoice or interfacing to external systems are implemented as strategies, which are pluggable & configurable. https://en.wikipedia.org/wiki/Strategy_pattern

    战略模式。诸如计算税,建立发票或与外部系统接口等算法被实施为可插拔和可配置的策略。 https://en.wikipedia.org/wiki/Strategy_pattern

  3. XML Bean Configuration/ Dependency Injection. For deployment & algorithm configuration. This layer selects, creates & configures your strategies enabling you to select & parameterize appropriate algorithms for your customer requirements. This is the modularity lives, that lets you you share most codebase between customers but plug in the necessary differences here. In Java we use Spring: http://docs.spring.io/spring/docs/2.5.3/reference/beans.html

    XML Bean配置/依赖注入。用于部署和算法配置。该层选择,创建和配置您的策略,使您能够根据客户需求选择和参数化适当的算法。这是模块化的生命,它允许您在客户之间共享大多数代码库,但在此处插入必要的差异。在Java中我们使用Spring:http://docs.spring.io/spring/docs/2.5.3/reference/beans.html

Building actual software products, that perform & can be configured for diverse customer requirements, is hard. It requires a solid platform, real tools & a moderate chunk of design skills.

构建可以针对不同客户需求执行和配置的实际软件产品很难。它需要一个坚实的平台,真正的工具和适度的设计技能。

The separate issue, not directly related to configurability & strategies, is the multi-tenant application (what @Lee was mentioning). That's where an application runs multiple customers, with different settings, off the same server simultaneously. (I did major infrastructure work, architecture & upgrades on such an app recently). However it's a different question, more complicated still (but only somewhat so) and and not necessary to address in this topic.

与可配置性和策略无直接关系的单独问题是多租户应用程序(@Lee提到的)。这就是应用程序运行多个客户,具有不同的设置,同时在同一服务器上运行。 (我最近在这样的应用程序上做了大型基础设施工作,架构和升级)。然而,这是一个不同的问题,仍然更复杂(但只是稍微如此),并且在本主题中没有必要解决。

My experience is that Java and C# are fast and reliable while PHP is slow, less than highly reliable, and tends to encourage security vulnerabilities. I do a lot of major applications (industrial, Government, financial, software products) with advanced requirements, systems integration & high-performance features -- from compact, to med-large to large-sized apps. So I'm pretty well versed in how to deliver multi-customer products -- and what platforms enable me to deliver good-performing, reliable apps successfully.

我的经验是Java和C#快速可靠,而PHP速度慢,高度可靠,并且往往会鼓励安全漏洞。我做了很多主要的应用程序(工业,*,财务,软件产品),具有高级要求,系统集成和高性能功能 - 从紧凑型到大型到大型应用程序。因此,我非常精通如何提供多客户产品 - 以及哪些平台使我能够成功地提供性能良好,可靠的应用程序。

#1


0  

I use Java, Spring and OO for configurability & extensibility. Applications normally have "config" tables with properties, but the need for configurability normally extends beyond what properties can easily configure.

我使用Java,Spring和OO来实现可配置性和可扩展性。应用程序通常具有带有属性的“配置”表,但对可配置性的需求通常超出了属性可以轻松配置的范围。

This is really the domain where OO programming languages, full control of the container, and powerful frameworks -- such as Spring, for configuration/dependency injection & Hibernate for ORM mapping -- come into their own.

这实际上是OO编程语言,容器的完全控制以及强大的框架(例如Spring,用于配置/依赖注入和Hibernate用于ORM映射)的领域。

You can "try" to do all this in PHP, but with 20+ years experience in all languages -- and no disrespect intended -- for a serious product you might need to consider moving towards a serious language.

您可以“尝试”在PHP中完成所有这些工作,但是在所有语言方面拥有20多年的经验 - 并且没有任何不尊重的意图 - 对于一个严肃的产品,您可能需要考虑转向严肃的语言。

As to what you'll actually need to do:

至于你真正需要做什么:

  1. Configuration table & admin UI for it. These are essentially key-value properties, which your application will use rather than constants, where variability is needed. Caching these is essential for performance, so having control of the webapp at the server-level is important here.

    配置表和管理员用户界面。这些本质上是键值属性,您的应用程序将使用它而不是常量,需要可变性。缓存这些对性能至关重要,因此在服务器级别控制webapp非常重要。

  2. Strategy Pattern. Algorithms such as calculating tax, building an invoice or interfacing to external systems are implemented as strategies, which are pluggable & configurable. https://en.wikipedia.org/wiki/Strategy_pattern

    战略模式。诸如计算税,建立发票或与外部系统接口等算法被实施为可插拔和可配置的策略。 https://en.wikipedia.org/wiki/Strategy_pattern

  3. XML Bean Configuration/ Dependency Injection. For deployment & algorithm configuration. This layer selects, creates & configures your strategies enabling you to select & parameterize appropriate algorithms for your customer requirements. This is the modularity lives, that lets you you share most codebase between customers but plug in the necessary differences here. In Java we use Spring: http://docs.spring.io/spring/docs/2.5.3/reference/beans.html

    XML Bean配置/依赖注入。用于部署和算法配置。该层选择,创建和配置您的策略,使您能够根据客户需求选择和参数化适当的算法。这是模块化的生命,它允许您在客户之间共享大多数代码库,但在此处插入必要的差异。在Java中我们使用Spring:http://docs.spring.io/spring/docs/2.5.3/reference/beans.html

Building actual software products, that perform & can be configured for diverse customer requirements, is hard. It requires a solid platform, real tools & a moderate chunk of design skills.

构建可以针对不同客户需求执行和配置的实际软件产品很难。它需要一个坚实的平台,真正的工具和适度的设计技能。

The separate issue, not directly related to configurability & strategies, is the multi-tenant application (what @Lee was mentioning). That's where an application runs multiple customers, with different settings, off the same server simultaneously. (I did major infrastructure work, architecture & upgrades on such an app recently). However it's a different question, more complicated still (but only somewhat so) and and not necessary to address in this topic.

与可配置性和策略无直接关系的单独问题是多租户应用程序(@Lee提到的)。这就是应用程序运行多个客户,具有不同的设置,同时在同一服务器上运行。 (我最近在这样的应用程序上做了大型基础设施工作,架构和升级)。然而,这是一个不同的问题,仍然更复杂(但只是稍微如此),并且在本主题中没有必要解决。

My experience is that Java and C# are fast and reliable while PHP is slow, less than highly reliable, and tends to encourage security vulnerabilities. I do a lot of major applications (industrial, Government, financial, software products) with advanced requirements, systems integration & high-performance features -- from compact, to med-large to large-sized apps. So I'm pretty well versed in how to deliver multi-customer products -- and what platforms enable me to deliver good-performing, reliable apps successfully.

我的经验是Java和C#快速可靠,而PHP速度慢,高度可靠,并且往往会鼓励安全漏洞。我做了很多主要的应用程序(工业,*,财务,软件产品),具有高级要求,系统集成和高性能功能 - 从紧凑型到大型到大型应用程序。因此,我非常精通如何提供多客户产品 - 以及哪些平台使我能够成功地提供性能良好,可靠的应用程序。