we have to migrate a very old project that are having more than 500 web forms and 400 tables and it is hugely depends on stored procedures, the current specification is:
- Asp.Net : .NET version 1.1
- language: VB
- uses 2 Tier architecture (UI and business(includes DataAccess also))
- xml is used to pass the data between UI and Biz layer
- For data access sql queries and stored procedures are used that fetch data as dataset.
- Finance related domain.
- a lot of javascript for validation
Planned specification:
- Asp.net 4.0 with c#
- MVC 3 or 4
Now my questions are
- Is it possible to implement mvc only for UI layer, if possible then how to use current business layer? Also we don’t have class and properties because it uses xml to pass data, also we have to use same legacy database.
- We don’t want to use Entity framework, because of performance, legacy database(not properly designed), uses more than 700 stored procedure.
- how to create model i.e Domain level or project level because my solution contains 14 projects?
- Is it possible to implement Repository pattern in separate layer?
-
Yes, absolutely. Your MVC controllers can interface with whatever business layer you already have in place. In fact, this might be a good way to begin your transition.
-
This isn’t worded as a question, but if you are asking “do I have to use EF”, then the answer is no, of course you don’t.
-
Your domain model classes do not need to be in your MVC project, they can live separately in existing projects and be referenced by your MVC project.
-
This is nothing to do with the MVC “layer”. You can create your repositories in a separate layer as you would for any other project and have the MVC project use them. Some people may wrap access to repo’s in a service layer. Others are moving away from repo’s when using tools like Entity Framework and NHibernate as they can be considered repo’s themselves, but that is a topic for another thread/question.
2