in Education by
Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic (.NET Standard) Data Access Layer for database operations (.NET Standard) Web Application (.NET Core) Xamarin Forms Mobile Xamarin Android Xamarin IOS Xamarin UWP Question: In which layer should i create my MVC controllers as a good design practice for this scenario? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Controllers belong in the web layer as they handle web related activities such as routing, handling incoming http requests, etc. Ask yourself what a controller is meant to do and then see which layer those activities make sense in... does handling incoming http requests make the most sense in a data layer? no, the data layer should be related to data I/O. Does handling incoming http requests make the most sense in a business logic layer? no, the business logic should contain logic only needed to do the business/domain logic of what you're building. Does handling incoming http requests make the most sense in a web layer? Well yes, http requests are part of the web as we know it. There is an awful lot of information about n tier (aka onion) architecture on the web. Here is one example I quickly dug up that goes into more detail than my answer above

Related questions

0 votes
    Description: I have a solution in Visual Studio which has multiple projects as application layers. Business Logic ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have two submit buttons and a few textboxes on my page. When I enter details in the textbox and hit ... model.FirsttName) @Html.TextBoxFor(model => model.LastName) Get History...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have an XML document which basically looks like this: SomeSeller 2535 Now I'm trying to parse the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I am developing solution where there are three webapi projcets. Each of them is secured with JWT tokens ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I am developing solution where there are three webapi projcets. Each of them is secured with JWT tokens ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have batch of user accounts and every user account's password is not crypted.I want to insert to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I have implemented exception handling as mentioned in below link How to pass error message to error view in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I want pass values from my view to a controller action however every time i do the parameter is null ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I want pass values from my view to a controller action however every time i do the parameter is null ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I've started to work a bit with master pages for an ASP.net mvc site and I've come across a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    I've started to work a bit with master pages for an ASP.net mvc site and I've come across a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    If I want to use the validation framework that you can use with ASP.NET MVC, will the JavaScript ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Say I have a page that display search results. I search for stackoverflow and it returns 5000 results, 10 per page. Now I ... was posted previously etc.. What I'd like to do is...
asked Mar 23, 2022 in Education by JackTerrance
...