microsoft / pmod

Native cross platform library with language projection support for native code.
Other
26 stars 11 forks source link

Few questions about pmod #1

Open bilsou opened 6 years ago

bilsou commented 6 years ago

Just found out about this gem and in all fairness I was surprised it did not get more attention, it looks really good. I have been through the FAQ but I wanted to clear some things up.

Thanks in advance for your answers.

rodrigovaras commented 6 years ago

Hey, I'm glad you get interested in this project, it is truly a gem, we spend many resources/hours on it. I architect the idea from the ground up and we spend many years perfecting the final goal and components. About your questions:

Things on my mind that i have planned already:

Hope this helps and ready to answer more questions.

bilsou commented 6 years ago

Thank you for answering in a really detailed manner. I am currently using Djinni in production. Although it is mature and used in production by many, when one wants to use some custom types on Android (OBJC is almost transparent with C++), you still need to create your own JNI boilerplate for those types and it is a real PITA. So when I found pmod and how it uses a COM-like projection architecture (which I have quite some XP with) to overcome the JNI pain, it immediately got my interest.

I quickly tried to see how pmod worked by running the Movies example, precisely the Xcode project, but unfortunately ended up with errors w.r.t. some missing files/obj files. I unfortunately don't have time to look more at it as I have other things going on right now but will try to get back to it as soon as I have some time. It would be great to have a detailed README that describes how to use pmod the same way Djinni does it with its limitations, real world example (like displaying a JSON-based listview from some REST api on Android/iOS/UWP) etc.. You should also definitely mention in the description that it is/has been used in production internally at Microsoft, it will make a lot people not doubting its strength and value.

Once again, I will try to look at it as soon as I can and might even be able to help by giving some feedback.

rodrigovaras commented 6 years ago

Thanks, I will add the reference to the README the existing use of pmod library inside MSFT. About the movies sample, i will double check again the build part. The painful part is getting the casablanca SDK (REST SDK) integrated into every platform. You may want to try the Android version since i think there is existing NuGet package. On this after noon i will attempt a clean build on the Movies sample on Android using VS. I think the XCode project is much more tricky since you need to follow the instructions to build casablanca on a Mac.

rodrigovaras commented 6 years ago

Have you had success on the Movies sample? I did the build again on my Mac using Xcode and i was able to succeed and run the sample, it should work for you, but first you would need to follow the instructions to build the C++ REST SDK here:https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS

But i understand you want to build the projection for Android instead. You have two options, use the regular Android SDK and make file or using VS 2017 with the Mobile C++ package support. I tried both on my Windows machine and they work. The VS 2017 seems to be nicer and simple if you like it. You should let me know if you want to work on a Mac instead and i can tried there too. You would need to produce the Movies native dll and then use the Android Studio to integrate it into the UI . Let me know how can i help you more. Note: for building for iOS you would need to have on a folder both the pmod & cpxprestdk repos, since i made some changes to the reference project.

bilsou commented 6 years ago

I haven't had the time to try since last time. Pretty busy lately. I will try to give it another go as soon as I am able to. I do remember looking at cpprestsdk once, it was definitely a PITA to build for iOS/Android. That's why I preferred going the libcurl way, built a C++ wrapper on top of it and it was way easier and lightweight to use. I might just try to look at your tutorial and try to build a small sample on my own by following the steps. I don't know how detailed your tutorial is, hopefully enough to give me a starting point. But again don't know when I will be able to do that, yet.

rodrigovaras commented 6 years ago

Thanks again for the feedback. I read again the tutorial i made some months ago and it has some useful screen shots that will help, but it's only intended to help you when using VS 2017 as main platform and it ends only on the authoring assembly without too much explanation on the UI integration. My advise is to start and look in detail the DemoApp sample since it is the best supported code and should run and build on every platform. I admit the app itself does not does anything useful as the 'Movies' sample but illustrate the potential on the SDK by showing observable objects and commands that are well integrated on any UI. The Demo Sample itself will work very well on VS 2017 when using NuGet packages but on other platforms you would need to build the library itself and then the samples. Thanks for the feedback on using the cpprestsdk, its a nice MSFT library but agree that the iOS version is painful to build. Will explore using the libcurl SDK on the Movies sample.