Puas yog Blazor suav nrog rau JavaScript?
Puas yog Blazor suav nrog rau JavaScript?

Video: Puas yog Blazor suav nrog rau JavaScript?

Video: Puas yog Blazor suav nrog rau JavaScript?
Video: Kab 3 txiaj yeeb zoo tshuaj muaj nqi (1kg: 8 000 000k)/ The value of the Scorpion in medicine 2024, Kaum ib hlis
Anonim

Cov ntaub ntawv tsim hauv a Blazor Daim ntawv thov Web Assembly tau muab tso ua ke thiab xa mus rau qhov browser. Lub browser ces khiav koj JavaScript , HTML thiab C# hauv kev ua tiav sandbox ntawm qhov browser. Nws txawm khiav ib tug version ntawm lub. NET Runtime.

Raws li, Blazor puas siv JavaScript?

Blazor nta ib qho kev tivthaiv architecture, routing, virtual DOM, thiab a JavaScript Kev sib koom tes (interop) API. Los ntawm JavaScript interop ib Blazor app ua tau caw JavaScript functions los ntawm. NET thiab C# txoj kev los ntawm JavaScript code. Hu rau JavaScript los ntawm.

Ib tug kuj yuav nug, Blazor puas yuav hloov JavaScript? Tsis yog, yog yuav tsis yog hloov JavaScript los yog tsev qiv ntawv. Wasm txhais tau tias koj ua tau hloov cov tsev qiv ntawv sau ua lwm hom lus xws li c/c++, xeb thiab mus rau JavaScript yog li ntawd lawv ua tau khiav ntawm lub vev xaib.

Tib neeg kuj nug, Blazor puas yuav tua JavaScript?

Lub ntsiab lus yog qhov ntawd JavaScript ua tias, thiab Blazor tsis yog. Nws yuav tsis tua ” JavaScript tab sis nrog me ntsis hmoov C# developers yuav tsis tau sau Frontend code nrog JS thiab yuav muaj peev xwm lo rau Blazor.

Puas yog Blazor ntau lawm npaj txhij?

Blazor WebAssembly tseem tab tom saib ua ntej thiab tseem tsis tau npaj rau ntau lawm siv tsis tau. Yog koj tab tom nrhiav ib npaj txhij lawm daws, ces Blazor Server yog yam peb xav kom. Ib zaug Blazor WebAssembly nkoj (Tsib Hlis 2020), nws yuav pab kom khiav Razor Cheebtsam thiab. NET code hauv browser ntawm tus neeg siv lub cuab yeej.

Pom zoo: