Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good C# ASP.NET MVC question to ask a prospective employee? [closed]

Tags:

c#

asp.net-mvc

I am about to employ a new programmer for our ASP.NET MVC projects. I put a lot of weight in an interview as to just how much I like a candidate's attitude and how I see them working with, talking to and enjoying being part of the team, but on a more practical note I need to weedle out those who talk a good game from those who actually have ability to adapt and overcome programming problems day to day.

Can anyone suggest any good short questions/exercises (preferably in C#) to separate the smart candidates from the good talkers?

UPDATE - Many thanks to all who answered, I have chosen the most voted for in traditional StackOverlfow manner, but still thanks for all the other suggestions.

like image 578
Richard Avatar asked May 14 '09 20:05

Richard


3 Answers

Which letter from MVC acronym should be responsible for performing the following features in online shop web application:

  • calculating the total amount to pay for items in cart (M)
  • build an html table of items to purchase (V)
  • redirecting not authenticated users to the page where they can enter billing information (C)

etc.

like image 187
bbmud Avatar answered Oct 18 '22 21:10

bbmud


Questions Which may be asked in ASP.Net MVC Interview.

1- what is ASP.Net MVC?

2- What is Razor?

3- What is TDD?

4- What is BDD?

5- What is Dependency Injection (DI)?

6- What is ViewData and ViewBag?

7- In which assembly is the MVC framework defined?

8- What does Model, View and Controller represent in an MVC application?

9- What are the advantages of ASP.NET MVC?

10- Which approach provides better support for test driven development - ASP.NET MVC or ASP.NET Webforms?

11- Name of different return types of a controller action method?

12- What is the significance of NonActionAttribute?

13- Is it possible to share a view across multiple controllers?

14- What is the role of a controller in an MVC application?

15- Where are the routing rules defined in an asp.net MVC application?

16- What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

17- ASP.NET MVC application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?

18- What is the adavantage of using ASP.NET routing?

19- What are the 3 things that are needed to specify a route?

20- What is the use of the following default route?

21- What is the difference between adding routes, to a webforms application and to an mvc application?

22- How do you handle variable number of segments in a route definition?

23- What are the 2 ways of adding constraints to a route?

24- Give 2 examples for scenarios when routing is not applied?

25- What is the use of action filters in an MVC application?

26- If I have multiple filters impleted, what is the order in which these filters get executed?

27- What are the different types of filters, in an asp.net mvc application?

28-Give an example for Authorization filters in an asp.net mvc application?

29- Which filter executes first in an asp.net mvc application?

30- What are the levels at which filters can be applied in an asp.net mvc application?

31- Is it possible to create a custom filter?

32- What filters are executed in the end?

33- Is it possible to cancel filter execution?

34- What type of filter does OutputCacheAttribute class represents?

35- What are the 2 popular asp.net mvc view engines? 36- What symbol would you use to denote, the start of a code block in razor views?

37-What symbol would you use to denote, the start of a code block in aspx views?

38- In razor syntax, what is the escape sequence character for @ symbol?

39- When using razor views, do you have to take any special steps to proctect your asp.net mvc application from cross site scripting (XSS) attacks?

40- What is asp.net master pages equivalent, when using razor views?

41- What are sections?

42- What are the file extensions for razor views?

43- How do you specify comments using razor syntax?

44-What's the deal with values parameter in ASP.NET MVC?

45- What website hosting is good for ASP.NET MVC?

46- What is Area in Asp.Net MVC projects and how to implement area in ASP.Net Projects/

47- How to Use Session in ASP.Net mVC Projects?

48- How to persist data from one page to another page in ASP.Net application?

49- What is Tempdata?

50- What is JSON?

51-What is Lambda Expression?

like image 26
dubey001abhay Avatar answered Oct 18 '22 20:10

dubey001abhay


First things first. Do they even know what MVC. Not just the TLA (three letter acronym) but can they describe it to you. Then what are the benefits. Also it doesn't hurt to ask them their opinion on it. It is good to know if they even like MVC frameworks.

Next, ask them if they have used any other MVC frameworks. Struts, Spring MVC, Zend or anything like that.

Ask them if they know when a session starts, the general state problem on the net etc etc.

Also a little bit of database. Ask them if they have any experience with database persistence layers.

Then just because you can ask a hard technical question, ask them to write a function that compares two binary trees both in value and structure to see if they are identicial.

like image 31
uriDium Avatar answered Oct 18 '22 20:10

uriDium