What's the benefit of make two places map with database table.


    accustom build program fields mapping database table. found there 2 places express mapping database in book of asp.net 2.0 website programming marco bellinaso.
    first place entity class.
    second place bll class.
    
    difference that  bll has few fields coming computing or other object. way , bll classes can including fields not existing in database  , expressing relationship other bll classes.

    have 2 questions:
    1、was view right.
    2、are there other benefits building 2 mapping.

ah ok understand.

well mapping reference act of converting 1 schema another. in case seems got 2 mappings, 1 database schema dal entity , 1 dal entity bll entity.

depending on ask , type of project on, may or may not valid application design.

the problem trying solve different algorithms , different screens need different kind of on object. martin fowler talks in presentation model maps , transforms internal entities presentation entities better suite data binding , presentation scenarios. if case, allow different presentation scenarios, valid map once again in bll.

another scenario might apply when got big project , different views on same model. in cases might want create separate models separate teams free work on own models. eric evans calls bounded context can read more on ideas on here: http://domaindrivendesign.org/discussion/siliconvalleypatterns/svpg_2004-02-03.html , in book.

so depends, looking @ scenario author of book follow presentation model pattern make easier data bind , reason double mapping.

that said justifying adding presentation model application if real need rose in change requests. e.g if needed re-use dal entities in different contexts , needed separate view each. otherwise it's overkill.


Architecture  >  Architecture General



Comments

  1. I feel SQL and many other aspects of it seriously need to be looked for in order to gather various ways and techniques through which problems can get solved.

    SQL Server Load Rest API

    ReplyDelete

Post a Comment

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'