r/visualbasic • • Apr 07 '20

VB programmer interested in writing web software. Where to start?

I am VB programmer with just enough skill to make the small apps needed. I write simple Windows Form Apps in VB.NET / VS 2019, after having switched from VB6.0 only about 2 years ago.

I am now interested in writing some simple apps for the web (i.e. run on a server and accessible to an end user via a web). I am under the impression that this can be done with VB using ASP.NET or something. Is this true? Despite some googling, I am very confused on where to begin.

Can somebody give me a brief explanation or point me in the right direction for where to start coding VB for a webapp? Or would I be better off starting with a new language / platform?

8 Upvotes

8 comments sorted by

7

u/JamesWjRose Apr 07 '20

As someone who started with VB 2.0 (1993) I want to mention that it will be worth it to move to C#. MS has stated that they will not be continuing with VB development. Not a rush, but I thought you should know.

Since you have some current vb applications, I would recommend converting them to web based. That way you know the logic and code and "only" need to work on making them web based.

eg: I have been learning VR for the last few years. I choose Unity over the Unreal engine as it uses C# so I didn't have to learn a new language. You already know your app, so making it web based is only ONE thing to learn

3

u/trab601 Apr 07 '20

Thank you. I’ve thought about learning C#. I know its the right next step for me. The problem of course is that it doesn’t solve any problems for me today as VB does what I need as is. Although I completely understand that learning C# is the right move for the future. How annoying as I just moved on from VB6.

Do you know a good resource to teach C# for VB users? I’ve seen tutorials learning C# from scratch. But I’d love for a guide / book / video that translates the concepts.

Thank you again.

4

u/andrewsmd87 Web Specialist Apr 07 '20

FWIW I moved to C# from VB and it was a pretty painless transition. I had some PHP and Java experience prior, so I was familiar with the syntax kind of. However, it's a pretty seamless transition.

What I'd recommend for your first project is to do a win forms app in c#, since you're already familiar with it. You'll find a lot of it translates pretty straight forward.

I.e. in vb

TextBox1.Text = "test"

is just

TextBox1.Text = "test";

In c#

There are nuances, mainly c# is a strongly typed language, which is a good thing, and some of the functions are a touch different. But it's not too tough to transition. However, as someone else mentioned, the online converter is good when you don't know the syntax for one thing in c# that you do in VB

If you want to migrate to the web, then web forms is going to feel the most comfortable to you, because it's basically win forms ported to the web.

THAT IS NOT the route I'd recommend to do. After you've done a win forms app or two in c#, look into either MVC, or possibly blazor. I don't know if blazor is production ready yet as it's pretty new, but web forms is being phased out so I'd recommend one of those two, for web apps.

3

u/JamesWjRose Apr 07 '20

Some good news, to convert VB to C#: https://converter.telerik.com/

This means you can take code you know, paste it and then see how it's done in C#. (use small chunks at first)

As someone who worked with VB Classic (what version 6.0 and lower are now called) for MANY years I hear your pain. Even moving to VB.NET is a lot. So make sure to not get down on yourself for not knowing something, or feeling frustrated. It happens to ALL of us.

2

u/theregoesanother Apr 07 '20

This is really good to know.

3

u/Mortiouss Database Specialist Apr 07 '20

The great thing about c# vs vb.net is the change isn’t too big of a step. Plus there are a large number of converters on the net so if you see some code in either language convert it if it helps you understand what’s going on.

As for web based tools, take a look at web forms, those will probably be the easiest to get into, the big thing you need to understand between web development and app development is the web state, a web tool won’t do anything until you force something to happen, what I mean by that is say you have a drop down that selects state, and you want that drop down to drive a list of cities in that state, you have to do a post back kicked off on the first drop down select to load the second drop down and handle that all in code where an app you can do it all on an on select (unless you get into java script).

I found web work much more annoying simply because of the state, however once you get past that having something that will basically run on anything without different code sets is great.

1

u/hl7guy Apr 07 '20

Technically you can write WebForms in visual basic, but webforms is going the way of the dinosaur as well. I suggest learning Blazor. It's MS new way of writing web apps without having to know Javascript or any kind of frameworks. It's purely C#.

1

u/1point44mb_is_fine Apr 08 '20

https://www.sitepoint.com/asp-dot-net-basics/

Also take a look at PHP. I went from VB > C# > PHP > Python and then back to PHP (and C#) I just love PHP. Easy to start and useful everywhere. Take some of your programs and write them again in C# and PHP - you already know how they work so it's a fun way to learn a new language :-) thats just me maybe