Differences from Radzen

Note

This article is meant for existing Radzen users. New Radzen Blazor Studio users should check the other resources.

Radzen Blazor Studio is our vision of how rapid Blazor application development should look like. There are some changes compared to Radzen Studio (a.k.a. Radzen) which are described in this article.

Features

Support for arbitrary Blazor applications

Radzen supports only applications created with it. This changes with Radzen Blazor Studio as it can open applications created by any tool - Visual Studio, the dotnet CLI and Radzen.

Automatic save

Radzen saves the current file on every change.

Radzen Blazor Studio does not save automatically. The developer has to save the file which is currently being edited. Radzen Blazor Studio saves all open files when you run the application.

Customize everything

Radzen is very strict about code customizations - the developer relies on partial classes or has to use the code generation ignore list which in turn disables the WYSIWYG designer.

Radzen Blazor Studio supports arbitrary code customizations without breaking the design time experience. Everything just works without additional hoops.

Code generation

Radzen generates code on every build. The actual UI is persisted in JSON files in the meta directory of the application. While this approach has its advantages Radzen Blazor Studio makes it obsolete. It does not generate code on every build and does not need additional metadata files.

Code editing

Radzen Blazor Studio has a built-in code editor with syntax highlighting, autocomplete and analysis.

Debugging

Radzen Blazor Studio has a built-in debugger.

Third party support

Radzen Blazor Studio supports third party component libraries as well as the built-in Blazor components.

Build errors

Radzen could in some cases display a page in design time even if the project itself has build errors and cannot run.

Radzen Blazor Studio requires the application to build and run successfully in order for design time to work.

Conceptual changes

We have made a few conceptual changes to make Radzen Blazor Studio feel more native to Blazor developers and to avoid introducing new terms.

Actions vs. Statements

The developer uses actions in Radzen to respond to user input, execute custom code or perform a DB query - set a property, invoke a data source method, navigate to a page.

Radzen Blazor Studio replaces this concept with methods and statements - the developer can use the new UI to visually edit the statements of a method, override Blazor lifecycle methods and create new methods. Some of the Radzen actions are available as Radzen Blazor Studio statements - invoke method, open dialog, set property etc. Some actions have been removed - invoke data source method is replaces by invoke method.

Expressions

Radzen uses ${} blocks to embed data in the UI e.g. ${customer.FirstName}. This is translated to @ during code generation - @customer.FirstName.

Radzen Blazor Studio does not use ${} blocks and does not recognize them. It relies on the native Blazor @ expressions only.

Template context

Radzen uses the special data implicit variable for the current template context. This is translated to context during code generation.

Radzen Blazor Studio relies on the Blazor default context.

Pages and Layouts vs. Files

In Radzen the developer works with pages and layouts. Radzen generates code in different files.

Radzen Blazor Studio behaves similar to a traditional IDE such as Visual Studio and lists all files in the application - .razor, .cs, .css, .js etc.

Page Load event

Radzen has a synthethic (not native to Blazor) event called Load. It is the rough equivalent of the OnInitializedAsync lifecycle method.

Radzen Blazor Studio no longer supports such synthethic events. The developer has to override one of the built-in Blazor lifecycle events instead e.g. OnInitializedAsync or OnInitialized.

Page properties

Radzen creates a property the first time the Set property action is used. This often feels like “magic”. It also initializes property values in the OnInitializedAsync method.

Radzen Blazor Studio requires explicit property declaration. Initial values are set at the time of declaration.

Page parameters

Radzen creates a parameter when a page is used from another page via Navigate or Open dialog action. There isn’t a way to explicitly declare a parameter.

Radzen Blazor Studio requires explicit parameter declaration.

Application

Bootstrap version

Radzen applications use Bootstrap 4 by including a theme CSS file that bundles it.

New Radzen Blazor Studio applications use Bootstrap 5 as a standalone CSS include and use the base Radzen.Blazor themes.

UI look and feel

New pages and applications created with Radzen Blazor Studio have refreshed and improved look and feel. If you add pages to your existing Radzen application you may see visual difference compared to existing ones.

Partial files

Radzen applications have three files per page - Page.razor, Page.razor.designer.cs and Page.razor.cs.

New Radzen Blazor Studio applications have only two files (if partial classes is checked in the UI): Page.razor and Page.razor.cs. If you add new pages to existing Radzen application from Radzen Blazor Studio it will use the three file layout as before for compatibility reasons.

Custom themes

Radzen applications save custom themes as a CSS file by generating it from the source SASS.

Radzen Blazor Studio applications customize themes by overriding the corresponding CSS variables. The original theme CSS remains intact.

Security

WebAssembly

WebAssembly applications created with Radzen used IdentityServer when configured for Default security. IndentityServer is no longer free for commercial use.

WebAssembly applications created with Radzen Blazor Studio no longer use IdentityServer. Enabling security for an existing Radzen application via Radzen Blazor Studio would migrate it to the new implementation.

Implementation

The generated security service no longer needs its InitializeAsync method to be called in every page and layout - this is done automatically.

FAQ

Can I open my Radzen application with Radzen Blazor Studio?

Yes you can. However changes made with Radzen Blazor Studio will not be recognized by Radzen and may get overwritten after code generation so be careful.

Radzen Blazor Studio uses the existence of the meta directory to determine if it is opening a Radzen application and acts accordingly. For example it generates three files per page instead of two and hides the ability to create pages without code behind (partial class).

Important Deleting the meta directory makes your application incompatible with Radzen . Do so only if you are 100% sure you will no longer use Radzen 2.x.

Should I use Radzen Blazor Studio immediately instead of Radzen?

Some of Radzen’s features are not yet implemented in Radzen Blazor Studio:

  • Azure ADB2C security

If you need any of those features you may consider a hybrid approach - generate pages in Radzen and customize them further in Radzen Blazor Studio. Also check the roadmap to see when new features are available.

Important

If Radzen Blazor Studio cannot open your Radzen application in design time contact us at info@radzen.com.