Is DotVVM way forward for building complicated business apps?

Abdul Rauf
DotVVM
Published in
4 min readJan 24, 2020

DotVVM is an MVVM framework that helps especially with web applications with complicated UI: lots of complex forms with dozens of fields and interactivity. Modal dialogs, multi-step wizards, lots of grids with data, sorting, paging.

Because DotVVM handles many things for you and translates the data-bindings to JavaScript, you don’t need to write the JS yourself. It doesn’t mean that you should not learn it. It will help you a lot if you know it — you will be able to add even more interactivity, extend the framework when you need it and more. DotVVM lets you do quite a lot without knowing JS, but you will get much further if you know

DotVVM is built for the line of business applications. It contains a lot of controls which you will need in such apps — GridView, DataPager, all form controls. There is also a lot of features that you can find useful: validation, localization, date and number formatting or SPAs.

DotVVM can be used together with other frameworks in one application. It is great because it gives some features of js frameworks like angular, react e.t.c and it also integrates very well with ASP.NET CORE 2.0

Why use DotVVM?

  • You can use it in your existing ASP.NET application.
  • It offers several built-in controls (e.g. GridView) for faster development.
  • It is easy to learn and use.
  • You don‘t have to write unnecessary javascript. All communication between the server and the client is handled by the framework.

How DotVVM works

DotVVM implements the MVVM design pattern (Model-View-ViewModel), which separates the application into three parts.

  • Model
    Describes the data and business logic of your application.
  • View
    Represents your UI and communicates with ViewModel using bindings and commands.
  • ViewModel
    Is the state of your application. It contains the data and commands the Views to be utilized.

Whether to use or not use DotVVM really depends on the type of web app you want to write. You can use any web framework to build any type of web app, but the difference is in the effort you will need.

If you want to build a “presentation” website of a company with several simple forms, the easiest way is to use pure ASP.NET MVC. It is possible to use DotVVM for this, but it won’t be easier.

If you want to build a line of a business web app with GridViews and complicated forms with multi-step wizards, many fields interacting with each other, then the MVVM pattern is much better for that and DotVVM can help with this a lot. Many people use Angular for these apps today, but if you have the .NET and WPF background, you would have to learn a lot of new things. Apart from HTML and CSS, you will need to know Javascript very well, and you’ll probably need to use many crazy weird tools like Gulp, Bower, Webpack, NPM, Require JS which is a lot of things to learn. DotVVM is much easier to begin because it is still one .NET based technology. Many concepts are similar to WPF and the difficult Javascript part is taken care of.

And to make things really complicated, if you need to build an e-commerce website where you care about rendered HTML in the public part of the website (where you need good SEO), but you also need to create an admin portal in which you can define products, prices, etc., you may find that the best option is the combination of MVC and DotVVM — MVC for the public part and DotVVM for the admin. It is quite simple to combine these two technologies (even if you want them in one project), there are no conflicts between them, and you can use the best tools for the specific task which saves your time.

Yet another framework? We have Angular, React, Vue…

Angular, React or Vue are mainly client-side libraries that do not depend on any particular technology used on the server. You can use Node.js, PHP, Java or anything else. You can also choose any technology to do server-to-client communication — REST, GraphQL or others… However, you need to learn many things.

DotVVM is not only a client-side framework — it includes also the server-side part which is built in .NET. With DotVVM, you need .NET on the server. But thanks to it, you will spend much less time dealing with the client-server communication because it is handled by DotVVM itself. You will also be able to continue to use Visual Studio, C#, and tools you know. You won’t need to learn almost anything about Javascript, its libraries and tools. Knowledge of this will certainly help you, but you can build a lot of stuff without writing a single line of javascript code or running npm

Credits:

--

--

Abdul Rauf
DotVVM
Editor for

Opensource enthusiast, passionate about communities, DevRel at DotVVM