Tag Info

Hot answers tagged

7

Basically, you have two issues here: E-mails are dispatched from presentation layer, The API is tied up to physical e-mail implementation. The first issue is solved by the first step of moving the code where it belongs: in business layer. You shouldn't save companies from presentation layer, and you shouldn't send e-mails from there: move all this code ...


6

In my applications I have always separated things out, with different models for the database (Entity Framework) and MVC. I have separated these out into different projects too: Example.Entities - contains my entities for EF and the DB context for accessing them. Example.Models - contains MVC models. Example.Web - web application. Depends on both ...


2

I would say it really depends on your application. Is it just doing pure CRUD, without any business logic? Then I would use EF models directly in my views. Most of the time there is at least some business logic involved and then a layer between the data/EF models and the view might be a good idea. In this case it might be appropriate to do "CQRS-lite" (see ...


2

Well... you can't. Not directly at least - if you could it would have been a major security breach. You can, however, use an embedded-in-page program - like a Flash application or a Java Applet - to run these commands. Take a note there is still some security hurdles you need to jump - Java Applets, for example, need to be signed and granted special ...


2

Depending on your setup, email can occasionally take an unreasonable quantity of time to respond, and it can fail ambiguously and need retries. So I would suggest that this is one of the times when a service is in order. Either in the form of a service of your own, or of an SMTP server you have control over. The local SMTP server presents a better-known ...


2

First, an alternative to consider... After many years of designing and implementing web services (and inheriting some rather sub-par implementations as well), I've reached a conclusion that some others have as well: Avoid nested resource paths. Matthew Beale's Suggested REST API Practices article explains the reasoning behind this. (Look in the First-class ...


1

I've found that there is way more repetition of code in a WebForms application than is immediately noticeable. I've been banging my head with this exact problem, and I've come up with several remedies. DRY Up Your UserControls (And Models, Too!) When you look at each individual page, you see so many differences that you can't possibly imagine code is being ...



Only top voted, non community-wiki answers of a minimum length are eligible