BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VCL vs MFC Study
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
Michael Swindell (CodeGea
Guest





PostPosted: Wed Apr 25, 2007 11:04 pm    Post subject: VCL vs MFC Study Reply with quote



Years ago I did some VCL vs MFC LOC comparisons that I used to demonstrate
the productivity and maintainability increase you get with C++Builder over
VC++. They were very impressive and real world. I've recently received
several VCL vs MFC comparisons from a customer and I think it's over due to
start doing this again. This particular customer rebuilt the exact same VCL
app with the exact same functionality with MFC for a 64bit deployment
requirement the difference was 57k LOC in VCL vs 251k LOC in MFC. Sure there
is some IDE generated code in the MFC app, but in general it was between a
4:1 to 5:1 difference in both time, complexity, and code. That's very
significant in time to market, cost, quality, and maintainability.

I'm interested in getting many more Chars/Words/Lines comparisons between
VCL and MFC based apps from C++Builder users. I'm not really interested in
biased or inflated examples... I'm looking to be as objective as we can get.
Metrics I'd be very interested in are word/line count comparisons between
functionally similar/identical VCL and MFC apps, ie unix cmd Wordcount is
good for that. Semicolon counts are also a good measure as they eliminate
formatting and comments.

If you'd like to participate in this please sendcomparisons to
mswindell (AT) codegear (DOT) com - the applications can just be a sample app you build
for this (redoing the BCB demos would be a great example) or ideally a real
world app that you've either brought from MFC to VCL or vice versa - you can
just send the comparison results, but source code if available is also
useful, provided you don't mind it being published. Other optional items
that would be useful to include:

- your name/company/position
- description of the application
- screenshots of the running apps
- any anecdotes on the development of the two apps and your comments on VCL
and MFC

Thanks! This should be fun.

-Michael
Back to top
dhoke
Guest





PostPosted: Thu Apr 26, 2007 4:30 pm    Post subject: Re: VCL vs MFC Study - how 'bout WTL too? Reply with quote



As long as your soliciting information, might be interesting to solicit
values for apps using WTL also. I doubt its as widely used as MFC, but I
know it has some use, and I have even considered it as a possible
alternative myself. I realize that may not be entirely inline with your
immediate objectives, but I'm probably not the only person who would be
interested. Smile (I believe the latest versions of WTL require a later
version of ATL than is shipping with the current b/cb releases, but I think
slightly earlier ones can run on b/cg's shipping version of ATL.)

"Michael Swindell (CodeGear)" <michael.nospam.swindell (AT) codegear (DOT) com> wrote
in message news:462f9840$1 (AT) newsgroups (DOT) borland.com...
Quote:
Years ago I did some VCL vs MFC LOC comparisons that I used to demonstrate
the productivity and maintainability increase you get with C++Builder over
VC++.
Back to top
Hendrik Schober
Guest





PostPosted: Thu Apr 26, 2007 5:19 pm    Post subject: Re: VCL vs MFC Study Reply with quote



Michael Swindell (CodeGear) <michael.nospam.swindell (AT) codegear (DOT) com> wrote:
Quote:
[VCL vs MFC comparisons] If you'd like to participate in this please sendcomparisons to
mswindell (AT) codegear (DOT) com [...]

Wasn't there a clause in the license agreement
forbidding giving away any kind of benchmarks
results (and couldn't, what you ask for, be
considered benchmark results)?

Quote:
-Michael

Schobi

--
SpamTrap (AT) gmx (DOT) de is never read
I'm HSchober at gmx dot de

"My hope is that if more people start reading books,
the world will become a better place."
froarulv in afp
Back to top
Helmut Giese
Guest





PostPosted: Thu Apr 26, 2007 6:30 pm    Post subject: Re: VCL vs MFC Study Reply with quote

Hi Michael,
though I cannot contribute I wish you luck with your inquiery. My only
exposure to MFC (well, not even that, really) was some 10 years ago:
When meeting a former collegue he mentioned in passing how much effort
went into the attempt to have a red button (because the boss wanted it
that way) - and that after almost one week they eventually resigned.
I was mostly using Delphi for GUI development at this time and I
didn't quite understand the problem they were having: Why, I would
just select the button's color property in the object inspector and
have it turn red. Couldn't be that difficult with MFC, could it?

It was only some time later after having heard similar stories that I
eventually realized that: yes, simple things like this can be a
daunting task in MFC, and (as a corollary): Thanks, thanks, thanks for
the VCL - life facing the Windows API is hard enough, but at least
getting the basic visual stuff done really is a snap.

Hm, that has almost grown to a little story. What I actually wanted is
asking a question:
Has the comparison you are planning still any merit? I mean, is MFC
still in use today?
I thought everybody working with Microsoft tools is using WinForms
under .NET - or whatever it's called now (I don't follow suite and
might be a little behind the current trend/terminology).
Or did I fell for Microsoft's marketing and in reality MFC is still in
widespread use?

Comments welcome
Helmut Giese
Back to top
Captain Jake
Guest





PostPosted: Thu Apr 26, 2007 11:14 pm    Post subject: Re: VCL vs MFC Study Reply with quote

"Michael Swindell (CodeGear)" <michael.nospam.swindell (AT) codegear (DOT) com> wrote
in message news:462f9840$1 (AT) newsgroups (DOT) borland.com...
Quote:
I'm interested in getting many more Chars/Words/Lines comparisons between
VCL and MFC based apps from C++Builder users.

I can give you examples of opens ource C++ code that compiles in VC++ but
not C++ Builder. Is that useful?
Back to top
Kathire
Guest





PostPosted: Thu Apr 26, 2007 11:49 pm    Post subject: Re: VCL vs MFC Study Reply with quote

"Captain Jake" <jake (AT) NOSPAMJsNewsreader (DOT) com> wrote in message
news:4630ec14$1 (AT) newsgroups (DOT) borland.com...
Quote:
I can give you examples of opens ource C++ code that compiles in VC++ but
not C++ Builder. Is that useful?

Please list them. I remember David Dean was asking about the popular libs
that cannot be compiled with BCB. I'm maintaining a list of free libs that
cannot be compiled with C++ builder. Have a look at :

http://codepaks.sourceforge.net/broken-libs.htm

-Kathire
Back to top
David Dean [CodeGear]
Guest





PostPosted: Fri Apr 27, 2007 6:36 am    Post subject: Re: VCL vs MFC Study Reply with quote

In article <4630f424$1 (AT) newsgroups (DOT) borland.com>,
"Kathire" <kathire@@-----yahoo-------.com> wrote:

Quote:
http://codepaks.sourceforge.net/broken-libs.htm

Thank you, BTW.

--
-David Dean
CodeGear C++ QA Engineer
<http://blogs.codegear.com/ddean/>
Back to top
Helmut Giese
Guest





PostPosted: Fri Apr 27, 2007 8:10 am    Post subject: Re: VCL vs MFC Study Reply with quote

On Fri, 27 Apr 2007 06:20:15 +0200, Andre Kaufmann
<andre.kaufmann_re_move_@t-online.de> wrote:

Quote:
Helmut Giese wrote:
Hi Michael,

[...]
daunting task in MFC, and (as a corollary): Thanks, thanks, thanks for
the VCL - life facing the Windows API is hard enough, but at least
getting the basic visual stuff done really is a snap.

I agree that VCL is far more easier to handle than MFC. Though regarding
the buttons background color I had the same problem recently with the
VCL. I couldn't figure it out, how to simply change a buttons background
color. Or did I miss something ?
Hi Andre,

sorry I can't help with this. The tale was from years ago and I don't
have Delphi installed on this machine.
Best regards
Helmut Giese
Back to top
Andre Kaufmann
Guest





PostPosted: Fri Apr 27, 2007 8:10 am    Post subject: Re: VCL vs MFC Study Reply with quote

Helmut Giese wrote:
Quote:
Hi Michael,

[...]
daunting task in MFC, and (as a corollary): Thanks, thanks, thanks for
the VCL - life facing the Windows API is hard enough, but at least
getting the basic visual stuff done really is a snap.

I agree that VCL is far more easier to handle than MFC. Though regarding
the buttons background color I had the same problem recently with the
VCL. I couldn't figure it out, how to simply change a buttons background
color. Or did I miss something ?

Quote:
[...]

Comments welcome
Helmut Giese
Back to top
Daniel James
Guest





PostPosted: Fri Apr 27, 2007 3:39 pm    Post subject: Re: VCL vs MFC Study Reply with quote

In article <462f9840$1 (AT) newsgroups (DOT) borland.com>, Michael Swindell (CodeGear)
wrote:
Quote:
Years ago I did some VCL vs MFC LOC comparisons that I used to demonstrate
the productivity and maintainability increase you get with C++Builder over
VC++.

I can't give you concrete examples from my own experience as the only time I
have coded substantially the same thing in both VCL and MFC I was working on a
client project that I no longer have to hand.

My own experience, in general, is that it is much easier to knock up a quick
demo with VCL than with MFC, but that the resulting VCL code has rough edges
that need to be shaved away. Getting a VCL app to production quality requires
MORE work than doing the same with MFC -- especially when using the supplied VCL
components (some of the third-party libraries one can buy are much better) and
especially when the default behaviour of the components being used has to be
overridden in some way.

In general, I find that the GUI aspect of most of my projects represents so
small a proportion of the total coding effort that the choice between MFC and
VCL is not an issue. Quality of code produced by the compiler, ease of
management of the whole project space, and compliance with standards -- to name
but a few -- are far more important.

Quote:
This particular customer rebuilt the exact same VCL
app with the exact same functionality with MFC for a 64bit deployment
requirement the difference was 57k LOC in VCL vs 251k LOC in MFC.

I didn't think VCL was available for 64-bit environments?

Quote:
Sure there is some IDE generated code in the MFC app ...

Yes, the VS IDE generates a good bit of the code for you with MFC. Line counts
aren't really the important thing, here, though: as MFC is a lower-level library
you do have to write a little more code to drive it -- but that code is very
simple, low-level, easy-to-understand and quick-to-write code. It's not a great
burden to write or maintain, it doesn't add significantly to the complexity of
the app, and producing it can be automated (more than by using MS's supplied
'wizards') to some extent.

I'm not suggesting that this makes MFC "better than" VCL -- just the mere LOC
isn't really a useful metric.

Quote:
ie unix cmd Wordcount is good for that. Semicolon counts are also a good
measure as they eliminate formatting and comments.

Yeah, thanks Granny, but we know eggs ...

I do like using VCL -- especially when I use Delphi. In Delphi it's the only
game in town and its fun to play and produces good results.

When I use C++ I'm much more aware of standards and portability issues. I want
to use a framework that makes best use of the features that the language
provides 'for free' and builds on those features to produce code that is
naturally portable and cross-platform. (I have a feeling that a marketing person
would misuse the word "leverage" here, so I won't.) I want to ensure that my
work can use third-party libraries that are written with the same principles in
mind without any clashes with my code or the framework, or any duplication of
effort (what's the point of having three different string classes in your app,
when the language itself provides one?).

It worries me that the VCL used by BCB is written in Delphi's Pascal (and as I
understand it, can't be compiled on any other Pascal compiler). That makes BCB a
one-shop tool, and that makes it a commercial risk. Some years ago I tried to
persuade a client to accept a solution using VCL (in Delphi, actually, but the
argument applies to BCB as well) and was told to use C++ and MFC because VCL was
a risk, whereas MFC was supported by a range of compilers (Borland and Symantec
were shipping C++ compilers with MFC support at that time). That may seem like a
stupid decision, and stupid grounds for making a decision, but it's people who
think like that that control the cash-flows in this industry (so help us!)

What I'd like to see is not a comparison between just VCL and MFC, but between
those and WinForms, Qt, wxWidgets, FLTK, and others (someone mentioned WTL) ...

... not just something that looks at lines of code; but something that consider
time to implement and ease of maintenance, portability, compiler support,
Unicode support, and internationalization support. I'd like to see an analysis
of how well the different frameworks utilize (rather than duplicating) the
standard library features, a discussion of the available tool support for these
libraries and an account of how that affects their usability and the
maintainability of projects using them.

I don't suppose that's in your remit, though.

Cheers,
Daniel.
Back to top
Bruce Salzman
Guest





PostPosted: Fri Apr 27, 2007 9:54 pm    Post subject: Re: VCL vs MFC Study Reply with quote

"Michael Swindell (CodeGear)" <michael.nospam.swindell (AT) codegear (DOT) com>
wrote in message news:462f9840$1 (AT) newsgroups (DOT) borland.com...

Quote:
If you'd like to participate in this please sendcomparisons to
mswindell (AT) codegear (DOT) com - the applications can just be a sample app
you build for this (redoing the BCB demos would be a great example)
or ideally a real world app that you've either brought from MFC to
VCL or vice versa - you can just send the comparison results, but
source code if available is also useful, provided you don't mind it
being published. Other optional items that would be useful to
include:

- your name/company/position
- description of the application
- screenshots of the running apps
- any anecdotes on the development of the two apps and your comments
on VCL and MFC


Time spent reloading the IDE after it crashes...

--
Bruce
Back to top
Darko Miletic
Guest





PostPosted: Sat Apr 28, 2007 5:20 am    Post subject: Re: VCL vs MFC Study Reply with quote

On Fri, 27 Apr 2007 06:20:15 +0200, Andre Kaufmann
<andre.kaufmann_re_move_@t-online.de> wrote:

Quote:
Helmut Giese wrote:
Hi Michael,


I agree that VCL is far more easier to handle than MFC. Though regarding
the buttons background color I had the same problem recently with the
VCL. I couldn't figure it out, how to simply change a buttons background
color. Or did I miss something ?

In this area MFC and VCL are the same. In both cases owner-draw button
is needed.

http://delphi.about.com/od/vclwriteenhance/l/aa061104a.htm

Darko
Back to top
Darko Miletic
Guest





PostPosted: Sat Apr 28, 2007 7:26 am    Post subject: Re: VCL vs MFC Study Reply with quote

On Thu, 26 Apr 2007 11:49:08 -0700, "Kathire"
<kathire@@-----yahoo-------.com> wrote:

Quote:

"Captain Jake" <jake (AT) NOSPAMJsNewsreader (DOT) com> wrote in message
news:4630ec14$1 (AT) newsgroups (DOT) borland.com...
I can give you examples of opens ource C++ code that compiles in VC++ but
not C++ Builder. Is that useful?

Please list them. I remember David Dean was asking about the popular libs
that cannot be compiled with BCB. I'm maintaining a list of free libs that
cannot be compiled with C++ builder. Have a look at :

http://codepaks.sourceforge.net/broken-libs.htm

I see that you mention curl as a problematic library. Just to test it
out I downloaded it and was able to compile it with Turbo C++ . Not
out of the box, but the fix is trivial.

As far as I can see in a lot of cases there are just not enough people
interested to participate in submitting fixes for Borland/codegear
compilers.
Back to top
AlexB
Guest





PostPosted: Sat Apr 28, 2007 8:11 am    Post subject: Re: VCL vs MFC Study Reply with quote

Michael Swindell (CodeGear) wrote:

Quote:
I'm interested in getting many more Chars/Words/Lines comparisons
between VCL and MFC based apps from C++Builder users.

Good example is PageControl.
With VCL you can simply drop it on form and use.
With MFC you must create a lot of dialogs/resources, manually keep
track of page switching and recreate page dialogs and values and so
on... It's nightmare.

--
Alex.
Back to top
Andreas Hausladen
Guest





PostPosted: Sat Apr 28, 2007 8:11 am    Post subject: Re: VCL vs MFC Study Reply with quote

Darko Miletic wrote:

Quote:
As far as I can see in a lot of cases there are just not enough people
interested to participate in submitting fixes for Borland/codegear
compilers.

Have you ever tried to create fixes for Qt 4.x ? It isn't possible
without rewriting a lot of code.


--
Regards,

Andreas Hausladen
Back to top
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 
 


Powered by phpBB © 2001, 2006 phpBB Group
.