Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TriWolf

C#, MFC, C++ and what I should do

This topic is 6483 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m a bit lost now because of Micro$oft. I hear about win64 and .NET. Well I should be getting a programming job in 2 years. I was wondering should I learn MFC, ATL, COM+, and programming for Win32 Api. Or will the Win64 API be out then. I don''t wwant to waste time or money learning something that C# and the next gen of programming tools will replace. Know what I mean. This is all to confusing. Also I am almost done with my C++ Book(Jesse Liberty: Teach yourself C++ in 21 Days) what would be the next appropiate step to take. I''m thinking a programming Windows book. Overall I''m confused so please Help. Thanks for your time. Timothy "TriWolf" Russell

Share this post


Link to post
Share on other sites
Advertisement
You can learn the basics of the Win32 API at WinProg.org. C# (C Sharp) isn''t meant to replace C or C++, it is simply meant to be Microsoft''s replacement for Java. So, it is meant to replace Java, but it can only be run in Windows, which kind of sucks .

I don''t think that the Win64 API will be all too different from the Win32 API in the end, but I don''t have any proof of that .

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites
C# can only be run in Windows? Wierd, that''s not what it''s inventors - or even Microsoft - have to say! There''s a lot of confusion over .net, and MS''s various standards right now, so I guess I might as well try and clear the water a little. [Note - I don''t work for Microsoft, but they do send me a lot of stuff in the mail!]. Anyway, here''s a quick runthrough of various MS technologies:

Quick tour of MS terminology
C# is a language, and will be submitted to various standards body. C# is completely independent of COM, COM+, DCOM and the various other proprietary Windows standards. Sure, the Visual Studio.NET version makes it REALLY easy to create COM objects, but the language is just fine without them. So if C# takes off, there''s no reason at all why it can''t exist on any platform. C# looks like a good learner language - it appears to offer a somewhat better thought out "everything is an object" implementation than Java (in which almost everything is an object), and obvious deficiencies such as templates are being resolved right now.

Win64 is the 64-bit version of Win32, and is very heavily based on Win32. A fair amount of Win32 code will recompile quite nicely to the 64-bit model. Currently, the Itanium is the only chip (and its not even out yet!) for which Win64 is relevant - and it won''t be commonplace for a very long time.

MFC is the Microsoft Foundation Class, a quite powerful set of C++ classes for building regular Windows programs. Its been around since Windows 3.1, and most of the old Win16 techniques translated readily into Win32 - and it looks like porting MFC applications to Win64 will be even easier. MFC is also quite an easy route to go for porting apps to Windows CE - but don''t expect to be able to compile an MFC app on any of the various UNIX flavours!

COM+ is "COM done right." Basically, its an object model that lets you derive all past versions of an interface from a single source - thus (partly!) solving the "but this app needs a version 6 interface, and I installed version 7!" problem familar to anyone who has worked with glibc. COM+ isn''t likely to go away - and C# makes it a LOT easier to write COM components than it used to be. COM is pretty neat - its really handy to be able to grab part of Internet Explorer and use it in your apps, whether your app is an active server webpage (IE''s HTML handler is great for active pages!) or a full-scale application. COM components can be written in any language.

ATL is basically "COM lite", and is largely used for lightweight server components that are designed to be created/disposed of on a regular basis. COM components can be a bit too heavy for this kind of usage, and ATL was a response to this. ATL might be phased out, but it has enough vocal supporters that I doubt it.

.NET is the initiative to watch. .NET is about a LOT more than simply recompiling your programs for the web! Simply put, .NET is a "windows everywhere" technology, potentially delivery system independent (unless you WANT to use a specific delivery technique). At its lowest level, its a common language runtime/just in time compiler system that enables ANY language to be compiled into pseudocode that can then be translated into native code when needed/installed (at the programmer''s choice). Currently, you are limited to C#, C++ or VB as the languages, but demonstrations of FORTH and LISP exist. Its even possible to setup Java as the language from which to compile, but Sun would never allow it. .Net portability comes at the cost of low-level machine support, and relies on the existence of common runtimes to support various interface features. MS claim to have run .net apps on everything from Red Hat Linux to Solaris, as well as the obvious (Windows).

Recommended Next Steps
First off, if you are learning programming solely as a job skill, then you are probably in the wrong field - it really is a "do it because you love it" field, in many ways. I''m going to hope that''s not the case!
Once you''ve mastered basic C++, you might want to look into one of the "Mastering MFC" or similar books if you want to learn regular Windows programming. These almost all include COM+, and often ATL - and if they don''t, you''ll have enough knowledge to create almost any applications. If you can find one, though, I strongly recommend taking the time to read a book/tutorial explaining how to write a Win32 app without an object layer. You learn a lot more about how Windows works that way, and even though most of the time you''ll want to use something like MFC for Windows development, you''ll have gained enough theoretical background to make SOLID Windows programs. :-)
If C# were released in a non-beta form, and authors had had time to write about it, I''d recommend studying it. Even if you never use it, it''s close enough to both C++ and Java that anything you learn is interchangeable - and its "pure" enough in its methodologies that it should make a great learning language.

One last thing: never be afraid of theory. Languages, APIs, Operating Systems and specifics come and go, but baseline theory will always help you.

Share this post


Link to post
Share on other sites
I agree with Bracket, don''t focus on the implementation focus on the DESIGN. Instead of picking up a programming or API book, pick up "Design Patterns" or "UML" or something of that nature. Heck I''d even recommend reviewing anti-patterns before I''d tell you to chase an api. Learn the theory and you can turn your hand to any language with ease. What will you do if confronted with Vignette,Broadvision or websphere if you don''t understand theory? ok I''m coming down a little hard on you now. Sorry.
fs

http://www.CornflakeZone.com
//-- Modelling and animation in every dimension --//

Share this post


Link to post
Share on other sites
Thanks guys you really helped(Esp. Bracket). No I am not programming just for a job I love doing it. I love playing games so I want to be a computer game programmer It''s so much fun and so unique than anything I''ve everdone .

Timothy "TriWolf" Russell

Share this post


Link to post
Share on other sites
quote:
Original post by Bracket
Currently, the Itanium is the only chip (and its not even out yet!) for which Win64 is relevant - and it won''t be commonplace for a very long time.


Actually, Microsoft has already made moves to support the AMD x86-64 architecture as well. The chips that AMD is making with that architecture are the Sledgehammer (server and workstation chip) and the Clawhammer (home variety). Of course, AMD''s 64 bit chips will also support 32 bit just fine .

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!