Что нового
  • Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

FlexCel .NET, .NET5, Blazor and WebAssembly - Part 1

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,071
Баллы
155
Возраст
51
Introduction: Supporting .NET 5



We've just released FlexCel .NET 7.8, which adds support for .NET 5.

Usually, "adding support" for a new version of a .NET framework is just recompiling the code, but in this case, as .NET 5 is the successor of .NET Core 3, not of .NET framework 4.8, things got a little more complicated. There were subtle errors generated from the switch from NLS in Windows to ICU (see

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

), and there were issues with the switching of the graphics engine from GDI+ to SKIA.

For this release we spent a lot of time optimizing the SKIA rendering, so it is now a little faster than GDI+. We added a way to switch back to GDI+ in Windows if you need to deal with WMF/EMF files or right-to-left languages (see

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

). We made a full review of all string comparisons in the code to ensure they work with ICU.

But this is all just business as usual. For this post, we wanted to have a little fun. And so we decided to investigate what cool stuff we can do with .NET 5 and FlexCel.

Generating a client-side app using Blazor and WebAssembly


Even if still a work in progress, one of the hot new things in .NET 5 is the

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, and more specifically,

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Blazor WebAssembly allows you to run a web app enterely on the browser, offline, in electron, and it even supports

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



It made sense then to start with a small WebAssembly app using FlexCel .NET. But before getting into that and getting the hopes too high, I'd like to mention two limitations currently in Blazor WebAssembly:

  1. Blazor doesn't yet support

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    . This means that in order to compile to WebAssembly, Blazor currently has a .NET interpreter running in WebAssembly, and the interpreter runs

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    , not WebAssembly IL. FlexCel isn't directly converted to WebAssembly, but it rather runs in the browser as .NET IL. And because of there is no "real" FlexCel WebAssembly yet, it is not currently feasible to call FlexCel WebAssembly from

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.


  2. The graphics engine we use for cross-platform rendering,(

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    ), doesn't currently support Blazor WebAssembly,

    Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

    . Not having SKIA means that you can't use the FlexCel rendering engine in WebAssembly, so you currently can't export an Excel file to PDF, SVG, or HTML in Blazor WebAssembly.Note that "Server Blazor", which runs native .NET 5 code in the server, doesn't have this limitation.

Both limitations should go away relatively soon, but we wanted to be completely honest about the current state. So now, with that out of the way, let's start. For this first example, we will create a Blazor WebAssembly "calculator" app that runs in the client and uses the FlexCel engine to calculate expressions





This was the first part of a 2-part series. In this one, we investigated client-side Blazor. In the next part, we will play a little with server-side Blazor.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх