Can someone please explain the difference between ASP.NET MVC & .NET Core 3.1 - asp.net

Hello I have built an application using asp.net MVC, this project is all working well but I am finding a lot of documentation with Stripe has documentation depreciated, however, the documentation is fine for asp.net core
Is it a massive change between the two types, why doesn't it seem to work with my one. I am new to all of this but it doesn't really make a lot of sense to me so please explain in lamens terms and link some articles if it would help :)

I understand your confusion :D I've worked with ASP.NET for very long (since web forms). I'll try to explain to the best of my understanding.
MVC is a design pattern that has seen a lot of success and has been adapted widely by several frameworks. ASP.NET MVC is the dot net implementation of the MCV pattern.
ASP.NET Core is a redesign of ASP.NET with a lot of new features and benefits. The biggest advertised differences is the fact that DOT NET CORE is open source and cross platform.
In an asp.net core web application you will still see the MVC pattern with several improvements since ASP.NET MVC.
If your project works perfectly you don't have to do a complete redesign. The frameworks will keep updating and as developers we need to stay updated but we can't go and redesign every project. New projects are a different story. If you start something new definitely consider using ASP.NET Core.
Here is one of Microsoft's docs that helps understand the difference.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/choose-aspnet-framework?view=aspnetcore-3.1

If you split your application into different projects for the front-end stuff, business logic, and data access, it shouldn't be too painful to port it over. The business and data access code should mostly work the same way. it's just the bit of MVC presentation stuff that will be markedly different.

Related

Best practise to migrate Web Forms to ASP.NET Core MVC

I am trying to migrate a project from classic ASP.Net Web Forms to ASP.NET MVC.
While I have read through http://www.codeproject.com/Articles/38778/ASP-NET-WebForms-and-ASP-NET-MVC-in-Harmony. I have a basic idea on how the code structure, libraries and routing should be done.
For your information, the scope of my existing project is around 400 pages and 300 tables.
On top of my head I have two approaches:
Start from stretch, rewriting the whole system - Obviously this would require intensive work and take a long time. Any change made on existing system would need a duplicate change made to the new system.
Migrate the page one each - I still have a rebuild the entire core library (for accessing db), and get the page migrated one by one. For this I would assume to have two core libraries (new and old) running simultaneously with different pages connect to one of those.
Would anyone have similar experience and advise a proper way to start?
For this complete revamp I may also target at the latest technology - .NET Core and MVC6, by taking these would I have extra advantage, or some blockages I would have to take care of?
Any suggestion and opinions are appreciated. Cheers.
Microsoft is a bit hush hush on the subject but the WebForms engine is probably never going to make its way to ASP.NET Core. One might think that MS is waiting to see if the community is calling for a port, but I think they're trying to kill it discretely (not like Silverlight).
Why? Because it proved to be a bad good idea on the long run, easy to use at first, but extremely complex to master (because of viewstate and page lifecycle), with a tendency to allow average developers to build very tedious application (in french we say steam factories). Also it was very poorly adapted to modern web development (Ajax, unit testing, IoC). They tried to fix it with a couple of tweaks, but the overall architecture is just not adapted to this kind of things. MVC is a treat in comparison!
To answer your question, it's not really possible to migrate WebForms to MVC, because those are quite different architectures, and of course the architecture is what an application sits on top on, so if you change it, you might as well rewrite it from scratch.
What can help you a lot is if your app is divided in tiers (business, data access, UI). If it's not the case, you could start by doing this, properly separating the UI project from the rest. Then you would just have to rewrite the ASP.NET project and not the rest.
There are some useful resources I'd like to share with the StackOverflow community just in case you are having troubles to decide what to do:
modernization of your existing Web Forms app
migration to MVC or Core
or whether to start a new project on Web Forms, MVC and Core.
Here you go:
https://www.telerik.com/blogs/review-of-telerik-toolsets-for-aspnet-web-forms-core
Modernizing ASP.NET Web Forms Applications by Tomáš Herceg (Microsoft MVP ) - https://tomasherceg.com/blog/post/modernizing-asp-net-web-forms-applications-part-1
Migrating Old ASP.NET Applications to .NET Core by Edi Wang (Microsoft MVP) - https://edi.wang/post/2018/10/31/migrating-old-aspnet-applications-to-net-core
Choose between ASP.NET and ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/fundamentals/choose-aspnet-framework?view=aspnetcore-3.1
Migrate from ASP.NET to ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-3.1
i have come across below links
https://www.youtube.com/watch?v=CZuqMrWSano
https://www.dotvvm.com/blog/59/Modernizing-ASP-NET-Web-Forms-applications-with-DotVVM
DotVVM package helps us to migrate ASP.Net Web Forms migration to ASP.NET Core without re-writting completely.
i have not tried any production application. still have tried some sample pages. you can try this out.
I can agree that for many cases a re-write of an ASP.NET application where WebForms is used widely may do not provide any business value.
Therefore we decided to use our experience with ASP NET WebForms to develop a highly compatible port of WebForms for ASP NET Core / .NET 6.0.
We use the solution in our own ASP NET WebForms-based products and projects as well as a licensable component library.
So the Forms can still be used and you can focus on the .NET CORE/6 migration.

