PC Review


Reply
Thread Tools Rate Thread

From C# going to c++

 
 
herr
Guest
Posts: n/a
 
      7th Jul 2007
Hi all,

For some reasons, I am moving away from managed c# (after using it for 3
years) and want to code my windows application in native C++ (perfomance
issues mainly). I already have a small knowledge of c++, but don't really
know what to read to learn writing advanced windows applications with it.
Any one can help me on my way to mastering c++ windows software writing?
I need some books, tutorials, online communities or what ever you guys just
know tell me.

Thanks for you help anyway!


 
Reply With Quote
 
 
 
 
Ben Voigt [C++ MVP]
Guest
Posts: n/a
 
      7th Jul 2007

"herr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> For some reasons, I am moving away from managed c# (after using it for 3
> years) and want to code my windows application in native C++ (perfomance
> issues mainly). I already have a small knowledge of c++, but don't really


Probably not a good idea to rewrite the whole thing. Use a profiler, find
out what portions of the code have performance problems, and rewrite just
those.

> know what to read to learn writing advanced windows applications with it.
> Any one can help me on my way to mastering c++ windows software writing?
> I need some books, tutorials, online communities or what ever you guys
> just know tell me.
>
> Thanks for you help anyway!
>


 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      7th Jul 2007
herr wrote:
> For some reasons, I am moving away from managed c# (after using it for 3
> years) and want to code my windows application in native C++ (perfomance
> issues mainly).


I am very skeptical on whether you will see significant
performance improvements by that change.

> I already have a small knowledge of c++, but don't really
> know what to read to learn writing advanced windows applications with it.
> Any one can help me on my way to mastering c++ windows software writing?
> I need some books, tutorials, online communities or what ever you guys just
> know tell me.


What GUI library do you want to code against ? Win32 API ? MFC ?
wxWidgets ? Qt ?

Arne
 
Reply With Quote
 
herr
Guest
Posts: n/a
 
      7th Jul 2007

> I am very skeptical on whether you will see significant
> performance improvements by that change.


Then why is it that .net is not used by big software companies like Adobe,
Yahoo, Google and even Microsoft (even in Vista) ? I mean in Desktop
applications.


> What GUI library do you want to code against ? Win32 API ? MFC ?
> wxWidgets ? Qt ?


I don't know! What is the most used GUI library in the market? The best for
windows XP / Vista platforms.




 
Reply With Quote
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      7th Jul 2007
herr wrote:
>> I am very skeptical on whether you will see significant
>> performance improvements by that change.

>
> Then why is it that .net is not used by big software companies like Adobe,
> Yahoo, Google and even Microsoft (even in Vista) ? I mean in Desktop
> applications.


I was not aware that Google and Yahoo made desktop apps.

I am very sure that more and more of MS desktop apps will be
coded using .NET (and Adobe also unless they have cross platform
requirements that prevent them from doing so).

The reason they are not already has probably more to do with the cost
of rewriting millions and millions of lines of code than for
performance reasons.

>> What GUI library do you want to code against ? Win32 API ? MFC ?
>> wxWidgets ? Qt ?

>
> I don't know! What is the most used GUI library in the market? The best for
> windows XP / Vista platforms.


There are a lot MFC code out there.

But I would consider .NET and WPF a much more future proof
route than MFC.

Arne
 
Reply With Quote
 
Peter Duniho
Guest
Posts: n/a
 
      7th Jul 2007
On Sat, 07 Jul 2007 10:11:36 -0700, herr <(E-Mail Removed)> wrote:

> Then why is it that .net is not used by big software companies like
> Adobe,
> Yahoo, Google and even Microsoft (even in Vista) ? I mean in Desktop
> applications.


For a variety of reasons, none of which have anything to do with
performance.

Also, I doubt it's true that the companies you mentioned don't use .NET in
any of their applications. For sure, it's not true for Microsoft, though
as is also the case for Adobe, the major desktop applications (e.g.
Microsoft Office programs) aren't going to be in .NET because .NET wasn't
around when the bulk of the code for those applications was written.

>> What GUI library do you want to code against ? Win32 API ? MFC ?
>> wxWidgets ? Qt ?

>
> I don't know! What is the most used GUI library in the market? The best
> for
> windows XP / Vista platforms.


..NET is IMHO the best GUI library to use on Windows.

If you're not going to use .NET, then you might as well learn the native
Win32 API and stick with that.

Personally, I think the business of "performance issues mainly" is
invalid. Only certain specialized applications would have "performance
issues", and even in those cases that's no reason to abandon .NET
altogether. It _is_ a reason to identify the elements of the application
that are not performing well and do something about it.

But most of your performance problems will turn out to be algorithm design
errors, rather than something inherently slow about .NET, and for the tiny
fraction of things that really are a limitation of .NET, you can implement
those in some other language in a separate module and then call that from
your .NET code. That will allow you to take full advantage of the
services .NET offers without sacrificing performance.

You should, of course, feel free to redevelop your code however you like.
If you want to stop using .NET, that's your perogative. But if you
believe that you will see significant performance gains doing so, I
suspect you are in for some disappointment.

Pete
 
Reply With Quote
 
Ben Rush
Guest
Posts: n/a
 
      7th Jul 2007
"Any one can help me on my way to mastering c++ windows software writing?"

