Coder Social home page Coder Social logo

usyncdatasync.example's Introduction

uSync Extension Examples

This repo contains example code that shows how you can implement your own uSync Handler and Serializer to transport your own custom data between umbraco installations via uSync.

Stucture

uSyncExamples.Site

Umbraco WebSite

uSyncExamples.Data

Sample property editor, backed with a Database driven picker.

This example is super simple mainly so we can have some data to share between installations.

uSync.Example.DataSync

Custom uSync Handler/Serializer and Mapper that integrate the data layer into uSync elements.

Key elements

within the uSync.Example.DataSync project we have implemented examples of the elements needed to integrate with uSync/ContentEdition and Complete.

Serializer

Responsible for reading/writing elements to and from XML

Handler

Responsible for reading/Writing the XML to disk, you would also link into any Saving/Deleting events you may have within your custom data editors.

Mapper

If your data is stored within properties of content or media items, a mapper lets you change how that data is stored on disk (e.g removal of Internal IDs etc)

Dependency Checks

mappers are also responsible for calculating any additional dependencies that might be required for a property to be correctly setup on a target site.

in our example this is the database entry for the selected item and a linked document type.

Notes:

It is important that you have someway of identifying your custom items that can be generic between implementations. e.g an alias or unique-key (guid) value. without something to differentiate between items uSync cannot tell what is new and what is existing when it performs a sync between instances.

you don't need both an alias and key - but uSync has been developed to work best with both - as if the value cannot be found by key, it will be searched for by alias. This allows us to sync previously un-synced systems, where the alias is the only matching element, and not rely solely on the key.

but if all you have is a key/alias and you know your system is going to be in sync from teh start this is fine.

usyncdatasync.example's People

Contributors

kevinjump avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.