2005: Things I hope you can change...

Denaes

Senior Contributor
Joined
Jun 10, 2003
Messages
956
1. In Visual Basic.net, when you add a typed dataset, binding source and Table Adaptors to your project (they're added automatically as a package when you add various tables), I have no problems with the fact that new controls are created for these objects. Pretty nice.

But the instances that are automatically added to the form are really not named what I want: UsersBindingSource, UsersBindingTable, UsersBindingNavigator.

then the automatically databound controls: FirstNameTextbox, isDeadCheckbox, etc.

This just bothers me to no end. I know MS likes to have a new naming convention where you don't use prefixes, but I think thats silly. Even if you don't go with prefixes, why would you want the entire name of the control after the name? It takes up a lot of space in that box below your form in design time.

It's also not intuitive in the least. I (and most people in the english speaking community) read from left to right. I like to see what something is right there. I don't want to have to read halfway into a variable name to find out if it's the BindingSource, TableAdaptor or BindingNavigator.

With intellisense, all of your controls would just be all over the place. I like typing bs and seeing all my BindingSources. txt gives me all of my textboxes. It's easy and groups things together.

I'm sure this is a template somewhere where you can change the default from "Name = Name + Control" to "Name = Control + Name" or better yet: "Name = preferredSyntax + Name".

2. While I'm thinking about it, if there is a file(s) I could change the default naming convention on normal controls, I would.

Textbox1, Textbox2, Textbox3. I could do just fine with txt1, txt2, txt3. lbl, cbo, chk, etc.

I'm not sure if it's really much quicker, but it just seems more convenient if you're using naming conventions.

3. Split files. I want to get rid of them. I'm not saying I'll never want to make use of them. I just don't want VS to make it happen automatically.

One of the selling points of .Net was that all the code was in one file. Nothing was hidden from you. I understand that they had to cripple things to make more VB6ers want to come over, but I very much hope this is an option and not mandatory.

I've been hardcore using 2005 for about a week at work and I've been tripped up by these split files about a dozen times.

in the time I've been using 2003 I've never once said "I wish this were hidden or in another file". I said "I'm greatful that I can view and get to all the code I need if I wish, but it's in a closed region. How great, the best of both worlds!"

*********************************************************

I'm sure more things will come up. Really it would be great if these were settings. I know there is a way to setup code generation. Thats like when you type in a property and VS gives you the skeleton to fill in. You can create your own. Not sure how yet, but thats smooth.
 
For #1 and #2, I have no idea - sounds like a good idea if it's not there already. Why not give a little more control over the default naming conventions used on newly added controls?

For #3, you can definitely modify the "template" files that VS uses when you add a form (for example). Just have it create one file instead of two and don't use the word partial.

Personally, I think partials in the case of designer-generated code are a GREAT idea. They have potential to be abused by people who just want their files "clean" by separating logic into separate files. It's the same with people who over-use regions (I used to be one of them). Regions and partial classes have their uses, but can be easily abused by us developers who obsess with "cleanliness". If you're not one of them, I'd suggest using partials for the designer generated code and see how you like it. I can't imaging having that one function, InitializeComponent, is too confusing?

-ner
 
Nerseus said:
For #1 and #2, I have no idea - sounds like a good idea if it's not there already. Why not give a little more control over the default naming conventions used on newly added controls?

I don't see any reason at all why the programmer wouldn't be able to change this. It's just a string. Textbox1, txt1, CustomersBindingSource, bsCustomers... to the application it doesn't make any difference.

Nerseus said:
For #3, you can definitely modify the "template" files that VS uses when you add a form (for example). Just have it create one file instead of two and don't use the word partial.

I'll have to look into that. My manager was annoyed by this as well.

Nerseus said:
Personally, I think partials in the case of designer-generated code are a GREAT idea.

It's not all designer generated code. When I added the datasources to VB.net 2005's form, it added 2 lines of code in the Form_Load event for each DataAdapter.

Personally I like the code being there. I know there isn't anything hidden and I've learned a ton of information about controls and how they're added to a form from that information.

Nerseus said:
They have potential to be abused by people who just want their files "clean" by separating logic into separate files. It's the same with people who over-use regions (I used to be one of them). Regions and partial classes have their uses, but can be easily abused by us developers who obsess with "cleanliness". If you're not one of them, I'd suggest using partials for the designer generated code and see how you like it. I can't imaging having that one function, InitializeComponent, is too confusing?

-ner

Thats part of the nightmare I'm thinking of... the database we're converting from allows seperate procedure files and seperate include files and they're so far abused that there is redundant code all over and you can't modify many of the base Include or procedure files for causing another to fail - so you make another and change it slightly making things worse.

This is the sort of things I fear.

I wouldn't mind if things were virtually split up, like a treenode that explodes into the regions and you can click on a region and see JUST what is inside of the region. But also have the option to click on the file and see the whole thing.

Then again, I may not mind the split classes so much if you has an option to do a virtual view which virtually combines all the partial classes into a single virtual window.

I think one of the things annoying me so much about it right now (aside from the rampant potential for abuse) is that 2005 b2 keeps having errors where I have to go in and delete lines manually. Not often, but 2-5 times in an 8 hour day if I make certain changes playing around with ADO 2.0. But since these are seperate files, it starts opening more and more windows and it just frustrates me having so many windows open.
 
Back
Top