I'm writing an application in WinForms and wondered whether to use an IoC or a Container.
What we're writing is a text-editor for our home grown BASIC style language for calculating fees etc. Its something like Notepad++ but not as much functionality and a debugger.
I'm wondering whether I should be using a Container or an IoC and which I should opt for. Being a WinForms application and having to do quite a few things at startup (Loading syntax engine, UI configuration etc) do you think I can even use an IoC?
With a container, I can make it a static class and just do Container.GetInstance() but I can't see how one could wire up an IoC when some classes will depend on others etc.
I also have quite a number of commands that I want to use the COmmand Pattern for, so define an ICommand and extend with ITextCommand, IFormulaCalculationCommand, IDebugCommand for specific areas. How would I even use IoC to say get the active document within a Tab from one of those commands?
Its all very confusing to me right now and I apologise.
Here's a few short questions if you can't answer the above cleanly :)
- What's the fastest and simplest Container (ServiceContainer?)
- Would you recommend an IoC like Autofac for this Windows Forms project?
- Can you implement IoC and still use the command pattern to invoke commands and get teh active document being edited etc?