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

eShopOnWeb.vb: A full ASP.NET Core 3.1 app in VB.NET #510

Open
VBAndCs opened this issue Mar 23, 2020 · 36 comments
Open

eShopOnWeb.vb: A full ASP.NET Core 3.1 app in VB.NET #510

VBAndCs opened this issue Mar 23, 2020 · 36 comments

Comments

@VBAndCs
Copy link

VBAndCs commented Mar 23, 2020

I just published eShopOnWeb_VB.NET which is the VB.NET version of the Microsoft full web sample eShopOnWeb
eShopOnWeb is a sample ASP.NET Core reference application, powered by Microsoft, demonstrating a single-process (monolithic) application architecture.
I created a VB.NET version of this app, using Vazor and ZML to design MVC views and Razor Pages, because ASP.NET Core Doesn't provide a razor syntax that supports VB.NET.
vazorpng

I hope VB.NET developers found it helpful, and start creating their web applications targeting ASP.NET Core 3.1 using VB.NET and Vazor.

@KathleenDollard
I hope you publish this work in VB blog and .net magazine. Vazor readme contains the necessary details to write such article.
And I wish to fix the issues I mentioned before regarding XML literals, to make using Vazor easier.
I aborted Vazor for months waiting for the top level code and other amazing work of @AnthonyDGreen but since you announced freezing VB.NET, Vazor is the only left option. You promised to keep enhancing VB.NET editor and VS.NET tools for VB.NET. This is what I am asking for Vazor. At least I need the editor support for html5 in XML literals.
Thanks.

@KathleenDollard
Copy link
Contributor

Can you let me know what link you would like me to Tweet

@VBAndCs
Copy link
Author

VBAndCs commented Mar 23, 2020

@KathleenDollard
I am not sure I understand the question correctly. If you mean the link of the repo, I prefer to refer to the eShopOnWeb_VB.NET as a practical usage of Vazor:
https://github.com/VBAndCs/eShopOnWeb_VB.NET
It's readme contains links to Vazor and ZML.
But I would appreciate if someone form .NET magazine summarize this work in an article like they did in this one
Thanks for you care and fast respond.

@ericmutta
Copy link

ericmutta commented Mar 23, 2020

@VBAndCs I haven't had a chance to look at this but it is definitely interesting and I commend your efforts on it! I have been learning ASP.NET Core and wanted to try it using VB and this looks like it solves that problem. Great stuff and thanks for leading the way 💪 👍

PS: love the transformer logo - very memorable!

@VBAndCs
Copy link
Author

VBAndCs commented Mar 23, 2020

@ericmutta
Thanks for your support.
I found this image named Vazor so I took it and added the .net core logo :)

@InteXX
Copy link

InteXX commented Mar 24, 2020

@VBAndCs Good job, thank you.

@VBAndCs
Copy link
Author

VBAndCs commented Mar 24, 2020

@InteXX You're welcome.

@VBAndCs
Copy link
Author

VBAndCs commented Mar 24, 2020

I fixed the bug in the ApplicationCore.vb project, and updated the repo. It is all a VB.NET code now!
I described the bug caused by a VB expression tree here:
#512

@VBAndCs
Copy link
Author

VBAndCs commented Apr 7, 2020

Writing web pages with vbxml code now should be a fun with html5 auto completion #527 (comment)

@InteXX
Copy link

InteXX commented Apr 7, 2020

Incredible...

Where do you find the time?

@VBAndCs
Copy link
Author

VBAndCs commented Apr 7, 2020

@InteXX
Thanks.
I have nothing but time :). This is not because a Corona curfew.
I work mainly in writing books about VB.NET and C# for Arabic readers, which is a struggling career as publishing market in Arabic is very limited in general. And of course MSFT flush out my VB.NET books by declaring freezing VB.NET :( , which motivated me to continue my work about Vazor trying to make VB.NET live a little longer.
I like doing some code adventure every spring, as it makes me learn new things, and enhance my books with new experiences.
And above all, you can save a lot of time if you realized where to start. @paul1956 advised me to look at the the RegexCompletionProvider, and this led me to think: "There is already some limited version of XML completion provider, used for XML document comments, so, why don't I look at?"
It gave me a kick start to write my first completion provider with zero previous knowledge of the subject, and it really was easy, letting me focus on learning xsd format and the .NET XMLSchema API used to parse it (which is really hard and needs to be more user friendly. I needed to search for answers in every step forward).
In short, all gradients are there in VB.NET waiting to be used. I explained the making of the provider to encourage VB developers to get involved with Roslyn. It is not intimidating as it may seem, and we really need to step up to take over the fate of our beloved language.

@InteXX
Copy link

InteXX commented Apr 7, 2020

Aha. You're the perfect candidate for helping to finish off the VB.NET Generator for EF Core ;-)

Anyway... I'm quite envious of you. I've got all of these wonderful things I'd like to do, but there's just not enough time in a day.

If it were possible to continue without eating or sleeping, I would do it :-)

@VBAndCs
Copy link
Author

VBAndCs commented Apr 7, 2020

You're the perfect candidate for helping to finish off the VB.NET Generator for EF Core ;-)

Sounds interesting. I will add it to the list after finishing all aspects of Vazor. But there is no documentation of that work, nor even a readme.

Hope you make the most efficient usage of your time.

@InteXX
Copy link

InteXX commented Apr 7, 2020

I'll try to work on a readme.

@InteXX
Copy link

InteXX commented Apr 7, 2020

Hope you make the most efficient usage of your time

Thanks :-)

@VBAndCs
Copy link
Author

VBAndCs commented Apr 10, 2020

I contacted VS Magazine and they published an article about this work:
https://visualstudiomagazine.com/articles/2020/04/10/vbnet-aspnetcore.aspx

