C++ and Java

J

jrefactors

..NET still only works on Windows Platform. Is that correct? It will be
very slow to run on VM. For commercial software, C++ is still the best
choice.
 
J

John Carson

.NET still only works on Windows Platform. Is that correct?

There are attempts to clone it for use on Linux --- the Mono Project.

http://www.mono-project.com/Main_Page

I haven't really followed the progress of the Mono Project but my impression
of all of these Microsoft-cloning attempts is that they are always
works-in-progress and are never going to appeal to people who want something
that "just works".
 
S

Steven T. Hatton

.NET still only works on Windows Platform. Is that correct? It will be
very slow to run on VM. For commercial software, C++ is still the best
choice.
I'm not sure why running on a VM will necessarily be "very slow". Some
things might be marginally slower, such as loadtimes, but instructions are
instructions. Calling a single instruction from the hardware instruction
set is no different when it is done by a virtual machine or by a program
running directly on the OS. The big difference is likely to come from the
ability of the C++ compiler to optimize code for the OS. If people come up
with ways of doing that for bytecode executed on a virtual machine, the
only difference in performance will come from factors such as the ability
to arrange source code in ways that enhances performance such as using
compositors.

In answer to the question about .NET:
http://www.go-mono.com/
 
B

Brooks Hagenow

John said:
Care to name some?

C++ applications include Microsoft Office, Internet Explorer, Adobe
Photoshop, Illustrator and Acrobat. I understand that Macromedia's Web
Development apps are also written in C++.

See here for a long list:

http://www.research.att.com/~bs/applications.html


I know of two off the top of my head not written by Sun. Workbrain is a
payroll system my employer is currently implementing which is written in
Java. "Chrome" is a FPS game written in Java. And there is LimeWire
which claims to be the fastest file sharing program available.

And if you count applications written by Sun, "StarOffice" isn't all
that bad.

Those are the examples I have used that I know are written in Java. I
am sure there are many more out there.


Chrome
http://www.chromethegame.com/

Workbrain
http://www.workbrain.com/

StarOffice
http://www.staroffice.com/

LimeWire
http://www.limewire.com/
 
D

Daniel Dyer

I know of two off the top of my head not written by Sun. Workbrain is a
payroll system my employer is currently implementing which is written in
Java. "Chrome" is a FPS game written in Java. And there is LimeWire
which claims to be the fastest file sharing program available.

And if you count applications written by Sun, "StarOffice" isn't all
that bad.

Those are the examples I have used that I know are written in Java. I
am sure there are many more out there.

StarOffice may use Java for some things but I think it's primarily C++.

Obviously there's all the Java commercial development tools like IntelliJ
and JBuilder. Surprisingly, some versions of C++ Builder are also written
in Java (I know the earlier versions were native but the Mobile Edition I
have installed here is Java at least - I don't know if that's the case for
the latest full edition). Most of Oracle's admin tools were Java too last
time I used Oracle.

Other commercial Java desktop apps include Poseidon UML and SmartCVS.

Moving away from the desktop, there's lost of commercial mobile software
written for J2ME (mainly games).

That said, most commercial Java development is server side. Where Swing
is used commercially it tends, in my experience, to be in more bespoke
development rather than off-the-shelf software.


Dan.
 
S

Steven T. Hatton

Brooks said:
John Carson wrote:
I know of two off the top of my head not written by Sun. Workbrain is a
payroll system my employer is currently implementing which is written in
Java. "Chrome" is a FPS game written in Java. And there is LimeWire
which claims to be the fastest file sharing program available.


And if you count applications written by Sun, "StarOffice" isn't all
that bad.

Sun didn't write StarOffice, nor is it written in Java:

#ifdef PRODUCT
#error Wer fummelt denn an den makefiles rum?
#endif


#pragma hdrstop

#include "dbg_lay.hxx"

#ifndef _STREAM_HXX //autogen
#include <tools/stream.hxx>
#endif

#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
#define _SVSTDARR_LONGS
#include <svtools/svstdarr.hxx>
#endif

#include <stdio.h>

#include "frame.hxx"
#include "layfrm.hxx"
#include "flyfrm.hxx"
#include "txtfrm.hxx"
#include "ndtxt.hxx"
#include "dflyobj.hxx"
#ifndef _FNTCACHE_HXX
#include <fntcache.hxx>
#endif
// OD 2004-05-24 #i28701#
#ifndef _SORTEDOBJS_HXX
#include <sortedobjs.hxx>
#endif

ULONG SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol::pImpl = NULL;

ULONG lcl_GetFrameId( const SwFrm* pFrm )
{
#ifndef PRODUCT
static BOOL bFrameId = FALSE;
if( bFrameId )
return pFrm->GetFrmId();
#endif
if( pFrm && pFrm->IsTxtFrm() )
return ((SwTxtFrm*)pFrm)->GetTxtNode()->GetIndex();
return 0;
}

