Using C#, XAML + Uno Platform to Build One Codebase, Cross-Platform Apps

Rukesh Shrestha Articles, C#, Development Technologies & Tools, Mobile 1 Comment

For more than a decade, we have been developing applications with C# and XAML. Throughout that time, the pair has really only been known for Desktop (WPF) and UWP applications.

Later came Xamarin, which utilizes C# as a unified language to share between all platforms. Then Xamarin.Forms was introduced, which was different in that it utilized XAML to develop the user interface with a single codebase for cross-platform (iOS, Android, UWP).

This progression has excited all the WPF developers out there. The only remaining platform left was web development. At one time, Silverlight was the option, but it was deprecated because of heavy loading and security concerns of browser plug-in solutions.

Then came the WebAssembly [also known as Web Assembly Modules (WASM)] that web browsers can directly execute without having to parse a source file.

In this post, we will discuss how to create a rich user browser interface using the cross-platform Uno Platform and WebAssembly technology. The example application will walk through building Models, ViewModel and View under a shared project that is common to all different platform-specific projects.

C# On The Client Side With Blazor

Clayton Terry .NET, Articles, CSS & HTML, Development Technologies & Tools Leave a Comment

With the introduction of .Net Core 3.0, Microsoft has built its own web UI framework.

Introducing Blazor: Microsoft’s fully C# client-side framework. With the help of its Razor platform, Microsoft is attempting to put its hat in the ring with the likes of Angular, React, and Vue.

Blazor allows developers to fully design and execute web pages purely with C# — it is meant to eliminate the need for JavaScript. The goal is also to hopefully limit the number of vulnerabilities found in front-end UI work.

In this post, we give an introduction to Blazor and a quick tutorial for getting started.

.NET Memory Management with dotMemory

Jason Schmidtlein .NET, .NET Core, Articles, Development Technologies & Tools 3 Comments

Given the maturity of the .NET Framework and the automated nature of its memory management, many developers are guilty of glossing over (or even outright ignoring) whether their code is optimal in terms of CPU and memory usage. Personally, I have caught myself making sure my code is maintainable, testable, and extendable while forgetting to consider memory management in terms of nonfunctional aspects.

While the .NET runtime does a great job and memory corruption is extremely rare, we should still be concerned with memory management, particularly in large-scale .NET base applications.

This concern isnโ€™t limited to on-premise applications. Itโ€™s easy to forget about memory usage with cloud computing. Azure Functions and AWS Lambda have billing structures based upon the average memory size per second of function execution. The direct correlation between memory usage and cost couldnโ€™t be more transparent.

Fortunately, there are many great tools to help profile and analyze your memory footprint. JetBrains has a fantastic tool called dotMemory which makes it easy to profile processes, auto detect issues, perform deep analysis, and determine traffic. dotMemory can be installed as either a stand-alone tool or as a part of the ReSharper package integrated into Visual Studio.

In this post, weโ€™ll show how to use dotMemory to generate a memory profile and analyze a memory leak in a .NET Core application.

Create your own web bots in .NET with CEFSharp!

Matt Cunningham .NET, Articles, Automation, JavaScript, Programming, Tutorial 8 Comments

Have you ever wanted to create an automated way to load, manipulate, and then act upon a web page?

Using CEFSharp (and some strategic JavaScript), you can create headless (no GUI) interfaces of Chromeโ€™s parent browser, Chromium, and then instruct them to do pretty much anything a web browser can do.

This is a tutorial about using CEFSharp to accomplish some basic web functions with simple examples. Weโ€™ll create three automated bots that can simulate user web interaction and programmatically react to browser events using CEF and the CEFSharp library. You can follow along by copying the code provided or by downloading…

Using Dapper Flexibly

Jason Schmidtlein .NET, Articles, Development Technologies & Tools 2 Comments

Dapper is a micro ORM (Object Relational Mapper) for .NET that is nearly as fast as using a raw ADO.NET data reader. It is a great alternative to Entity Framework, especially when performance is a top priority and you donโ€™t need all the features of a โ€œheavyโ€ ORM.

In this post, I will provide an example of creating a generic CRUD repository that leverages the performance of Dapper while providing flexibility for a multitude of scenarios..