Miyagi Coder
Miyagi Coder

Reputation: 5532

IoC/DI Container in a Windows Mobile Appication

Should I have any concerns about using a IoC/DI Container, specifically ninject, in a windows mobile app using the compact framework 3.5?

Upvotes: 1

Views: 670

Answers (3)

user96973
user96973

Reputation: 11

I have tested ninject and has been satisfied with that. I haven't used it in production yet.

Upvotes: 1

Chris Brandsma
Chris Brandsma

Reputation: 11736

The OpenNetCf.net group has an IoC for Mobile here http://ioc.codeplex.com/

The main concern is about how much reflection you force the IoC to perform on your app. Reflection is expensive. If you use a little: no problem, if you use a lot, you could have startup issues.

Personally, I use a variation of Ayende's 15 line IoC in my code.

http://ayende.com/Blog/archive/2007/10/20/Building-an-IoC-container-in-15-lines-of-code.aspx

Upvotes: 3

Paul Sasik
Paul Sasik

Reputation: 81509

i am using DI with a CF 2.0 project and haven't seen any issues performance-wise. Or any other issues for that matter. But my DI approach is fairly straightforward in that i look for a particular interface in a DLL specified in a config file and then load it. i'm not sure what kind of overhead ninject would introduce on a compact platform.

Upvotes: 1

Related Questions