Some framework on top of ASP.NET MVC for easily create backend part of the site? - asp.net

Good day!
For PHP framework CodeIgniter exists 'app-framework' BackendPro:
What I mean by this is it provides you with functionality to do all the simple repetitive tasks like authentication, permissions and a basic look and feel for your websites control panel. So using your current PHP and CodeIgniter knowledge you can use BackendPro to built a fully working website quickly since you can concentrate on your application instead of the bits to manage the system.
It helps a lot with building quickly backend of the site (grids for entities, common CRUD interface, login\logout etc you know :)). In fact it is a stub for a backend. Does something similar for ASP.NET MVC exists?
Thanks in advance!

You could be interested in this and following articles by Steve Sanderson:
Scaffold your ASP.NET MVC 3 project with the MvcScaffolding package

Related

Use OrchardCMS, Umbraco or DotNetNuke as a component in ASP.NET application

OrchardCMS, Umbraco and DotNetNuke are CMSes in .Net galaxy. They work as stand alone applications well. Suppose I have a requirement that need CMS features in an another ASP.NET MVC application. I do not like to implement CMS again in the application. Rather I like to use current CMSes as a component of application.
Is it possible at all to use for example OrhcardCMS as a component of my MVC application? It is ideal to have relations between CMS and application itself, for example I can load entities from CMS, update them etc.
I know there are integration techniques in .Net. For example ASP.NET Identity integrates with ASP.NET applications in core level, but view (CSHTMLs) must be copied and customized in most cases. Or Hangfire and ELMAH that integrates with an application without need to copy view (cshtml, html, css) to the target application. Indeed it is good to know that integration methods are available regarding plugging CMSes into ASP.NET applications.
I can tell you more about Umbraco as I don't know other CMS as much as this one. There is a whole course / training for those who want to integrate their apps with Umbraco: https://umbraco.com/products-and-support/training/umbraco-application-integration/. So yes, it's possible and it's even suggested way from my perspective to use already done piece of software rather than building the wheel once again.
Umbraco is an ASP.NET MVC application. You can use Umbraco components, backoffice, membership and everything else CMSish delivered out of box and still you're able to write and use your business logic, controllers and everything else what you've created inside your ASP.NET MVC / C# app. Still, it's an ASP.NET app, so you can use anything what you want from the .NET world. We're using ELMAH.io for example to take care of logging and keeping the errors in the cloud. We're also using a ton of 3rd party, both open-source and commercial tools and softwares to do multiple things around our web components. Umbraco is not blocking us from using them or anything else. I like to consider Umbraco as a framework or library helping us to deal with content editing and giving us a massive number of opportunities to offer for our clients or editors.
Speaking for OrchardCMS, there are some questions touching this subject already, see
Reusing Orchard's Core to build another extensibility framework
Extracting a Module from Orchard
If it's possible for you then try to setup Orchard as the base system and move your MVC application in a module. This will be much easier than trying to cut out peaces of Orchard. In return you get amazing possibilites when running Orchard as the underlying framework, e.g. Localization, Modules, Themes, the whole user / role management etc.
OrchardCMS 2 is currently developed towards single components that can be reused in any application but it's far from finished yet.

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.

What is the best approach to start the following project in ASP.NET?

I am new to ASP.NET Web Forms. Now I am having a small project that I have develop it in ASP.NET. This project consists of the following:
1. data entry system: adding, editing and deleting users
2. defining two roles of the users: admin or registered user
3. creating, editing and deleting events
4. creating simple reports with some graphs
I am expert with HTML, CSS and Javascript. Also, I have a good background in C# and I used Oracle database during my university life, so I know SQL language.
I finished the Lynda Essential Training about ASP.NET and now I am thinking to start my project but I am confused about my start and I don't know from where I should start.
In addition, I have the following questions:
1. Should I know Entity Framework and know how to use it and use it in my project? Is is possible to develop the website with the SqlDataSource?
what is the best and short approach to develop this website from your experience?
Do I need to take another tutorial or is it fine to start with project and taking specific tutorial for each problem that I will face?
Your help guys is highly appreciated
There were a few decisions to make:
Project Type
Web Project or Web Application Project
See http://msdn.microsoft.com/en-us/library/dd547590.aspx
Pattern
MVC or classic Web Forms
See Biggest advantage to using ASP.Net MVC vs web forms
Data Access
Entity Framework (currently in BETA for use with Oracle, see http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html), LINQ to SQL, System.Data.SqlClient classes

