-
Notifications
You must be signed in to change notification settings - Fork 11
FAQ
The pmod SDK has many features that may help your native code to be accessed and being used by other languages and UI frameworks. Your native objects will be 'visible' and projected to a variety to languages without the need to learn complex marshaling code like JNI or Windows runtime types.
The library can be build in the following supported platforms:
- Windows Classic
- Windows UWP (Universal Windows platform)
- MacOSX
- iOS
- Android
- Linux
The supported projection languages:
- .NET platform
- Xamarin (Mono)
- UWP
- Objective-C
- Java
- Java script (experimental)
- NodeJS (experimental)
The library is heavily based on the native types supported by the windows runtime API. On top of that we allow the folloing additional types that are cross platform:
- IEnumValue (cross language enum values)
- IAsyncOperation (for async/await pattern)
- IPropertyValue (object type for boxing/unboxing)
- IDictionary<string,Object>
- IEnumerable
- IObjectDispatch
- IObservableObject
- IObservableCollection
- ICommand
- IYourCustom (all derived types your schema define)
The current syntax supported is based on the C# 2.0 language. The syntax does not support generics and so is not trivial to define type safe enumerations for example. The parser being used is written itself in C++ based on the Golden Grammar syntax and it can run on MacOSX machines. We want less dependency as possible to develop a project without any need to install Mono or .NET core to use their compilers. We may want to change the current approach since the syntax is limited and hard to mantain
Look on the following path of the repo: ${ROOT}\src\public\inc
The organization allows you to use the projection layer (and native reflection) in the most possible lightweight form without any specific implementation. The library runtime offers a specific implementaion on most the 'core' object types like dispatchable objects and obervable collections. In many cases your project is only interested in providing a good projection layer without any observable pattern, then you only need the pmod layer.
Here a description of the main two components:
- pmod: All the reflection type registration and core types. No concret implementation of the observable pattern
- pmod library: Implementation of observable pattern and full model support with binding support among other features
The library has several features that will help organize your native code on Model layers and View Model development. Also many objects support the 'observable' pattern and will notify when a property is being changed, a collection is being modified or a Command has a new state. This notifications will be also projected into other languages in a natural way. In UWP you will have standard observable objects and collections that can be used directly on XAML entities. On Objective-C we follow the KVO pattern and so most standard observable patterns are also valid.
You would start by defining your model schema and the entities that you want to project. The current supported description language is C# interfaces and enumerations. You would declare your methods and mark some supported attributes. For windows development you may want to attach a VS C# project as a quick way to validate your object model. The library will provide code generation tools to run on your schema model that will produce the projection code and also many C++ template classes that will help your authoring code. You would spend time creating your authoring code that will be build on all the supported platforms. The final step is to deploy the pieces into your target language/platform
As long as the code is portable you would benefit from the projection capabilities of the library. You just need to define the model schema and then use the generated template code to write a thin layer against your existing code. Make sure on the implication of the life time of the objects being created
There is ton of work to be done starting with a proper wiki page. There is also a lot of work con completing the unit test code and review the model schema definition.