• Separate MW and UI


    From electron framwork, User Interface (UI) and Middleware (MW) will be running separately, this means  the each device  will have 2 pages running, one is the UI and one is the MW. This document list down the steps change the current device code into UI or MW.

    Repositories

          The separate UI and MW will be deployed in the new device URLs which is inside the current device <pid>

          Example below for the staging environment.

                 UI URL     ----  https://apps-staging.razer.com/synapse/products/<pid>/ui

                 MW URL  ----  https://apps-staging.razer.com/synapse/products/<pid>/mw

          Creating code baselines

          1、checkout the latest device code from the device repository

          2、Work on the code baselines

               a、remove anne_common and  razer-anna-utilities folder,as for MW 

                     (1)、remove folder

                     (2)、add razer-anne-utilities as npm  from the bitbuck repository

                            "razer-anne-utilities":"bitbucket:razersw/razer-anne-utilities#staging"

                            "razer-common":"bitbucket:razersw/razer-anne-common#staging"

                     (3)、update all import references of razer-anne-utilities and ane-common to the npm bitbucket above.

                     (4)、run build and fix any issues.

               b、remove irrelevant code           

               c、run build and fix build errors

               d、add some statement  to communicate (such as replace the previous call window.dispatchEvent to MW with new broadcastChannel postMessage)or load  the active profile settings. from local storage and set it into the UI redux store.

  • 相关阅读:
    一些tips
    微信小程序之后端处理
    微信小程序之前端代码篇
    微信小程序踩坑之前端问题处理篇
    Vue组件封装之一键复制文本到剪贴板
    读别人的代码之bug的发现
    解析webpack插件html-webpack-plugin
    数组去重方法整理
    如何理解EventLoop--浏览器篇
    axios和vue-axios的关系
  • 原文地址:https://www.cnblogs.com/zhishiyv/p/16144138.html
Copyright © 2020-2023  润新知