Converter from other syntax to ASP.NET MVC - asp.net-mvc-3

My knowledge is in ASP.NET MVC C#, SQL Server 2005/2008 R2, SQL Server Business Intelligence Studio and Crystal Reports. I would like to extend my knowledge to work on existing customers CRM /CMS applications who perhaps used different syntax, such as Drupal, php, C++ or Oracle. Who need an update in uniqueness. Could someone kindly tell me where I can find resources for this kind of information? In general terms, of course. I Had a look at MVC Framework for existing application, for reference. Also http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet, but this is for ASP.NET1 not MVC.
If there is no tool out there for ASP.NET MVC C# converter is there alternative way? I have not come from ASP.NET, Straight to MVC
Thanks

Converting code is generally an ugly process which ends up with you having to do a lot manually. And that assumes that you are converting from/to languages that are at least being used in the same paradigm; in-line server-side scripting in PHP to in-line, server-side 'scripting' in ASP.NET, for example.
But ASP.NET MVC is a completely different paradigm for developing a web application. There really is not any useful way to 'convert' an application from in-line, scripted PHP to ASP.NET MVC; You would just end up with "views" that are just ASPX pages with in-line code, not all of which could even be converted in the first place.
Even trying to go from a different MVC web framework to ASP.NET MVC would likely be near-impossible to do completely, as different things are separated in different places.
So much of MVC is about architecting the application "properly" from the start. Trying to automatically convert things would really mess with that.

Related

MVP vs MVC design patterns for web and mobile?

