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 

Porting between VS and Borland
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
Herby
Guest





PostPosted: Mon Dec 11, 2006 10:41 pm    Post subject: Porting between VS and Borland Reply with quote



Is it possible to port a VS GUI project to Borland and vica versa?

If not, why not?

Thanks.
Back to top
Chris Uzdavinis (TeamB)
Guest





PostPosted: Mon Dec 11, 2006 11:26 pm    Post subject: Re: Porting between VS and Borland Reply with quote



"Herby" <prmarjoram (AT) gmail (DOT) com> writes:

Quote:
Is it possible to port a VS GUI project to Borland and vica versa?

Anything is possible in source code, but the question is a matter of
difficulty.

Quote:
If not, why not?

If you use the VCL, then it probably won't work because it is written
in Delphi and VS does not have a Delphi compiler. The C++ side of
things involves several language extensions to work with VCL code that
no other C++ compiler implements. If you depend on any of those
features, you won't be able to recompile your code anywhere else.

However, if you're using a non-vcl gui library, such as wxWindows or
Qt, for example, that code is fairly portable and should work between
different compilers, Borland and MS. The drawback is you give up the
nice RAD functionality that BCB offers if you don't use the VCL.

(This is why it's a wise design decision to write the heart of your
application in portable C++ that can run on any platform, and then
develop the GUI as a higher layer that is almost like a seperate
project. Then when you go to port your application, you're really
only needing to rewrite the GUI portion, and the main logic remains
unaffected. (Assuming that the GUI is not portable, which is usually
(but not always) the case.)

--
Chris (TeamB);
Back to top
Alan Bellingham
Guest





PostPosted: Mon Dec 11, 2006 11:27 pm    Post subject: Re: Porting between VS and Borland Reply with quote



"Herby" <prmarjoram (AT) gmail (DOT) com> wrote:

Quote:
Is it possible to port a VS GUI project to Borland and vica versa?

If not, why not?

That depends. How much work do you consider it to be before it's no
longer 'porting' and is now rewriting? Frequently, it's the GUI that has
to be discarded and replaced, and if the application is little but GUI,
then you're into rewriting.

For instance, a Borland VCL application would require the VCL to be
discarded.

Alan Bellingham
--
ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Back to top
Chris Uzdavinis (TeamB)
Guest





PostPosted: Mon Dec 11, 2006 11:30 pm    Post subject: Re: Porting between VS and Borland Reply with quote

"Herby" <prmarjoram (AT) gmail (DOT) com> writes:

Quote:
Is it possible to port a VS GUI project to Borland and vica versa?

If not, why not?

Oh yes, it also depends on the code you write. If your code makes use
of any compiler bugs or other implementation-dependent features (order
of evaluation of function arguments, etc) you may have your own
non-portability issues that are of your own doing. Further, you may
encounter bugs that prevent valid code that compiles on one compiler
from correctly compiling (or running) when used with another compiler.

It's usually a worthwhile exercise to keep a complicated application
in a good compiling state under multiple compilers... just like
getting second opinions from two doctors, one may diagnose problems
the other does not find. I've done this between BCB and VC++ many
years ago, and since the interface was seperate from the application,
I was able to have a nice, GUI for the BCB build, and a simple
text-mode output for the VC++ build. But the functionality was
identical, and I was able to find problems with my code, and utilize
different tools on it (profilers, different debuggers, etc) to get the
most out of it. BCB was the main target, and VC++ was just to ensure
that I was writing code that wasn't too platform/compiler dependent,
and at the time (era BCB3) the VC++ debugger was orders of magnitude
faster, and hence, more usable.

--
Chris (TeamB);
Back to top
Daniel James
Guest





PostPosted: Tue Dec 12, 2006 5:29 pm    Post subject: Re: Porting between VS and Borland Reply with quote

In article <1165855310.389853.28200 (AT) 79g2000cws (DOT) googlegroups.com>, Herby
wrote:
Quote:
Is it possible to port a VS GUI project to Borland and vica versa?

It depends ... it's certainly possible to write C++ programs that will build
under both systems, but code written specifically for one system will very
possibly not build on the other.

If you have an application written using Borland's tools it will probably
have been written to use Borland's Visual Component Library (VCL) which is a
library written in Pascal (Delphi). There is no equivalent to VCL in
Microsoft's tools, so you would have to rewrite any part of your app that
relied upon that library.

If you have an application written in using Microsoft's C++ it will very
probably have been written using the Microsoft Foundation Classes (MFC) -- a
library that (like VCL) provides an easier-to-use C++ wrapper around the
Windows API. Borland used to licence the MFC library from Microsoft so that
Microsoft projects could be built with Borland's tools, but I don't know
whether current Borland products ship with MFC nor whether the Borland
version of it has been kept up-to-date.

If you have the MFC library you can build an MFC project with Borland's
tools, but note that Borland don't provide any support within their IDE to
assist with further development of an MFC project, so it would be hard work
to enhance the code once it had been ported.

What I've said here applies to unmanaged C/C++ code ... if you have a
managed code project in VS you can't port it. If you have a non C/C++
project in VS you can't port it,

Note also that none of the compilers we may be talking about here, the
Borland compiler, Visual C++ 6, and the VC7/8 (from VS 2003/2005) is a
complete or correct implementation of the ISO C++ standard -- though VC8 is
lacking in only a few somewhat contentious details. If you write a
bleeding-edge modern C++ application you may get it to work with VC 8 and
maybe VC7, but you are unlikely to get it to compile with either VC6 or the
Borland tools.

If you carefully choose a subset of ISO C++ that works on all the compilers,
and avoid using proprietary libraries that are not available for all of
them, you can write useful projects that can be built with any of the tools.

Cheers,
Daniel.
Back to top
Herby
Guest





PostPosted: Tue Dec 12, 2006 6:01 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Thanks guys for the excellent info.

Iv just inherited a rather large C++ Builder project in the telecoms
industry.
All my experience is with VS and MFC. like 10+ years
They didnt make that clear in the interview :-|

Oh well i like a challenge.

So im just trying to get my bearings.
Can anyone recommend some good reading?

Ideally, something like

"Having 10 years experience of VS/MFC then picking up a large project
using Borland C++ Builder"
Back to top
Alan Bellingham
Guest





PostPosted: Tue Dec 12, 2006 7:04 pm    Post subject: Re: Porting between VS and Borland Reply with quote

"Herby" <prmarjoram (AT) gmail (DOT) com> wrote:

Quote:
Thanks guys for the excellent info.

Iv just inherited a rather large C++ Builder project in the telecoms
industry.
All my experience is with VS and MFC. like 10+ years
They didnt make that clear in the interview Neutral

Aha.

It may be that it's not too much of a learning curve - after all, a
properly structured application should cleanly separate GUI and
underlying code.

However, given the RAD abilities of BCB, there's at least a chance that
all the logic is in the Button press event handlers.

Good luck!

Alan Bellingham
--
ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Back to top
Darko Miletic
Guest





PostPosted: Tue Dec 12, 2006 7:31 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Herby wrote:
Quote:
Thanks guys for the excellent info.

Iv just inherited a rather large C++ Builder project in the telecoms
industry.
All my experience is with VS and MFC. like 10+ years
They didnt make that clear in the interview Neutral

I know your pain because I experienced something simmilar though in the
other direction. From Borland to MFC monster :)

Quote:

Oh well i like a challenge.

So im just trying to get my bearings.
Can anyone recommend some good reading?

Get any C++ Builder book you can purchase it will help because first
thing you need to learn is basics of VCL.
Back to top
Herby
Guest





PostPosted: Tue Dec 12, 2006 7:52 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Quote:
I know your pain because I experienced something simmilar though in the
other direction. From Borland to MFC monster Smile

Shall we swap jobs?

At least we will have something real to compare the other against. Im
sure we will come out better developers for it. Its just more
exposure.

Quote:
Get any C++ Builder book you can purchase it will help because first
thing you need to learn is basics of VCL.

Will do.
Can anyone recommend any good online resources, tutorials etc?

Thanks.
Back to top
Andrue Cope [TeamB]
Guest





PostPosted: Tue Dec 12, 2006 8:24 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Daniel James wrote:

Quote:
There is no equivalent to VCL in
Microsoft's tools

Well there's C# and WinForms :)

The code changes required wouldn't be all that severe and a
knowledgeable VCL developer will be up and running with Winforms almost
immediately. They might occasionally be heard to mutter "why the
<bleep> is it so klunky" though. ListViews and Datagrids seem to have a
bizarrely innefficient way of rendering themselves that means anything
more than three or four columns and performance becomes abysmal.

