Connecting Tech Pros Worldwide Forums | Help | Site Map

stay in vb6, or move to csharp?

Elhanan maayan
Guest
 
Posts: n/a
#1: Nov 16 '05
hi all..

i work in a company that deals with mainly with hardware devices via serial
comm port. up untill most of the software was writeen in plain old dos c.

that company is planning to move it's applications to windows. the
applications themselves are rather small, they usually just extract binary
data from devices store them in a database or a file and present them in a
report format. the application are being distributed sold outwards, and not
developed for the company itself, so ease of distribution is important (we
have install shield express x).





Ansil MCAD
Guest
 
Posts: n/a
#2: Nov 16 '05

re: stay in vb6, or move to csharp?


hi
move to c# .That is my advise.
regards
ansil



"Elhanan maayan" wrote:
[color=blue]
> hi all..
>
> i work in a company that deals with mainly with hardware devices via serial
> comm port. up untill most of the software was writeen in plain old dos c.
>
> that company is planning to move it's applications to windows. the
> applications themselves are rather small, they usually just extract binary
> data from devices store them in a database or a file and present them in a
> report format. the application are being distributed sold outwards, and not
> developed for the company itself, so ease of distribution is important (we
> have install shield express x).
>
>
>
>
>[/color]
Bob Grommes
Guest
 
Posts: n/a
#3: Nov 16 '05

re: stay in vb6, or move to csharp?


Whether you use C#, J#, S#, VB.NET, Eiffel.NET, COBOL.NET, or whatever .NET
compiler you might choose, it all uses the same common language runtime.
Your language choice boils down to a matter of personal preference and
potentially, whatever minor advantages a particular language syntax might
afford you in your particular environment. For example, VB.NET is slightly
easier to do late binding with; Eiffel kludges multiple inheritance on top
of the CLR, and so forth.

Obviously those of us on this particular newsgroup prefer C#, for reasons
good, bad and indifferent.

Since your legacy code is written in C, it would seem to me that porting to
C# would be your easiest route and your shallowest learning curve. There is
really nothing compelling about VB.NET that I can see for your scenario.

--Bob

"Elhanan maayan" <emaayan@msn.com> wrote in message
news:e7sNzKpqEHA.3868@TK2MSFTNGP15.phx.gbl...[color=blue]
> hi all..
>
> i work in a company that deals with mainly with hardware devices via
> serial
> comm port. up untill most of the software was writeen in plain old dos c.
>
> that company is planning to move it's applications to windows. the
> applications themselves are rather small, they usually just extract binary
> data from devices store them in a database or a file and present them in a
> report format. the application are being distributed sold outwards, and
> not
> developed for the company itself, so ease of distribution is important (we
> have install shield express x).[/color]


cody
Guest
 
Posts: n/a
#4: Nov 16 '05

re: stay in vb6, or move to csharp?


After everybody told you that .NET and C# are good I have to come with some
drawbacks.

If you are using .NET, you have to ship the .NET framework (~20mb) along
with your apps.
Also, everybody can simply decompile (not just disassemble!) your programs.
Using obfuscator tools will obfuscate some identifiers but does not really
get rid of this problem.
Additionally, if you plan to make your programs run under another OS you
cannot use .NET (at least if you are using a GUI).

These 3 are the big disadvantages that I can see with .NET, but there are
much more advantages for example a big class library, fully
interoperability, safety, security and less debugging.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Elhanan maayan" <emaayan@msn.com> schrieb im Newsbeitrag
news:e7sNzKpqEHA.3868@TK2MSFTNGP15.phx.gbl...[color=blue]
> hi all..
>
> i work in a company that deals with mainly with hardware devices via[/color]
serial[color=blue]
> comm port. up untill most of the software was writeen in plain old dos c.
>
> that company is planning to move it's applications to windows. the
> applications themselves are rather small, they usually just extract binary
> data from devices store them in a database or a file and present them in a
> report format. the application are being distributed sold outwards, and[/color]
not[color=blue]
> developed for the company itself, so ease of distribution is important (we
> have install shield express x).
>
>
>
>[/color]


