Skip to content

Commit eeaa62b

Browse files
committed
Started writing the migration steps and notes
1 parent 18eb204 commit eeaa62b

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# BlazorWebFormsComponents
2+
23
A collection of Blazor components that emulate the web forms components of the same name
34

45
[![Build status](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_apis/build/status/BlazorWebFormsComponents-.NET%20Standard-CI)](https://dev.azure.com/FritzAndFriends/BlazorWebFormsComponents/_build/latest?definitionId=14)
56

6-
## Controls proposed to be migrated
7+
## Approach + Considerations
8+
9+
We believe that Web Forms applications that have been well maintained and provide value should have a path forward to the new user-interface frameworks with minimal changes. This is not an application converted nor is it a patch that can be applied to your project that magically makes it work with ASP<span></span>.NET Core. This repository contains a library and series of strategies that will allow you to re-use much of your markup, much of your business code and help shorten your application re-write process.
10+
11+
This is not for everyone, not everyone needs to migrate their application. They can continue being supported as Web Forms for a very long time (2030 EOL at the time of this writing) and the applications that are considered for migration to Blazor may be better suited with a complete re-write. For those applications that need to be migrated, this library should help make that process simpler by providing components with the same names, markup, and functionality as previously available.
12+
13+
[Strategies for your migration and steps ahead](docs/Migration/README.md) are available as part of this repository.
14+
15+
## Blazor Components for Controls
16+
717
There are a significant number of controls in ASP.NET Web Forms, and we will focus on creating components in the following order:
818

919
- Data Controls

docs/Migration/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Migration Strategies
2+
3+
Migration from ASP<span></span>.NET Web Forms to Blazor is not simple and this repository attempts to make it easier for developers to reuse as much of their Web Forms application as possible. The two technologies are 'concept compatible', but run on different implementations of the .NET runtime (.NET Framework vs. .NET Core / .NET 5+)
4+
5+
We, the maintainers of this project, believe that with a little ingenuity the markup from a Web Forms application can be copied over with minimal changes and function similarly to its original purpose. We believe that well formatted and maintained code in Web Forms should be easily migrated. Applications that are a significant mix of C# and markup will have a more difficult time going through this process.
6+
7+
## Known Required Changes
8+
9+
There are several changes that are going to need to be made to the markup in your ASPX and ASCX files in order to get them working. Some of these are obvious changes, and some are considerations necessary for the razor templating and Blazor rendering engine.
10+
11+
### Visual Basic converted to C#
12+
13+
Blazor uses razor templates which only support the C# language. All Visual Basic in the markup will need to be converted to C#.
14+
15+
### Bee-sting notation <% %> needs to be converted to @() notation
16+
17+
ASP<span></span>.NET famously wrapped all .NET code in <% %>. Starting with ASP<span></span>.NET MVC and razor templates, all C# code is wrapped in @() syntax.
18+
19+
### _Imports files needed
20+
21+
In order to match some of the syntax previously available in Web Forms markup, a series of `using static` statements are necessary to allow the appropriate shims to work with your markup. You can find our sample of the `_Imports.razor` file here: **INSERT LINK**
22+
23+
### User Controls (ASCX files) need to be converted to components
24+
25+
Components are the building blocks for Blazor, just as controls were in Web Forms. If you have user controls in your application, you will need to convert those to components. See the UserControl strategy below for more details.
26+
27+
### MasterPages are no more
28+
29+
The concept of a MasterPage does not exist in Blazor. Instead, your ASPX pages will be loaded inside of a host page. You can compose a razor component that hosts other *converted ASPX pages* but your pages cannot dictate their parent container. See the MasterPage strategy below for more details.
30+
31+
### Page Directive Changes
32+
33+
### No Namespaces, No Tag-Prefixes
34+
35+
Namespaces and tag-prefixes are gone. You can do a Find and Replace on asp: and remove those from your markup.
36+
37+
## Strategies
38+
39+
- A simple initial site migration
40+
- Intertwined code
41+
- Model-Binding
42+
- .NET Standard to the rescue!
43+
- Other considerations
44+
- MasterPage
45+
- Rearchitecting Web Application Layout
46+
- UserControls
47+
- The simple conversion

0 commit comments

Comments
 (0)