Skip to content

ghybs/zxingjs2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZXingJS2

Yet another port to JavaScript of ZXing multi-format 1D/2D barcode image processing library.

Many 1D and/or 2D code image processing libraries exist.

== Disclaimer ==

This library is far from being fully functional now. Unfortunately I do not plan to work further on it for the time being. Please feel free to re-use the work and extend it. You can open issues to mention your extended work.

Rationale

Mobile application target

Mobile application (smartphone) is a big usage:

  • Manual input is tedious.
  • Smartphone is almost always readily available.
  • Input data is very likely printed on paper (usage of other storage like RFID and NFC is limited to appropriately organized domains, whereas paper can be printed by anyone) or on a screen.

Since we target mobile usage, we can build a native application (Java in Android, Objective-C in iOS), hybrid application (HTML, CSS and JavaScript with Cordova / PhoneGap / Ionic), or a web application / pure online service.

Commodity service

Barcode scanning is today a commodity service (dozens, maybe hundreds of free and even ad-free applications are available, if not already shipped with the OS). Hence there is no business model to build a paid dedicated software, and even less for a dedicated hardware! Unless very specific requirements are needed (scanning speed being probably the only reason to keep laser-based technology). Many open source libraries are available on the Internet, and even full mobile applications (Barcode Scanner, based on ZXing).

With no business model, there is no point in fragmenting the libraries.

  • OS convergence is achieved by using Java language (as chosen by ZXing team).
  • However, web application and full online service cannot be achieved easily with Java.
  • If the library were based on JavaScript, everything would be achievable: online service, web application, hybrid application.
  • Current JavaScript libraries are not as complete and at the same time as powerful as ZXing. E.g. quaggaJS is less orientation dependent, but it reads only 1D barcodes and is slower. ZXingjs was also promising, but porting stopped at the most popular 1D barcodes.

This is the rationale to attempt a new full port of ZXing to JavaScript.

Why not simply continuing the work from ZXingjs?

It does a brilliant job at porting exactly the Java ZXing structure (interfaces, classes, etc.) despite the differences between Java and JavaScript.

  • Advantages:
    • Keeps exact same public and private API.
    • Decreases conversion barrier from ZXing to zxingjs.
    • Facilitates porting of future updates from Java ZXing.
  • Drawbacks:
    • Does not leave room for code and algorithm optimizations, made possible by JavaScript difference and simpler use case.
    • Requires dependencies to "emulate" Java classes in JavaScript.

Strategy

Other barcode image processing libraries (related to JavaScript)

License

ZXingJS2 is distributed under the Apache 2.0 License, like ZXing.

About

Yet another port to JavaScript of ZXing multi-format 1D/2D barcode image processing library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published