Start fixing your problem by identifying exactly what is poor in your C#
application and fixing it one by one. If you have to ask how to write
advanced windows applications in C++ you're not going to get the performance
gain you expect out of doing something in C++; an application can suck no
matter what language you write it in.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultant
http://www.ben-rush.net/blog
http://www.sideshowsystems.com


"herr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> For some reasons, I am moving away from managed c# (after using it for 3
> years) and want to code my windows application in native C++ (perfomance
> issues mainly). I already have a small knowledge of c++, but don't really
> know what to read to learn writing advanced windows applications with it.
> Any one can help me on my way to mastering c++ windows software writing?
> I need some books, tutorials, online communities or what ever you guys
> just know tell me.
>
> Thanks for you help anyway!
>



 
Reply With Quote
 
OD
Guest
Posts: n/a
 
      7th Jul 2007
Like some others in this thread I'm not sure you will see a big
difference about performances..

I recently wrote a complete test between C# and Delphi 2006, a kind of
benchmark.
Each code does exactly the same thing, one built on BDS 2006, the other
on VS 2005. Each code has been written to respect each language (no
unfair trick to give advantage to one language).
Results are that the C# version is about 25 to 40 % faster than the
Delphi 2006 one (depending on the computer, Intel processors giving
best C# results than AMD ones, but always C# faster than Delphi).

Memory management, strings, maths, file IO, I tested what most
applications are supposed to do when they're working.

So, as I'm knowing C++ is very near Delphi on the performance side (I
tested this a couple of years ago), I think switching to C++ will
decrease the overall performances of your application. And you'll lose
all the benefit of the CLR and the object API of the framework. Win32
API is a mess...

--


OD___
www.e-naxos.com


 
Reply With Quote
 
herr
Guest
Posts: n/a
 
      7th Jul 2007
Thanks guys for your valuable help.

I have one other questions. What is the largest application written in .net?
(except for the Framework itself).

"OD" <webmaster @ e-naxos dot com> wrote in message
news:mn.3cc67d77cb45103c.18651@e-naxosdotcom...
> Like some others in this thread I'm not sure you will see a big difference
> about performances..
>
> I recently wrote a complete test between C# and Delphi 2006, a kind of
> benchmark.
> Each code does exactly the same thing, one built on BDS 2006, the other on
> VS 2005. Each code has been written to respect each language (no unfair
> trick to give advantage to one language).
> Results are that the C# version is about 25 to 40 % faster than the Delphi
> 2006 one (depending on the computer, Intel processors giving best C#
> results than AMD ones, but always C# faster than Delphi).
>
> Memory management, strings, maths, file IO, I tested what most
> applications are supposed to do when they're working.
>
> So, as I'm knowing C++ is very near Delphi on the performance side (I
> tested this a couple of years ago), I think switching to C++ will decrease
> the overall performances of your application. And you'll lose all the
> benefit of the CLR and the object API of the framework. Win32 API is a
> mess...
>
> --
>
>
> OD___
> www.e-naxos.com
>
>



 
Reply With Quote
 
Chris Mullins [MVP]
Guest
Posts: n/a
 
      7th Jul 2007
If you're moving away from .Net, you need to decide what technology you want
to use.

There are several options that come to mind for Windows Forms development:

- You can write a pure C / C++ Win32 application. This is a major pain in
the ass, but is certainly possible. For this, go buy Charles Petzold's book,
"Programming Windows". It's circa 1998 or so - be sure you get the Win32
version, and not the newer C# versions. You'll probably need to end up
buying this book anyway, regardless of which choice you end up making.

- MFC is a good, and very popular choice. There are tons of books out there
on this.

- ATL is probably not the right choice these days - but I don't know the
current status of this technology though, or where it sits in relationship
to MFC.

- You could go with an older Borland product (Delphi or C++ Builder). These
both produce native code - no CLR requried.

- You can use VB6, depending on what you're needing to do.

- There are also a number of libraries out there for C++ you may want to
look at. I've heard good things about qt, although I've never used it.

It's all going to depend on what you're needing to do...

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"herr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> For some reasons, I am moving away from managed c# (after using it for 3
> years) and want to code my windows application in native C++ (perfomance
> issues mainly). I already have a small knowledge of c++, but don't really
> know what to read to learn writing advanced windows applications with it.
> Any one can help me on my way to mastering c++ windows software writing?
> I need some books, tutorials, online communities or what ever you guys
> just know tell me.
>
> Thanks for you help anyway!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
emails not going to outlook they are going to web mail default ac. =?Utf-8?B?c2FsdG1hbg==?= Microsoft Outlook Discussion 2 11th May 2005 12:51 AM
How do I change columns going from left to right to rows going up. =?Utf-8?B?U3RldmU=?= Microsoft Excel Misc 2 7th Apr 2005 05:39 PM
ChkDsk Keeps Going and Going =?Utf-8?B?Rmx5TkZhbGw=?= Windows XP Help 0 29th Mar 2005 03:25 PM
mail that was going to junk mail as directed is now going to inbo. =?Utf-8?B?R2FzbWFu?= Microsoft Outlook Discussion 1 2nd Dec 2004 10:43 PM
Re: out-going mail sitting and not going out Cris Spencer Microsoft Outlook 0 25th Jul 2003 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:44 PM.