tags:

views:

50

answers:

1

I would like to prepare my existing asp.net web forms application for a smooth conversion to asp.net mvc. I have architected my app as follows

  1. POCO entity layer is used to pass through all tiers
  2. Data layer
  3. Business layer
  4. UI layer - no view state; no post back; only two things are in code behind, a) populating form, list view, dropdown etc. in page load; b) web methods to support jQuery client side ajax. Web methods are very light, mainly passthrough to business layer and return either JSON or html back to client.

Is there anything else that I could do to ensure a smooth conversion to asp.net mvc?

I am thinking my conversion tasks will be

  1. Port the UI markup to a view
  2. Port the page load code in to a controller action, and render the view
  3. Port the web methods to a controller action, and return JSON

Did I miss any thing? Any gotcha/surprise that I should anticipate?

Thanks so much.

+1  A: 

That sounds like you have covered most of it. Do you use the Sitemap to render your navigation? You will need to look into building a custom Sitemap as MVC doesn't support very well (action/controller concepts). The nice thing is that once you have moved to MVC you will have access to some cool links like DataAnnotations for common validation. You will also have access to areas support. Your over all web framework should also become more testable!

Have fun!

Andrew Siemer
I am not using Sitemap. I am using a helper method that creates a dynamic POCO object structure base on user roles, then bind it to a ul list view in the Master Page and use css to style the navigation menu. But thanks for mention about Sitemap, I have overlooked it and possibly make things harder for my self. Thanks Andrew.
2nd Chance