learning web app development with asp.net

I have been doing windows applications using c#.
But recently our management has planned to make some of the projects to be web based.
We thought of using asp.net with c#.
Can anybody guide me on effectively learning asp.net.
pls provide some useful links for sample projects.
Thanks in advance.
Web Forms would be a quicker route if your used to desktop development (over microsoft MVC). MVC3 is my preference but takes a bit longer to get used to if your not familiar with it. MVC3 gives you more control over your code and in my oppinion is less bloated.
May be worth looking into the MVC pattern if you go down this route.
Loads of videos to get you started here: http://www.asp.net/web-forms
They have a couple of example applications you can work through:
Web Forms: Contoso University App
MVC: MVC3 Starter App
as simple as this: http://www.asp.net
I'd recommend to start with ASP.Net MVC even you'll find it a bit complex in the beginning , Here you can find a lot of tutorials and books
you can also take a look at the MVC Music Store , it is a complete project to learn ASP.Net MVC by example.
I would steer clear of WebForms - even though it may seem a more natural fit coming from your WinForms background, you will run into issues later on. Given that you're going to have to learn a new platform anyway, makes sense to learn MVC and get off on the right foot (note that there are alternative MVC frameworks to ASP.NET MVC such as Fubu but these are probably riskier options in your situation).
PluralSight do some good online training courses, though you do need to pay for them.

ASP.NET MVC Experiences/Success Stories [2010]

At the moment we're evaluating whether it's worth it to start using ASP.NET MVC in combination with Visual Studio 2010.
I've been searching the web for experiences developers have had with working with ASP.NET MVC. I can't seem to find any. So I decided to post a question here.
Are there any people out there that have used ASP.NET-MVC for serious development? What are the experiences so far? Does ASP.NET-MVC help or hinder projects? Do you deliver your project on time? Does ASP.NET-MVC save you time or does it make you go over time and over budget?
And then the big question: Now that you've been working with ASP.NET MVC for a while, do you wish you had chosen an alternative? If that's the case, which alternative?
Thanks,
M
StackOverflow itself is an ASP.NET MVC site and I would say it is pretty successful.
I think it depends more on the people doing the actual implementation of the site than on the technology used how 'successful' the end result will be (successful in the broadest sense: on time, within budget, happy end users, ...).
Asp.net mvc is a better then asp.net webform some reason are here
the logic code in asp.net MVC is maintainable and clean.
he provide a better performance then webform
provide a pretty url for SEO and user-friendly.
full control on mockup [without using server-side control].
if you want to see there are many example of MVC project. stackoverflow.com is one of them.
I am a big fan of ASP.NET MVC (especially with the great improvements done in MVC3). I have worked on two big sites built entirely in MVC2 SempToshiba Brazil and Cyrela Brasil. These projects have been quite sucessful. They were delivered on time, saved time and our clients were very happy. Lastly, no, I would not have chosen an alternative. A side note, the Cyrela project was actually a re-do of a ASP.NET Web Forms site that had various downsides.
On the other hand, I have seen a large project done in MVC 2 by inexperience programmers, and it is one the worse projects I have ever seen. So, over all, ASP.NET MVC has some major advantages, but if the team is inexperienced in ASP.NET MVC you will get poor results.
On another note, this post has some great ASP.NET MVC 3 material.

