Giter VIP home page Giter VIP logo

wrl's Introduction

WebRunLocal

1. 程序说明

WebRunLocal旨在实现网页(Web Page)和本地程序(Local App)之间的动态调用,WebRunLocal作为Windows本地托盘程序在客户端电脑运行,网页中使用JavaScript通过http的方式WebRunLocal服务,WebRunLocal服务根据传入的参数,动态的调用本地程序并返回结果,并将结果作为返回值返回,方便在网页中进行解析。

在网页中调用本地程序,一般采用的技术方案是ActiveX或NPAPI插件技术,其中ActiveX仅能够在IE浏览器中使用,随着Chrome,Firefox等浏览器基于安全性及稳定性的考虑,不再支持插件,NPAPI插件在高版本的浏览器上均不能正常的使用,想要访问本地程序就不得不固定浏览器版本,项目兼容性比较差。有的项目会在网页中调用第三方提供的本地程序,用以实现对电脑硬件的调用或者作为第三方项目之间的交互方式,然而第三方提供的程序稳定性无法得到保证,动辄无响应或者崩溃导致浏览器崩溃,极大的降低用户体验度。WebRunLocal在网页和本地程序之间增加了一个中间服务层,即保证了网页对本地程序的正常调用,又可以降低网页和本地程序之间的耦合度,增加程序的可拓展性,解决了在网页中调用本地程序出现的各种问题。

2. 兼容性要求

系统兼容性:1、Windows 7或以上操作系统;2、.net framework 4.5以上运行环境。 浏览器兼容性:全版本浏览器

3. 使用场景

根据本地程序的种类,本地程序大致分为两种:

  1. DLL插件,用于调用电脑本地硬件(打印机、扫描仪、读卡器等)或者通过DLL插件和第三方项目程序进行交互。
  2. Exe可执行程序,主要用于集成第三方程序。

4. 程序优点

  1. 低耦合,http请求本地服务的方式可以设置异步同步请求方式以及超时时间,不会因为本地程序的原因导致浏览器长时间无响应或崩溃。
  2. 强兼容可拓展,WebRunLocal对外提供的http服务采用WebAPI实现,拓展方便。
  3. 解决了大多数高版本浏览器不再支持插件的问题。
  4. http的方式既可以网页调用也可以后台调用,后台调用方便进行事务以及日志的统一处理。

该项目为java版本实现,后续会持续拓展不同的模块调用 项目源于:https://github.com/wrxiang/WebRunLocal 启发于:https://github.com/wangzuohuai/WebRunLocal

wrl's People

Contributors

wrxiang avatar

Watchers

 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.