Содержание
- Frequently Asked Questions
- How the pmod SDK can help my projects and application development ?
- What languages and platforms are currently supported ?
- What of types are supported to be projected in the library ?
- What is the current model schema syntax ?
- Where can i find the public API for C++?
- Why the SDK offer two runtime components (pmod & pmod_lib) ?
- What is the support available for Model View development ?
- What is typical flow when developing with the pmod SDK ?
- I have a lot of legacy C++ code that i want to use on other languages, did the SDK can help ?
- How can i contribute ?
Frequently Asked Questions
How the pmod SDK can help my projects and application development ?
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.
What languages and platforms are currently supported ?
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)
What of types are supported to be projected in the library ?
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)
What is the current model schema syntax ?
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
Where can i find the public API for C++?
Look on the following path of the repo: ${ROOT}\src\public\inc
Why the SDK offer two runtime components (pmod & pmod_lib) ?
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
What is the support available for Model View development ?
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.
What is typical flow when developing with the pmod SDK ?
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
I have a lot of legacy C++ code that i want to use on other languages, did the SDK can help ?
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
How can i contribute ?
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.