All Questions

18
votes
1answers
7158 views

Servicestack - architecture & reusing POCOs for everything

I refer to ServiceStack documentation reg use of POCOs: Since it promotes clean, re-usable code, ServiceStack has always encouraged the use of code-first POCO's for just about everything. i.e...
80
votes
4answers
22936 views

How to map View Model back to Domain Model in a POST action?

Every article found in the Internet on using ViewModels and utilizing Automapper gives the guidelines of the "Controller -> View" direction mapping. You take a domain model along with all Select List...
46
votes
7answers
9736 views

MVC: Data Models and View Models

I've read some MVC advice in the past regarding models stating that you should not reuse the same model objects for the domain and the view; but I haven't been able to find anyone willing to discuss w...
0
votes
1answers
865 views

Construct testable business layer logic

I am building an applications in .net/c#/Entity Framework that uses a layered architecture. The applications interface to the outside world is a WCF service Layer. Underneath this layer I have the BL,...
14
votes
2answers
4276 views

What to put in your ViewModel

And what do you put in your View? A recent blog from Scott Hanselman about using a special model binder for easier testing led me to think about the following: What do you put in your controller logi...
11
votes
5answers
4999 views

ASP.NET MVC - separating large app

I've been puzzled by what I consider a contradiction in terms: ASP.NET MVC claims to be furthering and supporting the "separation of concern" motto, which I find a great idea. However, it seems there...
9
votes
1answers
9725 views

Using Unity, how do you register type mappings for generics?

I'm trying to implement a repository solution for Entity Framework but I am having trouble registering the types that include generics using Unity. Given: // IRepository interface public i...
1
votes
2answers
545 views

Angular2 - Module Separation - Best Practice

I have some Angular 2 services that have identical methods for parsing the json response, handling errors etc (eg. trapping if it's a 422 error for example). Obviously I don't want these methods copy...
18
votes
1answers
6826 views

When to use JavaScript template engines?

Here is an example of JavaScript template from Ben Nadel's demo single page long-lived AJAX application taken from: [source] <script id="contact-list-item-template" type="application/template">...
19
votes
1answers
3168 views

How does Clojure aproach Separation of Concerns?

How does Clojure aproach Separation of Concerns ? Since code is data, functions can be passed as parameters and used as returns... And, since there is that principle "Better 1000 functions that work ...

Previous Next