If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > Questions about VB.Net and C#

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-07, 11:37
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Questions about VB.Net and C#

Hey guys and gals, just wanted a wee bit of advice about VB.Net and C#

Basically I'm going to be taking over someone's development work over the next few weeks and have a guess at what it's all written in...
My manager seems to think I'll have no trouble with VB.Net because I know VBA - is this a fair enough assumption?
I know there are some big differences, but are the syntax/functions etc pretty much the same?

Then along comes some C# stuff - I've had a google or three at some examples and it seems to be rediculously similar syntax to JavaScript - fair assumption?

Not sure what to ask really, hmm...
If you have any links you reckon I'd benefit from reading then please let me know!

Kind regards,
George
__________________
George
Twitter | Blog
Reply With Quote
  #2 (permalink)  
Old 06-26-07, 11:48
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by georgev
My manager seems to think I'll have no trouble with VB.Net because I know VBA - is this a fair enough assumption?
Kind of. Actually - it is you - yes no problem Remember you are going properly OO now. The syntax is very similar but the underlying concepts are much more sophisticated.

Quote:
Originally Posted by georgev
Then along comes some C# stuff - I've had a google or three at some examples and it seems to be rediculously similar syntax to JavaScript - fair assumption?
I believe the guy that created JAVA was recruited by MS to create the "perfect" language and C# is what he came up with. More similar to JAVA than javascript I understand (though I don't know JAVA). I'll see if I can dig up a nice article I read....
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 06-26-07, 12:12
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Oops. Guess I misremembered a few things.

Anyway - I like this article. It admits up front it is subjective. You can google for millions of other VB Vs C# articles. I can't write C#, though I can translate reasonably well to VB (on the To Do list) so I am not a C# puritan. If you can, I would start out programming in C#. Higher demand and higher pay -> Happy George.
http://www.codeproject.com/dotnet/CS...sp?msg=2096633
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 06-26-07, 18:48
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Thanks for the insight Poots (and the compliements !)
Oh and congrats on breaking the big five-oh-oh-oh!

I actually read that article earlier, not exactly what I'd call objective, but hey!
I'm probably going to request a formal training course on C# now - especially if I have to support this crud at a later date...

I've done a lot of theory about OOP and have written all kindsa carp back in school (we did assembly language and created a text based DOS game which was pretty much OO).

So yeah, thanks!
__________________
George
Twitter | Blog
Reply With Quote
  #5 (permalink)  
Old 07-07-07, 20:26
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Quote:
Originally Posted by georgev
Then along comes some C# stuff - I've had a google or three at some examples and it seems to be rediculously similar syntax to JavaScript - fair assumption?
I haven't used Java since a few releases, but I'm pretty familiar with it. The same is true for Javascript. I haven't done nearly as much with C#. Javascript is more properly known as ECMAScript, and aside from syntactic similarities, is not based on Java and is completely incompatible with Java. The Netscape folks called it Javascript for marketing reasons and I never did understand why Sun didn't sue them. Actionscript, which is in Flash, is also based on ECMAScript. JScript is MS's implementation of Javascript.

Synopsis: Javascript was designed for simple programming. It's become pretty big, I believe there's some startup named Google that has a bunch of stuff that's endlessly in beta. Java is a "serious" programming language that brought 10 year old OOP ideas into vogue. It's designed to always do the right thing and be highly consistent so you have to write endless error checks and type conversions, though I hear they've fixed this somewhat. C# was set up explicitly to destroy Java so it has lots of nice things for developers and tries to give you what you want.

Syntax: yes, they're all based on C which inherited it from earlier languages. There are little differences. Javascript has the simplest, Java has the most uniform, C# is like Java but more flexible.

Imperative control structures: all have the usual for, while, foreach, try/catch, if.

Subroutines: You can pass a subroutine as a value in each language. C# has delegates which I find a little weird. None of them support coroutines, to my knowledge.

Simple data types: all have various integers, floats, a boolean, strings. But Javascript ignores all that, so a string that happens to say 15 behaves like the number. The other languages make you do this manually.

Declaring variables: Javascript doesn't require that you declare variables.
I don't think any of them allow global variables; you have to assign a variable to a class (this is an OOP concept).

