On .NET Live: Supercharging Blazor SSR with htmx

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ต.ค. 2024

ความคิดเห็น • 11

  • @ben5219
    @ben5219 5 หลายเดือนก่อน +2

    Great demo Egil. I've been wanting to do something similar, and have started a Blazor + HTMX project that was going Ok, but I was ignorant of some of the power of HTMX.....so thanks. I look forward to reviewing you code in a bit more detail.

  • @ryansaunderson7261
    @ryansaunderson7261 6 หลายเดือนก่อน +5

    How much harder would it be to build this example using Razor Pages & HTMX and ignoring Blazor all together?

    • @seancpp
      @seancpp 6 หลายเดือนก่อน +2

      I've been researching combining HTMX and blazor/razor pages for a short while now, and it's interesting to see this livestream which shows me others are also seeing the potential here. I've come to this same question as you and have been experimenting with combining Razor Pages and HTMX, to test its viability for a production system.
      My first impressions are that htmx and razor pages work very well together. With razor pages, each page's model contains the request definitions that htmx will use for interactivity.
      Like the OnGet() method for example. It's almost like they were made to work together. I haven't had a chance to use it in production but so far in my personal testing it shows me huge potential.

    • @stevenfranzen2161
      @stevenfranzen2161 5 หลายเดือนก่อน

      We've been using this combination for a small internal website and we have the same experience as @seancpp. I started it as a Blazor Server app, but one of my team members wanted to experiment with HTMX and rewrote it using Razor pages. The biggest difference with regular Razor pages is just that the OnGet() methods now only render the full page for normal requests. For HTMX requests, they return partial pages that HTMX then inserts into the DOM as instructed, which naturally suits SPA designs. Although not specific to Razor pages, this difference is also relevant to browser caching: if you serve different content for HTMX requests and the header includes a Last-Modified timestamp, you should add "Vary: HX-Request" to ensure that browsers fetch the right cache entry. Otherwise, it also just works (TM).

  • @garrettlondon470
    @garrettlondon470 6 หลายเดือนก่อน +1

    Incredible!

  • @KieranFoot
    @KieranFoot 6 หลายเดือนก่อน

    What is the name of the track plying on the starting soon sequence?

  • @B_knows_A_R_D-xh5lo
    @B_knows_A_R_D-xh5lo 6 หลายเดือนก่อน +1

    😊😊😊

  • @pixelpanda2227
    @pixelpanda2227 6 หลายเดือนก่อน +7

    how about fixing all of this shit in blazor first?

  • @DaveRetchless
    @DaveRetchless 4 หลายเดือนก่อน

    All these round robin technologies to get back to JavaScript client interactions that we have had for years. Fail!

  • @slynch401k
    @slynch401k หลายเดือนก่อน

    Please slow down when you're talking. It Is very difficult to understand what you're saying because of your accent.