Pfew! I am glad .NET exists... confessions of a MS immigrant.

N

~~~ .NET Ed ~~~

OK, here is the story, or rather a confession. I used to be a die hard Linux
user and app./tools developer. I avoided using Windows (or programming in
it) because of lack of freedom. Basically for me it was either Linux or bore
myself to death.

When WinXP Professional came out using Windows became more fun but that is
only the foot at the door. To keep the story short, for reasons of my own I
decided to explore .NET back in .NET v1.0. Wow! it was the answers to my
prayers, since then I have been doing a lot of windows development and more
or less dropped Linux as my main platform. Not that I don't find it useful,
it still gives me lots of freedom but as for productivity I go for .NET.

And then.... recently, for similar reasons I have been "forced" to explore
Java (which I had done at some point many years ago). Sadly, Java as a
language still misses some nice features of my favourite .NET language: C#.

And then there were web applications, sure with ASP.NET some thing get a bit
more complicated. But I expected that Java, as a framework had come to
mature enough to provide these things. Unfortunately it isn't so, you have
to grab things from here and there (as it was with Linux) and there are
frameworks to kind of achieve what ASP.NET does but not quite there yet, not
to mention that it is not part of the standard platform.

To complicate matters even more, I had to do some Java windows GUI (not web
app. gui). The IDEs (Eclipse and NetBeans) both provide some support for GUI
development but do not compare with VS.NET. I mean, I have run into cases
where I design a form that looks like something in the "designer", then it
simply looks different when you test the form using the IDE's test feature,
and then it looks even more different (actually totally screwed up) when run
as part of the application.

I cannot believe that something as basic as an absolute layout (X,Y
positions for the components) is still not native! you have to use some
vendor specific library (in this case from Sun's IDE) but if you try to run
it standalone (rather than within the IDE) then hell breaks lose.

Then an application runs fine on the IDE but by default it never "copies"
the required "assemblies" to the binary directory and obviously, trying to
run the application standalone from the command line is yet another misery.

Quite frankly, I had done some Java years ago and had hoped that after all
these years the whole framework and tools had evolved sufficiently, but for
what I see I was wrong.

So... for me, .NET anytime, specially with Visual Studio, with it I just
don't have to waste time assembling the engine and putting the car together
before I can take it for a drive. I must say Microsoft has done a darn good
job with .NET and Visual Studio and these words do not come lightly from
someone who was a hard core Linux/Unix fanatic (both as user and
programmer).

:)
 
J

Jon Skeet [C# MVP]

I cannot believe that something as basic as an absolute layout (X,Y
positions for the components) is still not native!

Actually, I believe you can use absolute layout in Java reasonably
easily. However, it's almost never a good idea. What *I* find hard to
believe is that Windows Forms doesn't have layout managers which are as
good as Java's. (It will with Avalon, but that's a way off.)

As for IDEs - yes, the Java GUI designers are behind VS's designers.
Personally, I find that a very small price to pay for the massive
development speed increase that Eclipse gives me whenever I'm doing
something other than UIs. (Heck, even when I'm doing UIs I tend to
avoid designers other than for prototyping.) VS.NET (even 2005) is
still a long way behind Eclipse when it comes to raw code editing.
 
C

Chris Dunaway

Jon said:
avoid designers other than for prototyping.) VS.NET (even 2005) is
still a long way behind Eclipse when it comes to raw code editing.

I tried eclipse a long time ago when I started to learn a little about
Java, but I have not devoted much time to it. I am curious: what are
some examples of things the Eclipse editor can do that the VS2005
editor cannot?
 
J

Jon Skeet [C# MVP]

Chris Dunaway said:
I tried eclipse a long time ago when I started to learn a little about
Java, but I have not devoted much time to it. I am curious: what are
some examples of things the Eclipse editor can do that the VS2005
editor cannot?

My favourite few:

Organise imports: imagine never having to type a "using" directive at
the top of a file again. VS 2005 lets you do it on an individual basis,
but it's a pain compared with hitting Ctrl-Shift-O and letting Eclipse
sort the whole file out. It removes imports you don't need, too.

Open type: Want to find a type without navigating the solution explorer
or class browser? Hit Ctrl-Shift-T and start typing the type name.
Alternatively, type just the first letters of each word in the name (eg
AL for ArrayList) and it'll even show you from that.

Open resource: Same as above but for resources too.

Hyperlinks: Hold down control and almost everything becomes a hyperlink
to the declaration - variables, methods, etc. Really handy.

Integrated unit testing: Unit testing isn't something that should only
be available after paying thousands of pounds for a premium edition.
Oh, and from what I've seen the unit testing in VSTS isn't as simple as
Eclipse's JUnit integration. (I believe it's more capable, but I don't
know how useful the extra capabilities are.)

