Hi All,
We are hoping to do $subject.
*What is 'bindings.yaml'?*
Through the bindings, app/component developer can push a fragment into a
zone.
e.g.
# zone name : fragment name
org.wso2.carbon.uuf.sample.foundation.usermenu:
"org.wso2.carbon.uuf.sample.simple-auth.usermenu"
Here, "usermenu" fragment in the "org.wso2.carbon.uuf.sample.simple-auth"
component is pushed (binded) into the "usermenu" zone defined in a layout
in the "org.wso2.carbon.uuf.sample.foundation" component.
As you can see, content in the 'bindings.yaml' is not configuration, rather
it is meta-info of that component.
*Goal of 'component.yaml'.*
It is intended to be the central place that contains all the meta-info of
an UUF component (similar to the MANIFEST.MF of an OSGi bundle). It gives
the room for new features and future enhancements. For example, we have a
requirement to add microservices to host UI-specific REST APIs. In the
following example 'component.yaml', we have defined REST APIs, along with
some bindings.
apis:
- className: "org.wso2.carbon.uuf.sample.simpleauth.Users"
uri: "/simpleauth/users"
- className: "org.wso2.carbon.uuf.sample.petsstore.Service"
uri: "/pets"
bindigs:
- zoneName: "org.wso2.carbon.uuf.sample.foundation.usermenu"
fragments:
- "org.wso2.carbon.uuf.sample.simple-auth.usermenu"
- zoneName: "org.wso2.carbon.uuf.sample.foundation.sidepane"
fragments:
- "org.wso2.carbon.uuf.sample.petsstore.sidemenu"
- "org.wso2.carbon.uuf.sample.simpleauth.sidemenu"
Also with this approach, we can bind (push) more than one fragment into a
zone.
WDYT?
Thanks.
--
Sajith Janaprasad Ariyarathna
Software Engineer; WSO2, Inc.; http://wso2.com/
<https://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture