473,767 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java developer moving to Windows-Only apps: C++ or C#?

Hi I'm a Java developer moving to windows only applications. Of course
the first thing I thought was "well at least, without the VM now I can
write desktop applications that run real fast".

So I was happily heading to refresh my C++ memory and learn MFC when I
ran into this on Wikipedia:

".... applications written in Managed C++ have automatic garbage
collection and will run via the .NET virtual machine, just as
applications written in C# and Visual Basic .NET do. Additionally,
applications written in Managed C++ compile to CIL-Common
Intermediate Language-and not directly to native CPU instructions
like regular C++ applications do."

Now, it's my understanding that Microsoft is really pushing for all C++
programmer to use Managed C++, and that MFC, while still supported,
will not get too much spotlight on Longhorn. In fact I have read in a
few places that to benefit from the new Aeroglass/Avalon 'look and
feel' you will be pretty much forced to use Managed C++.

So... if you are using Managed C++ you are using a VM, so you basically
lose the 'traditionnal' advantage of C/C++ being 'faster' than C# or
Java. It's almost as if the only reason one would want to use C++ is
because they already know it, certainly not because it will provide
better performance on Longhorn. Basically, almost as if Microsoft was
providing "Backward compatibility".

If that's the case, then I suppose a Java guy like me probably will be
more at home with C#. But before I make the jump and invest a lot of
time and effort in this project, I'd like to ask this group their
opinion first.

I do find this very odd. I installed Paint .Net and noticed the whole
thing runs slow compared to say, Photoshop. It also took an awful lot
of memory for what it did. I can't really imagine Ms would want
EVERYONE to build applications that run within VMs, JIT or not. Sounds
horribly wasteful to me, especially since after all they do have
control over the platform.

TIA,

Steve.

Nov 17 '05 #1
18 2366
<st********@gma il.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
So I was happily heading to refresh my C++ memory and learn MFC when I
ran into this on Wikipedia:

".... applications written in Managed C++ have automatic garbage
collection and will run via the .NET virtual machine, just as
applications written in C# and Visual Basic .NET do. Additionally,
applications written in Managed C++ compile to CIL-Common
Intermediate Language-and not directly to native CPU instructions
like regular C++ applications do."
Right. Note that in the .Net case IL is never executed. It is either
just-in-time compiled to machine code or it is pre-jitted and stored in the
Global Assembly Cache.
Now, it's my understanding that Microsoft is really pushing for all C++
programmer to use Managed C++, and that MFC, while still supported,
will not get too much spotlight on Longhorn.
I think that the operative word is "done". MFC is done in the sense that we
probably won't see much in the way of enhancement or extension though it may
be updated to do some things better, like perhaps interoperating with the
..Net framework.
In fact I have read in a few places that to benefit from the new
Aeroglass/Avalon 'look and feel' you will be pretty much forced
to use Managed C++.
I _think_ that's the case.
So... if you are using Managed C++ you are using a VM, so you basically
lose the 'traditionnal' advantage of C/C++ being 'faster' than C# or
Java. It's almost as if the only reason one would want to use C++ is
because they already know it, certainly not because it will provide
better performance on Longhorn. Basically, almost as if Microsoft was
providing "Backward compatibility".
Well, MC++, soon to be C++/CLI when VS2005 is released, is a special case.
With it it is possible to build an application that contains both managed
and unmanaged code even within the same module. You will appreciate this
feature if you have ever had to use JNI to craft a class with native
methods. It is a lot easier than that, IMO, though there a still enough
details to make it interesting. It is not an either/or proposition.
If that's the case, then I suppose a Java guy like me probably will be
more at home with C#.
Yes.
But before I make the jump and invest a lot of
time and effort in this project, I'd like to ask this group their
opinion first.
It is a crap shoot. You places your bets and you takes your chances. :-) I'm
not sure what to make of it but there seems to be quite a lot more traffic
in the groups that focus on .Net groups than the native side of the house.
I do find this very odd. I installed Paint .Net and noticed the whole
thing runs slow compared to say, Photoshop. It also took an awful lot
of memory for what it did. I can't really imagine Ms would want
EVERYONE to build applications that run within VMs, JIT or not. Sounds
horribly wasteful to me, especially since after all they do have
control over the platform.


