Sign in to follow this  

Please tell the differences

This topic is 3591 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

Well actually I was surfing the forums when suddenly I read this sort of stuffs... Umm..to make the story short,can you please tell me the difference between this terms or maybe just define to me what they really are: 1.MFC 2.C++\CLI 3.Managed/unmanaged (c++ or directx) 4.native codes 5.wrapper(is this just the use of oop to hide implementations) 6.JIT well thats as far as is can remember...i'll post again if i find more terms that i dont understand thanks for the help!

Share this post


Link to post
Share on other sites
1. A C++ GUI framework developed by Microsoft. Windows-only, fairly popular, but only available with Standard editions of Visual Studio and up.

2. C++ running on the Common Language Infrastructure - .NET.

3. Managed C++ is the precursor to C++/CLI and generally is not recommended for use in light of the latter's improvements.

4. Code compiled directly for a processor and not an intermediary such as the CLI.

5. Implementation hiding, generally, yes.

6. A compiler for an intermediate form (such as the CLI) into native processor code, generally giving a large performance speedup over a purely interpreted version.

Share this post


Link to post
Share on other sites
Just as a hint for the future: Things like these are easily findable on Google and/or Wikipedia. If, after browsing both of these you find that you lack a suitable answer, then come and post about it. Doing so saves the rest of the forum goers here a lot of time and trouble.

Share this post


Link to post
Share on other sites
5. a wrapper is a way of changing an interface. say you have a library written in C. It isn't object oriented at all. You want to use it in an object oriented way so you write classes that use the underlying library to make it appear object oriented.


The term is also used when talking about making a library available in a new language. If you want to use opengl in python you need an opengl wrapper.

Share this post


Link to post
Share on other sites
@Mike.Popoloski actually i googled this before i make this thread i've also read the things about my question in wikipedia,im not that kind of person that just creates thread you know...

@niteice can you expand your explanation about 2,3,4 if possible some examples regarding on its difference to the other

Share this post


Link to post
Share on other sites
I think of 'managed' as meaning 'managed' by the the clr runtime (ie offering memory management services [garbage collection] and whatever else goes on). likewise 'managed code' is code that can only run in a 'managed environment' - the clr runtime.

'native' is the opposite of 'managed'. 'native code' runs straight on the cpu and you have to manage your own memory.

The normal c++ that we traditionally know is native or generates native code (ie we get compilers that target the cpu) and so there has never been a need for these distinctions. microsoft with their new (NET) technologies have introduced variations or extensions (and in some case limitations) to the c++ language that allow it to generate 'managed code'. ie some things are sufficiently different that they are judged to warrant changes in the language (or at least microsoft's implmentation of c++).

The first iteration of this stuff was called MC++ or 'managed extensions' for c++. this was really clunky and tried to make some stuff which wasnt c++ look like c++ to ease transition for programmers. The next iteration with vs2005/08 is CLI or c++/CLI. So the relationship of c++/CLI with MC++ is that it replaces it - but both can be considered to do the same job and merely enable the programmer to write managed code from a c++ style lanaguage or interop between managed and native.

one example of the difference between mc++ and c++/cli --> MC++ used the '*' operator so as to appear to be the same as normal c++ pointer syntax, while c++/cli uses '^' which has no equivalent in c++ to indicate references to manged objects.

sorry i am a bit tired so dont think am expressing myself very well. anyway it took me forever to work out these distinctions as well - so i hope it helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by Skeezix
@Mike.Popoloski actually i googled this before i make this thread i've also read the things about my question in wikipedia,im not that kind of person that just creates thread you know...

Then ask us to elaborate on what you don't understand about what you've read, rather than ask us to just regurgitate the same damn thing. You'd agree it'd be a waste of both our times if we ended up giving you the same answers as you already read, yes? On that note, I recommend reading this wonderful article which I've read time and time again myself.

Share this post


Link to post
Share on other sites
@MaulingMonkey actually if you read my post I'm not asking you to define them but to site the differences because the once at wiki are all some kind of definition to the terms what I'm looking for is the differences for me to better understand them.Actually don't you think you already wasted your time by writing your post instead of just answering my query,yes? I don't want to start a fight here so please if you don't want to answer just don't,but if you know something please do so post(what I'm really looking for is somewhat like what chairthrower had said)

Share this post


Link to post
Share on other sites
Quote:
I'm not asking you to define them but to site the differences
Inherent in the definition is the differences between the terms you listed. Perhaps you could explain to us why you think they are similar, and how you are unable to differentiate between them?

We want to help, but you aren't making it clear to us, what it is you don't understand. So, we can't really progress in this thread.

Share this post


Link to post
Share on other sites
Quote:
Original post by Skeezix

I'm looking for is the differences for me to better understand them.Actually don't you think you already wasted your time by writing your post instead of just answering my query,yes?


The problem here is that you listed 6 buzzwords that are mostly, yet not entirely unrelated. As such, it's really difficult to talk about differences between apples, tables and hills. Although, at some level, apples may grow on trees on hills and are placed on a table after they are collected.

MFC is Microsoft Foundation Classes. It's a lot of code that is a *wrapper* over Windows API.

"Native codes" don't exit. Languages like Java, C# or Python are all "hosted". When they designed these languages, they also wrote down the exact virtual computer they will run on. These computers don't have Intel or Athlon CPUs or things like that. They defined a mock computer which doesn't exist, yet is very simple to program.

When you run such an application, it is converted (possibly by JIT) into *native* environment (hardware, operating system, ....).

JIT - Just In Time refers to compilation process, which converts application commands written for the above mentioned virtual computer into native environment. This process happens while the application is running, when such commands are executed. Most trivial benefit of this approach is fast development. Other benefits are strictly technical.

CLI is Microsoft's "virtual computer". They defined how their ideal computer should look like, and then everyone programs just that - not all those tens of thousands of different hardware configurations. C++/CLI is just that - it allows C++ programmers to create such applications.

Managed (whatever) is older version of the above concept.

MFC is wrapper to Windows API. When Windows came out, developing applications was a pain. MFC tried to solve that by providing a more user friendly interface. Most would say they failed at that goal, at least with MFC.

Wrapper wraps something. Interface hides implementation. The term wrapper is used to emphasize that two things are being bridged for sake of convenience. Term interface defines a contract on how to do something.

Share this post


Link to post
Share on other sites
Well sorry for the confusion...im a little confused as well
what im trying to say is that isn't it that mfc is just some kind of wrapper and that its not alot like native code (w/c in my understanding is the code we write using just plain c++) also isn't it that mfc and cli are of some relationship in that their almost alike(or maybe the other is better or something), and what is the difference with managed and unmanaged code,is that native code an unmanaged code?

Share this post


Link to post
Share on other sites
Quote:
Original post by Skeezix
Well sorry for the confusion...im a little confused as well
what im trying to say is that isn't it that mfc is just some kind of wrapper and that its not alot like native code (w/c in my understanding is the code we write using just plain c++) also isn't it that mfc and cli are of some relationship in that their almost alike(or maybe the other is better or something), and what is the difference with managed and unmanaged code,is that native code an unmanaged code?


If you're unfamiliar with programming, then we have no common grammar in which to explain these terms.

Do you know the role of a compiler is?
Do you know what API is (not acronym, the meaning), and why it's needed?
Do you know the difference between machine and source code?

Share this post


Link to post
Share on other sites

This topic is 3591 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this