Should I use ASP.NET MVC or ASP.NET 4.0 webforms

We are planning to start a new asp.net web based application in a few weeks. We have three members in our team all with experience in asp.net 2.0
We are jumping direct from asp.net 2.0 to 4.0 (skipping 3.5) and we were discussing, should we go for asp.net 4.0 webforms or should we learn/develop in asp.net MVC? However, we don't have any prior MVC experience.
If you guys think that MVC is the way to go then please recommend good books using C#.
As with all engineering decisions, it depends.
Is your timeline long enough that you can ride the learning curve? Is everyone OK with learning MVC, or are you going to get blowback? Does your team know and understand HTML and CSS? I know this seems like a silly question, but a lot of ASP.NET WebForms programmers get by without really understanding the concepts for quite some time.
Do you want to make pervasive use of Ajax and CSS? Does anyone know JQuery or one of the other JS frameworks and want to make the best of them? Is unit testing important to you?
If the answers to these questions are, in general, "yes", then I would recommend taking the plunge and going for ASP.NET MVC over WebForms. As far as a book goes, I'll leave that to others. I still have not found a book that I really like yet.
I know that I'm pretty much an exclusive ASP.NET MVC programmer for new projects going forward. IMO WebForms is a broken and outdated model. Viewstate is painful for developers and web services, and postbacks are painful for users.
If you are comfortable with and know Web Forms well, use those.
Generally, use the tool you are most comfortable with.
My suggestion is: if you are tight scheduled and development team is experienced with web forms 2.0, your choose should be web form. It is nothing so serious happend between 2.0 and 4.0 that you might loose competence. Web forms still web forms.
If you have month or so as buffer to get in into MVC, you should do that. It is more natural for web development, and what I like - more testable.
I'm personally not to quick to rewrite my applications on MVC 2.0, and even start new project with MVC.. Maybe I wait for 3.0 version :)
A lot of information is here:
http://www.asp.net/mvc
A also got sources of Mvs2inaction (please google for Mvc2inaction and be pointed to github site)
And sure you have to check Phil Haack blog.
(sorry could not post a lot of links yet))
As others have answered already about what to choose between Web Forms and MVC, if you have decided to go for MVC you can find book recommendation in following links -
https://stackoverflow.com/questions/1281726/good-asp-net-mvc-vb-books (Although the questions is about VB books but answers are for both)
https://stackoverflow.com/questions/1942068/best-resources-books-for-asp-net-mvc-framework-closed
Also I would like to recommend one new book which I have just started to read. This is good for understanding the concepts and compares Web Forms and MVC.
Programming Microsoft ASP.NET MVC - Dino Esposito

Asp.net MVC VS ASP.net WebForms?

I am starting a new project in VB /.Net Framework 2.0 for a company corporate website with data driven forms. So should I go further with Asp.net MVC or Asp.Net web forms and WHY ??? We are not ready for Ajax now but later.
And also we have DevExpress components.
Actually I see ASP.NET MVC as next generation in that it is an evolution - trying to be a better programming environment, as software development for web apps asks for something more testable.
It is a huge beast. Decide based on features whether you need it. MVC has less documentation and is a lot harder to master thanks to a less RAD approach, but it seems that once you are in, it will be quite a better experience. If you have a web application (like stackoverflow.com) then it may be a good approach.
DevExpress components - have fun... throwing them away. Like most ASP.NET components they will not work or only work very partially. Totally different approach.e
ASP.Net MVC is not "next generation" ASP.Net. It's an alternative approach to design that can be more beneficial depending on the kind of project you're working with. Without more information about the particular type of project you're working on no one can give you any informed recommendations.

Resources