10 Replies - 16464 Views - Last Post: 23 March 2012 - 08:22 AM

#1 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Project Roslyn (What refactoring do you think vb.net needs?)

Post icon  Posted 25 October 2011 - 05:21 PM

With the recent release of the Roslyn CTP.


What re-factorings / IDE Language features do you think vb.net developers need?


Ny suggestions
  • Split method in to separate partial class.
  • Suggest base-class.
  • Flow chart my class / methods.


Let's here your suggestions and ideas.

This post has been edited by AdamSpeight2008: 25 October 2011 - 05:32 PM

Is This A Good Question/Topic? 1
  • +

Replies To: Project Roslyn (What refactoring do you think vb.net needs?)

#2 xnn  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 227
  • Joined: 10-February 10

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 25 October 2011 - 08:26 PM

It'd be nice to have the ability to refactor the usage of ArrayList to List(of T) with a couple of mouse clicks.

Create interfaces or abstract classes based on the method signatures in the current class.

I'm not sure how this would be implemented but how about having the ability to refactor code to follow a pattern ie. turning a class into a singleton or to create an observer/observing relationship.
Was This Post Helpful? 1
  • +
  • -

#3 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 26 October 2011 - 01:52 PM

I do like that concept xnn of extracting an Interface from your code.
Was This Post Helpful? 0
  • +
  • -

#4 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 584
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 30 October 2011 - 02:41 PM

A more customizable sort of MessageBox - specify your own icons, bold/italic/underlined text and customised buttons.
J-Bo
Was This Post Helpful? 0
  • +
  • -

#5 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 31 October 2011 - 10:24 AM

: That's not strictly a re-factoring. A re-factoring is something that helps you to change / do things in your code.

For example:
Rename variable. (It's a context aware find and replace.
Find all Callers -> Find all locations that call this method.
Was This Post Helpful? 0
  • +
  • -

#6 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2534
  • View blog
  • Posts: 4,635
  • Joined: 24-September 10

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 01 November 2011 - 08:15 AM

Easier access to the partial class section of WinForms (this goes for C# as well). Visual Studio does so much to hide that part of the code from you, and it's actually something I go into rather frequently. Especially with namespace changing which the auto-updating of the partial class is shaky at best, non-existent at worst.

Speaking of namespaces, being able to specify a namespace when adding a class would be nice, or better recognizing the namespace from the folder hierarchy like C# does would be very nice. I also am not very keen on the initial prefix of the namespace being implicit.
Was This Post Helpful? 1
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2267
  • View blog
  • Posts: 9,479
  • Joined: 29-May 08

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 01 November 2011 - 10:55 AM

Can you access the Architecture Explorer panel in VS? lordofduct
You can explorer your methods via namespaces
The implicit namespace now has a solution. Namespace Global

This post has been edited by AdamSpeight2008: 01 November 2011 - 11:01 AM

Was This Post Helpful? 0
  • +
  • -

#8 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 584
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 03 November 2011 - 03:03 AM

Execute code entered into a string - would help for a bit of a VB.Net Introductory Program
Was This Post Helpful? 0
  • +
  • -

#9 xnn  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 227
  • Joined: 10-February 10

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 03 November 2011 - 12:16 PM

View PostjimmyBo, on 03 November 2011 - 03:03 AM, said:

Execute code entered into a string - would help for a bit of a VB.Net Introductory Program



I believe that's already a feature that is part of project roslyn where you will be able to select code to execute or paste code in the immediate window and run it.
Was This Post Helpful? 0
  • +
  • -

#10 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2534
  • View blog
  • Posts: 4,635
  • Joined: 24-September 10

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 15 November 2011 - 07:07 AM

View PostAdamSpeight2008, on 01 November 2011 - 05:55 PM, said:

Can you access the Architecture Explorer panel in VS? lordofduct
You can explorer your methods via namespaces
The implicit namespace now has a solution. Namespace Global


Architecture Explorer - only now heard of it, appears to be a VS 2010 Ultimate feature... I don't have that.

Though I don't think getting to the partial class of a Win Form should require such a tool. Showing the partial class in the solution explorer, or when right clicking giving the options to see 'designer, code, designer partial code' (the third choice being an addition to the existing first 2).

And actually that 'Global' thing is the complete opposite of what I'd want. I don't like that in VB the root namespace is implicit.

That if I say:

Namespace Utils

   Public Class MathUtil

   End Class

End Namespace



in project with root namespace 'LOD', that it implicitly becomes the class 'LOD.Utils.MathUtil'. I personally prefer a more 'explicit' method of doing this. The 'global' feature seems to allow me to override the implicit namespace, for an ability to put something outside the root namespace, which I guess also comes with the ability if explicitly writing out the root namespace each time if you wanted. Though an explicit namespace would fix all of these issues from the get go (but an explicit namespace would break all previous versions of code, so I understand why it wouldn't be done).

Furthermore I prefer the ability to state a namespace when creating a class/form/etc, for the code generation, especially in the case of Forms because to change its namespace after code generation requires me to break into the partial class for the designer, because the auto-updater fails to update the partial class 9 times out of 10.




It's actually one thing that I've disliked about VB.Net in general (keep in mind, I'm not a full fledged VB hater, I write it daily for my job, and enjoy many of its powers over other .Net languages). The designers of the language seem to go out of their way to create a lot of implicit code that the programmer doesn't even see.

For Instance hiding the entry point of a WinForms project, or hiding the root namespace away in the project properties. I've been told it has been to reduce the code length for coders, but at the expense of them being completely ignorant to certain normal requirements of the code (the requirement fulfilled, just invisible to the naked eye). Which leaves me scratching my head for a language so notorious for being verbose in general, its verbosity is one of its selling points over C-style languages which are cryptic in their short-handedness.

Though I have also heard response that this is because the language is so verbose that the don't need to clutter it up with even more verbosity. Hence a favoring of implicit declarations so frequently. Which just erks me for lack of consistency.

This post has been edited by lordofduct: 15 November 2011 - 07:19 AM

Was This Post Helpful? 0
  • +
  • -

#11 xnn  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 227
  • Joined: 10-February 10

Re: Project Roslyn (What refactoring do you think vb.net needs?)

Posted 23 March 2012 - 08:22 AM

It would be nice to be able to change the namespace of classes at the click of a button, much like renaming a class or object. It would also have to change the namespace of partial classes. I'm sick of starting a project and once I have a general sense of the class hierarchy/design namespacing every class so tediously. With winforms you have to open the designer to match the namespace. It's a pain in the butt. I'm surprised VS doesn't support it natively.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1