156 reputation
7
bio website jeffijoe.com
location Sonderborg, Denmark
age 19
visits member for 3 years, 2 months
seen Jun 18 at 6:03

I work with C#, ASP.NET MVC, HTML(5), CSS, and JavaScript at www.MemberLink.com

http://www.Twitter.com/Jeffijoe


Aug
30
comment Fastest way to set up a JSON server on my local machine
Sails.js is easy to set up, runs on Node.
May
21
comment Is it completely impossible to have total separation without leakage of any kind in a design?
Yes, you're probably right, I just don't know how to do it right.
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
Because then one service depends on a specific implementation of the other - the idea is that all dependencies are being managed at the composition root.
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
But the services dont instantiate other services
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
@ErikReppen It's critical because if each service has it's own Unit of Work, and one service calls the other, problems will arise since the objects are being tracked by 2 UoW's, which I've heard is not good (EF does not appear to like it).
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
But if I have 2 services, where 1 uses the other, should they each have their own unit of work?
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
The reason I need to reuse them across services, is when service1 calls service2. :)
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
Defining the architecture; that Service needs UnitOfWork and Repository, and Repository needs UnitOfWork is all clean and stuff, but consuming it from different application types is the problem.. Again, unless I am totally mental.
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
@Euphoric Thanks for acknowledging that for me :P
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
My problem is that any application that wants to use ICustomerService needs to provide a Unit of Work and a Repository at the time the Customer Service is constructed. An ASP.NET MVC constructs a new controller for every web request, and the controller wants a customer service, so it is instantiated, all behind the scenes. This magic is not given to us in, say Winforms, right? We'd have to explicitly call our IoC container to build the dependency chain whenever we want to create a sub form.
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
The problem should be common to any kind of application, unless I am completely stupid. Say my ASP.NET controller takes a ICustomerService as a ctor parameter. The CustomerServiceImpl takes an ICustomerRepository and an IUnitOfWork as a parameter. The CustomerRepositoryImpl needs the same IUnitOfWork instance as the service does, else they would be working on different contexts/sessions.
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
@Bill Yes, you are right, I want all my logic in the services, and yes, the different app UI's would interact with the services - but the services need a Unit of Work, and each application type determines when (a new) one is started and disposed, right?
May
20
comment Is it completely impossible to have total separation without leakage of any kind in a design?
Yes, you are absolutely right - the problem is, however, how can I make sure that all my services and all my repositories are working with the same Unit of Work instance? That's the real problem I am facing.
Feb
27
comment What kind of abstraction/SoC should I use here?
This was the answer I was hoping to get! I will probably be using NHibernate for this, as it does exactly what I need, is pretty fast, easy to set up, and easy to map, but will definitely keep Dapper in mind! Thank you!
Feb
27
comment What kind of abstraction/SoC should I use here?
@GregSmith - Because the project I am starting, will very likely be reused & integrated somewhere else, that uses another database. Therefore I would love it if I could just reference my business & model projects, and plug in a new DAL repository.
Feb
27
comment What kind of abstraction/SoC should I use here?
@AdrianThompsonPhillips - so basically NoSQL? My boss like SQL Server and Azure Table Storage.
Jul
19
comment Making the logical jump from complete noob to developer?
+1 for the "could I make this"!