What is the difference between user create Java API and Java jar? - jar

I want to create web application that is having some functionality to be platform independent.For that i want to create Java API, but I am confused that is the same thing can be done using jar implementing that functionality?

That are two completely different things and cannot be compared as you did.
An API is an Application Programming Interface, so it defines the methods you can use. (wikipedia link)
A JAR is a Java Archive, it is just a packaged Java Application. (wikipedia link)

An API, by definition, it's just an interface your application/library exposes to other applications to take advantage of your functionality. It doesn't impose any way of implementing it and there is no such a thing as a Java API (unless you mean you have multiple APIs for different programming languages in the form of wrappers). You can build your API just using a regular Java interface, and then pack that in a JAR other Java applications can import and use.

A rest API written in Java will return a JSON payload which can then be read and used by an application written in any programming language. This is the advantage of web services.
A jar will return Java objects as a payload, so is optimal to use if you will be using it exclusively within other Java applications.

Related

ARM ADF Deployment Features

I am not sure that this is the appropriate forum but we are having some issues with the recommended CI/CD flow for Azure Datafactory which is requiring us to create our own script to deploy ADF resources using the ADF REST APIs instead of auto-generated ARM templates.
Before undertaking this work, we wanted to clarify a few assumptions about the ARM template deployment for ADF resources. Are all of the assumptions true?
ARM template deployment for ADF resources simply calls the ADF REST APIs to deploy resources and has the same limitations as calling the REST APIs ourselves?
ARM template deployment for ADF does not perform any optimizations before calling the REST APIs such as reading the current definition of resources before writing and only writing if the definition has changed.
Are there any other ARM limitations or optimizations that we should be aware of in order to make sure that our performance is as optimal as ARM?
As we know An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment without writing the sequence of programming commands to create the deployment.
ARM has its own benefits over REST APIs such as Incremental and complete deployments which are not available when using the REST APIs.
David Gaspard: Coming to your ask, ARM Templet is collection of JSON defines where you can include multiple REST APIs calls in single module and use it for deployment. You can re-use. It also allows you to use Variables. It dependence on what best suits for your requirement.
You can use incremental deployment in ARM which can take care of Optimization.
Few reference that might help.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-rest
related discussion : Azure ARM Templates and REST API
ARM Limitations : https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/best-practices

Accessing Cloud Datastore from Qt app

I've developed a REST API back end using Endpoints-Proto-Datastore, which wraps the Cloud Endpoints Python API. I'm starting to look at Qt and trying to get an idea what will be involved in accessing my API from the Qt networking or other library. Might it be nearly as straightforward as is making the calls from the command line using the Python Client library, which even handles OAuth2 flows? This would be very nice. I might use PyQt if this makes things simpler.
Your Endpoints service can generate an OpenAPI specification file which describes the API. Once you do this, there are many OpenAPI-compatible packages which can generate client code for you.
I located this document which gives a pretty good overview for my purposes:
"The Google APIs Client Library for C++ will automatically take care of many of the tedious details for interpreting and complying with the discovery documents so that you can write simpler and familiar C++ code."
Now it's a matter of building and installing the C++ client and then figuring out how to generate the client library and access it from a Qt application. But that is beyond the scope of this question.

OM2M with dotnet core, restAPI, oneM2M

I am working on a REST API to communicate with one of the server which is communicating using oneM2M architecture. Does anybody have an idea how to decode its JSON format in dotnetcore?
If your program needs to communicate with a oneM2M CSE then you need to implement at least parts of the Service Layer Core Protocol. This is specified in oneM2M's TS-0004. You should also have a look at TS-0001, the Functional Architecture document, which beside of the general architecture, describes the individual resources, their structures and their relationships.
You can find these specifications here: http://www.onem2m.org/technical/published-documents.
If you are new to oneM2M then you definitely want to have a look at the "Getting Started" pages and the Application Developer Guide.

What Java CMIS client library should I use?

I am starting a new project and must decide which CMIS client library we will use.
Our Java project just needs to connect an a CMIS server (actually Alfresco but it should not matter), in order to perform some read/write/search operations.
I am looking for a client library that:
is already usable
is not going to be abandoned soon
has an active community of users
is open source
Which one would you recommend and why?
Here are a few possibilities:
Apache Chemistry's OpenCMIS (winner by now)
xCMIS
chemistry-atompub-client (abandoned)
chemistry-abdera (not very active)
Abdera (difficult)
Use the AtomPub or Web Service directly (difficult)
I recommend OpenCMIS. (Well, I have to since I'm involved in the project.)
It's an active project supported by a broad community. OpenCMIS supports both bindings, AtomPub and Web Services, and has been tested against a number of repositories.
chemistry-atompub-client has been abandoned and chemistry-abdera is not very active. You can, of course, handle the AtomPub binding directly, but that's a lot of work.
You may also use an Alfresco-specific OpenCMIS extension for the sake of simplicity.
http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/

Adobe AIR and HNAP (SOAP)

I have been struggling with this for some time now scanning the net for examples or references for executing HNAP calls via an Adobe AIR application using Adobe Flex Builder. I know that making the HNAP calls implements SOAP technology and that AIR can execute SOAP calls. I have even been able to successfully compile and execute example SOAP projects using AIR and Flex.
The examples I have used all reference a WSDL file to define the functions available via the SOAP interface. One big problem is that I have been unable to find a WSDL file defining the HNAP functionality.
Other than trying to create my own WSDL file, which is becoming a real pain, does anyone have any experience or links to references on how to use a SOAP service from AIR and Flex without the use of a WSDL file? Or perhaps information about calling HNAP commands from AIR and Flex?
I wound up creating my own WSDL file in order to make the calls.

Resources