@InteXX
Copy link

InteXX commented Apr 10, 2020

@VBAndCs

That is absolutely fantastic.

Congratulations :-)

@VBAndCs
Copy link
Author

VBAndCs commented Apr 10, 2020

Thanks @InteXX.

@VBAndCs
Copy link
Author

VBAndCs commented Apr 10, 2020

I want to advertise this to regular VB.NET developers. Is there still a popular forum or whatever that gathers a large number of them?

@InteXX
Copy link

InteXX commented Apr 10, 2020

You might try http://www.vbforums.com/.

@InteXX
Copy link

InteXX commented Apr 11, 2020

I hear also that there're a couple of VB groups on Facebook, but as I'm a social media holdout, I've never seen them.

@VBAndCs
Copy link
Author

VBAndCs commented Apr 11, 2020

Thanks. I'll try both suggestions.

@InteXX
Copy link

InteXX commented May 21, 2020

@VBAndCs

Didn't you recently build a project template for one of these? I've been poking through my history, but I'm not finding what I seem to remember having read.

Anyway, assuming I'm correct... why not try a PR to get a link published here:

https://github.com/dotnet/templating/wiki/Available-templates-for-dotnet-new#vbnet-templates

This looks like it might have some potential for becoming a go-to spot for our stuff.

@VBAndCs
Copy link
Author

VBAndCs commented May 21, 2020

@InteXX
Yes, here it is:
https://github.com/VBAndCs/Vazor/blob/master/VazorTemplateSetup.zip
I am not sure if it is compatible with dotnet new.

@InteXX
Copy link

InteXX commented May 22, 2020

@VBAndCs

I betcha it is!

I was fiddling around today with dotnet new and project templates. It's surprisingly simple. In my research I happened upon this interesting little tidbit:

Creating your own templates

You can also create your own custom templates. These don't have to be for popular frameworks, but might be for internal or personal projects. Essentially, if you often find yourself creating a specific folder structure, set of references, or boilerplate files, consider creating project or item templates. Project templates are simply plain text files, including the .vbproj files — there's no requirement that the generated templates are .NET Core specific, and they can be made to target any framework.

https://www.infoq.com/articles/dotnet-core-template-engine/

In any case, I can think of one sure way to find out ;-)

@InteXX
Copy link

InteXX commented May 23, 2020

@VBAndCs

I cloned your repo, but I couldn't find a project template.

Did I look right past it?

@VBAndCs
Copy link
Author

VBAndCs commented May 23, 2020

@InteXX
It is in the Vazor repo.
The eShopOnWeb app uses the Vazor and ZML NuGets, so it doesn't have to be a part of the Vazor repo.

@InteXX
Copy link

InteXX commented May 23, 2020

@VBAndCs

OK, got it.

Is the source for this in the repo? I'd like to review your file/folder hierarchy and compare it to my own as I learn more about templating.

@VBAndCs
Copy link
Author

VBAndCs commented May 23, 2020

You can export any project as a template. I used the sample projects in the repo to do that. Follow these steps:
https://docs.microsoft.com/en-us/visualstudio/ide/how-to-create-project-templates?view=vs-2019

@InteXX
Copy link

InteXX commented May 23, 2020

@VBAndCs

That helps, thanks for the link.

I've been going by this one, but it doesn't provide documentation for the placeholders. I found that here, nestled among the topic tree you pointed me to.

My next step, after getting this under my belt, is to work out dotnet new with Vazor.

@VBAndCs
Copy link
Author

VBAndCs commented May 23, 2020

Nice.

@InteXX
Copy link

InteXX commented May 25, 2020

@VBAndCs

I'm running into all kinds of problems trying to shoehorn this .NET Core project into a Framework 4.8 template project for the VS IDE.

Clearly you were able to do it; are you able to publish the source for your template and installer projects? I'd like to compare what you're doing with what I'm trying to do.

@InteXX
Copy link

InteXX commented May 26, 2020

I spotted a couple of typos in your item templates:

VazerPage
VazerView

:-)

@VBAndCs
Copy link
Author

VBAndCs commented May 26, 2020

trying to shoehorn this .NET Core project into a Framework 4.8 template project

Vazor is meant for ASP.NET Core. It has nothing to do with .NET framework.

I spotted a couple of typos in your item templates:

Thanks. I fixed them. I attached the template project here.
VazorTemplateSetup.zip

@InteXX
Copy link

InteXX commented May 26, 2020

Vazor is meant for ASP.NET Core. It has nothing to do with .NET framework

Right, but the documentation I was using wants us to create a Framework 4.8 (or lower) interim template project:

https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-custom-project-and-item-templates?view=vs-2019#create-a-project-template

That's where I was getting hung up. Once I dropped that approach and pointed the deployment project to the .ZIP file, as described here, I then could at least get a build and generate a VSIX file.

But this thing isn't out of the woods just yet. When running an experimental-instance debug (described here) or installing a VSIX Release build, the new template doesn't show up in the New Project list.

According to this, starting with recent releases of VS2019 it's apparently pretty important to include the *Tag elements in the manifest. But I see you're not including them in yours. And while I haven't tried a Vazor template installation yet, I believe it's safe to presume that yours are showing up where they ought to. That's a head-scratcher.

I don't see anything fundamentally different between your deployment project and mine.

Anyway, I'm done for the day. I'll pick it up again tomorrow.

@VBAndCs
Copy link
Author

VBAndCs commented May 26, 2020

I believe it's safe to presume that yours are showing up where they ought to

No. I failed to do so. Nothing is working as they describe. So, I just told the users to search for the Vazor name in the new project window search textbox.

@InteXX
Copy link

InteXX commented May 26, 2020

@VBAndCs

I just opened a support case on this.

I'll keep you posted on my progress.

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

4 participants