Architecting related products for different markets: MEF?

Hopefully, this question is not too open-ended…

I have been tasked with taking a 3 year old application (.NET 4.0, WPF, WCF, EF 4, SQL 2008) that was designed for a very specific market X and “re-purposing” it for a another very specific market Y.

To further complicate things, the company has also mentioned a third market Z, but that may be a year+ down the road. But it’s definitely coming.

The deadline for getting the application Y ready for market is aggressive. It might be negotiable, but just assume it’s a matter of 2-3 months.

I have been working at the company for a while, and I was very intimately involved with the initial creation of application X, and I am still involved with the maintenance.

The new “application” Y is interesting because there is some “overlap” between the features required for X and Y.

For example, let A, B, C, D, and E be features and let ‘ (prime) denote an enhancement to a feature. All of the following scenarios are valid:

---X---|---Y---  …  ---Z--- (down the road)
   A   |   A
   B   |   B’
   C’  |   C
       |   D
   E   |

Some features can be merged from X to Y as-is (A). Some features from X must be enhanced before they can be merged into Y (B). Some features in X will not be in Y at all (E), and Y will contain features that are not in X (D). You get the idea.

Here are my questions:

(1) In the eyes of upper management, they ultimately see 3 different applications – one for each market: X, Y, Z. Moreover, they see 3 different copies of the same feature A that will need to go into each application. As discussed, there may be some enhancements that will make it to select products, but at the core, they are nearly identical.

Sometimes I’m guilty for finding excuses to use the latest programming trends, BUT I think there’s a strong business case here for utilizing the Managed Extensibility Framework (MEF). Why have 3 different physical applications (and hence 3 code bases) when it could really be one “next generation” application with plug-able features through something like MEF? There are several benefits that something like MEF could bring to the table.

Does an extensibility solution like MEF seem valid in a case like this?

(2) Given the limited time to get application Y to market…

(a) Should I go with a conservative approach and simply give management what they’re asking for, i.e. make a deep copy of X and modify it for Y? Perhaps there will be time after Y goes to market to develop a more ideal and extensible solution? My past experience with this company has seen demos become fully-fledged products within no time – if you get my drift 😉

It could very well be more difficult to modify X code to make it work for Y rather than it would be to create Y from scratch and import X features.

(b) Leaving X alone for now, should I create Y with MEF in mind. Features from X can easily be imported into Y. If this is done properly, Z should be easy to implement. It will probably be a risky undertaking to go back and address X to fit into this framework since it’s so widely used, but it could be done on the side with no specific deadline.

I have to pitch this to upper management. Any advice or thoughts?

Some thoughts:

  1. Upper management very likely doesn’t know or care what MEF is. If asked, they’d likely want to know that it will get them a solution sooner and cheaper than otherwise. That’s a tough promise to keep if you are still learning the framework.
  2. Do you really want to be learning a new framework at the same time you’re implementing Y with “an aggressive deadline”?
  3. Regarding Z in a year – what if “definitely coming” turns into “maybe someday?” or “never”?

My recommendation would be to implement your choice (2)(a) – give the folks who sign your paycheck what they ask for. Copy X into Y and revise. Naturally, this isn’t an ongoing pattern.

Learn MEF on the side with no specific deadline. That way you’re not risking your deadlines and you can afford to make mistakes as you climb the learning curve.

If/when Z becomes a real project, you’ll be in a good position to implement it with ‘known technology’ and probably refactor the other two into a more general solution.

1

Using MEF does not magically turn your application into a collection of composable components.

The code first has to be structured to have sufficiently loose coupling between the different parts, which probably requires quite a bit of refactoring. Sometimes it’s almost a rewrite if you didn’t care for loose coupling before.

Once your codebase is structured to support composing features, the technology you use for composing does not have that much impact. It’s only there to create objects and wire them up to each other. MEF isn’t necessarily the only choice for composing “components”. A dependency injection container like Autofac also does that (with better features for composition of “components” within a single codebase, but no dynamic loading of plugins).

So i’d suggest to learn about the requirements for composability on your codebase first (i think Dependency Injection in .NET is a good book on that – it also covers MEF), pay special attention to them while creating new features and slowly refactor exisiting features. Once you can compose the most important parts you can pick a technology for doing so.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật