开发者

WebForms: Why using GridView, DetailsView, FormView, Repeater, DataList controls?

I am in commercial development for few months only, the team leader is not using gridview, detailsview, formview, repeater, datalist.

We alwyas write our own looping to dislpay the data even it is read only.

He said : we do this for better performance and I am always thinking, so why microsoft create them???

I checked other questions and articles, and I am still confused. Please try to give开发者_StackOverflow社区 me a persuadable answer.


There is some balance between developing velocity and performance reason. For example, you can propose to your teamlead, to develop displaying grid on assembler-language, manipulating processor register and direct memory access (hopefully .Net allows these tricks).

As practice shown you can win up to 5-7% of rendering time using this technique. But you will spent huge man-hours before releasing yet another version.

Saying you have bets team all over the world, and you can implement 1 grid a day per human. So if your customers can wait this time, my answer- WHY NOT?

Second point is absence of knowledge how to raise performance of existing components. For example switching off ViewState on GridView reduces number of bytes transfered between server and client (and back) up to 1Kb. Note this amount doesn't depends on programming language you select, but leverage reusable and well tested component.

The third point, I would like note about large books, which describe component oriented approach, the note:

  • reuse component reduces risk of bugs;
  • you always can connect to internet community about specific question;
  • you can override particular behavior just overriding couples methods on component;
  • and at last (see my first point) you save the most valuable resource - the Time!
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