In my perfect world everyone would be smart enough and ambitious enough to
do things the right way and able to use C++ without doing harm to
themselves. Sadly, there are not a lot of those people around.

I can't help but think that the situation is a lot like the one in the early
90s when the decision was to choose DOS or Windows. Windows was slow and
bloated (by comparison) and almost no one used assembly language which was
not at all uncommon under DOS. And you didn't get to do everything
yourself - no more INT 21H or writing app-specific print drivers - but
instead on had to use the platform.

Unfortunately for you though, no one can predict when the future comes or
what it will bring.

Regards,
Will
Nov 17 '05 #2
Are you in for a nasty shock! VC++ 2005 is a disaster - at least from what I
have seen from the Express Beta Edition. Managed code is Microsoft's buzzword
for controlled memory management (garbage collection as in Java). Trying to
write even the most simple application is a Herculean task. Most of the
traditional C++ functions have been deprecated in favour of the 'managed
ones'.

Some facts I learned very fast:
- The Beta Edition crashes for no reason at all.
- Compiler output is not trustworthy (It may report that the compilation was
unsuccessful but it was in fact successful). There is a serious problem with
the compiler not knowing the status of certain files and resources, i.e. it
may not compile your code because it thinks a resource/file is locked when
in actual fact it is not.
- Using managed code and handles is very difficult. The ^ (handle to object)
can only be used with managed objects.
- The Document Explorer (MS help feature) is vague, unorganized and full of
bugs (back and forward browser buttons don't work consistently).
- You may lose parts of your 'solution' (project) by just clicking
accidentally in
one of your source files. An error window pops up and tells you to restart
the
application in order to rebuild the solution. A million other windows pop up
asking if they can send bug reports to MS. It is a joke.
- You may not be able to monitor certain variables because the compiler thinks
they are out of scope.

Actually I could go on and on but I see no sense in it. I have already
uninstalled the
VC++ Express Edition and will not look at this again until MS brings out a
version which is truly 'beta'. The version they claim is beta is in actual
fact more of an 'omega' version which they are bringing to 'beta' phase by
exploiting newsgroup users and the public in general as an unpaid Quality
Control department.

Join the ranks of all of MS unpaid software developers/testers !!

Good luck.

John Gabriel

"st********@gma il.com" wrote:
Hi I'm a Java developer moving to windows only applications. Of course
the first thing I thought was "well at least, without the VM now I can
write desktop applications that run real fast".

So I was happily heading to refresh my C++ memory and learn MFC when I
ran into this on Wikipedia:

".... applications written in Managed C++ have automatic garbage
collection and will run via the .NET virtual machine, just as
applications written in C# and Visual Basic .NET do. Additionally,
applications written in Managed C++ compile to CIL-Common
Intermediate Language-and not directly to native CPU instructions
like regular C++ applications do."

Now, it's my understanding that Microsoft is really pushing for all C++
programmer to use Managed C++, and that MFC, while still supported,
will not get too much spotlight on Longhorn. In fact I have read in a
few places that to benefit from the new Aeroglass/Avalon 'look and
feel' you will be pretty much forced to use Managed C++.

So... if you are using Managed C++ you are using a VM, so you basically
lose the 'traditionnal' advantage of C/C++ being 'faster' than C# or
Java. It's almost as if the only reason one would want to use C++ is
because they already know it, certainly not because it will provide
better performance on Longhorn. Basically, almost as if Microsoft was
providing "Backward compatibility".

If that's the case, then I suppose a Java guy like me probably will be
more at home with C#. But before I make the jump and invest a lot of
time and effort in this project, I'd like to ask this group their
opinion first.

I do find this very odd. I installed Paint .Net and noticed the whole
thing runs slow compared to say, Photoshop. It also took an awful lot
of memory for what it did. I can't really imagine Ms would want
EVERYONE to build applications that run within VMs, JIT or not. Sounds
horribly wasteful to me, especially since after all they do have
control over the platform.

TIA,

Steve.

Nov 17 '05 #3
John Gabriel wrote:
Are you in for a nasty shock! VC++ 2005 is a disaster - at least from what I
have seen from the Express Beta Edition.

Have you tested Beta software before in your life?
Nov 17 '05 #4
Ioannis Vranos <iv*@remove.thi s.grad.com> wrote:
Have you tested Beta software before in your life?


I have, I'm still running VS.NET 2003. That's still beta, isn't it -- or
did they fix all the bugs and somehow I missed it?

--
harry
Nov 17 '05 #5
Probably much longer than you have been around Ioannis!
I have been a developer over 20 years. I have several firsts to my name.
Was around before the first PC or Microsoft appeared.
Started off as a COBOL programmer writing software on punched cards.
Have I ever tested 'beta' software in my life? Hmmm, let me see? Yes, I
think I have.

"Ioannis Vranos" wrote:
John Gabriel wrote:
Are you in for a nasty shock! VC++ 2005 is a disaster - at least from what I
have seen from the Express Beta Edition.

Have you tested Beta software before in your life?

Nov 17 '05 #6
Harry,
VC.NET 2003 is only starting to get close to 'beta' now. :-) It was
'omega' when you got it. With the help of fine programmers like you and the
public, MS has outsourced quality management to the public which it does not
even pay for!

