I have a base applicaiton that will evolve. Right now UI includes BLL. DAL is a separate library that serves its purpose.
I dont have time to do everything right now, so i want to bypass patterns that help with decoupling (IoC , DI as i have been proposed here).
I would like to create my BLL and have a reference for the DAL directly. This will give me the opportunity to start creating separate UIs that i need now.
My question is can i do it? Can i focus right now in creating my 3 layers and gradually apply design patterns to make my code better?
Added Info:
I have the luxury of the time because my first app will not be used during the development of the second one. So i will have the time to optimize my coding structure. The question what i can do know to split UI into UI + BLL as effective as i can . On my mind is that i will just move the DAL init in BLL and put in UI the BLL init. Is there something else i can do that it will help me more when applying IoC/DI later on?
You can set up "poor man's dependency injection", using this kind of structure:
public class MyEndClass
{
private readonly IDependency dependency;
public MyEndClass(IDependency dependency)
{
this.dependency = dependency;
}
// temporary constructor until we introduce IoC
public MyEndClass() : this(new Dependency())
{
}
}