Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is MFC Legacy?

Posted on 1999-07-23
26
Medium Priority
?
533 Views
Last Modified: 2013-11-25
3 years ago i beat my head against the wall learning programming & MFC on top - at that time asp was king.  6 months ago i moved to web design & i am stuck writing this bogus asp script all the time.  I would much prefer c++ mfc or even some sdk - but its over - all that energy wasted..
I would even argue c++ is becoming legacy - minimal new development, mostly maintance as people jump ship..  I am a huge c++ fan & worked hard to develop skills in it - what now..

anyone agree or disagree?  
0
Comment
Question by:jkramer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 3
  • +6
26 Comments
 
LVL 3

Expert Comment

by:VCGuru
ID: 1311178
why the hell are u giving out points. MFC is the best!! Anybody disagree?!!
0
 

Author Comment

by:jkramer
ID: 1311179
mfc is done.  just look in the paper guy - how many jobs are out there for it - i'm not happy about it - just the facts..  it's too difficult for the masses..  you think i'm happy to hear vb programmers tell me they can do anything in vb that you can in mfc - oh and com is so much simpler - if not, where is the next mfc library?  what's the future hold for mfc?
0
 
LVL 3

Expert Comment

by:VCGuru
ID: 1311180
Hey pal, who says anything can be done in VB. I'd like to talk to him. Ask him to do a simple multithreaded program and he'll give you reasons why he can't!
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

Author Comment

by:jkramer
ID: 1311181
why cant he - please explain?  what about writing com objects - these dudes say 'oh it's nothing - right through the wizard & your done..  

any word on future releases of mfc or what?  did msft give up on it too?
0
 
LVL 1

Expert Comment

by:SD_Adept
ID: 1311182

I hear a lot of VB programmers talking about how VB is the glorious end all.  ..... well... I also hear a lot of idiot mac heads talk about how the mac will rise again and conquer the earth.  My point is, some people get married to a particular technology or machine and they don't know how to think otherwise.

Just about every technology has its upsides.  VBScript, jscript, HTML, and java are great for web based applications.  ATL/STL seems to be great for that as well but is also good for very lightweight applications, COM objects, controls and system services.  MFC is great for enterprise applications and GUI intensive projects.  I have left a lot of technologies out here, but, like I said, my point is that one technology won't solve all your problems in the best way.

the fact is, MFC may indeed be going away, but not for the right reasons.  Microsoft seems to have anointed ATL, STL, COM etc... as the new wave of the future.  API's and class libraries (MFC) seem to be out of vogue.  Therefore, MFC is not receiving the type of updating or technical upkeep that it should be getting.  MFC has a high learning curve, but its incredibly powerful and fun to use IMHO.  The fact that Microsoft is abandoning MFC doesn't mean you shouldn't use it though.  Its still the best choice for almost every system wide "Application" you can think of.


0
 
LVL 2

Expert Comment

by:cpopin
ID: 1311183
>> MFC is the best!! Anybody disagree?!!
Disagree.  MFC is not the end all be all of application frameworks.  Despite Micro$oft's claims, it is NOT platform independent.  It's slow.  It's container classes suck.  I'll use STL containers before I'll use MFC's.  It's a poor example of OO design.

Has anyone here used MFC on a platform other than Windows?  If so, what platform?  Were you successful?

I do have to say that they did get CString right, but it took them four tries to do it and it's still slower than STL string.

We use MFC because it saves us development time.  Most C++ programmers know it and so there are a lot of resources available for it.

>> The fact that Microsoft is abandoning MFC...
What makes you think that Micro$oft is abandoning MFC?  Just because their not making great strides with it doesn't mean they're dropping it, it just means it's fairly complete as a framework.

And Micro$oft does not like supporting STL because it's not their standard.  STL still has some conflicts with the VC++ environment.  To name a few:
1. Have to place #pragma warning(disable:4786) in your code if you want to create a simple vector<string> because VC++ doesn't support debug symbols longer than 255.
2. Can't iterate through an STL map container created in another DLL.  The underlying reason for this is that static class members are actually different objects in different modules (DLLs, EXEs, etc.)  STL map uses a static member variable named _Nil in their red/black tree algorithm.

Micro$oft could address these problems with STL, but they don't want to be viewed as supporting a non-M$ standard.
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1311184
Oh, and as for those programmers who can do anything in Visual Basic, try writing an application for UNIX.
0
 

Author Comment

by:jkramer
ID: 1311185
glad to hear in cpopin -

STL is the slickest stuff out there - blows away any mfc fatware libraries i've seen!  So you say Micro$oft is abandoning MFC!! is this true?  if not, why is it still on 4.2?
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 1311186
jkramer...
they have moved to new version 6 ..... but they did one bad thing.. kept the DLL names same MFC42**.. which created lot of problems when it was released initially..

