473,836 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compare Visual Basic .Net with JavaScript

1 New Member
Hi,

Can somebody tell me the difference between vb.net and JavaScript?

Thanks.
Apr 26 '07 #1
4 5892
MMcCarthy
14,534 Recognized Expert Moderator MVP
You have posted this question in the Jobs forum.

I am moving it to the Software Development forum.

ADMIN
Apr 26 '07 #2
LacrosseB0ss
113 New Member
Hi,

Can somebody tell me the difference between vb.net and JavaScript?

Thanks.

one of the biggest differences is that Javascript is run on the page whereas VB code (in an asp page for example) is run on the server.

Take a site that verifies user input (phone number for example). When a button is clicked, Javascript will check the phone number and if it's ok, it will send the info to the server for processing. If it's incorrect, it'll pop a message saying "Hey doofus, enter your correct number!" and nothing else.

The VB part will send all info to the server when the button is clicked and will either return a success or return "Hey doofus ...".

So which is better? As with everything, depends on the situation. When a page posts back (comes back from the server) you will usually lose data that was entered. If you have a page where TONS of information is being input and the user gets 1 field wrong, they're screwed and they hate you if you used VB. If you used JS, they hate themselves for having too fast fingers.

This is just a very very specific example. It all depends on what you're doing. I usually prefer VB b/c that's what I'm comfortable with and my users can suck it up :D. Best advice, get to know both. Then you'll figure out which is the best one in whatever situation and when you come across somewhere that needs one or the other, you can code it no problem.

Hope this helps
-LB
May 22 '07 #3
Aflj
6 New Member
one of the biggest differences is that Javascript is run on the page whereas VB code (in an asp page for example) is run on the server.
It's a long time since I last touched MS-specific technologies, but if I correctly remember, you can use VBScript (which is sort of a VB) to script web pages, if you (or your users) are using only IE for browsing. Also, you should be able to use JS for server-side scripting.

Even more, using MS's client-side scripting technologies, you should be able to build apps scripted in JS similar to those you can do in VB, by scripting similar UI components.

IMO the big difference, when it comes to scripting for the browser, is portability. Using ECMA-626 (or is it 262?) conformant Javascript you can be pretty much sure that all major browsers will properly interpret your scripts. Using VB for the same purpose you're stuck with IE.

Server side the story is to some extent similar, but actually worse. I don't know of any other server (than IIS) supporting either JS or VB for server-side scripting. Usually, you script srever-side in perl, php, ruby or other languages which are better suited and supported for server-side scripting.

Strictly about the languages speaking, not about how and for what you can use them for, I think Javascript is a nicer language to use, extremely powerful for small stuff - as you usually do inside an HTML page. VB has a more verbose syntax, and a less powerful grammar.

What do you want to use the language(s) for? That should determine what you need to learn. There is no such thing as learning one language for one context once, and then using it for the rest of your life.
May 30 '07 #4
LacrosseB0ss
113 New Member
Strictly about the languages speaking, not about how and for what you can use them for, I think Javascript is a nicer language to use, extremely powerful for small stuff - as you usually do inside an HTML page. VB has a more verbose syntax, and a less powerful grammar.

What do you want to use the language(s) for? That should determine what you need to learn. There is no such thing as learning one language for one context once, and then using it for the rest of your life.
Personally, I prefer VB. As I mentioned before, it's what I'm used to but as well, it hides code better. For example, if you use FF or IE for browsing, they both have an option View--> Source. This shows all source code for a page.

If you have coded in JS, all the scripts and such appear here (unless you've done page source = script.js). If you use VB, there is no way code shows up. For personal web sites, it's not that big a deal. You may not care if someone steals your code. In fact, you may be proud someone wanted to. However, if you're developing a business web site using in house methods or sensitive code, you may want this hidden.

As mentioned by myself and Aflj, no language is perfect and it will depend on what you're doing which one will work best.

Hope this helps
- LB
Jun 1 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2692
by: Florin | last post by:
Hi, How to return a variable from javaScript to the visual basic? The script is loaded into the webbrowser control as a html page. THX
4
5396
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and calculate days, months, and years. This is not for a college course. It's for my own personal genealogy website. I'm stumped about the code. I'm working on it but not making much progress. Is there any free code available anywhere? I know it...
9
3944
by: Rich | last post by:
Thanks for the Help in my previous post. I've been working on this and it's almost what I want. I want to obtain the user's current age by comparing their date of birth (user inputs) to the current date. I know how to get the Current Date but I'm not finding how to calculate the Current Date minus the User's Birthday.
19
9537
by: David zhu | last post by:
I've got different result when comparing two strings using "==" and string.Compare(). The two strings seems to have same value "1202002" in the quick watch, and both have the same length 7 which I have tried to print out by debug.writeline(). But the "==" operator results false, and string.Compare() results true. Somebody helps me!
2
3716
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi... Say i have this string call "data" in Form1, this string contains number "5" value.... how do i pass this string to the Form2 and compare with the combo box items... The combo box DropDownStyle is set to DropDownList... which means when i pass, the SelectedIndex must be subtract or add by 1 to
10
1577
by: ljh | last post by:
Google ran dry on me while looking for .Net examples of how to compare 2 Word Docs. Has anyone here seen anything like that?
6
1403
by: John Bailo | last post by:
http://www.informationweek.com/software/showArticle.jhtml?articleID=196600515 Developers Embrace Java, Drop Visual Basic "Developers have abandoned Microsoft's Visual Basic in droves during the last six months, and they're using Java more than any other development language, according to a recently published survey."
1
2606
by: mayaanant | last post by:
Two Finger print or thump impression compare in visual basic for making software
7
17967
by: rmurgia | last post by:
When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between javascript, visual basic, and vbscript non-interchangable? I created the following code: <script language="javascript"> function question(){ strReply = confirm('Click Yes if you wish to continue.') alert(strreply) } </script>
0
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10248
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7782
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6976
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5817
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3108
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.