Pregunta

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.

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.

¿Fue útil?

Solución

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.

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.

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.

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.

  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

  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

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.

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top