And as cpopin has told collection objects is the worst example of microsoft implementation... you have to be very careful with their use. Simplest exampel is CArray.. if you don't preassign the size large enuf and try to add element to it.. see what hapens :) they wipe out the memory and reallocate it to accomodate new elements...

And now MS is pushing ATL as next phase of development...trying to monopolise high end server technologies by promoting MTS/MSMQ/COM+
0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1311187
MFC is a tool.  Use it for the right job and its pretty darn effective.  As long as people need to solve the problems that MFC handles well, it will be a viable solution.

>>3 years ago i beat my head against the wall

and it's obvious from the rest of your post
0
 
LVL 1

Expert Comment

by:SD_Adept
ID: 1311188
I agree.  Don't get too carried away with any given technology or platform.  Use whats best for the job.
0
 

Author Comment

by:jkramer
ID: 1311189
gosh darn danny - i wish i was as darn effective as you.  darn.  

what problems are those, chump?  a little client server perhaps - well, wake up - want to write a system level program, yeah, c++ is arguably still king - want a windows gui?  no one has explained why all the vb touting programers are wrong - EXPLICITLY - that everything you want to do in mfc can be done in vb.

So, do you mind telling me what "the right job" is, or will you continue with your nebulous statements!
0
 

Accepted Solution

by:
lamia earned 20 total points
ID: 1311190
it is too soon to say that MFC is a legacy,
in your line of work you can still write C++/MFC code.
you can design and implement your server as a Web Gateway and you can create COM objects in C++ and use them in your ASP code.
0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1311191
SD_Adept said:
MFC is great for enterprise applications and GUI intensive projects.  

I believe that.  I also think that as projects get more complex in this area that VC++ and MFC provides a better solution than VB in the array of support for MDI, printing, etc.  I have not used VB since 3.0 so maybe this has changed.

As far as C++ is concerned, it will never become a useless legacy language because 1. you can put it on any platform  2. you can do so much with it and 3. you only have to pay for the features you use.

As for your personal attacks, you only seem to be mocking things that you are unable to understand.  You might appreciate MFC if you were ever able to learn it.
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1311192
>> Don't get too carried away with any given technology or platform.  Use whats best for the job.

"You always told me, 'never commit myself to one style.'"
-- Jean-Claude Van Dam in "Blood Sport"
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1311193
>> no one has explained why all the vb touting programers are wrong - EXPLICITLY - that everything you want to do in mfc can be done in vb.

I'm sorry JKramer, but the reasons are fairly obvious:

VB is a Micro$oft product.  M$ is really only in the business of selling operating systems.  They would rather give away application software then let a competing company that supports multiple platforms own market share.  That's why most of their products and technology are tied to OSes: 95, 98, and especially Windows NT Server.

VB, in all its forms, is not now and will never be ported to any OS other than an M$ OS.  C++ programmers have an advantage in that they can program on any platform.  MFC programmers even though they are, for all practical reasons, tied to Windows Oses, still are programming in a very portable language: C++.  Most of the code that you will write in an MFC application is not going to be tied to MFC.  You should always write your C++ code to be as portable as practical.  That way you can use it on other platforms.  You can't do all that with VB, but you can use MFC together with portable code.

VB is not object oriented.

You can't derive from VB classes because there are none.  But you can, and in most situations must, derive from MFC classes.

VB does not compile into fast and efficient code.

The VB language is controlled by one company that is not motivated to follow any industry standards.

The argument against programming in VB is very different from the argument for programming in MFC.  Although MFC is tied to Windows OSes, there are a couple very important advantages to using it:

MFC is an application framework.  Learning to use an application framework is itself a learning trend.  However, there are other application frameworks and they pretty much work the same way.  Learning another one, a more portable one, is now much simpler.

MFC is based on a very important standard:  ANIS C++.

You're programming in C++.  Not only is it a very accepted standard, but C++ is one of the most copied languages.  It is the basis for Java.  Much of what you learn programming in C++ can be applied to Java, and employers know this.

And to finally answer your question 'EXPLICITLY', you know exactly what MFC is doing when you're debugging because you have the source code and can step into it.  It makes you aware of the underlying Win32 API calls to the OS, something you must know before your can call yourself a professional Windows developer.
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 1311194
Is there going to be an answer or is this just a FORUM or ARGUMENT?

cpopin is right on all points.
Don't forget console apps.
0
 

Author Comment

by:jkramer
ID: 1311195
a huge hat's off to cpopin - thanks for the explanation!
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1311196
Thanks guys!  That really means a lot comming from EE experts!
0
 

Author Comment

by:jkramer
ID: 1311197
why too soon for mfc to be legacy?  bottom line is look int the paper - you do NOT see many jobs there for mfc developement - many less now then years past.    and what about the new rev of vb about to come out - where's the next mfc?  is it "done"?  i see nothing on m$ft web site about it?  i recently went on a number of interviews & one after another heard employers say they are going light client front end, cant be asked to deal with mfc any more - i am certainly not happy about it as the learning curve for mfc wan non trivial.  

