ASP.NET MVC Interview Questions
A friend of mine had to hire a developer to implement a web based system in ASP.NET MVC. Since my friend know that I use both ASP.NET MVC, ASP.NET Web API and ASP.NET Core, he asked me about which questions to ask during the interview.
Let me start off with this: I don't believe in check-lists. You cannot find a list of 50 ASP.NET MVC questions, which will reveal if you have the right guy or not. To really show that the interviewee knows something about ASP.NET MVC, you will need to either see code that he/she wrote or even better: let him/her show it to you. Ask the person you are interviewing to show you some code and explain what is going on.
I often read comments from people saying something like "with this approach, you don't know if the person under interview wrote the code or not". Don't worry! If he/she didn't, you will know within the first couple of minutes. When asking for the rationale behind the design choices, people writing the code will be able to answer and the ones showing other peoples code won't.
Depending on the architecture you chose for your MVC app, talking about one or more of the following subjects is a great way to understand how the interviewee think about code.
Model View Controller
Talk about separation of concern. What does the person think about MVC versus similar patterns? Do he/she even know about alternatives?
Dependency Injection
DI is a vital part of MVC (or at least should be). Talk about the advantages and disadvantages of using IoC. Which containers have the person used. Any favorites and why? Remember to ask about object lifecycles and when to use what.
Rendering views
Which view engines have the interviewee used and prefer? Ask about the differences between Razor and single page applications. You might have a good understanding about the differences, but you will be surprised about the weird answers people come up with.
Security
Let's face it. Security is important. Does the person know about authentication and authorization and how to implement it in ASP.NET MVC? Digging into techniques for solving cross site request forgery could be a way to find out how much the interviewee actually knows outside the usual AccountController generated by Visual Studio.
ASP.NET Web API and ASP.NET Core
Do the person you are interviewing know the difference between ASP.NET MVC, ASP.NET Web API and ASP.NET Core? While knowledge about Core isn't a must, it shows you if the person is into new technologies or not.
There you go. A pretty simple list and I'm sure there are lots of other things to talk about as well. In my opinion, digging into details about the details of the API or having people write Razor on a whiteboard, isn't the way to go here. Take 15 minutes to look through the code that the interviewee wrote after the interview instead. Identifying mess in the code, usually show up in the first file you open anyway.