From: Tom Shelton on
Mayayana brought next idea :
>> I asked this question a few weeks ago and never got a straight answer as to
>> why VB.NET is off-topic here. I guess the charade continues.
>>
>
> I know you're only here to cause trouble, but since
> .Net beginners may end up reading this thread, I'll
> answer the question seriously.
>
> No charade. They're two completely different tools.
> Here's a good example.

Actually, it's not. Like with most things, there is more then way to
accomplish a task.
> I just downloaded some VB.Net
> code from PlanetSourceCode. (Which has VB code in one
> category and all .Net code in another category.) This is
> a simple sub to copy a file:
>
> Private Sub copying()
> Try
> System.IO.File.Copy(fromPathAndName, toPathAndName)
> Catch ex As Exception
> errorException = ex
> End Try
> completed = True
> End Sub
>

They author of this code, decided to use the native .net method in the
most wordy way possible. Most people using this method would have
written this as:

Private Sub copying()
Try
File.Copy(fromPathAndName, toPathAndName)
Catch ex As Exception
errorException = ex
End Try
completed = True
End Sub

Of course, most VB coders would have written the above:

Private Sub copying()
Try
FileCopy(fromPathAndName, toPathAndName)
Catch ex As Exception
errorException = ex
End Try
completed = True
End Sub

There are even a few (though, not many) that would have written it:

Private Sub copying()
On Error Goto ErrHandler

File.Copy(fromPathAndName, toPathAndName)
GoTo Done

ErrHandler:
errorException = Err.Number

Done:
completed = True
End Sub

> That code is completely unusable in VB.

No, the code is completely unusable in VB6. In VB7 - VB10, it's quite
usable. Just as:

Dim s As String

s = Replace$("1,2,3,4", ",", "|")
MsgBox s

Is unusable in VB5 and below...

> There's
> no System class. There's no IO class. There's
> no such thing as Catch or Exception or Try.

And there's not InStrRev, Replace, and StrReverse in VB5. What's your
point? Newer version, newer features.

>I've
> been using VB since 1999, but that code makes no
> sense to me. And that's just copying a file.
>

Hmmm.. I wonder what File.Copy might be doing? It's not that hard.

> .Net is for web services, like Java.

That is one thing it can do, yes.

> It was created
> to compete with Java after Microsoft lost the legal
> battle and had to remove their illegal version of
> Java from Windows. At the time everyone was yapping
> about SOAP and web services. Microsoft, as usual,
> jumped on the bandwagon.
>

It's a good thing to do when you customers are asking for it. Remember
the soap toolkit for vb6? Yikes what a night mare.

> Today .Net is popular and well-regarded within
> corporate intranet environments. It more unsuitable
> than ever for use writing Windows software because
> it has vast dependencies , low efficiency , a design
> intended for sandboxing, massive memory demands,
> and poor adaptability to COM.
>
> VB is for compiled Windows software. It's COM-centric
> (as is Windows) and optimized for RAD Windows software
> development.
>

VB.NET is optimized for RAD windows software. Prove otherwise? You
remember the days when people complained about the size of the
vb.clasic runtime? I do.

Still doesn't make it off topic though.

> There was a time when Microsoft was honest about what
> .Net was for. The original press release here:
>
> http://www.microsoft.com/Presspass/press/2000/jul00/pdcdeliverspr.mspx
>
> ...is titled:
>
> Microsoft Delivers First .NET Platform Developer Tools for Building Web
> Services

And? That prove's nothing. Sure, they were touting those features at
the time - they were new... But, that didn't mean it wasn't designed
for windows software development.

--
Tom Shelton


From: Tom Shelton on
Mike Williams was thinking very hard :
> "Viken Cerpovna" <viken(a)spam.com> wrote in message
> news:i3e1bi$8ga$1(a)news.eternal-september.org...
>
>> I asked this question a few weeks ago and never got
>> a straight answer as to why VB.NET is off-topic here.
>
> For the same reason Java is off topic. It is not Visual Basic.

MS says it is. It's there product. If you don't like it, don't use
it. But, that doesn't make it off topic or not visual basic.

--
Tom Shelton


From: news.eternal-september.org on

"Tom Shelton" <tom_shelton(a)comcast.invalid> wrote in message
news:i3edt3$oi3$1(a)news.eternal-september.org...

> Private Sub copying()
> On Error Goto ErrHandler
>
> File.Copy(fromPathAndName, toPathAndName)
> GoTo Done
>
> ErrHandler:
> errorException = Err.Number
>
> Done:
> completed = True
> End Sub
>
>> That code is completely unusable in VB.
>
> No, the code is completely unusable in VB6. In VB7 - VB10, it's quite
> usable. Just as:
>
> Dim s As String
>
> s = Replace$("1,2,3,4", ",", "|")
> MsgBox s
>
> Is unusable in VB5 and below...

I've avoided this but there's no way I could let that stand.

Are you really that stupid?

The point here is that approximately:



99% of VB3 code would work unaltered in VB4

99% of VB4 code would work unaltered in VB5

99% of VB5 code would work unaltered in VB6

<1% of VB6 code would work unaltered in VB7

<0.5% of VB6 code would work unaltered in VB8

Almost no VB6 code would work unaltered in VB9 or VB10

I have no idea about VB7-->VB8, VB8-->VB9 etc



Even you cannot substantially dispute that between VB6 and VB7 there is
almost no similarity, that does not say that the .NET environments are not
good for what they do but they are by no stretch of the imagination a
progression from VB6, to suggest otherwise is at best disingenuous, at worst
a calculated lie.



DaveO.


From: Mike Williams on
"Tom Shelton" <tom_shelton(a)comcast.invalid> wrote in message
news:i3ep27$tcl$1(a)news.eternal-september.org...

> The problem - you didn't know the framework. Seriously,
> you can't approach the conversion without being intimately
> familar with both platforms.

Do you know what makes me laugh most of all? It's the fact that you really
cannot see the implication of that statement you've just made! Hilarious!

Mike




From: Tom Shelton on
Mike Williams submitted this idea :
> "Tom Shelton" <tom_shelton(a)comcast.invalid> wrote in message
> news:i3ep27$tcl$1(a)news.eternal-september.org...
>
>> The problem - you didn't know the framework. Seriously,
>> you can't approach the conversion without being intimately
>> familar with both platforms.
>
> Do you know what makes me laugh most of all? It's the fact that you really
> cannot see the implication of that statement you've just made! Hilarious!

Hmmm... The implication that the framework is very powerful? That
there is a lot of built in functionality that replaces a lot of the
hard work the a VB.CLASSIC app might do?

You misunderstand me I think... Most of the code, could be kept as is
with just a few tweaks... Most conversions I've done go like this:

1) run project through the upgrade wizard
2) look at the upgrade report to see all of the errors.
3) tweak until the app compiles and runs.
4) test, correct any differences in behavior
5) refactor code to optimize for .net (basically, this is the part
where code gets stripped and replaced with framework stuff)
6) test

Don't confuse language with library... There are very few
incompatabilities at the language level (a few, but not many). Where
vb.net and vb.classic differ is mainly on the differences of the
underlying platform and the large class library that vb.net has access
to.

--
Tom Shelton