Data binding in a three-layer architecture?

Are data bindings connected in a three-layer architecture? Throws a grid as a web form and links it to a LinkDataSource or SQLDataSource, which is considered bad? The way I see it suggests that the presentation layer is talking to the data access level. I once heard a "professional developer" say that he never did this, so what an alternative if you shouldn't?

+4
source share
3 answers

The way you do is good if it is a small project, but if you want your application. have the flexibility to support Windows / Web in the future, then you should use layers.

Please follow this link http://www.dotnetspider.com/resources/1566-n-Tier-Architecture-Asp.aspx

You must have an intermediate level between the presentation and data access levels, the middle level is removed from the presentation level and, like its own level, it controls the functionality of the applications by performing detailed processing.

The main task of the business level is to verify the business and the business process.

When you create your business logic components in the SDK, you will actually disconnect it from your web application and any input check that it performs. Therefore, your business logic components are the last line of defense to ensure that only valid values ​​get into your database.

+1
source

Data binding is, of course, necessary for efficient data distribution.

The tool is excellent and can improve performance. It is equally important to understand what the toolkit generates, even at a basic level, in order to be able to effectively use the generated code.

The reaction you are describing seems a bit extreme. If the wizard can generate code that runs on ya, then use it. If you do not understand the generated code, then this is the next priority; find out what he is doing and why. In the meantime, you have a page that people can look at, no matter how it got there.

I am a little pragmatic when it comes to tools. You do what you need. But if after [insert the appropriate length of the internship] you still use the gen code and cannot configure or fix it, then you (as in the royal, not you) are lazy or stupid or both .; -)

OT: (almost) Never say never unless you want to lessen the impact of what you are trying to communicate.

my 2 pesos.

+1
source

When you are doing a small project or prototype, go to LINQDataSource or SQLDataSource. However, the flaws of these data sources are serious enough that you might think if they are appropriate. If you are running a layered or multi-page architecture, they just don't work. But even if your architecture is not so strict, you should ask yourself how big this application is, and how likely it is that you will make changes to the system in the future. How much time will you have when you want to make changes to the database?

I saw projects in which developers used these data sources because they were the constructs that were used in these nice ASP.NET videos. However, when projects grew from prototypes to large production applications (yes, I saw how this happened, the prototype seemed good enough), the lack of compilation time support (your requests are defined in the markup!) Made any changes to the system very difficult.

When you need to make changes to the system, this will be the time when you see that the cost of the change is an amount greater than the time that you saved by flattering your architecture.

+1
source

Source: https://habr.com/ru/post/1301408/


All Articles