Daniel O'Connell [C# MVP]
Guest
 
Posts: n/a
#5: Nov 16 '05

re: stay in vb6, or move to csharp?


> Additionally, if you plan to make your programs run under another OS you[color=blue]
> cannot use .NET (at least if you are using a GUI).[/color]

That is a bit of a non-issue. If you write a GUI specific to any platform in
any langauge, you are out of luck. If you can choose a cross platform
library in C++, you can choose one in .NET(I think wxWindows has a .NET
library\wrapper out now, and there is GTK#).

Also, VB6 doesn't have any support on other OS's, so .NET would be *more*
support than the other option suggested in the title.


Michael Voss
Guest
 
Posts: n/a
#6: Nov 16 '05

re: stay in vb6, or move to csharp?


Elhanan maayan wrote:

[...snip...][color=blue]
> i work in a company that deals with mainly with hardware devices via[/color]
serial[color=blue]
> comm port. up untill most of the software was writeen in plain old dos c.[/color]
[...snip...]

IIRC, C# does not support serial communication out of the box, though there
are some (free / commercial) solutions available (mostly PInvoke, I guess).
Not much of a problem, I'd think, but .NET 2.0 might be able to support
serial communication without having to manually invoke os resources.

Someone who knows better ?



Jon Skeet [C# MVP]
Guest
 
Posts: n/a
#7: Nov 16 '05

re: stay in vb6, or move to csharp?


Michael Voss <michael.voss@lvrREMOVE.deCAPS> wrote:[color=blue]
> Elhanan maayan wrote:
>
> [...snip...][color=green]
> > i work in a company that deals with mainly with hardware devices via[/color]
> serial[color=green]
> > comm port. up untill most of the software was writeen in plain old dos c.[/color]
> [...snip...]
>
> IIRC, C# does not support serial communication out of the box, though there
> are some (free / commercial) solutions available (mostly PInvoke, I guess).
> Not much of a problem, I'd think, but .NET 2.0 might be able to support
> serial communication without having to manually invoke os resources.[/color]

Yup - see http://msdn2.microsoft.com/library/System.IO.Ports.aspx

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#8: Nov 16 '05

re: stay in vb6, or move to csharp?


Hi,

I may be get excomulgated : ) but...

why don't just change to C++ for win, as per your description the core of
your system is serial com. nothing to do with UI so it should be pretty easy
to convert to a win32 dll or COM.

For the UI you can use either MFC or even VB6 ( now my soul is definely
lost )

If you want to learn .NET you can use the win32 DLL or COM created with the
serial comms lib. and use Crystal Reports for the reports.

Anyway, the thing is that you have several paths to develop you have to
select the best based on the current knowledge base and future directions.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"Elhanan maayan" <emaayan@msn.com> wrote in message
news:e7sNzKpqEHA.3868@TK2MSFTNGP15.phx.gbl...[color=blue]
> hi all..
>
> i work in a company that deals with mainly with hardware devices via[/color]
serial[color=blue]
> comm port. up untill most of the software was writeen in plain old dos c.
>
> that company is planning to move it's applications to windows. the
> applications themselves are rather small, they usually just extract binary
> data from devices store them in a database or a file and present them in a
> report format. the application are being distributed sold outwards, and[/color]
not[color=blue]
> developed for the company itself, so ease of distribution is important (we
> have install shield express x).
>
>
>
>[/color]


Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#9: Nov 16 '05

re: stay in vb6, or move to csharp?


Hi,


I think that those are not the biggest problems, but the codebase and the
knowledge of the programmers, they know C for sure
and the code base itself which is C code, this is easier to convert it to a
win32 DLL or COM object, if written in C/C++ they should work almost with no
change.
IF they convert them to c# the old codebase will have to be discarded and
rewritten from scrash.

Those I think should be the main consideration, if they want to move to a
managed environment they can keep the core in win32 and write the UI apps in
..NET to make the transition more smooth.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation



"cody" <no_spam_deutronium@gmx.net> wrote in message
news:egz5XOrqEHA.2424@TK2MSFTNGP10.phx.gbl...[color=blue]
> After everybody told you that .NET and C# are good I have to come with[/color]
some[color=blue]
> drawbacks.
>
> If you are using .NET, you have to ship the .NET framework (~20mb) along
> with your apps.
> Also, everybody can simply decompile (not just disassemble!) your[/color]
programs.[color=blue]
> Using obfuscator tools will obfuscate some identifiers but does not really
> get rid of this problem.
> Additionally, if you plan to make your programs run under another OS you
> cannot use .NET (at least if you are using a GUI).
>
> These 3 are the big disadvantages that I can see with .NET, but there are
> much more advantages for example a big class library, fully
> interoperability, safety, security and less debugging.
>
> --
> cody
>
> Freeware Tools, Games and Humour
> http://www.deutronium.de.vu || http://www.deutronium.tk
> "Elhanan maayan" <emaayan@msn.com> schrieb im Newsbeitrag
> news:e7sNzKpqEHA.3868@TK2MSFTNGP15.phx.gbl...[color=green]
> > hi all..
> >
> > i work in a company that deals with mainly with hardware devices via[/color]
> serial[color=green]
> > comm port. up untill most of the software was writeen in plain old dos[/color][/color]
c.[color=blue][color=green]
> >
> > that company is planning to move it's applications to windows. the
> > applications themselves are rather small, they usually just extract[/color][/color]
binary[color=blue][color=green]
> > data from devices store them in a database or a file and present them in[/color][/color]
a[color=blue][color=green]
> > report format. the application are being distributed sold outwards, and[/color]
> not[color=green]
> > developed for the company itself, so ease of distribution is important[/color][/color]
(we[color=blue][color=green]
> > have install shield express x).
> >
> >
> >
> >[/color]
>
>[/color]


jamie
Guest
 
Posts: n/a
#10: Nov 16 '05

re: stay in vb6, or move to csharp?


[color=blue]
> IIRC, C# does not support serial communication out of the box, though there
> are some (free / commercial) solutions available (mostly PInvoke, I guess).
> Not much of a problem, I'd think, but .NET 2.0 might be able to support
> serial communication without having to manually invoke os resources.
>
> Someone who knows better ?
>
>
>[/color]

Under framework 1.1 I use the same ActiveX control that VB6 is using
MSCOMM32.dll.

Jamie
Ignacio Machin \( .NET/ C# MVP \)
Guest
 
Posts: n/a
#11: Nov 16 '05

re: stay in vb6, or move to csharp?


Hi,


[color=blue]
> IIRC, C# does not support serial communication out of the box, though[/color]
there[color=blue]
> are some (free / commercial) solutions available (mostly PInvoke, I[/color]
guess).[color=blue]
> Not much of a problem, I'd think, but .NET 2.0 might be able to support
> serial communication without having to manually invoke os resources.
>
> Someone who knows better ?[/color]

IMO it does not matter that much if the framework itself does not support
it, you have several well documented and FREE implementations
(opennetcf.org ) of serial communications. You can use them with no problem.
The 2.0 provide serial functionality but unless you wait until it's released
you will have to use one of the current implementation, and after doing so,
why change it to use the framework's implementation?

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


Daniel O'Connell [C# MVP]
Guest
 
Posts: n/a
#12: Nov 16 '05

re: stay in vb6, or move to csharp?



"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:ulXnCftqEHA.1992@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi,
>
> I may be get excomulgated : ) but...
>
> why don't just change to C++ for win, as per your description the core of
> your system is serial com. nothing to do with UI so it should be pretty
> easy
> to convert to a win32 dll or COM.
>
> For the UI you can use either MFC or even VB6 ( now my soul is definely
> lost )[/color]

I tend to agree, although there is no reason to avoid managed C++ to create
unmanged nad managed interfaces to your core code and the use C# for
wrappers.



Closed Thread


Similar C# / C Sharp bytes