DotVVM
| Developer(s) | RIGANTI and community |
|---|---|
| Initial release | June 11, 2015[1] |
| Stable release | 4.1.7
/ April 5, 2023 |
| Repository | DotVVM Repository |
| Written in | C# and TypeScript |
| Engine | |
| Platform | Web platform |
| Type | Web framework |
| License | Apache 2.0 |
| Website | dotvvm |
Search DotVVM on Amazon.
DotVVM is a web framework for ASP.NET and ASP.NET Core that implements the Model-View-ViewModel pattern.[2][3] It is free, open-source, and maintained by RIGANTI and a community of contributors. DotVVM handles back-end by implementing a custom templating language, and front-end by relying on Knockout. The framework is a member project of .NET Foundation.[4]
Features
DotHTML
DotVVM allows declarative specification of a view using a templating language derived from HTML called DotHTML.[5] Similarly to ASP.NET Razor, the language syntax contains directives and allows C# expressions in certain contexts. The language implements two-way data bindings using C# expressions.[5] These expressions are internally translated into Knockout bindings. [6]
The following example displays the text Hello, User! and counts the number of times the user clicked on a button.
public class ExampleViewModel
{
public string Name { get; set; } = "User";
public int ClickCount { get; set; }
public void Increment()
{
ClickCount++;
}
}
@viewModel ExampleViewModel
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Hello, {{value: Name}}!</h1>
<p>You've clicked the button {{value: ClickCount}} times.</p>
<dot:Button Click="{command: Increment()}" Text="Increment" />
</body>
</html>
Controls
Controls are reusable components that encapsulate a part of a view (e.g. an input field, image gallery, list of links, etc.). In DotHTML, controls are seen as elements with a registered namespace prefix and the control name (e.g. dot:TextBox stands for DotVVM.Framework.Controls.TextBox). DotVVM supports three types of controls:[7]
- Markup controls – defined using DotHTML.
- Code-only controls – implemented in C# using a low-level API.
- Composite controls – implemented in C# by combining existing controls.
Page lifecycle
DotVVM viewmodels and controls have a lifecycle which can be observed in the Init, Load, and PreRender back-end events.[8][9]
Init– invoked after the viewmodel has been instantiated.Load– invoked during a postback after the viewmodel has been populated by data sent from the client.PreRender– called after all commands have been executed but before the view is converted into HTML, viewmodel serialized into JSON and both sent to the client.
History
DotVVM was initially conceived as an alternative to ASP.NET MVC after Microsoft decided not to include ASP.NET Web Forms in ASP.NET vNext.[10][11][12] The first prototype has been built by Tomáš Herceg, a Microsoft MVP, who presented it at a developer conference in Prague under the name Redwood.[13][10] The next year, Redwood has been renamed to DotVVM and publicly released on NuGet.[14] Although a team of developers has formed around the framework since its creation, Herceg continues to be a strong advocate of it by means of various conferences, podcasts, and other media.[15][16][17]
| Version | Release Date | Note |
|---|---|---|
| 0.6.0-pre | 2015-06-11 | First public release[1] |
| 1.0.0 | 2016-07-03 | First stable release[14] |
| 1.1.0-rc | 2016-12-28 | Added support for .NET Core[18] |
| 2.0.0 | 2018-05-25 | REST API bindings, static command bindings[19] |
| 3.0.0 | 2021-03-29 | Introduces JavaScript commands and public TypeScript API[20] |
| 4.0.0 | 2022-03-22 | Dropped support for Internet Explorer, introduces composite controls[21] |
Adoption
Due to its similarities to ASP.NET Web Forms, DotVVM is often used to migrate complex systems based on Web Forms, which are no longer supported by Microsoft, to more recent versions of .NET.[22][23][24]
Apart from use in the development of commercial websites, DotVVM also found its footing in scientific research where it was successfully used, for example, to develop a user interface for the Biochemical Space modeling language,[25] or display test results of robotic arms.[26]
Licensing
The framework, its default set of controls, as well as all the controls contributed by the community are licensed under the permissive Apache 2.0 license. However, the Pro version of the DotVVM Visual Studio extension and the Business and Bootstrap sets of controls are proprietary and available only under a commercial license.[27]
References
- ↑ 1.0 1.1 "DotVVM 0.6.0-pre". NuGet.org. Retrieved 2022-04-28.
- ↑ Jurásek, Tomáš (2018-04-03). "Introduction To DotVVM". C# Corner. Retrieved 2023-05-23.
- ↑ "Introduction". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ "DotVVM: Component-based MVVM framework for ASP.NET". .NET Foundation. Retrieved 2023-05-23.
- ↑ 5.0 5.1 "DotHTML markup overview". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ "Adding interactivity using Knockout binding handlers". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ "Control development overview". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ "Viewmodels overview". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ "Code-only controls". DotVVM Documentation. Retrieved 2023-05-23.
- ↑ 10.0 10.1 Herceg, Tomáš (2014-05-12). "Proč jsem se rozhodl napsat Redwood". dotNETportal.cz. Retrieved 2023-05-23.
- ↑ .NET Team (2014-05-12). "The Next Generation of .NET – ASP.NET vNext". Retrieved 2023-05-23.
- ↑ Herceg, Tomáš (2016-04-19). "Náš rok s DotVVM". dotNETportal.cz. Retrieved 2023-05-23.
- ↑ "Tomáš Herceg". Microsoft Most Valuable Professional. Retrieved 2023-05-23.
- ↑ 14.0 14.1 Herceg, Tomáš (2016-07-04). "DotVVM 1.0 RTM is here!". DotVVM. Retrieved 2023-05-23.
- ↑ "DotVVM". Windows User Group Czech Republic. 2016-05-10. Retrieved 2023-05-23.
- ↑ On .NET Live - Building web apps using MVVM. 2022-12-12. Retrieved 2023-05-23.
- ↑ ".NET 022: Using DotVVM for migrating WebForms applications to .NET Core with Tomas Herceg". Top End Devs (Podcast).
- ↑ Lukeš, Stanislav (2016-12-29). "DotVVM 1.1 RC". GitHub.com. Retrieved 2023-05-23.
- ↑ Jež, Adam (2018-08-12). "DotVVM 2.0.0". GitHub.com. Retrieved 2023-05-23.
- ↑ Herceg, Tomáš (2021-04-03). "DotVVM 3.0". GitHub.com. Retrieved 2023-05-23.
- ↑ Lukeš, Stanislav (2022-03-23). "DotVVM 4.0". GitHub.com. Retrieved 2023-05-23.
- ↑ "Migrate legacy ASP.NET Webforms application (specially aspx controls and its code behind pages) to .NET Core 6 using DotVVM". Microsoft Learn. 2022-07-14. Retrieved 2023-05-23.
- ↑ "Cheat Sheet for ASP.NET Developers". DotVVM. Retrieved 2023-05-23.
- ↑ ".NET 022: Using DotVVM for migrating WebForms applications to .NET Core with Tomas Herceg". Top End Devs (Podcast).
- ↑ Mikuš, Milan (2018). Development of a tool for online maintenance of biochemical space (Mgr). Masaryk University. Retrieved 2023-05-23.
- ↑ Šišková, Barbora (2019). Design of testing data visualization from the robotic system for the YSoft SafeQ print management (Mgr). Masaryk University. Retrieved 2023-05-23.
- ↑ "DotVVM Products". DotVVM.com. Retrieved 2023-05-23.
External links
This article "DotVVM" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:DotVVM. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