Object orientation: They all do it. Javascript has supported prototypes (a different way of doing OOP than Java and C#) as early as Netscape Navigator 2.

Complex data types: Mostly done through objects. Java and C# both have a root Object class that everything is a "subclass" of. Java goes with the "everything is an object" philosophy as much as possible. C# has special structs for user-defined types. Both have arrays; C# has more features for their arrays. Java has a very extensive and mature library for working with trees and maps and other advanced objects. C# generally has better primitives, e.g. multidimensional arrays. Javascript used to be very primitive in this regard but with modern browsers depending on Javascript I'll bet that's changed.

Multithreading: Java's is based on monitors and mutexes. Javascript doesn't directly allow multithreading, to my knowledge. I haven't used C# to do any multithreading.

Multitasking: I'm quite sure none of them support fork, which is a pity. Unix guys will harrumph about this.

Supporting libraries: All of them have massive APIs that virtually implement an operating system.

Memory management: they all use garbage collection, and all of them use a pretty sophisiticated system.

Mode of execution: Java semi-compiles to bytecode which is run by the infamous Java Virtual Machine. C# compiles to bytecode that is run by the Common Language Runtime. Javascript is also compiled, but the browser generally does it behind the scenes.

I/O: Javascript generally runs in a browser or flash plugin or something. Nowadays you can send AJAX requests, so the sandbox you play in is a little bit bigger. If you don't mind warning dialogs and paying ridiculous fees to certificate authorities, you can get local file access. Java and C# both have excellent IO systems that are highly adaptive and customizable.

GUI: .NET's WinForms is uninspired, but I guess it works. Java has gone through several iterations trying to find the ultimate UI that works on anything, and it still generally sucks, but see Eclipse and jEdit for counterexamples. Javascript sticks you with the usual horrible browser UI.

Database: Java has JDBC. The latest revisions of C# supposedly allow SQL directly in the source code. With Javascript, you're stuck sending AJAX requests back to the server.
Reply With Quote
  #6 (permalink)  
Old 07-09-07, 03:19
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Wow,
Not much to say other than a very sincere thank you for taking time out to write such an impressive, useful and informative reply.
Thank you
__________________
George
Twitter | Blog
Reply With Quote
  #7 (permalink)  
Old 07-09-07, 13:29
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Quote:
Originally Posted by georgev
Thank you
No problem.

Quote:
<3 Engaged!


Congrats!
Reply With Quote
  #8 (permalink)  
Old 07-09-07, 13:39
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
Quote:
Originally Posted by georgev

My manager seems to think I'll have no trouble with VB.Net because I know VBA - is this a fair enough assumption?
Absolutely not.

When you begin making the jump from VBA to .NET, step one is to throw everything you thought you knew about proper programming out the window. The syntax will be familiar enough that once you understand the underlying concepts, implementing them will be fairly simple. Making the jump from what is effectively procedural code to a true OO model can be a challenge.

I would suggest grabbing one of the free versions of studio and doing a few sample projects in .NET to get an overall feel for how things get done.
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #9 (permalink)  
Old 07-10-07, 06:08
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
I had the meeting today for the first stage of handover of one of the .NET modules. I've studied OO programming in the past and built a couple of tiny bits and bobs but nothing major - so the theory is sorta there.

I'll get a better look at the code over the next week or so - from what I've seen already I can follow most of it - but I'd be damned if I could write it all from scratch The good news is that I don't have to do much of that - just support it in a few months time. I'm going to talk to my new manager about a VB.NET course and see where that leads.

I'll see if work will lend me a laptop with VS (or even my own copy ) so I can have a play with some samples at home.
__________________
George
Twitter | Blog
Reply With Quote
  #10 (permalink)  
Old 07-20-07, 18:09
rudra rudra is offline
L O S T in Reality
 
Join Date: Nov 2005
Location: San Francisco, CA
Posts: 506
Quote:
Originally Posted by georgev
I'll see if work will lend me a laptop with VS (or even my own copy ) so I can have a play with some samples at home.
Good Luck, but FYI VBA and VB.NET are completely different stuff in underlying technology.I would suggest you that the transition could be easy but if you go by OOPs that would be far better.
Compared to VB.net ,C# gives you a good coding standards.
I was basically a VB.net guy but for the last 2 year I just worked in C#, and trust me I am loving it....
__________________
Success is the ability to go from one failure to another with no loss of enthusiasm.
- Sir Winston Churchill
Joydeep
Reply With Quote
  #11 (permalink)  
Old 08-07-07, 11:25
Shaun.McGuile Shaun.McGuile is offline
Registered User
 
Join Date: Jun 2007
Location: Under a desk hiding from SSIS
Posts: 23
Wink Poots I think is wrong perhaps....

Quote:
Originally Posted by pootle flump
I believe the guy that created JAVA was recruited by MS to create the "perfect" language and C# is what he came up with. More similar to JAVA than javascript I understand (though I don't know JAVA). I'll see if I can dig up a nice article I read....
It was the guy who wrote Delphi - Anders H. - i forget how to spell his surname, from Borland. The greatest OO language implementation ever - blows VB away.

Regards,
Reply With Quote
  #12 (permalink)  
Old 08-08-07, 12:13
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
That would be Anders Hejlsberg. Everything he has created has left me awestruck, and he's created a lot of stuff!

-PatP
Reply With Quote
  #13 (permalink)  
Old 08-10-07, 16:21
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by Shaun.McGuile
It was the guy who wrote Delphi - Anders H. - i forget how to spell his surname, from Borland. The greatest OO language implementation ever - blows VB away.
I will freely confess that accuracy suffered for the sake of posting reasonably early, always intending to follow up with a link.

OOP (and client side languages in particular, indeed many would argue programming languages in general) are really not my forte. I think Sc00b's post is a superb summary though I confess I am not in a position to judge it on anything but on the most superficial of levels.

Article(s) I have read recently that piqued my interest in OO techniques in case anyone is interested:
http://www.tonymarston.net/php-mysql/good-bad-oop.html

I think this guy's summary (it is only an article and so can only be judged on that basis - I know there are more thorough examinations of the discipline) on relational db design is one of the best I have read on the web. Kudos to Rudy for pointing out his www.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On