{"id":4014,"date":"2022-01-04T15:31:25","date_gmt":"2022-01-04T10:01:25","guid":{"rendered":"https:\/\/lgconsultancy.wpcomstaging.com\/?p=4014"},"modified":"2022-08-02T09:43:19","modified_gmt":"2022-08-02T09:43:19","slug":"blazor-server","status":"publish","type":"post","link":"https:\/\/lng-consultancy.com\/staging\/5474\/blazor-server\/","title":{"rendered":"Blazor Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This type of application executes fully on the server within the ASP.NET Core application. To communicate with the HTML, the server-side application uses SignalR. This is provided through the JavaScript file called\u00a0<strong>blazor.server.js<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png?ssl=1\" alt=\"\" class=\"wp-image-4025 size-full\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\">The server-side code was communicating with the client-side code in real time using\u00a0<a href=\"https:\/\/www.udemy.com\/aspnet-core-signalr-in-a-nutshell\/\">SignalR<\/a>.<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">the benefit of this type of application is that the download size is really small, significantly smaller than the Blazor WebAssembly, which means the application loads much faster. Because it runs on the server-side, it uses all the advantages of server capabilities with all the server-side APIs available. Additionally, we have full debugging support and our application can work on browsers that don\u2019t support WebAssembly. This means, older browsers are supported.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create a new blazor server app<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" height=\"568\" width=\"1024\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-6-1024x568.png?resize=1024%2C568&ssl=1\" alt=\"\" class=\"wp-image-4018\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Project structure of blazor server app<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-7.png?ssl=1\" alt=\"\" class=\"wp-image-4020\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the application and inspect the downloaded files<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/05-Server-app-downloaded-files.png?ssl=1\" alt=\"\" class=\"wp-image-4022\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">SignalR Connection<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" height=\"258\" width=\"1024\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-8-1024x258.png?resize=1024%2C258&ssl=1\" alt=\"\" class=\"wp-image-4024\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros: <\/strong><br>Server-side Blazor can be debugged in exactly the same way as any other ASP.NET application. Because it is, essentially, an ASP.NET Core application<br>1. No need for a Javascript<br>2. Small size, fast loading<br>3. You are using .Net Core<br>4. Debug like a boss<br>5. Run on any browser<br>6. Your code stays on the server<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cons: <\/strong><br>server-side Blazor routes every single action to the server, the action will be delayed by the network latency. And it will use more bandwidth.<br>1. You need a server-side<br>2. No offline support<br>3. Higher latency, worse UX<br>4. Hard to maintain and scale<br>5. Each browser session is an open SignalR connection<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This type of application executes fully on the server within the ASP.NET Core application. To communicate with the HTML, the server-side application uses SignalR. This is provided through the JavaScript file called\u00a0blazor.server.js. The server-side code was communicating with the client-side code in real time using\u00a0SignalR. the benefit of this type of application is that the [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[32],"tags":[],"class_list":["post-4014","post","type-post","status-publish","format-standard","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Blazor Server - L&amp;G Consultancy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/landg-consultancy.com\/blazor-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Blazor Server - L&amp;G Consultancy\" \/>\n<meta property=\"og:description\" content=\"This type of application executes fully on the server within the ASP.NET Core application. To communicate with the HTML, the server-side application uses SignalR. This is provided through the JavaScript file called\u00a0blazor.server.js. The server-side code was communicating with the client-side code in real time using\u00a0SignalR. the benefit of this type of application is that the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/landg-consultancy.com\/blazor-server\/\" \/>\n<meta property=\"og:site_name\" content=\"L&amp;G Consultancy\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-04T10:01:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-02T09:43:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png\" \/>\n<meta name=\"author\" content=\"Jagtar Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jagtar Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/\"},\"author\":{\"name\":\"Jagtar Singh\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/567b08166f0e70512d060ab27ff5f404\"},\"headline\":\"Blazor Server\",\"datePublished\":\"2022-01-04T10:01:25+00:00\",\"dateModified\":\"2022-08-02T09:43:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/\"},\"wordCount\":251,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lgconsultancy.wpcomstaging.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/image-9.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/\",\"url\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/\",\"name\":\"Blazor Server - L&amp;G Consultancy\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lgconsultancy.wpcomstaging.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/image-9.png\",\"datePublished\":\"2022-01-04T10:01:25+00:00\",\"dateModified\":\"2022-08-02T09:43:19+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/567b08166f0e70512d060ab27ff5f404\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lgconsultancy.wpcomstaging.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/image-9.png\",\"contentUrl\":\"https:\\\/\\\/lgconsultancy.wpcomstaging.com\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/image-9.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/landg-consultancy.com\\\/blazor-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blazor Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\",\"url\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/\",\"name\":\"L&amp;G Consultancy\",\"description\":\"Your Technology Partner\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/567b08166f0e70512d060ab27ff5f404\",\"name\":\"Jagtar Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g\",\"caption\":\"Jagtar Singh\"},\"url\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/author\\\/jagtarji\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Blazor Server - L&amp;G Consultancy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/landg-consultancy.com\/blazor-server\/","og_locale":"en_US","og_type":"article","og_title":"Blazor Server - L&amp;G Consultancy","og_description":"This type of application executes fully on the server within the ASP.NET Core application. To communicate with the HTML, the server-side application uses SignalR. This is provided through the JavaScript file called\u00a0blazor.server.js. The server-side code was communicating with the client-side code in real time using\u00a0SignalR. the benefit of this type of application is that the [&hellip;]","og_url":"https:\/\/landg-consultancy.com\/blazor-server\/","og_site_name":"L&amp;G Consultancy","article_published_time":"2022-01-04T10:01:25+00:00","article_modified_time":"2022-08-02T09:43:19+00:00","og_image":[{"url":"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png","type":"","width":"","height":""}],"author":"Jagtar Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jagtar Singh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/landg-consultancy.com\/blazor-server\/#article","isPartOf":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/"},"author":{"name":"Jagtar Singh","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/567b08166f0e70512d060ab27ff5f404"},"headline":"Blazor Server","datePublished":"2022-01-04T10:01:25+00:00","dateModified":"2022-08-02T09:43:19+00:00","mainEntityOfPage":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/"},"wordCount":251,"commentCount":1,"image":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/#primaryimage"},"thumbnailUrl":"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png","articleSection":["Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/landg-consultancy.com\/blazor-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/landg-consultancy.com\/blazor-server\/","url":"https:\/\/landg-consultancy.com\/blazor-server\/","name":"Blazor Server - L&amp;G Consultancy","isPartOf":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website"},"primaryImageOfPage":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/#primaryimage"},"image":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/#primaryimage"},"thumbnailUrl":"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png","datePublished":"2022-01-04T10:01:25+00:00","dateModified":"2022-08-02T09:43:19+00:00","author":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/567b08166f0e70512d060ab27ff5f404"},"breadcrumb":{"@id":"https:\/\/landg-consultancy.com\/blazor-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/landg-consultancy.com\/blazor-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/landg-consultancy.com\/blazor-server\/#primaryimage","url":"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png","contentUrl":"https:\/\/lgconsultancy.wpcomstaging.com\/wp-content\/uploads\/2021\/12\/image-9.png"},{"@type":"BreadcrumbList","@id":"https:\/\/landg-consultancy.com\/blazor-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lng-consultancy.com\/staging\/5474\/"},{"@type":"ListItem","position":2,"name":"Blazor Server"}]},{"@type":"WebSite","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website","url":"http:\/\/sh024.global.temp.domains\/~landgcon\/","name":"L&amp;G Consultancy","description":"Your Technology Partner","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/sh024.global.temp.domains\/~landgcon\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/567b08166f0e70512d060ab27ff5f404","name":"Jagtar Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bb54f046da86686b56f102623e16778642c679dee0726c87bb6765fa82a9ed78?s=96&d=mm&r=g","caption":"Jagtar Singh"},"url":"https:\/\/lng-consultancy.com\/staging\/5474\/author\/jagtarji\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/4014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/comments?post=4014"}],"version-history":[{"count":1,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/4014\/revisions"}],"predecessor-version":[{"id":7460,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/4014\/revisions\/7460"}],"wp:attachment":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/media?parent=4014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/categories?post=4014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/tags?post=4014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}