A decent incremental compiler: Eclipse compiles every time you save. It
does it in the background these days, but even when it didn't it was
really quick anyway unless you'd changed an interface which large
numbers of things rely on.

Refactoring: Visual Studio has *finally* got refactoring support (about
5 years late) but it's not nearly as comprehensive as Eclipse's.

Better intellisense: Overloads show as a proper list tooltip, rather
than a single option at a time. Additionally, you can let Eclipse fill
in what it reckons the method parameters should be, based on name and
type. It's amazing what it can get right!

"Quick fix": VS 2005 has some support for this I believe, but I don't
*think* it's as good as Eclipse's. Basically, if Eclipse reckons it can
fix a compiler error, you can let it do that. Things like changing the
filename to match the type name (or vice versa), adding unimplemented
methods, creating methods in the target type when you've called them in
another type, etc. The last is really handy for TDD - write the code as
you want to be able to call it, then just tell Eclipse to add the
appropriate methods!

Structural diff: Eclipse does intelligent differencing, so it can tell
that you've added a method, removed a different one, and changed
another one. (And likewise for other members, etc.) Really handy.

Those are just a few highlights. Oh, and Eclipse has had most of these
for years, and it's always been free...
 
C

Christoph Nahr

Organise imports: imagine never having to type a "using" directive at
the top of a file again. VS 2005 lets you do it on an individual basis,
but it's a pain compared with hitting Ctrl-Shift-O and letting Eclipse
sort the whole file out. It removes imports you don't need, too.

Yes, I'd like to see this feature very much... Whole Tomato's Visual
Assist X did something similar but it never worked quite right for C#.
Open type: Want to find a type without navigating the solution explorer
or class browser? Hit Ctrl-Shift-T and start typing the type name.
Alternatively, type just the first letters of each word in the name (eg
AL for ArrayList) and it'll even show you from that.

You can get solution/file/Framework browsers that work this way by
installing the free DPack, available here: http://www.usysware.com
Hyperlinks: Hold down control and almost everything becomes a hyperlink
to the declaration - variables, methods, etc. Really handy.

Nice, but so far I didn't mind having to right-click and move down the
mouse cursor by a few lines for the same effect. :)
Integrated unit testing: Unit testing isn't something that should only
be available after paying thousands of pounds for a premium edition.

Fortunately we all can download NUnit for free...
A decent incremental compiler: Eclipse compiles every time you save. It
does it in the background these days, but even when it didn't it was
really quick anyway unless you'd changed an interface which large
numbers of things rely on.

I'm not sure how useful that would be, given that C# compilation is
lightning-fast already.
Refactoring: Visual Studio has *finally* got refactoring support (about
5 years late) but it's not nearly as comprehensive as Eclipse's.

Does Eclipse automatically rename references in comments, too? That's
my big complaint about Visual Studio's refactoring.
Structural diff: Eclipse does intelligent differencing, so it can tell
that you've added a method, removed a different one, and changed
another one. (And likewise for other members, etc.) Really handy.

That's very nice, but can you use this feature from within a source
control application such as Perforce in order to diff revisions? When
I'm differencing files it's usually between work files and checked-in
revisions. Right now I'm using ExamDiff Pro for this job.
 
J

Jon Skeet [C# MVP]

Christoph Nahr said:
Yes, I'd like to see this feature very much... Whole Tomato's Visual
Assist X did something similar but it never worked quite right for C#.
Right.


You can get solution/file/Framework browsers that work this way by
installing the free DPack, available here: http://www.usysware.com

I'll give that a try. Shame it's not part of VS 2005 itself though,
isn't it? I wonder what proportion of Visual Studio users are aware of
it, for instance. It makes a *huge* difference to productivity, IMO.
Nice, but so far I didn't mind having to right-click and move down the
mouse cursor by a few lines for the same effect. :)

You might think that - but once you get used to being able to hop
around really easily, you find you use it a lot more than you do when
it involves more work. I thought it was just a bit of a gimmick to
start with - but it turns out to be really useful.

Admittedly it's not as useful as it would have been without the
Declaration view - another tab you would normally have in the same way
as Console/Output etc. Leave the cursor over a method name, and it'll
show the declaration and (if it can) the first 10 lines or so of the
code itself. No need even to leave the current editor :)
Fortunately we all can download NUnit for free...

