Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
Hi,
I have started learning MVC.
I was making a sample App from One of learning tutorial.
I am used to work with rich ASP.Net Server controls like Grid View, Datalist, Authentication and Validation controls, they are not present in MVC,
When I was adding a View, there was a option for Razor View Engine(cshtml) and genrated views had a extension of cshtml, moreover the generated HTML in views was little scary as it contained HTML objects methods and blah blah...(not like usual asp.net html).
I love c# and code behind and I am not a superb HTML developer. I do it mostly through C#.

So do I have to Learn a bag full of things like Razor view engine, that scary HTML to master MVC??
What are basic prerequisites to learnMVC?
Posted
Updated 12-Mar-18 23:58pm

 
Share this answer
 
Knowing HTML, JavaScript, CSS and obviously C# or VB is all you need to be a good MVC developer.

You shouldn't be doing any web development if you don't know the client part (ie, HTML, CSS, JS; etc). It's true that there are several guys out there that only user asp.net web server controls, but that really limits what you can do.

MVC uses a different approach to development than web forms (where clear separation of concerns and test-ability are important concepts) and this should be where your learning curve should be.

It also helps to know some stuff about how a webserver works internally when you want to do some more advanced stuff.

Just don't be scared. Do it one step at a time and you will get it. Just don't read too much. Practice it.

Lots of highly useful tutorials are to be found here: ALL about MVC[^]
 
Share this answer
 
Hi there,

Obviously you should know C# and HTML for developing web applications in MVC.
MVC open new doors over traditional web forms and server controls you are talking about. MVC uses totally different approach of developing web applications than web forms.
MVC has more clearer architecture than web forms where your business logic and the UI are separated according to its concerns. I.e. Models, Views and Controllers. controllers hold your business logic where your views hold your UI. this was not possible in web forms where you had business logic attached as code behind .cs pages.

other than this, MVC supports TDD(test driven development). Visit this Link[^]

well, these are some basic ideas behind MVC but if your major concern is HTML than don't let Razor and its extension scare you. :)

Razor is just a view engine in MVC. MVC is much more than just a view engine(don't think about MVC without View engine too). You can use .aspx/.ascx file templates of asp.net web forms as your view engine.

Razor is not a programming language but it uses C# syntex for embedding code in a view page(of course you have faced such situations where you wanted to embed some logic inside your HTML page....long years ago..). you can visit this link[^] for more knowledge about Razor

one more good news that ASP.Net MVC 6 includes the feature named as Tag helpers.
TagHelpers[^]

please mark as answer if it helps.


Regards.
 
Share this answer
 
v2
Comments
CHill60 20-May-15 5:06am    
Quote: "please mark as answer if it helps." - OP didn't bother 2 years ago, I doubt they'll bother now

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900