Asp.net MVC Question regarding n-tier

I have studied a lot of starter kits for ASP.NET and ASP.NET MVC really is awesome compared to web forms, because it runs fast and developement is easy. But when I fit ASP.NET MVC, LINQ in a site with a lot of visitors and mostly controls based website, I got so many issues in my mind.
Let's say I want to build a website which is small scale, but got a lot of visitors and mostly controls based (i.e. TV Show Information website). You've got shows, episodes.
Is it efficient and easy when you use n-tier architecture in ASP.NET MVC?
Should I create my own entities in Business Logic Layer or use SQL Tables as entities?
Should I use Application Cache in it to save all shows in cache?
I like the Presentation Layer of MVC using LINQ but when it comes to DataAccess and BusinessLogic its confusing me. Can anyone help?
My 2 cents:
In my opinion there is no difference between using ASP.Net MVC or Web Forms in an N-Tier architecture. We use WCF to comunicate between tiers.
We create Data Transfer Objects that are not the Entity Framework Entities. However, I expect this to change with the next version of Entity Framework which introduces POCO.
Not sure what you mean by "shows". ASP.Net has its own caching for pages, for caching data you could use Enterprise Library.
Just to clarify I define a Tier as a separate machine, where as a layer would be a separate dll.
i've just read an amazing article regarding working n-tier with asp.net mvc
check it out:
http://www.codeproject.com/KB/aspnet/ASP_NET_MVC_WITH_EF.aspx
it's all about right architecture working with ASP.NET MVC Framework + N-tier + Entity Framework
enjoy!
:-Dan
I highly recommend the NerdDinner ASP.NET MVC Tutorial. You can get more info on it and download the free chapter from ScottGu's blog post here.
In the code that accompanies that sample chapter there is a pretty good architecture structure that you can use to base your architecture on. I have gone back to it several times when trying to see how to architect something in ASP.NET MVC.
Have you built your first application in ASP.NET MVC yet, or are you still studying?
I think you should start with an architecture similar to NerdDinner and refactor after you become more familiar with how ASP.NET MVC works.
If you really are well versed in multi-tier, then you should be able to figure it out without help from us. Try some things. Do what works. Try not to worry so much about being "correct."
Some of what you are asking in your question is premature if you haven't written your first ASP.NET MVC application yet.
By the way, I found Scott Hanselman's "File/New/NerdDinner" video both enlightening and entertaining: http://videos.visitmix.com/MIX09/T49F
I use my own flavor of n-Tier with MVC because I don't like LINQ-to-SQL and the Entity Framework. I've also written some T4 templates that generate those objects and the use the Enterprise Library to interact with the DB. It's up to you, whatever works.

Forum for ASP.NET MVC site

I am buidling a new site for an organisation. I am using ASP.NET MVC. The previous site was PHP based and had a PHPBB forum. This forum opened in an IFrame, so no integration.
We want a site with all functionality integrated. I thought, I probably have to write a forum myself. However there are other ASP.NET open source forums out there just like phpbb.
Is there a way to integrate third-party forums cleanly into my site? Or am I better of coding it myself?
Check my answer to this question, for an ASP .NET MVC based forum:
Who knows a good free open source forum in C#?
If you want an ASP .NET Webforms forum I can recommend you YetAnotherForum.NET.
ASP.NET MVC is still in beta stage and not much free options are available on the .NET side of things.
It's actually a very easy task if you already have experience writing MVC app.
Not counting those that haven't got some stable releases out, most free options such as YAF are written to run as a standalone applications on classic ASP.NET webforms framework and will often requires that you use a certain fixed database platform and thus will require work to patch them so they integrate nicely with the MVC framework.
So I suggest you code it up yourself. Especially if you just want an integrated forum that don't need to have as much features as phpbb.
Or better yet, start an open source project!
The following post has numerous options: ASP.NET MVC Forum Software?

Resources