0

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:

  1. Asp.Net : .NET version 1.1
  2. language: VB
  3. uses 2 Tier architecture (UI and business(includes DataAccess also))
  4. xml is used to pass the data between UI and Biz layer
  5. For data access sql queries and stored procedures are used that fetch data as dataset.
  6. Finance related domain.
  7. a lot of javascript for validation

Planned specification:

  1. Asp.net 4.0 with c#
  2. MVC 3 or 4

Now my questions are

  1. 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.
  2. We don't want to use Entity framework, because of performance, legacy database(not properly designed), uses more than 700 stored procedure.
  3. how to create model i.e Domain level or project level because my solution contains 14 projects?
  4. Is it possible to implement Repository pattern in separate layer?

1 Answer 1

3
  1. 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.

  2. 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.

  3. 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.

  4. 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
  • my current project UI Layer contains aspx and its .vb file , on firing events it get's the data from UI and creates xml file, UI also contain's call_biz_layer.vb file that holds a switch case(using Menu id or screen id) for creating respective business class object. biz layer is separate project, with the object it passes xml to biz layer, where it manipulates the data and stores to db. is itpossible to remove callbizlayer class from UI, because its creates very huge switch case for every screen.
    – arvind
    Commented Feb 24, 2014 at 12:01
  • very difficult to comment without seeing the codebase and based on that brief description alone and goes beyond the scope of the original question. In very general terms, if you have a well defined business layer being called from your asp.net code behind, then there is no reason that business layer could not be called from an MVC controller.
    – ozz
    Commented Feb 24, 2014 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.