If MS was to pay $1000 for each bug reported, I have no doubt we would be
multimillionair es in no time at all.

John Gabriel

"harry_bosc h" wrote:
Ioannis Vranos <iv*@remove.thi s.grad.com> wrote:
Have you tested Beta software before in your life?


I have, I'm still running VS.NET 2003. That's still beta, isn't it -- or
did they fix all the bugs and somehow I missed it?

--
harry

Nov 17 '05 #7
John Gabriel wrote:
Probably much longer than you have been around Ioannis!
I have been a developer over 20 years. I have several firsts to my name.
Was around before the first PC or Microsoft appeared.
Started off as a COBOL programmer writing software on punched cards.
Have I ever tested 'beta' software in my life? Hmmm, let me see? Yes, I
think I have.

OK, just checking out. Myself think that these releases should be called alphas and not betas:

http://groups.google.com/groups?q=al...phx.gbl&rnum=1
My personal opinion is that their primary purpose for general availability of the Express
Beta versions is not Beta testing but technology preview.

Regarding VS 2003, I think it is stable, so I can't understand any VS 2003 instability
allegations (by anyone, I do not remember whom).

Also Beta 2 is much more stable than Beta 1, so I do not think Beta 2 instability is any
indicator of the final product instability.

Regarding "handles" etc, perhaps this page of mine may provide some insight:

http://www23.brinkster.com/noicys/cppcli.htm
Nov 17 '05 #8
Hi,
Traditionally, beta is the second phase of software release and usually
the last one. In the 1980s we would talk about it the other way around, i.e.
alpha is the version before production. What this means is that 2 testing
phases were not necessarily enough for the
quality management. It would generally be agreed that n phases were required
and then a countdown would begin so that alpha would be the most stable. Each
phase would have its own scope and objectives. By the time you reach alpha
phase, there should be no show-stoppers remaining. As an example, this VC++
2005 express edition has numerous show-stoppers. In fact, it is unacceptable
for commercial use. Under no circumstances should an IDE terminate abruptly
with loss of files and data. At the very least, the compiler mechanism should
report accurately the results of compilation. The express edition allows you
to perform a build without any changes given a faulty compilation. It
subsequently reports no compile errors. How can this be? Okay, so customer
would have to build any project TWICE just to be sure that it either compiled
or did not compile correctly. The documentation is another issue - I know
that it can't be 100% bug-free but there are levels of acceptance. This
version does not even pass the first level in my opinion. The IDE is sooo
cluttered, soooo complicated - in trying to do too much, MS ends up doing
very little and annoying those whom it's trying to satisfy. There is just too
*much* going on in Express edition.

I don't have a problem with managed code except that that I don't like it
stuffed down my throat. Am open to new ideas and advancement but it must
work. I think the first version of DOS probably had far less errors than
Express edition.

