microsoftgraph / msgraph-sdk-android

Microsoft Graph SDK for Android! https://graph.microsoft.io
Other
51 stars 43 forks source link

standard java support - contributions? #62

Closed davidmoten closed 6 years ago

davidmoten commented 7 years ago

Following up on #60:

I'm wondering to what extent our organisation can help with the creation of standard java support for msgraph. Perhaps the creation of a github project that ports classes from msgraph-sdk-android and then contribute it back for your team to control?

Here's some background to my question.

I notice that very few classes in the msgraph-sdk-android have references to android packages and those references are trivially migrated:

./graphsdk/src/main/java/com/microsoft/graph/extensions/GraphServiceClient.java:import android.app.Activity;
./graphsdk/src/main/java/com/microsoft/graph/http/BaseRequest.java:import android.net.Uri;
./graphsdk/src/main/java/com/microsoft/graph/serializer/ByteArraySerializer.java:import android.util.Base64;
./graphsdk/src/main/java/com/microsoft/graph/logger/DefaultLogger.java:import android.util.Log;
./graphsdk/src/main/java/com/microsoft/graph/concurrency/SynchronousExecutor.java:import android.os.Handler;
./graphsdk/src/main/java/com/microsoft/graph/concurrency/SynchronousExecutor.java:import android.os.Looper;

From my cursory inspection it appears that decoupling this library from the android SDK would be very simple but I haven't implemented this.

Would you like some community help here? How good is msgraph-sdk-android (is the Microsoft team happy with it)? Is it a suitable basis for a standard java product or should we wait for something else?

dpim commented 7 years ago

Hey David! The Java community (including Android development with Microsoft Graph) is of great interest to us. We'd certainly appreciate your input on what you would like to see from a standalone Java SDK.

davidmoten commented 7 years ago

Hi @dpim, thanks. I'll browse this project a little more to gather some ideas. Can you (or @cbales who seems to be the active contributor here) answer my questions?

caitlinrussell commented 7 years ago

At this point, we have not finalized a design, but as you say, it seems like it would be straightforward to port from the Android library, since it is not heavily tied to the platform. We will likely build something that can use one code base to publish both a Java and Android library, or convert this library to Java and publish a lightweight layer for Android to use on the frontend.

davidmoten commented 7 years ago

thanks @cbales. I agree. I've created a java sdk from the android one to play with it. I'll see what I learn from this (I now have to setup OAuth2 stuff to test) and report back what I find.

davidmoten commented 7 years ago

@cbales Haven't had a chance to test my fork yet and am on leave now for six weeks so will test late October.

davidmoten commented 6 years ago

@cbales How's progress on Java SDK development? If it's still early days I might test my fork.

caitlinrussell commented 6 years ago

This is still in the works and is still in the design phase. I have a converted library, but am investigating changing the calling pattern and a few other design decisions that we could iterate on when releasing a new SDK. Are there any changes that you added or would like to see added to the Java library?

davidmoten commented 6 years ago

@cbales that sounds good. As you are making progress I'll abandon my fork (also because merging many recent commits from master would be a pain). I'd be keen to see the library as early as possible in github (with whatever qualifications to say it's not ready yet, is in active development etc). Once I've got something that I can import into my IDE to view I'd be delighted to give some feedback by coding my use cases and stepping through the called code. The earlier I see the code the more review you'll get so I look forward to it appearing.

Two months ago when I made the fork I did notice repeated patterns in the generated code that would be nice to extract into utility classes. It allows a developer to throw in extra debug logging in one place instead of many. I didn't spot the pattern just now in a quick review but you will be familiar enough with the generated code for this to ring a bell I imagine. I'll have another look for such things when I see the new project.

caitlinrussell commented 6 years ago

I have added each of you to the prototype repository for Java. If you have any feedback on features or changes you would like to see implemented in the Java SDK or would like to load the library into your project for early testing, please use this repo to do so.

buckett commented 6 years ago

Is there any update on the prototype repository for Java?

buckett commented 6 years ago

To answer myself I think @cbales has it in hand: https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/112

Thanks for the work your putting into this, I'm looking forward to trying it out.

caitlinrussell commented 6 years ago

We can't give any firm dates but it's first on our plate to get out the door!

pranayw3 commented 6 years ago

@cbales can you please add me to the prototype repository for Java? Thanks!

marekswiecznik commented 6 years ago

@cbales I would really appreciate access to the prototype repository, can You add me as well? Thanks!

eluodema commented 6 years ago

@cbales Would it be possible for us to get access to the prototype as well? We are evaluating ways to access the Graph API from Java and this would really help. Thanks.

caitlinrussell commented 6 years ago

Thanks everyone for your patience. The Java SDK is now available in public preview. You can check out the repo now here: MSGraph-SDK-Java. The package will be available through MavenCentral shortly or you can download directly from Bintray today.

MIchaelMainer commented 6 years ago

@cbales Kudos to you for getting this out! @davidmoten Thank you for all of the help on this.

PranayWankhede commented 6 years ago

Congrats to team 😊 I am currently working on POC which will make use of this SDK. POC deadline is March end and we need to start production from April. Will this be production ready starting April?

caitlinrussell commented 6 years ago

No, it will most likely still be in preview at that time. We want to allow time for developers to use it and suggest improvements before we publish a non-breaking API surface.

PranayWankhede commented 6 years ago

@cbales thanks!

PranayWankhede commented 6 years ago

@cbales can you please give any approximate time for production ready use?

caitlinrussell commented 6 years ago

Unfortunately we cannot give any timelines on when we will be ready to release the library for production. It also is dependent on the amount and type of feedback we receive. I would expect it to take several months. I would encourage you to watch the new repo and we will do our best to keep developers updated there.

PranayWankhede commented 6 years ago

@cbales I will keep my design flexible to accommodate SDK in future. Can you please add me to new repo? Thanks!

davidmoten commented 6 years ago

@pranayw3 the repo is now public at https://github.com/microsoftgraph/msgraph-sdk-java

PranayWankhede commented 6 years ago

@davidmoten thanks!