For an upcoming project, I am looking into MVP as an option over MVC. I am highly familiar with and like MVC, and am merely trying to see if I will gain anything using MVP.
What I gather about MVP is that it uses the ASP.Net view engine/MVC# (which I don't particularly like) that uses the ViewState - adding a bunch of extra content to a rendered web page, and not built in routing functionality (can be written in separately into the Global.asax).
MVC/Razor on the other hand, renders very clean HTML.
Certain articles, such as this one seem to lean towards using MVP for multiple views, however in light of MVC3 with jQuery Mobile, there are some fantastic things that can be accomplished with this MVC.
How do these compare to what is currently available with MVP? What are some pros/cons or potential pitfalls of using MVP over MVC?
I am also considering using an existing MVP application to expedite development time.
I know you will cringe at the following, but looking for options:
While this app offers all the required features, if implementing this solution, how difficult is it to tie in additional MVC applications (I know that looks ugly)? If this was something that we had to consider (combining both), would it be best to wrap the application in MVC (routing) and have the MVP app contained inside?
The reason for this is a staggered feature update process, where the requirement is to implement a new feature (which is built using the MVC framework; the rest of the system is not). Future plans are to completely change the current framework to either MVC or MVP.
Thanks.
You seem to be confusing patterns with frameworks here.
Both MVC and MVP are design patterns, ASP.net MVC and MVC# on the other hand are frameworks that implement the MVC/MVP design patterns.
There is a massive confusion and lots of conflicting information on the web about the difference between MVC and MVP patterns and infact Martin Fowler the guy who made MVP popular since "retired" the pattern in favour of 2 new ones. See here
Both patterns are there to aid separation of concerns that is for sure, but other than that there really isnt a lot of difference between them, the only thing I have found is that MVC has a controller per widget on the screen where as MVP is one per screen although even this rule is violated if you have a complex screen. I am still unsure and use the terms interchangeably myself.
The one thing I see over and over is that in MVP the view is responsible for creating the presenter, however this is not part of the original design. It appears to have arisen from the fact that older web frameworks such as asp.net webforms were page centric. You had no way of changing this and so it was the page (view) that created the presenter. Basically the framework is getting in the way of the pattern and so a hack was made to shoe horn it in. Unfortunately this seems to have become the defacto way of describing MVP.
Basically my wall of text above is trying to say that if you want to do MVC properly use a framework designed to do it, ASP.net MVC is a good choice, it is part of the MS stack, well supported (MVC# hasnt been updated since 2008) and if you are already happy with it the loss of productivity trying to learn something else isnt really worth it imo

Integrating MVC3 into an existing Classic ASP application

We have a very large application written in classic ASP. The application consists of a single codebase which is accessed by multiple tenants, each of which has their own database. The application has been developed over a number of years.
Initially we were going to write a new application in MVC3 which would take over from this application, and eventually migrate customers to this new application.
We are now wondering if it is viable to add to the existing application gradually using code written in MVC3. At some point, we would expect the whole application to be running in MVC3 with no classic ASP left. The application would have to act as a single application, with one login giving access to the existing classic asp parts of the system as well as the new parts written in MVC3.
Does anyone have experience of doing this? What issues are we likely to face? Are there any pitfalls we should look out for?
I am in the process of completing a (painful and long) migration from a Classic ASP site to MVC3.
I looked at running both side-by-side in detail because this is a large ecommerce website I have migrated and it would have been beneficial.
The issues I came across and which eventually led me to abandon this option are as follows:
If you have URL rewriting on your Classic ASP website then it is
likely going to interfere with ASP.NET MVC routing
Authentication is going to be very difficult because of the way
authCookies are set in both technologies
In my case both of these points were show-stoppers.
Saying that, there have been some interesting developments in the open source arena since I started that try to tackle the issue of migrating Classic ASP sites to MVC.
Specifically, you might want to take a look at the ASP Classic Compiler on codeplex. It looks promising.

Curriculum for developing with ASP.NET MVC 3

I want to write a web site using ASP.NET MVC 3.0 and Microsoft technologies. I'm studying it now, and enjoying it.
The web site is experimental, and will be used by me and my son in house, but of course I will want to grow it and let other people use it. It will be in Hebrew.
What other technologies do I need to study? One I'm sure of is C# 4.0 (and LINQ). But I'm not sure about ASP.Net 4.0 - Do I also need to study it? How about Html 5? Javascript? Entity framework? Ajax?
Well here's my $0.02 worth of advice. I guess if your are going to expand this site at some point in the future you would have to add Enfity Framework 4 as well in terms of how you do your data access and JQuery since it comes out of the box with your MVC projects. Since you are developing it now you might as well add HTML5 to the list. With respect to ASP.NET 4 you might not need to if you're only doing this for your site. It's a pity that there aren't any mvc3 books our yet but you could either refer to blogs for newer material or if you don't mind use MVC2 books to help you along with u

Silverlight 4 Business Application or ASP.NET MVC 2?

Wondering whether it is advisable to develop web applications under the "Silverlight 4 Business Application" template or under the "ASP.NET MVC 2 web application" template.
In any case, what are the PROS and CONS?
Thank you.
IMHO, I think a web application is better off being developed using MVC2. Silverlight has and is coming a long way, but to my knowledge, is largely still client-side (please correct me if wrong anyone). As such, I think MVC2 is a better platform because you're leveraging your web server to process all the work and not bogging down processes client-side. I liken this to why we do certain things server-side vs. in JQuery/Javascript. It's mostly because the server has the speed, capacity and ability to process the user experience in the best way possible.
MVC2 has come a long way since MVC1. I would definitely support use of MVC2 in any new ASP.NET web applications over webforms. There are trade-offs, especially if you cut your teeth on Webforms like I did :)
Overall, best bet for the future is MVC2 as we're still seeing a lot of advances in Silverlight, and not sure it's finished growing.
HTH,
Sid

Any Metadata driven UI sample code?

I am in the process of designing a .net windows forms application that uses metadata to drive the UI. Apart from finding http://msdn.microsoft.com/en-us/library/ms954610.aspx, I have nothing much to look forward to. Anyone here worked on metadata driven User interfaces? What are the implications of following this methodology and any pointers would be greatly helpful.
The most obvious answer would be that Microsoft have themselves embraced this concept through their use of Xaml in Windows Presentation Foundation which replaces WinForms (to an extent).
If you want to stick to a WinForms, you may want to consider MyXaml which is kind of a homage to Xaml for WinForms!
You may want to check out Evolutility CRUD framework. It is an open source metadata driven framework for CRUD generating all UI at run-time.
It comes w/ source code (in C# and JS) and many samples.
http://www.evolutility.org
You may try this with HTA. Sometime back I created a metadata driven application using HTA and XML. I created XAML like structure and HTA-VBScript code to parse this structure and render diffent types of UI elements along with validations.
Check the Andromeda project out, which does so extensively. Too bad the stack isnĀ“t .NET friendly (PHP, Postgres, Perl).

Resources