The good ideas: I like the look and feel of the IDE as far as the Toolboxes,
Property Sheets, etc are concerned and also all the auxiliary code generated
automatically. It makes for less coding but becomes far more complex, slower
and takes away more control from the programmer. Good programming is not made
possible by managed code but rather by disciplined programmers. Taking away
control from the programmer is not the solution.
And what's this thing with new terminology: 'solution' etc? Why not just
stick with the original names? I have not worked on VC 2003 but I bet a
conversion from this to 2005 will not be a straightforward task either.

One last thing: A lot of bugs go unreported because programmers find
workarounds and MS takes too long to resolve the issues. In my experience, MS
often does not even respond to my bug reports. They are simply never fixed.
If there is a workaround you are expected to use it.

John Gabriel

"Ioannis Vranos" wrote:
John Gabriel wrote:
Probably much longer than you have been around Ioannis!
I have been a developer over 20 years. I have several firsts to my name.
Was around before the first PC or Microsoft appeared.
Started off as a COBOL programmer writing software on punched cards.
Have I ever tested 'beta' software in my life? Hmmm, let me see? Yes, I
think I have.

OK, just checking out. Myself think that these releases should be called alphas and not betas:

http://groups.google.com/groups?q=al...phx.gbl&rnum=1
My personal opinion is that their primary purpose for general availability of the Express
Beta versions is not Beta testing but technology preview.

Regarding VS 2003, I think it is stable, so I can't understand any VS 2003 instability
allegations (by anyone, I do not remember whom).

Also Beta 2 is much more stable than Beta 1, so I do not think Beta 2 instability is any
indicator of the final product instability.

Regarding "handles" etc, perhaps this page of mine may provide some insight:

http://www23.brinkster.com/noicys/cppcli.htm

Nov 17 '05 #9
John Gabriel wrote:
Hi,
Traditionally, beta is the second phase of software release and usually
the last one. In the 1980s we would talk about it the other way around, i.e.
alpha is the version before production.

I had alpha as the first phase in mind, when I was talking about that.
What this means is that 2 testing
phases were not necessarily enough for the
quality management. It would generally be agreed that n phases were required
and then a countdown would begin so that alpha would be the most stable. Each
phase would have its own scope and objectives. By the time you reach alpha
phase, there should be no show-stoppers remaining. As an example, this VC++
2005 express edition has numerous show-stoppers. In fact, it is unacceptable
for commercial use.

I agree. MS general jumps to "Beta" terminology directly and calls "Release Candidates"
(or Final Betas) what should be called as Betas.
In any case, I expect the final product to be stable when it is released, and if you want
to see real "Beta", I think you should wait for the first release candidate whenever that
happens.
Under no circumstances should an IDE terminate abruptly
with loss of files and data. At the very least, the compiler mechanism should
report accurately the results of compilation.

I know, myself uses mainly the compiler of these "Betas" in the command line.
The express edition allows you
to perform a build without any changes given a faulty compilation. It
subsequently reports no compile errors. How can this be? Okay, so customer
would have to build any project TWICE just to be sure that it either compiled
or did not compile correctly. The documentation is another issue - I know
that it can't be 100% bug-free but there are levels of acceptance. This
version does not even pass the first level in my opinion. The IDE is sooo
cluttered, soooo complicated - in trying to do too much, MS ends up doing
very little and annoying those whom it's trying to satisfy. There is just too
*much* going on in Express edition.

I don't have a problem with managed code except that that I don't like it
stuffed down my throat. Am open to new ideas and advancement but it must
work. I think the first version of DOS probably had far less errors than
Express edition.

Again, I think you should wait to see how the final version will look like.
In another matter, Express editions are aimed for students/hobbyists and are not aimed to
professional development. I am talking about features here and not about stability.


The good ideas: I like the look and feel of the IDE as far as the Toolboxes,
Property Sheets, etc are concerned and also all the auxiliary code generated
automatically. It makes for less coding but becomes far more complex, slower
and takes away more control from the programmer. Good programming is not made
possible by managed code but rather by disciplined programmers.

