mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Update CorDapp overview for Open Core changes.
This commit is contained in:
parent
4f1777adb4
commit
f34235924b
@ -49,7 +49,8 @@ updates related to issuance, sale, purchase and exit of bonds.
|
||||
|
||||
Writing and building apps that run on both Corda (open source) and Corda Enterprise
|
||||
-----------------------------------------------------------------------------------
|
||||
Corda and Corda Enterprise are compatible and interoperable, which means you can write a CorDapp that can run on both.
|
||||
Corda and Corda Enterprise are moving towards an Open Core approach, which means in practice that the APIs and dependencies for CorDapps
|
||||
should all be open source, and all CorDapps need to be compiled against the Open Source Corda core library.
|
||||
To make this work in practice you should follow these steps:
|
||||
|
||||
1. Ensure your CorDapp is designed per :doc:`Structuring a CorDapp <writing-a-cordapp>` and annotated according to :ref:`CorDapp separation <cordapp_separation_ref>`.
|
||||
@ -61,12 +62,8 @@ To make this work in practice you should follow these steps:
|
||||
.. note:: It is also important to understand how to manage any dependencies a CorDapp may have on 3rd party libraries and other CorDapps.
|
||||
Please read :ref:`Setting your dependencies <cordapp_dependencies_ref>` to understand the options and recommendations with regards to correctly Jar'ing CorDapp dependencies.
|
||||
|
||||
2. Compile this **CorDapp kernel** Jar once, and then depend on it from your workflows Jar (or Jars - see below). Importantly, if
|
||||
you want your app to work on both Corda and Corda Enterprise, you must compile this Jar against Corda, not Corda Enterprise.
|
||||
This is because, in future, we may add additional functionality to Corda Enterprise that is not in Corda and you may inadvertently create a
|
||||
CorDapp kernel that does not work on Corda open source. Compiling against Corda open source as a matter of course prevents this risk, as well
|
||||
as preventing the risk that you inadvertently create two different versions of the Jar, which will have different hashes and hence break compatibility
|
||||
and interoperability.
|
||||
2. Compile this **CorDapp kernel** Jar once, and then depend on it from your workflows Jar. In terms of Corda depdendencies,this should only
|
||||
depend on the ``corda-core`` package from the Corda Open Source distribution.
|
||||
|
||||
.. note:: As of Corda 4 it is recommended to use :ref:`CorDapp Jar signing <cordapp_build_system_signing_cordapp_jar_ref>` to leverage the new signature constraints functionality.
|
||||
|
||||
@ -75,5 +72,9 @@ To make this work in practice you should follow these steps:
|
||||
to your CorDapp for when it is run on Corda Enterprise (perhaps it uses advanced features of one of the supported enterprise databases or includes
|
||||
advanced database migration scripts, or some other Enterprise-only feature).
|
||||
|
||||
When building a CorDapp against Corda Enterprise, please note that the ``corda-core`` library still needs to come from the open source
|
||||
distribution, so you will have dependencies on Corda Enterprise and a matching open core distribution. Specifically, any CorDapp targeted
|
||||
to run on Corda Enterprise should have unit and integration tests using Corda Enterprise.
|
||||
|
||||
In summary, structure your app as kernel (contracts, states, dependencies) and workflow (the rest) and be sure to compile the kernel
|
||||
against Corda open source. You can compile your workflow (Jars) against the distribution of Corda that they target.
|
||||
|
Loading…
Reference in New Issue
Block a user