JAVA + Engine vs c # + Engine

Source: Internet
Author: User
Tags ipoint

From Net + Engine, I thought it was not very difficult, but I was wrong. We know that AE development means interface programming, and what in AE is AO, this is built on com. When we use Net for development, there will be interaction between net and com, all of these have their respective sets (ESRI provides primary interop assemblies for all the ArcObjects type libraries that are implemented with COM ). A class can implement multiple interfaces, and each interface is responsible for managing its own methods. Therefore, interface programming must also have access from one interface to another, that is, QI, in C #, this is easy to do. It is okay to directly perform a type conversion.

Classes cannot be used in C.

Communication in java must also have an interoperability set, that is, COM Interop Bridge, and for java (ESRI are using third-party software (J-Integra: http://j-integra.intrinsyc.com /) to automagically generate a bridge between Java and their COM libraries .). In Java, the interface QI is inevitable, and this is done by the proxy class. in Java, there is an IXXXproxy, which is a class rather than the interface we mentioned in c.

In Java, classes can be used for programming. This may be because Interface Conversion in Java is troublesome! Since IXXXproxy is a class, there must be constructor. Otherwise, how can the object be generated? The default constructor of IXXXproxy cannot be used internally.

[C #]

IPoint point = new PointClass();if (point is IGeometry){    IGeometry geometry = (IGeometry)point;    Console.WriteLine(geometry.GeometryType.ToString());}

 

In Java

IGeometry iGeometry = new IGeometryProxy(iPoint);

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.