开发者

Help required in architecting an application

开发者 https://www.devze.com 2023-03-14 13:34 出处:网络
The proposed architecture ofour new application is as given below Presentation Layer This will be an ASP.NET MVCapplication running on mobile

The proposed architecture of our new application is as given below

  • Presentation Layer This will be an ASP.NET MVC application running on mobile

  • Services Layer This will be a WCF Services . The Presentation layer communicates with the services using custom DTO.

  • Business Logic Layer this is a normal c# class library where all the businnes related logic are written. This layer e开发者_开发知识库xposes Business objects to the services layer. The services layer uses an entity translator to convert Business objects in to DTOs

  • Database Access Layer We are plannning to EF4.1 for this. We would like to have stored procedure support. Hence the plan is to use Model First approach

This being our architecture , i have the following questions

  • Instead of having Business Objects and Entities separately , can we combine these two. Is it a good approach ??
  • Since the client is web based , is it Ok to use Self tracking entities ??
  • Could be send me some links on how to optimize peformance


Instead of having Business Objects and Entities separately , can we combine these two. Is it a good approach ??

Stored procedure support is no reason to use Model First - I would tend to go code-first as it frees you more from the tooling.

Since the client is web based , is it Ok to use Self tracking entities ??

If it's web-based .. why would you bother with self-tracking entities..? You can commit the changes in one go. As it says on the MS page:

Use self-tracking entities only if the object context is not available on a tier where the changes to the object graph are made. If the object context is available, use EntityObject derived types, or "plain-old" CLR objects (POCO) types, or POCO proxy types. For more information, see Working with Objects.

As mentioned - I would tend to POCOs as in the long run it'll be easier to work with.

Could be send me some links on how to optimize peformance

Optimizing performance is well down the road and depends on what you're doing or the problems you're solving.. but in general you will want to minimise the use of the wire - either the wire from the web server to the database or the wire from the mobile client to the web server.

Also note that there are some more questions on this topic e.g.:

ASP.NET MVC & EF4 Entity Framework - Are there any performance concerns in using the entities vs retrieving only the fields i need?

Performance reprogramming website in MVC3 with Entity Frameworkenter link description here

0

精彩评论

暂无评论...
验证码 换一张
取 消