class SwImplProtocol
{
SvFileStream *pStream; // Ausgabestream
SvUShortsSort *pFrmIds; // welche FrmIds sollen aufgezeichnet werden
( NULL == alle )
SvLongs *pVar; // Variables
ByteString aLayer; // Einrueckung der Ausgabe (" " pro
Start/End)
USHORT nTypes; // welche Typen sollen aufgezeichnet werden
USHORT nLineCount; // Ausgegebene Zeilen
USHORT nMaxLines; // Maximal auszugebende Zeilen
BYTE nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der
INI-Datei
BYTE nTestMode; // Special fuer Testformatierung, es wird ggf. nur
// innerhalb einer Testformatierung aufgezeichnet.
void _Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void*
pParam );
BOOL NewStream();
void CheckLine( ByteString& rLine );
void SectFunc( ByteString &rOut, const SwFrm* pFrm, ULONG nAct, void*
pParam );
public:
SwImplProtocol();
~SwImplProtocol();
// Aufzeichnen
void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
{ if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); }
BOOL InsertFrm( USHORT nFrmId ); // FrmId aufnehmen zum Aufzeichnen
BOOL DeleteFrm( USHORT nFrmId ); // FrmId entfernen, diesen nicht mehr
Aufzeichnen
void FileInit(); // Auslesen der INI-Datei
void ChkStream() { if( !pStream ) NewStream(); }
void SnapShot( const SwFrm* pFrm, ULONG nFlags );
void GetVar( const USHORT nNo, long& rVar )
{ if( pVar && nNo < pVar->Count() ) rVar = (*pVar)[ nNo ]; }
};

/* -----------------11.01.99 10:43-------------------
* Durch das PROTOCOL_ENTER-Makro wird ein SwEnterLeave-Objekt erzeugt,
* wenn die aktuelle Funktion aufgezeichnet werden soll, wird ein
* SwImplEnterLeave-Objekt angelegt. Der Witz dabei ist, das der Ctor
* des Impl-Objekt am Anfang der Funktion und automatisch der Dtor beim
* Verlassen der Funktion gerufen wird. In der Basis-Implementierung ruft
* der Ctor lediglich ein PROTOCOL(..) mit ACT_START und im Dtor ein
* PROTOCOL(..) mit ACT_END.
* Es lassen sich Ableitungen der Klasse bilden, um z.B. beim Verlassen
* einer Funktion Groessenaenderungen des Frames zu dokumentieren u.v.a.m.
* Dazu braucht dann nur noch in SwEnterLeave::Ctor(...) die gewuenschte
* SwImplEnterLeave-Klasse angelegt zu werden.
*
* --------------------------------------------------*/

class SwImplEnterLeave
{
protected:
const SwFrm* pFrm; // Der Frame,
ULONG nFunction, nAction; // die Funktion, ggf. die Aktion
void* pParam; // und weitere Parameter
public:
SwImplEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual void Enter(); // Ausgabe beim Eintritt
virtual void Leave(); // Ausgabe beim Verlassen
};

class SwSizeEnterLeave : public SwImplEnterLeave
{
long nFrmHeight;
public:
SwSizeEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ),
nFrmHeight( pF->Frm().Height() ) {}
virtual void Leave(); // Ausgabe der Groessenaenderung
};

class SwUpperEnterLeave : public SwImplEnterLeave
{
USHORT nFrmId;
public:
SwUpperEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {}
virtual void Enter(); // Ausgabe
virtual void Leave(); // Ausgabe der FrmId des Uppers
};

class SwFrmChangesLeave : public SwImplEnterLeave
{
SwRect aFrm;
public:
SwFrmChangesLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {}
virtual void Enter(); // keine Ausgabe
virtual void Leave(); // Ausgabe bei Aenderung der Frm-Area
};

void SwProtocol::Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct,
void* pParam )
{
if( Start() )
{ // Hier landen wir, wenn im Debugger SwProtocol::nRecord mit
PROT_INIT(0x1) oderiert wurde
BOOL bFinit = FALSE; // Dies bietet im Debugger die Moeglichkeit,
if( bFinit ) // die Aufzeichnung dieser Action zu beenden
{
nRecord &= ~nFunction; // Diese Funktion nicht mehr aufzeichnen
nRecord &= ~PROT_INIT; // PROT_INIT stets zuruecksetzen
return;
}
nRecord |= nFunction; // Aufzeichnung dieser Funktion freischalten
nRecord &= ~PROT_INIT; // PROT_INIT stets zuruecksetzen
if( pImpl )
pImpl->ChkStream();
}
if( !pImpl ) // Impl-Object anlegen, wenn noetig
pImpl = new SwImplProtocol();
pImpl->Record( pFrm, nFunction, nAct, pParam ); // ...und Aufzeichnen
}

// Die folgende Funktion wird beim Anziehen der Writer-DLL durch TxtInit(..)
aufgerufen
// und ermoeglicht dem Debuggenden Funktionen und/oder FrmIds freizuschalten



