Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Write web pages with Xaml and VB.NET (VBlazor) #329

Open
ghost opened this issue Jul 20, 2018 · 13 comments
Open

Proposal: Write web pages with Xaml and VB.NET (VBlazor) #329

ghost opened this issue Jul 20, 2018 · 13 comments

Comments

@ghost
Copy link

ghost commented Jul 20, 2018

In my opinion, ASP.NET was one of the reasons that made VB.NET popularity go down over the past decade. VBScripts run only in Internet Explorer, So it is born dead and any web developer had only to use JavaScript which uses C-Like syntax, so it is easy to be used with C# than with VB.NET. Over the years JavaScript frameworks kept emerging, and MS adapted some of them like JQuery and Angular. TypeScript also is some advanced JavaScript. Things got worse for VB.NET developers when MVC Razor came and kept VB.NET away! Then ASP.NET Core did the same so VB.NET can't run on other servers than Windows!
This made C# is the only logical choice for beginners, even forced many VB.NET developers to migrate to C#.

I quote @KathleenDollard here:

As has been discussed: ASP.NET Core's version of Razor (and by implication Blazor) was designed for a single language due to very low adoption of vbhtml and much higher cost of a language agnostic engine. That decision, right or wrong, was made years ago. It is highly, highly unlikely that Razor will be rewritten to be multi-language. This is OSS, but there has been a clear warning that rewriting it is an enormous job, and due to the magnitude might not be incorporated. The guidance is to create your views in a separate dll that is in C#, or use a client side technology (that was in increasing popularity at the time the decision on single language was made). My personal opinion is that Razor is an OK but not brilliant generation engine, so if you are going to work that hard, build a better one.