But even with TestDriven.NET, it's far from brilliantly integrated. I
want my green bar right inside my IDE, dammit ;)

(I'm hoping Jamie will be able to write an add-in for 2005 which is
closer to what Eclipse provides, but I don't know whether he's working
on that or not.)
I'm not sure how useful that would be, given that C# compilation is
lightning-fast already.

I have to wait minutes for compilations of large solutions. That can be
a significant headache in some situations. I can't remember the last
time I had to wait more than a couple of seconds in Eclipse.
Does Eclipse automatically rename references in comments, too? That's
my big complaint about Visual Studio's refactoring.

It can, IIRC. It can do all kinds of other things too - like renaming
types which are specified in XML files etc.

I've just been reading about an improvement in Eclipse 3.2M4 (a beta,
basically). If you have:

class Foo
{
static Foo CreateFoo()
{
...
}
}

and rename Foo to Bar, Eclipse offers to do this:

class Bar
{
static Bar CreateBar()
{
...
}
}

I haven't tried it in 2005, but I very much suspect it would leave the
method as CreateFoo.
That's very nice, but can you use this feature from within a source
control application such as Perforce in order to diff revisions? When
I'm differencing files it's usually between work files and checked-in
revisions. Right now I'm using ExamDiff Pro for this job.

Eclipse has plug-ins for many source control providers (and its VSS
plug-in gives a better interface than in Visual Studio, amusingly
enough) - you wouldn't normally go out to a different source control
application, you'd do the diff within Eclipse itself. I don't believe
there's any way of asking Eclipse to do a diff from within a separate
application, but I can't remember wanting that feature often, to be
honest.

As it happens, I've been writing lists of features like this repeatedly
recently. I think it's time to write them up properly - preferrably
with screen-shots. I'll add it to my blog when I get round to it. (Plug
plug ;)
 
S

Sergey M

You can get solution/file/Framework browsers that work this way by
I'll give that a try. Shame it's not part of VS 2005 itself though,
isn't it? I wonder what proportion of Visual Studio users are aware
of
it, for instance. It makes a *huge* difference to productivity, IMO.

A very small portion if I were to guess. I try to promote it as much
as I can though.
 
J

Jon Skeet [C# MVP]

Sergey M said:
A very small portion if I were to guess. I try to promote it as much
as I can though.

Well, having just installed it, SolutionBrowser looks like what I was
after. I'll have to see what it's like at work with a really large
solution. Feature request for next version: if everything has been
typed in capitals, assume those are the first letters of words. For
instance, ANE would find ArgumentNullException. Not a big deal, just
something which can be pretty handy.

Thanks for providing it though - excellent stuff.
 
S

Sergey M

Jon,
Well, having just installed it, SolutionBrowser looks like what I
was after. I'll have to see what it's like at work with a really
large

You might wanna look into Code Browser as well as it's very similar to
Solution Browser but rather works on current project as oppose to the
whole solution. It has more options and doesn't need to pre-parse
solution's code model first time you invoke it, hence faster load time
than with Solution Browser.
typed in capitals, assume those are the first letters of words. For
instance, ANE would find ArgumentNullException. Not a big deal, just
something which can be pretty handy.

Will add it to todo list.
Thanks for providing it though - excellent stuff.

Thanks. If I may make another suggestion: don't overlook numbered
bookmarks feature. It's very useful IMHO.
Well, hopefully that portion might grow a little bit now:
http://msmvps.com/blogs/jon.skeet/archive/2005/12/22/79631.aspx

I appreciate it. And don't hesitate to contact me or use support
forums if you every run into any issues.
 
J

Jon Skeet [C# MVP]

Sergey M said:
You might wanna look into Code Browser as well as it's very similar to
Solution Browser but rather works on current project as oppose to the
whole solution. It has more options and doesn't need to pre-parse
solution's code model first time you invoke it, hence faster load time
than with Solution Browser.
Right.


Will add it to todo list.

Cool :)
Thanks. If I may make another suggestion: don't overlook numbered
bookmarks feature. It's very useful IMHO.

Will look into it. Bookmarks are in Eclipse, but I've hardly used them,
to be honest. The "back to last edit location" usually does anything I
would use a bookmark for. (If I need to remember that I still need to
do something, I put a TODO comment in, and that appears in the Tasks
list.)
I appreciate it. And don't hesitate to contact me or use support
forums if you every run into any issues.

Star :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top