PardusLabs.JSVaporizer.NET.8
1.0.8.1
See the version list below for details.
dotnet add package PardusLabs.JSVaporizer.NET.8 --version 1.0.8.1
NuGet\Install-Package PardusLabs.JSVaporizer.NET.8 -Version 1.0.8.1
<PackageReference Include="PardusLabs.JSVaporizer.NET.8" Version="1.0.8.1" />
<PackageVersion Include="PardusLabs.JSVaporizer.NET.8" Version="1.0.8.1" />
<PackageReference Include="PardusLabs.JSVaporizer.NET.8" />
paket add PardusLabs.JSVaporizer.NET.8 --version 1.0.8.1
#r "nuget: PardusLabs.JSVaporizer.NET.8, 1.0.8.1"
#addin nuget:?package=PardusLabs.JSVaporizer.NET.8&version=1.0.8.1
#tool nuget:?package=PardusLabs.JSVaporizer.NET.8&version=1.0.8.1
JSVaporizer
Cut down on JavaScript. Write more C#.
A minimalistic .NET 8 WebAssembly library that helps you unify front-end and back-end logic without committing to a full framework like Blazor.
Why JSVaporizer?
Most ASP.NET Core apps need some front-end interactivity: DOM manipulation, event handlers, and data transformation. But juggling both JavaScript and C# can be messy:
- You end up writing repetitive JavaScript and JQuery boilerplate everywhere.
- Business logic is split across two languages, and you have to maintain it in two languages.
- Front-end code can become spaghetti.
JSVaporizer offers a middle ground:
- It’s lighter than a full SPA framework (like Blazor).
- It cuts down on JavaScript by letting you write front-end logic in C#.
- Use the same business logic source code in both the front and the back ends.
- You're not boxed in. You can still add custom JavaScript if you choose.
JSVaporizer Assembly
DOM Facade in C#
Typical DOM calls likegetElementById
,setAttribute
, oraddEventListener
are wrapped in easy C# methods. No more copy-pasting JavaScript for every form or event handler.Minimal JavaScript
A small script loads the .NET WASM runtime (which isn't tiny), then delegates all serious logic (event handling, validation, data manipulation) to C#. You can still drop in small custom JS for specialized tasks—no big frameworks needed.Extensible in Four Ways
- Call arbitrary JS from C#: If you need a special function or a quick fix, register it in JSVaporizer’s function pool.
- Call arbitrary C# from JS (whitelisted methods): Perfect for callbacks or event hooks.
- Import your own JS modules via
[JSImport]
. - Export your own C# methods to JavaScript via
[JSExport]
.
JSVTransformer Extension
Define a Transformer
ImplementITransformer
or extend theTransformer
base class. Implement methods likeDtoToView()
, which updates DOM fields from your C# DTO, andViewToDto()
, which pulls form data back into the DTO.Register the Transformer
Make it discoverable via a registry key (e.g.,"MyCoolTransformer"
), so JavaScript can call it by name. Or use any other approach (like a dictionary) to store your transformers.Use Minimal JavaScript
In your page’s JS, just import the WASM and call something likeTransformerInvoker.Invoke("MyCoolTransformer", dtoJSON);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.8.4 | 0 | 4/2/2025 |