My reply on all that is: Let VB.NET ride the new WebAssembly wave:
After WebAssembly and Blazor, the opportunity represents itself: It is logical now to write XAML instead of HTML5 (differences are minimal) and write VB.NET instead of Java script (the same way C# replaces Java now in Blazor).
I already asked for it (but from C# prospective):
aspnet/Blazor#389
and there is already a project named Ooui trying to do that.
I think, VB.NET should do the same, and have a project to design ASP.NET pages with XAML and VB.NET code, making use of the work done in SilverLight, Blazor and Ooui. If this starts now, it can grow steadily, instead waiting for Blazor and Ooui to stable and then MS says:
Sorry, it will be expensive for VB.NET to catch up!

@KathleenDollard
Copy link
Contributor

A couple clarifications:

Things got worse for VB.NET developers when MVC Razor came and kept VB.NET away!

Incorrect. ASP.NET MVC supported VB Razor in vbhtml files. There was very low adoption. ASP.NET Core does not support VB Razor.

Then ASP.NET Core did the same so VB.NET can't run on other servers than Windows!

Incorrect. ASP.NET WebAPI DOES support Visual Basic.NET as shown here. This does allow VB to run on other servers. If there are problems, please let us know (the scenario is not in wide use). What's missing is project templates..

@KathleenDollard
Copy link
Contributor

I would be ecstatic if a community based project that was true to the spirit of VB and made creating applications and solving user problems as easy as some past VB technologies have been. And if it had legs and gained a following I would help get it merged into the .NET Foundation.

But such a project for VB isn't, and isn't likely to be on the table at Microsoft.

What Microsoft has committed to do is put the VB language on the platform (as I said, I think current .NET Core VB is stinky). I'm working on that (as are other people).

My personal belief is that the simple approach we so badly need in building applications today is not likely to come from a company with many competing reasons to add complexity. Microsoft already tried and failed. Instead, I believe It will come from a community. Maybe VB, maybe C#, maybe F#, and maybe a non-.NET language. I don't know.

@ghost
Copy link
Author

ghost commented Jul 20, 2018

@KathleenDollard
Thanks for corrections. In fact all the samples and books I saw about MVC and Razor were in c#.
Lets focus on VBlazor ideada. I spent years reding about ASP.NET trying to find the right moment to write my own projects but things kept change and java frameworks made me hate web development!
I thought silver light is the right tool and hoped to see xaml a part of AsP.Net but Silver Light died suddenly!
I see that VBlazor is suitable for desktop developers to enter web development. They have experience with Vb.net and xaml and its styles and templates, so they have a head start. Blazor on the other hand is suitable for web developers who have experience with html, css and any c-like lang.

@ghost
Copy link
Author

ghost commented Jul 20, 2018

@KathleenDollard
I hope other VB.NET fans find this idea attractive to convence MS that VB.NET still alive and shouldn't be treated otherwise .As I said, VB.NET didn't mix well with html, css and iava scrept, so I totally understand that why developers preferred c# in web so MS found it a waste to support vb in web any further. But VB.NET did grate with xaml in wpf and uwp so we can expect they will be attractive in web too.
I hope I could start VBlazor myself, but unfortunately I don't have the experience in such projects. I think it will be easier if MS starts it and call for community help.
This effort must be made to prevent VB.NET from fading away. Another necessary step is to write Xamarin apps in vb.net, but lets focus on step 1 ferst.
Thanks.

@KathleenDollard
Copy link
Contributor

I'm fine with a discussion here, because there aren't a lot of places for these discussions, but this isn't an LDM issue.

Blazor is an experimental project that does not yet have a roadmap to being a product. I hope it succeeds, but it's entirely reasonable while experimenting to do it in a single language.

As it becomes closer to being a product, it will become more obvious how reliant it is on the Razor engine, and thus how big a development effort VB would be.

I also think it would be awesome if Blazor supported VB.

@hishamco
Copy link
Member

I also think it would be awesome if Blazor supported VB.

I think this will work for creating models, view models .. etc but not views, because .cshtml uses Razor which written for C# only. This the same case for Razor Pages

@ghost
Copy link
Author

ghost commented Feb 14, 2019

@hishamco
Let's focus on vbxaml. It would be similar to uwp/wpf design view, but with two code-behind files, one for server vb.net codes, and another for client (script) codes, with the ability to use MVVM pattern to organize large projects. XAML will be complied to html5, Xaml styles will be compiled to CSS, and VB.NET script codes will be compiled to WebAssembly.

@KathleenDollard
Copy link
Contributor

KathleenDollard commented Feb 15, 2019 via email

@ghost
Copy link
Author

ghost commented Feb 15, 2019

@KathleenDollard
Nice, but you forgot a little something; VB.NET peogrammers are app oriented by defualt. Compilers and such projects are not thier comfort zone. I think MS decision to rewrite Vb14 with vb.net code was a big mistake that closed the open source community for vb.net lang! Vb programmers do not have the legacy nor experience of open source projects. I myself need months to understand vb compiler, wpf underground structure and WebAssembly to startup such a project, but I hsve no such time! (@AnthonyDGreen published only one part about the anatomy of vb.net compiler and stopped!).
In my opinion, either MS rewrite vb compiler in c#, or assigne some of vb team to startup such project and call vb community for help، under their supervision (and please @AnthonyDGreen continue publishing the compiler anatomy articles).
This is how I see it. You must lead vb peogrammers slowly to the open source world.

@KathleenDollard
Copy link
Contributor

I agree with the compiler being a challenge to work on. Very, very few everyday C# devs can work on the C# compiler either.

I believe that the compiler being written in VB.NET is critical to its future. It means there is a group of people here at Microsoft that deeply understand the language because they use it and I'm very happy to work with them.

I also think it is unrealistic to think people that choose to work in C# would suddenly decide to work on something in/for VB.NET. Much of the Blazor development has been non-Microsoft Open Source.

@rrvenki
Copy link

rrvenki commented Feb 19, 2019

@KathleenDollard Incorrect. ASP.NET WebAPI DOES support Visual Basic.NET as shown here. This does allow VB to run on other servers. If there are problems, please let us know (the scenario is not in wide use). What's missing is project templates..
"Project Templates"-- is the root cause. There were no B# templates for many new development targets like MVC, SQL Addons, etc. Neither were samples in B# anywhere (atleast MSDN). The language conversion tools available online are not from Microsoft and they did transliteration not translation. So semi-technical (most project management decision makers in real world or ones who started using MS technologies coming from other platforms like Mainframe, AS400) decision makers assumed Microsoft wants everybody to use C# only and down the line B# will be dropped. Moreover transliteration uses equivalent keywords but does not (cannot) rewrite in VB way of writing things which showed there is hardly any difference between C# & B# for decision makers. --That was another bad...
For developing a full blown web application there are many things one needs to know which includes C#/B#, JavaScript, jQuery, Angular,... which all are "{;}" languages and for a typical developer B# doesn't fit the sequence. Microsoft could have supported VBScript in non MS platforms and that could've helped. But its too late.
Hope Blazer would fill the vacuum. A typical developer could use B# through his full day in writing the whole gamut of web development with B#, XAML, & LINQ.
But... Blazer, like Silverlight will be a target by non-MS platforms and support would be stopped in most browsers. They will make .NET Core and Blazer related runtimes as separate download from the store so no Enterprise will automatically support out of box. This will lead Blazer to death same like Silverlight. How'z Microsoft planning to mitigate this? Is this plan going to be put in roadmap?
Assuming .NET Core runtime is available in different platforms and MS store apps would run anywhere, that's very desirable. Moving out of browser dependency could only save us (B# ers').
Summing up all,... B# Templates for everything as in C# is a must requirement. Please don't go by patronage, stackoverflow reviews etc.

@CoolCoderSuper
Copy link

CoolCoderSuper commented Aug 5, 2023

Visual Basic, C#, and F# all compile to same IL code and can run anywhere the others can including WASM and Xamarin targets.
You could write all you logic in class library in vb and then use c# to write the ui or write your web app, your mobile app, and desktop all in vb using something AvaloniaUI. There might not be templates for making apis or avalonia apps but it's not that hard to make your own.

@giovanni-a
Copy link

I would love this project to get off the ground as a community effort. VB via either WPF or WinForms model on WebAssembly would be amazing.

I wanted to share an update that might be relevant to our ongoing discussion here.

OpenSilver has released version 2.0, which interestingly introduces support for VB.NET.

For those unfamiliar, OpenSilver is an open-source, plugin-free initiative that serves as a reimplementation of Silverlight (a subset of WPF).

This means that with the new update, there's a pathway for developers to work on web applications using a combination of VB.NET and XAML.

The development experience is remarkably similar to that of Silverlight and WPF.

For more details, you can refer to the release notes here: https://opensilver.net/announcements/2-0/

--
Disclaimer: I am directly involved in the OpenSilver project, so my perspective might be biased. Nonetheless, I felt this information could contribute to our discussion and provide an alternative solution for VB.NET developers interested in web application development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants