473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Tightest integration of C++ and C#

Die-hard C++ enthusiast hear (only been recently converted - actually
dragged kicking and screaming to ASP.net).

I have loads of C++ libraries - what is the technology/methodolgy that
provides the tightest integration of C++ and the .Net languages (C#
especially - since that is my target language)

BTW, preference is given to methodologies/technologies that involve the
least learning curve (from a seasoned C++ programmers point of view).
Jun 28 '07 #1
3 3594
you know there is C++.NET right? Though I don't know C++, I'm assuming you
can still use what you have and just call them from the C# app.

Again, I don't know C++ to save my life, just .NET so I may be wrong. But
there is a C++.NET
http://msdn2.microsoft.com/en-us/visualc/default.aspx

"2b|!2b==?" <ro**@your.box.comwrote in message
news:II******************************@bt.com...
Die-hard C++ enthusiast hear (only been recently converted - actually
dragged kicking and screaming to ASP.net).

I have loads of C++ libraries - what is the technology/methodolgy that
provides the tightest integration of C++ and the .Net languages (C#
especially - since that is my target language)

BTW, preference is given to methodologies/technologies that involve the
least learning curve (from a seasoned C++ programmers point of view).

Jun 28 '07 #2
the best is managed C++ as you can add C# entry points and ref .net
objects directly.

the second best is use simple objects and use pinvoke from c# to call
the C++ code. if you use winapi standard entry points, you can just use
C# declarations to call the libraries.

the last is to use com. this requires discipline in C# to release ref
counters when done (the GC will do it automactally but usually not soon
enough).

there are 4 learning curves:

the .net runtime library which is huge (quick transition if you have
done java).

the asp.net page model and events handling. this is really a stateless
request response model. a class instance is created and destroyed for
each request. (a button click is really a request). also as all requests
are handled by the same application, but seperate threads, statics need
be avoided. also as a single request may change threads, no thread local
storage should be used.

html/css - enough said.

ajax/javascript (WEB 2.0). this is turning into the most important new
technology for web pages.
note: there is probably no advantage in using C++ on a website, release
the blanket.

-- bruce (sqlwork.com)
2b|!2b==? wrote:
Die-hard C++ enthusiast hear (only been recently converted - actually
dragged kicking and screaming to ASP.net).

I have loads of C++ libraries - what is the technology/methodolgy that
provides the tightest integration of C++ and the .Net languages (C#
especially - since that is my target language)

BTW, preference is given to methodologies/technologies that involve the
least learning curve (from a seasoned C++ programmers point of view).
Jun 28 '07 #3
2b|!2b==? wrote:
>
>Die-hard C++ enthusiast here (only been recently converted - actually
dragged kicking and screaming to ASP.net).

I have loads of C++ libraries - what is the technology/methodolgy that
provides the tightest integration of C++ and the .Net languages (C#
especially - since that is my target language)

BTW, preference is given to methodologies/technologies that involve
the least learning curve (from a seasoned C++ programmers point of view).
Top posted comments moved down here ... |
V

bruce barker wrote:
the best is managed C++ as you can add C# entry points and ref .net
objects directly.
Erm, no thanks. I have resisted Microsoft forcibly over the years
because of they are (or have been) extremely keen on vendor "lock in"
and non-portable code. I think even the great Redmond company have
realized the futility of this approach in todays open standards world -
and AFAIk, they've canned this silly language along with its bizzare
non-standard "C++" syntax.
the second best is use simple objects and use pinvoke from c# to call
the C++ code. if you use winapi standard entry points, you can just use
C# declarations to call the libraries.
This looks like the most viable option - although I was (somehow) hoping
I could get around marshalling large chunks of data around.
the last is to use com. this requires discipline in C# to release ref
counters when done (the GC will do it automactally but usually not soon
enough).
Also a potential contender as I can easily right ATL COM wrappers around
my C++ classes), I was hoping this would provide tighter integration -
since the (C#) syntax i've seen so far looked less "exotic" ...., still
I guess I'll have to weigh up the Pros and con's (i.e. workload) between
the COM wrappers and Pinvoke approach.
there are 4 learning curves:

the .net runtime library which is huge (quick transition if you have
done java).
Yeah C# is (mostly) Java and C++ repackaged and branded as a new language :P
I've done some Java programming in the past and had to do a "double
take" when I first saw a C# code snippet.
the asp.net page model and events handling. this is really a stateless
request response model. a class instance is created and destroyed for
each request. (a button click is really a request). also as all requests
are handled by the same application, but seperate threads, statics need
be avoided. also as a single request may change threads, no thread local
storage should be used.
Ok, so there is more to it than simple wrapping the classes up. Since
state must somehow be maintained. For "heavy" objects - you can't go
about creating them from scratch at each request - there must be a way
of creating object pools or something similar server side ...
html/css - enough said.

ajax/javascript (WEB 2.0). this is turning into the most important new
technology for web pages.
note: there is probably no advantage in using C++ on a website, release
the blanket.
True, apart from the fact that I have over 10 years worth of custom
business logic in C++ libraries (where it is likely to stay) - until
decompiling code from compiled .Net binaries requires AT LEAST some
effort. At the moment decompilation/deobfuscation (even to the point of
recovering source code comments) is almost TRIVIAL.
>
-- bruce (sqlwork.com)

Jun 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang Keller | last post by:
Hello, Python seems to be used quite a lot for (the integration of) enterprise applications. Just as an example, there are at least three (projects for the implementation of) ERP systems in...
4
by: Dan | last post by:
Hello all. I am currently working on a project for several Hospitals. The application is written in Java, and the database is either Oracle or MySql, depending on the client. For a while now,...
0
by: Wayan | last post by:
Geekcorps Volunteer - Systems Integration Kenya, East Africa Geekcorps http://www.geekcorps.org is in search of systems integration professionals experienced in developing communication systems...
0
by: Magic1812 | last post by:
Magic Software invites you to join us this coming Tuesday (January 13th, 2004) at 12:00 EDT / 17:00 GMT for a FREE live Webinar: Title: Accelerated Application Integration and Information...
0
by: Magic1812 | last post by:
Magic Software invites you to join us this coming Tuesday (January 13th, 2004) at 12:00 EDT / 17:00 GMT for a FREE live Webinar: Title: Accelerated Application Integration and Information...
0
by: S Arnold | last post by:
Date: June 24, 2004 Time: 4:00 PM - 5:00 PM (GMT +01:00) Presenter: Richard Curtis Description: iBOLT, Magic's comprehensive EAI and BPM suite was recently described by VP Strategic Services...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
0
by: Stylus Studio | last post by:
Hey Everyone, A new podcast entitled: Business-to-Business Data Integration in a SOA World was just released by ZapThink. The key speakers in the podcast are the following: ZapThink...
1
by: YellowfinTeam | last post by:
Marketplace: Yellowfin reporting 3.1 with BIRT Integration Yellowfin is proud to announce the release of 3.1. The major theme of this release is enhanced integration capability. We have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.