OTOH:

BEA WebLogic is written in Java, and is used by a great many DoD sites.

http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products
 
J

John Carson

Brooks Hagenow said:
I know of two off the top of my head not written by Sun. Workbrain
is a payroll system my employer is currently implementing which is
written in Java. "Chrome" is a FPS game written in Java. And there
is LimeWire which claims to be the fastest file sharing program
available.
And if you count applications written by Sun, "StarOffice" isn't all
that bad.


Those are the examples I have used that I know are written in Java. I
am sure there are many more out there.

What makes you think that StarOffice is written in Java? I went to the site
of its close relative, OpenOffice, and there I read:

"The OpenOffice.org source code includes the technology which Sun
Microsystems has been developing for the future versions of StarOffice(TM)
software. The source is written in C++ and delivers language-neutral and
scriptable functionality, including Java(TM) APIs."

http://about.openoffice.org/index.html

Enough said really.
 
S

Steven T. Hatton

John Carson wrote:

What makes you think that StarOffice is written in Java? I went to the
site of its close relative, OpenOffice, and there I read:

"The OpenOffice.org source code includes the technology which Sun
Microsystems has been developing for the future versions of StarOffice(TM)
software. The source is written in C++ and delivers language-neutral and
scriptable functionality, including Java(TM) APIs."

http://about.openoffice.org/index.html

Enough said really.

Most of what you find here is written in Java:
https://www.us.army.mil/suite/login/welcome.html
 
T

Tor Iver Wilhelmsen

Raymond DeCampo said:
Note that he said commercial applications. That would preclude a lot
of custom web applications you may be banking on on the Java side of
the ledger.

When company A pays company B $2 million to develop a Java app that is
a commercial app. Unless you redefine commercial to mean shelfware or
somesuch.

(MSIE is not a commercial app but - according to the vendor - a
component in Windows.)
 
T

Tor Iver Wilhelmsen

Daniel Dyer said:
Surprisingly, some versions of C++ Builder
are also written in Java (I know the earlier versions were native but
the Mobile Edition I have installed here is Java at least - I don't
know if that's the case for the latest full edition).

The C++BuilderX IDEs are written in Java.
Other commercial Java desktop apps include Poseidon UML and SmartCVS.

Plus project planning tool GDPM Tools.

The big issue regarding Java desktop apps has to do with install
complexities; the C++ and Delphi worlds have better installers. In
theory, installing an app for Java should be as easy as the "xcopy
deployment" Microsoft claims for .Net, but just as with that
technology you need the runtime installed, and common libraries
referenced (not all install to lib/ext in a clean fashion).

JNLP and in particular the most common implementation - Java Web Start
- helps a lot though.

Sun has a list of Swing applications at

http://java.sun.com/products/jfc/tsc/sightings/S21.html

(that's the most recent page, there are earlier ones too).
 
R

Raymond DeCampo

Tor said:
When company A pays company B $2 million to develop a Java app that is
a commercial app. Unless you redefine commercial to mean shelfware or
somesuch.

That was my understanding of the term. WikiPedia agrees, citing
shrinkware as a synonym:

<http://en.wikipedia.org/wiki/Commercial_software>

However, I recognize that reasonable people can disagree on this matter
and even the WikiPedia article is open to interpretation. Another
reason statistics like this are impossible to obtain.

Ray
 
J

Joan

John Carson said:
C:\WINDOWS\assembly\GAC\Microsoft.VisualBasic\7.0.5000.0__b03f5f7f11d50a3a

The significance of this directory entry is not as clear to me as it
apparently is to you.

It is certainly true that Microsoft is moving some of its development to the
.Net framework. Stroustrup acknowledges this when he comments "Some parts of
Visual Studio like the Base Class Libraries that ship with the .NET
Framework were written using C# but the C# compiler itself is written in
C++."

And C++ is/was written in "C", so what?
 
J

Joan

.NET still only works on Windows Platform. Is that correct? It will be
very slow to run on VM. For commercial software, C++ is still the best
choice.

Best for what? My washing machine doesn't use C++.
 
J

John Carson

Joan said:
And C++ is/was written in "C", so what?

Stroustrup was discussing the full range of C++ uses. Accordingly, the use
of C++ in the writing of compilers is an appropriate thing to mention. I was
discussing application programs, so compiler writing has no relevance to my
point, but I prefer to quote complete sentences.
 
J

John Carson

John Carson said:
Stroustrup was discussing the full range of C++ uses. Accordingly,
the use of C++ in the writing of compilers is an appropriate thing to
mention. I was discussing application programs, so compiler writing
has no relevance to my point, but I prefer to quote complete
sentences.

Actually, now that I think of it, I was discussing off-the-shelf
applications, and the C# compiler is one of them. Further, the original C++
compiler would have been written in C, but that is no longer the case. C++
compilers are now written in C++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,297
Messages
2,571,536
Members
48,283
Latest member
SherriP988

Latest Threads

Top