so back to LAMIA - right - i suppose cpopin's answer covers it & i dont know much about it - but you mention writing a com object in c++ - there is no mfc ( unless you consider ATL to be a subset of MFC ) to write these objects & the vb user would croak about the simplicity of creating the vb com object.  Have you ever done this - web gateway?

damn, i meant to say mfc was king in my original statement.

So, it seems that through this forumn, we have many arguments that mfc sucks - only thing worse is vb - hilarious - more more..


0
 

Author Comment

by:jkramer
ID: 1311198
why too soon for mfc to be legacy?  bottom line is look int the paper - you do NOT see many jobs there for mfc developement - many less now then years past.    and what about the new rev of vb about to come out - where's the next mfc?  is it "done"?  i see nothing on m$ft web site about it?  i recently went on a number of interviews & one after another heard employers say they are going light client front end, cant be asked to deal with mfc any more - i am certainly not happy about it as the learning curve for mfc wan non trivial.  

so back to LAMIA - right - i suppose cpopin's answer covers it & i dont know much about it - but you mention writing a com object in c++ - there is no mfc ( unless you consider ATL to be a subset of MFC ) to write these objects & the vb user would croak about the simplicity of creating the vb com object.  Have you ever done this - web gateway?

damn, i meant to say mfc was king in my original statement.

So, it seems that through this forumn, we have many arguments that mfc sucks - only thing worse is vb - hilarious - more more..


0
 

Expert Comment

by:gatkinso
ID: 1311199
>> VB is a Micro$oft product.  M$ is really only in the
>> business of selling operating systems.  

Wrong.  Microsoft in in the business of making a profit and domiating the software industry.  They are doing a pretty good job of it, too.

Does anyone remember Object Windows from Borland (there is an OWL EE forum)?  In its day it was very superior to MFC.  Technical excellence aside, it still was defeated by MFC due to superior marketing and a decrease in innovations. Nobody who is adept on both OWL and MFC could say that MFC is superior in amyway (when comparing OWL 4.2 v. MFC 4 - they are roughly contemporary).  However, compare OWL 5.0 to MFC 4.2 and Borland's lead starts to break down.

It would seem that the day of the huge class libray API wrapper is going away.  There willl always be a need for MFC, but technocal innovation marches on.  

So whats the matter?  Afraid to learn something else or are you becoming too complacent like the thousands of COBOL and FORTRAN programmers who were shove aside when C entered the picture?  Either way you should know that in this industry NOPTHING lasts forever.  Especially a programmers skill set.
0
 

Expert Comment

by:gatkinso
ID: 1311200
Not only that, but MFC code is difficult for a appy typist like me to key in correctly.  :-)
0
 
LVL 1

Expert Comment

by:SD_Adept
ID: 1311201

I get into this argument with some COM programmers here at work.  And the thing I keep coming back to is, "what exactly is the benefit to me of using COM and ATL instead of MFC".  The usual answer I get back is, "COM is lean and mean and slick and great and tiny etc..etc..etc...".  Which leads me back to my original question, what exactly is the benefit for ME.

the answer is that having tiny code is of little to no use whatsoever unless you are writing a activeX object that will be used on a web page (download time) or on a system with almost no hard drive or system ram space.  I thought about this and did a survey of my harddrive.  I found that less than %3 of 2gig my hard drive here at work is used by DLLs, EXEs and LIBs.  Furthermore, my system RAM is not my any means suffering at run time.  Therefore, I gain -0- benefit from getting a tiny executable fingerprint.

now lets look at the other side of the coin and see what I lose.  First and foremost, COM and ATL are C-O-M-P-L-I-C-A-T-E-D.  Talk about a web of templates, obscure macros and dependant settings.  If you screw one single thing up in a COM object, it may take you a day to figure out that you moved a macro above something else at the head of a routine that wasn't supposed to be there.  What a mess!!!  Further, you now have to have all your objects registered with the system.  If anything happens to your registry entries...  Moving on, they are much more difficult to debug.  Running an object in a container that you compiled in another workspace etc..etc..etc.... is a beast.

I could go on.  But basically my point is this.  The ATL/COM model was setup for web page downloading.  The fact that some programmers are bringing it into the mainstream is unfortunate as they are using a technology in a way that it was not intended simply becuase they think its 'slick'.

(can you tell i just got out of an argument with an ATL programmer?)  :)

gday
0
 

Expert Comment

by:gatkinso
ID: 1311202
the thing that gets me is right about the time I can finally call myself an expert in something, it becomes old.
0
 

Author Comment

by:jkramer
ID: 1311203
more comments!
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question