views:

91

answers:

3

Many poeple have online startups in their head that may potentially attracts millions, but most of the time you will only have minimal budget (time and resource) to start with so you want to have it delivered within a year's time. Short after launch, you are bound to perform one or a series of upgrades that may include: code refactor to newer foundation, adding hierarchy(ies) in software architecture or restructure database(s). This cycle of upgrade/refactor continues as:

  • New features avaiable in latest version of the language(s)/framework(s) you use.
  • Availability of new components/frameworks/plugins that may potentially improve the product.
  • Requirement has changes it's direction, existing product wasn't designed to cope with new needs.

With above as prerequisite, I want to take this discussion serious and identify the essence of an upgradable solution for a web application. In the discussion you may talk about any stages of development (initial, early upgrade, incremental upgardes) and cover one of more of the following:

  • Choice of language(s) for a web application.
  • Decision for using a framework or not? (Consider the overhead)
  • Choice of DBMS and its design
  • Choice of hardware(s) and setups?
  • Strategy to constant changes in requirements (, which can be a natural of web application)
  • Strategy/decision toward total redesign
+1  A: 

To get the ball rolling, I'd have thought a language/framework that supports the concept of dependency injection (or Inversion of Control as is seems to be called these days) would be high on the list.

middaparka
Note: IoC is *not* Dependency Injection. DI is a "kind of" IoC. See http://garyshortor.web140.discountasp.net/blog/archive/2008/02/05/inversion-of-control-not-di.aspx
VonC
@VonC - You live and learn. :-) Thanks for the heads up.
middaparka
http://bradleyboveinis.com/post/2009/09/03/Inversion-of-Control-vs-Dependency-Injection.aspx is interesting too, on that side-topic that is "DI and IoC"
VonC
+6  A: 

Our company's web solution is on its fourth major generation, having evolved considerably over the past 8 years. The most recent generation introduced a broad variety of constructs to help with exactly this task as it was becoming unwieldy to update the previous generation based on new customer demands. Thus, I spent quite a bit of time in 2009 thinking about exactly this problem.

The single most valuable thing you can do is to employ an Agile approach to building software. In particular, you should maintain an environment in which a new build can be (and is) created daily. While daily builds are only one aspect of Agile, this is the practice that is most important in addressing your question. While this isn't the same thing as upgradeability, per se, it nonetheless introduces a discipline into the process that helps reduce the chance that your code base will become unwieldy (or that you'll become an Architect Astronaut).

As far as frameworks and languages go, there are two primary requirements: that the framework be long-lived and stable and that the environment support a Separation of Concerns. ASP.NET has worked well for me in this regard: it has evolved in a rational manner and without discontinuities that invalidate older code. I use a separate Business Logic Layer to manage SoC but ASP.NET does now support MVC development as well. In contrast, I came to dislike PHP after a few months working with it because it just seemed to encourage messy practices that would endanger future upgrades.

With respect to DBMS selection, any modern RDMS (SQL Server, MySQL, Oracle) would serve you well. Here is the key though: you will need to maintain DDL scripts for managing upgrades. It is just a fact of life. So, how do you make this a tractable process? The single most valuable tool from any third-party developer is my copy of SQL Compare from Red Gate. This process used to be a complete nightmare and a significant drag on my ability to evolve my code until I found this tool. So, the generic recommendation is to use a database for which a tool exists to compare database structures. SQL Server is just very fortunate in this regard.

Hardware is almost a don't care. You can always move to new hardware as long as your development process includes with a reasonable release build process.

Strategy for constant changes in requirements. Again, see Agile. I'd encourage you not to even think of them as "requirements" any more - in the traditional sense of a large document filled with specifications. Agile changes that in important ways. I don't keep a requirements document either except when working on contract for an external, paying customer so that I can be assured of appropriate billing and prevent feature creep. At this point, our internal process is so rapid and fluid that the reports from our feature request/bug management software (FogBugz if you want to know) serves as our documentation when documenting a new release for marketing.

The strategy/decision for total redesign is: don't. If you put a reasonable degree of thought into the process you'll be using, choose mainstream tools, and enforce a Separation of Concerns then nothing short of a complete abandonment of HTTP and RDBMSs should cause a total redesign.

If you are Agile enough that anything can change, you are unlikely to ever be in a position where everything must change.

Mark Brittingham
Great answer :)
the_drow
+1 nice explanation. Further does the changing technology also plays a role in up-gradation approach. For if one sees that a new technology would be available within a year or so should one wait for it or go for an upgrade based on current technology ?
HotTester
HotTester - it would depend on the technology. Typically, I prefer a "wait and see" approach to new technologies only because I've been burned once or twice rushing to support a technology that ends up getting no buy-in from my customers. That being said, I *am* using Visual Studio 2010 (which isn't formally released) and I am *always* looking for new tech - just because I like to.
Mark Brittingham
@HotTester - that should have been "no *early* buy in from my customers"
Mark Brittingham
A: 

You will find out that RDBMS technology is not easily scalable. All vendors will tell you otherwise yet when you try multiple servers and load-balancing the inherent limitations will show up. Everything else can be beefed up with "bigger iron" and may be more efficient code but Databases cannot be split and distributed easily.

Web applications will hopefully drive the innovation in database technologies and help us break out of the archaic Relational Model mind-set. It is long overdue.

I recommend paying a lot of attention to this weak link right from the start.

Square Rig Master