Should I use data binding to place data on my web page?

The video tutorial says that I should use data binding to place data on my web page. Is this right to do?

This is wrong to do. Shouldn't there be a separation of problems? Should the view be separated from the code that connects to the database? In the above video, it connects to the database without going through the data access layer. What about the master / controller? It seems that we completely bypass these layers, bypassing architecture.

+3
source share
3 answers

It’s important to understand that when Microsoft releases a new user interface technology, at least 2 / 3rds of it is designed to make it easy for beginners to remove very simple two-tier demos. I am not saying that this is bad. In the end, it helps us quickly master the technology. However, when you write a suitable n-level application, it is important to know which bits of technology can and cannot be used.

For example, in ASP.NET WebForms you must voluntarily limit yourself as follows:

  • Do not use the data source control except ObjectDataSource, and use it only to bind the model to the view.
  • . Business Layer .
  • // GridView. // -.

: , , , .

+3

, ASP.NET MVC, ASP.NET( MVC ASP.NET Webforms). ASP.NET MVC : http://www.asp.net/mvc/learn/

, ASP.NET , . Webforms , , Winform. MVC, , , , - /.

+1

Have you looked at ASP.NET MVC ?

With WebForms, it will be easy to do everything you need for your code.

0
source

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


All Articles