Question Pure code Vs. BindingSource

evolet10000

Active member
Joined
Nov 22, 2012
Messages
40
Programming Experience
Beginner
i was just wondering if which is better? when it comes to style on developing a winform application...

i always used pure codes, i dont use binding sources with a drag and drop features with auto-generated codes...i really dont... for me it sucks, it makes me feel that im not a programmer.,

can someone, here in this wonderful forum explaine to me the big differences(if there are)between this 2 styles? i mean, in detailed., please please please., whoever you are., THANKS IN ADVANCE DUDE :D
 
First of all, the fact that you don't want to drag items from the Data Sources window onto a form has absolutely nothing whatsoever to do with whether you should use a BindingSource. If you drag a table from the Data Sources window then it will generate a BindingSource, yes, but it will also generate a DataGridView. If you use "pure code", does that mean that you can't use a DataGridView? Of course not, so why would it mean that you can't use a BindingSource? If you're binding data then, more often than not, you should use a BindingSource.

What you're really talking about is whether or not to drag and drop items from the Data Sources window onto a form. If you're doing all your data access in the form anyway then you should absolutely do that. There's absolutely no reason not to. The thing is though, unless you're a beginner just playing with a project, your data access shouldn't be done in the form to begin with. If you don't have your data access in the form then you can't drag and drop. If you do have your data access in the form then not dragging and dropping is only making your life harder for no gain. It's that simple.
 
thanks for the reply sir., and yeah absolutely im making my life harder :D., but? i mean., for example i want to display all my database datas into a datagridview , and ofcourse i can simply do that by dragging my datasource to my form as a datagridview and voila here it is, or by means of pure coding in my form_load., it really seems that im making it on a hard way on typing such codes(especially for big projects) and i know that., i just want some light on their differences? like? if use my long bunch of codes vs the vb generated codes., does it affect anything? such as execution time? or whatever?
 
It makes basically no difference to the application is use, only in development. Writing all your own SQL code, etc, is not such a bad thing from the point of view that it helps you learn what's actually going on but it doesn't really gain you anything else.
 
Back
Top