--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Back to top
Darko Miletic
Guest





PostPosted: Tue Dec 12, 2006 9:45 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Herby wrote:
Quote:
Shall we swap jobs?

At least we will have something real to compare the other against. Im
sure we will come out better developers for it. Its just more
exposure.


Nice idea Smile I would really like to get back to borland tools.
Back to top
Chris Uzdavinis (TeamB)
Guest





PostPosted: Tue Dec 12, 2006 10:03 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Alan Bellingham <alan (AT) lspace (DOT) org> writes:

Quote:
However, given the RAD abilities of BCB, there's at least a chance that
all the logic is in the Button press event handlers.

I hope not, for his sake! But RAD does encourage tight coupling of
the presentation and application logic, which is a disaster waiting to
happen.

That means a major effort will be involved, as you surgically remove
the important logic out of the presentation code.

Worse is if you actually store your data directly in the VCL
components, or whatever, because if you remove the presentation, your
data structures vanish as well. Then, rather than being a view of the
inner workings of the application, the GUI *is* the application.

--
Chris (TeamB);
Back to top
Nathaniel L. Walker
Guest





PostPosted: Wed Dec 13, 2006 3:09 am    Post subject: Re: Porting between VS and Borland Reply with quote

Try Visual C++ with WinForms :)

- Nate.

"Andrue Cope [TeamB]" <no.spam (AT) not (DOT) a.valid.address> wrote in message
news:457ebb43$1 (AT) newsgroups (DOT) borland.com...
Quote:
Daniel James wrote:

There is no equivalent to VCL in
Microsoft's tools

Well there's C# and WinForms :)

The code changes required wouldn't be all that severe and a
knowledgeable VCL developer will be up and running with Winforms almost
immediately. They might occasionally be heard to mutter "why the
bleep> is it so klunky" though. ListViews and Datagrids seem to have a
bizarrely innefficient way of rendering themselves that means anything
more than three or four columns and performance becomes abysmal.

--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Back to top
Andrue Cope [TeamB]
Guest





PostPosted: Wed Dec 13, 2006 4:01 pm    Post subject: Re: Porting between VS and Borland Reply with quote

Nathaniel L. Walker wrote:

Quote:
Try Visual C++ with WinForms Smile

No thanks. I did for a while but ran away screaming.

--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Back to top
Herby
Guest





PostPosted: Thu Dec 14, 2006 3:14 am    Post subject: Re: Porting between VS and Borland Reply with quote

Andrue Cope [TeamB] wrote:
Quote:
Nathaniel L. Walker wrote:

Try Visual C++ with WinForms :)

No thanks. I did for a while but ran away screaming.

--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html

But i dont see the RAD capabilities an advantage to me, as the app has
already been developed, i am going to have to maintain it and start
adding some new features.

RAD is great when you have a blank canvas.
What i need is a great tool to help me maintain the code...
Any recommendations?

Its a killer app!

Not a great deal of reading material on VCL either...

Can anyone give me the major differences of the VCL from version 1 to
version 5.

Im using C++ Builder 5.

Thanks.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.