Last post Aug 10, 2013 05:12 AM by matskm
Aug 09, 2013 04:52 PM|matskm|LINK
My background is in C++ development, linux based. I am working on broadening my skillset to C# and ASP.NET.
I have a c# application that will be complex (currently 18 classes, likely to be 50+ classes). I would like to deploy it as a server based web application (where the user interacts via a web browser with the application, and the c# code runs on the server).
I would like to use ASP.NET, and preferably razor rather than aspx.
Which tool and framework should I use?
Here are some other design parameters:
I would like to have the flexibility to use the full .NET c# class library (e.g., LINQ), and even other libraries (e.g., json.NET).
I have investigated MVC (version 3 and 4) and while I am keen to use the basic "Model View Controller" design pattern architecture, I don't want quite as many of my design decisions taken away from me as full adherence to ASP.NET MVC in "Visual Studio Web
Express" would mean (e.g., I don't want to represent my data with a full relational database with 6 or 7 tables where each table maps to a class in the Models dir).
I would like to have my c# code operate largely independently to the .cshtml pages, except where user interaction is concerned (input/output) of course.
I have coded a "version 0" of the project in Visual C# 2010 Express (console based). And am trying to figure out how to deploy it as a server based web application.
I have investigated:
What I don't want to do is limit myself to a framework where I can only use a small subset of c# libraries, and this seems to be what will happen if I have too much c# inside the .cshtml pages (razor).
I am currently seeing how far I can get with WebMatrix, just copying all my classes across and interacting minimally through .cshtml
My biggest question is what approach I should take as I don't want to burn alot of time investing in an approach which won't ultimately work.
Thanks in advance for any help!
Aug 09, 2013 04:56 PM|CriticalError|LINK
I think MVC is your best choice. It will provide you with the control needed and splits up C# and razor. WebPages does not, but it does have the whole .Net Framework backing it..but MVC also has that too.
Aug 09, 2013 05:32 PM|Mikesdotnetting|LINK
Both MVC and Web Pages offer full access to the whole .NET framework.
There's nothing to stop you wrapping all your business logic in a separate class library and sticking it in the bin folder within a Web Pages app. I would recommend you use Visual Studio as your development tool. It's a lot more powerful than WebMatrix.
The only downside with Web Pages is that you inevitably end up with a certain amount of processing logic in the same files as your HTML.
MVC offers more by way of code separation, but there's nothing within it that dictates how you should design your schema so I'm not sure why you are concerened about that.
Aug 10, 2013 05:12 AM|matskm|LINK
Thank you Mike & CE - seems like MVC is the consensus.