Project1 = Asp.net pages project (presentation Layer)
Project2 = Data Access Layer
when Project1 is hosted and running smooth, if i have to add few PRIVATE methods into the Project2 and call these methods within some of the PUBLIC methods that i know are being called by Project1, should the changes apply that 开发者_运维问答i made in Project2?
I did the above, but the new methods were not called. (I think Project1 is still pointing to the old assemblies of Project2)
I am sure if i rebuild the Project1, the changes will work.
But if i have to rebuild Project1 after every change i make in Project2, what is the point of having the separate tier Architecture? I thought the good thing about separate tiers is that one can do as many changes in 1 layer, without rebuilding the other layers ... is that a wrong perception?
You don't HAVE to rebuild it. You can just copy the new project2 dll to the web app\bin directory and it will work if the interface hasn't changed. A build of project1 will redundantly rebuild project1 and produce the same result, and also include the latest version of project2, that's why it works, too.
First of all separate tier doesn't really mean separate assemblies. A multitier archtecture program can easily be stored in 1 assembly and have DAL, presentation and BL classes separated by some logical separator like namespace or even project folders with classes (or even no logical separation whatsoever, but you will known that certain set of classes is for DAl, and annother for BL, etc)
To your question - if your DAL is generic and has a fixed interface you can update your dal assembly ( for example fix some buggy methods, or something else) if you dont change interface of public methods. Obviously if you change some interface your other assemblies that reference this assembly will have to be not only rebuild but rewritten in order to use new method names for example
精彩评论