As always. I think .NET however is much high-level and more convenient than MFC, Win32,
COM, etc. Plus it provides the same API for all languages and thus you do not have to
learn a new Windows API for another language.
Also it enables different parts of an application to be written in different languages by
being shared as managed dlls.

Taking away
control from the programmer is not the solution.

Regarding C++, I see no loss of control. May you provide an example?

And what's this thing with new terminology: 'solution' etc? Why not just
stick with the original names? I have not worked on VC 2003 but I bet a
conversion from this to 2005 will not be a straightforward task either.

I am new to Windows programming (learning .NET directly), so I do not know the previous
VC++ terminologies.

As far as I can understand, a solution is a project containing one or more projects. In VS
2003 you can join different projects in one solution and compile them together (apart from
VC++ ones, perhaps it can be done mixed with VC# projects etc, apart from the dll approach
that I mentioned above).

One last thing: A lot of bugs go unreported because programmers find
workarounds and MS takes too long to resolve the issues. In my experience, MS
often does not even respond to my bug reports. They are simply never fixed.
If there is a workaround you are expected to use it.

I think they must make their bug-reporting mechanism more open than what is currently.
Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6013
by: Robert Bralic | last post by:
Hello, I writed small graphical editor for probabilystic networks in JAVA, but there was problem with making save file inJAVA. I thinked about it and I concluded that Save in JAVA is great error. If is possibile to mke save in JAVA then is posible tha make save in any
0
2239
by: asj | last post by:
luke: BORRRRRRRRING......the most interesting initiatives are happening on the client side - in small wireless devices such as cellphones and smartphones, where J2ME has become the de facto standard for application development. Article from Javaworld.com: "Java everywhere is for world domination" http://www.javaworld.com/javaworld/jw-08-2003/jw-0822-wireless.html? Some quotes:
13
472
by: Moonraker | last post by:
After working extensively with .Net and Java, these are the differences I see: Java does not have Reflection.Emit But it does have Reflection. That's okay so far, because most programmers are too dumb to use Reflection.Emit. Visual Studio .net is the easiest way to create web services.
25
3183
by: wee | last post by:
I've been using Java for a few years now and am just amazed at how many new "technologies" or tools come out all the time (i.e., Struts, Java Server Faces, JMeter, jad, etc.). It is nigh impossible to keep up on everything. It seems almost like it's a fad in which you've got to know the next new thing or you aren't much. I've always wondered: does the C++ world do this? Are there new libraries coming out all the time, new paradigms, or...
5
14718
by: Hassan Naqvi | last post by:
Hi, Basically, I am Java developer. In past I have played with Oracle using Java (JDBC). But this is the time to play with IBM DB2 using Java (JDBC). So kindly help this DB2 newbie. I have a file of 32 MB, named as "fdbk5.0". This is actually a database created in DB2 and containing records. I am interested in viewing the *structure of this database, i.e. table names, column names and finally all the records. How I can do this? Which...
9
1813
by: babylon | last post by:
i just read this (http://java.sun.com/developer/technicalArticles/releases/j2se15/) am I correcting on these concepts? Java Metadata == C# Attribute (java learn from c#?) Java Generics == C# Generics (any other difference?i heard that C#'s generic is faster) Java autoboxing == C# autoboxing (java learn from c#?) java enchanced for == C# foreach ( (java learn from c#?) java enumerated type == c# enum (java learn from c#?) java static...
11
1312
by: redefined.horizons | last post by:
I wanted to thank those members of the Python community that took the time to answer my questions about interfaces and plug-ins in Python. I have discovered that Python is a very powerful language, and one that I look forward to using for Linux development. I have found the support for Python much better than that for Mono, and I will be moving development of my Linux applications to Python. Thank you again for the help. Scott Huey
5
1801
by: Abhinay | last post by:
Hi there, I am new in java, I was C++ developer. I have to develop echo server using java which would be run on windows , I am ready with server logic. I am stuck in basic code of java server as I don't understand how to write code for server start / stop as well run java server as daemon process ( like C++ ). Is there any thing in java simillar to windows services in C++ ?? Please suggest me, your help will make me happy.
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10009
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.