Skip to content

Consider a Streamlined/Slimmed-down Version 2.0 #242

Open
@csturm83

Description

@csturm83

Type of issue

[ ] Bug
[ ] Question (e.g. about handling/usage)
[X] Request for new feature/improvement

Expected Behavior

  • Modern/lean/minimal .NET QRCoder v2.0 library
  • Zero dependencies
  • Easy to integrate cross-plat/Docker

Current Behavior

  • Dependency on System.Drawing.Common causes cross-plat/Docker issues (libgdiplus)
  • System.Drawing not really ideal for server based scenarios
  • Locked into legacy design/public API for back-compat reasons
  • Some degree of code bloat as code has aged

Possible Solution = QRCoder v2.0

  • Cut some legacy cruft (support netstandard2.0+ only)
  • Cleanup public API surface (flexibility to consider new designs)
  • Remove System.Drawing.Common dependency completely
  • Separate Payloads from QRCode generation (separate package maybe?)

Rationale

  • Fresh start to target modern .NET platforms/scenarios (netstandard2.0+)
  • Core logic/class/project structure can largely be reused
  • Different/new designs/optimizations can be explored.
  • Several existing renderers already have no dependency on System.Drawing
  • Other renderers could potentially be refactored to remove System.Drawing dependency.
    • Does Base64QrCode really need to use Bitmap class? Can it instead work with raw bytes from PngByteQrCode? (not sure, I'm actually asking..)
    • Do simple System.Drawing structs (Size Color) really need to be used?
      • Maybe remove from public signatures (string instead of Color) or maybe roll similar custom structs as an implementation detail?
  • Not all consumers need Payloads - maybe separate into separate package (at least more than one file ;) ).

In my mind, it wouldn't be a huge divergence from the current codebase - just mostly stripping out System.Drawing. Which would likely impact the embedded icons feature. Maybe layer a separate package (that depends on System.Drawing) on top of the "Core" package - so consumers can 'light up' features they need?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions