|
Ian Ying Xiao wrote:
"But I have a question, do you really utilize the OO models?"
Are you asking me whether the software I develop is the result of proper OO analysis and design? If so, well my answer is not all of it, it depends on the context I find myself in, with the most influential factors being time and resources. If there's enough time and resources to do things right, then I'd be a fool not to. Otherwise, delivery always takes priority even if it means sacrificing what you call the "OO Style".
Ian Ying Xiao wrote:
"In this world, we are still using RDBM like SQL Server as the backend, and still manipulating recordset in mid-tier, and still using table styled data grid or data grid like front end tabular stuff. And all the reports are still tabular based (most of them)."
And your point is? Are you saying that using a relational database inhibits OO? If so, please look into ORM. By the way, that dataset you're using in the middle tier is a beatiful abstraction of a database.
Ian Ying Xiao wrote:
"XML is not a solution for OO"
I assume you meant to say that XML is not an ideal way of storing objects. I think that depends on the type of object. Regardless, I think you place way too much emphasis on how objects are stored rather than on the objects themselves.
Ian Ying Xiao wrote:
"So please don't put OO as a word in your mouse all the time."
Just to clear things up here, first, I don't know where you got the idea that everything I say is somehow related to OO. This article, for example, has nothing to do with OO. Second, the only reason OO has come up is because of the discussions I've had with other coders as seen in the threads. Finally third, I know you said please, but please don't tell me what I can and cannot say unless what I am saying is inaccurate, in which case I will make to shut up.
Ian Ying Xiao wrote:
"Until a real OO database is matured in the market place, then lets talk about real OO."
Please speak for yourself, you can wait all you want. I myself could care less how an object is stored as long as it's an object that I'm storing. An OO database perhaps is "ideal", and I know there are some stable ones out there right now, but until the prices go down, I'll do without them.
Thanks for your feedback, although I respectfully disagree with most of it.
|
|
|
|
|
Giancarlo, I agree with you in this matter. 
|
|
|
|
|
You fail to make clear what you think it means to "code" OO style. In my opinion, it isn't a question of coding style but a question of design (and, usually, architechture).
What does object-orientation mean? Broadly speaking, it is an approach to programming that centers on the common everyday language concepts of "objects" and "classes", or uses this concepts as metaphores to help us think about a system. Certain concepts have come to be seen as the "core" concepts: Inheritance, encapsulation, polymorphism. But it is not automatically obvious how exactly these are to be used. They just help clarify the thinking by drawing analogies to the more familiar world. For example, ask yourself what a class member is. In my view, the best "oop" answer isn't anything to do with static linking or indeed anything very technical at all -- the best answer is that it is a member that pertains to the class as such, rather than to any particular instance.
Sometimes a class can be thought of as all the instances collectively, and the number of Car instances is indeed a good example of what would be a class member - how many instances there are is clearly not an attribute of any particular car. Other times, it may not make sense to speak of instances at all; the class may model something abstract, such as Mathematics. (Yes, the Math class is static, but a static class is also an abstract class.)
I think that most of use make much use of these metaphores, if in sub-optimal ways, and that the OOP paradigm is of great value overall. Inheritance and thinking of your model in terms of more and more specific classes facilitates reuse and polymorphism facilitates extensibility. There is nothing of this that you could not achieve using structured programming techniques, but it is much easier to think in terms of objects and classes in the same way that we subclass "Person" into "Man", "Woman" and so on in our daily lives. The reason the metaphor is so useful is just because it happens to promote good practices: By thinking about what is the common stuff that belongs to "Person" and putting in the base class I promote reuse, which in turn reduces bugs and increases maintainability, testability, and productivity.
That said, its not always good to use OOP and its not always obvious when a principle should be considered "fulfilled". Take encapsulation, for instance: A completely encapsulated type would have no public members at all, and hence it would be completely useless - there would be no way to interact with it, hence to use it.
A completely different set of problems emerge when developing servers, including web applications. Consider ASP.NET web pages, which live (exist) only during the processing of a web request. Once a response has been sent, all the objects are garbage collected, and the next time the page is posted back, even though it seems like its "the same text box" in some sense, another object instance is created and its state set up so that it is representative of the page as it was on the client when posted back. Exactly how this is achieved doesn't matter to the present subject, but it involves using a combination of the aspx page definition and postback data (including the hidden-input stored viewstate). My point here is just that in cases like this, it could make more sense to use stateless "objects" (they aren't really objects at all!), in this case logic that renders a textbox given its text value. Since the state anyway has to flow in and out of the object the encapsulation just leads to a potentially huge amount of instantiation/garbage collection overhead.
As it happens, the fact that servers generally need a fairly different design from desktop applications in order to be efficient is one of the main motivations behind SOA, service-oriented architecture. Just like OOP centers on the object metaphor, SOA makes use of another common metaphor, services, to help us think about software design in a way that promotes good and useful programming practices.
Finally, I do not agree that there is any fundamental problem with using relational databases and still call a system object oriented. The database is just a persistence medium, and if I persist an object in the form of rows in tables there is nothing wrong with that. It would be nice if either high-performance object databases emerged or really good O/R mapping tools came to our rescue so we didn't have to write all that mundane DAL code, but merely using a relational database to store information does not prevent a system from using OOP design principles.
|
|
|
|
|
1) u've a choice 2 write unsafe code with pointers in c# but not in vb.net
2) xml documentation is supported in c# and not in vb.net
3) C# supports operator overloading while VB.Net doesn't support it.
4) C#.Net is sytactically much cleaner than VB.Net, may be 'coz of the fact tht C#.Net is entirely new n specifically targeted for the .net framework.
5) C# is a bit faster then vb.net (this thing has been tested by many of the organizations by doing the benchmarks but MS didn't accepted till now (as far as i know). This might be because .NET framework itself is written in c# although the difference between speed isn't that noticeable so we can ignore this part.
Some Interesting articles:-
===========================
--> Top 10 reasons C# is better than VB.NET
http://www.vbrad.com/pf.asp?p=source/src_top_10_cs.htm[^]
--> Top 10 reasons VB.NET is better than C#
http://www.vbrad.com/pf.asp?p=source/src_top_10_vb.htm[^]
--> C# Conference Session
http://www.simonrobinson.com/DotNET/Discussions/WroxConfDec2002.aspx[^]
--> The .NET Language Paradigm
http://www.codeproject.com/dotnet/dnlp.asp#xx561639xx[^]
--> What are the advantages of C# over VB.NET and vice versa?
http://blogs.msdn.com/csharpfaq/archive/2004/03/11/87816.aspx[^]
--> Visual Basic.NET or C#...Which to Choose? [DOWNLOAD: PDF]
http://www.amazon.com/exec/obidos/tg/detail/-/B00005YX8N/102-5064032-6760145?v=glance[^]
Technically speaking, the language war is ABSURD!! I mean, wht matters is CLR and BCL!! If u know how 2 use the full power of .net platform, u can use either of those 2 languages efficiently. Both DO have minor differences and some pros n cons.
DO NOT fall for the author's comment tht VB.NEt is better than C# (Just 'coz he likes VB.Net). Thtz ABSURD N ARROGANT. I wudn't say C# is better than VB.Net 'cuz i like C#.Net The real answer is "depends" wht u wanna do with ur application. No hard feelings for the author of this article though n i appreciate his efforts. Have a gud 1 
|
|
|
|
|
Misty_Blue wrote:
"u've a choice 2 write unsafe code with pointers in c# but not in vb.net"
very true, vb has never had nor ever will have that feature. furthermore, if you need to make use of pointers in .NET, then C++ is by far a superior tool.
Misty_Blue wrote:
"xml documentation is supported in c# and not in vb.net "
bogus, all of my vb.net apps use xml comments, just download a free add in.
Misty_Blue wrote:
"C# supports operator overloading while VB.Net doesn't support it."
true, at least until 2.0 arrives.
Misty_Blue wrote:
"C#.Net is sytactically much cleaner than VB.Net, may be 'coz of the fact tht C#.Net is entirely new n specically targeted for the .net framework. "
that's your personal preference, I could care less about syntax as long as the functionality is there.
Misty_Blue wrote:
"C# is a bit faster then vb.net (this thing has been tested by many of the organizations by doing the benchmarks but MS didn't accepted till now (as far as i know). This might be because .NET framework itself is written in c# although the difference between speed isn't that noticeable so we can ignore this part."
let's not ignore it, bogus!, that all depends on how you code in VB.
Misty_Blue wrote:
"Technically speaking, the language war is ABSURD!!"
I know it is, but it's fun .
Misty_Blue wrote:
"DO NOT fall for the author's comment tht VB.NEt is better than C#"
I think you're the only one that fell for it .
Misty_Blue wrote:
"No hard feelings for the author of this article though n i appreciate his efforts. Have a gud 1"
absolutely none taken, nor could I care less on the vote you gave me .
thanks for the feedback
|
|
|
|
|
Giancarlo Aguilera wrote:
"u've a choice 2 write unsafe code with pointers in c# but not in vb.net"
very true, vb has never had nor ever will have that feature. furthermore, if you need to make use of pointers in .NET, then C++ is by far a superior tool.
--> looooolz. I thought we were comparing VB.Net with C#.Net!! So where did C++ came frm?
------------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
"xml documentation is supported in c# and not in vb.net "
bogus, all of my vb.net apps use xml comments, just download a free add in.
--> yes, it DOESN'T!! Like u said poor VB.Net has to look for some "add-ins"!!
------------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
"C# is a bit faster then vb.net (this thing has been tested by many of the organizations by doing the benchmarks but MS didn't accepted till now (as far as i know). This might be because .NET framework itself is written in c# although the difference between speed isn't that noticeable so we can ignore this part."
let's not ignore it, bogus!, that all depends on how you code in VB.
--> EXACTLY!! it ALWAYS depends on how u code!! Like i said b4, the question itself is invalid 2 begin with!!
-------------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
"Technically speaking, the language war is ABSURD!!"
I know it is, but it's fun .
--> And also, VERY time-consuming hehehehe....
-------------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
"DO NOT fall for the author's comment tht VB.NEt is better than C#"
I think you're the only one that fell for it .
--> huuuuh?? u'r funny!! loooooooolz
-------------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
"No hard feelings for the author of this article though n i appreciate his efforts. Have a gud 1"
absolutely none taken, nor could I care less on the vote you gave me .
--> Well, I haven't voted ur article yet n i'm not 1 of those persons who'll vote 1 just 'coz our opinions aren't matching. In general, authors REALLY have 2 work hard to get lower than 3 from me hehehehe (Reason: I appreciate tht they cud take sum time out 2 write article instead of being a lazy ass like me hehehehe). I know u don't care wht i'll vote but still, it won't be lower than 3 for sure and like i said, it's gud 2 share knowledge n opinions n tht i DO respect ur opinions as well
-------------------------------------------------------------------------------------------------
Gee, yer killin' my time!! hehehehe
Cheers,
Neel. 
|
|
|
|
|
Misty_Blue wrote:
"I thought we were comparing VB.Net with C#.Net!! So where did C++ came frm"
We are, but I'm just letting you know that you should use C++ rather than C# when working with pointers. Besides, can you give me a specific example of a use of pointers in C# that cannot be done in VB via System.Runtime.InteropServices.Marshal? Regardless, C# does have a poor excuse of a pointer yet VB does not.
Misty_Blue wrote:
"yes, it DOESN'T!! Like u said poor VB.Net has to look for some "add-ins"!!"
I can't tell the difference when writing XML comments in VB or C#, so it doesn't bother me. Besides in 2.0 it will come straight out of the box .
Misty_Blue wrote:
"And also, VERY time-consuming hehehehe"
tell me about it, but hey man, you started the thread .
"i DO respect ur opinions as well "
Likewise, I respect your opinion as well, BUT I have ZERO respect for your language (C#) .
Well, I must say that this debate has been better than others because at least it seems you know something about VB. Others talk trash, but that's all, no words behind the talk. At least you were able to pick out a few insignicant features C# has that VB does not. Yet of course there's a flip side to that coin:
1) what's up with C#'s lack of declarative event handling that VB has via the withevents and handles keywords.
2) what's up with the name mapping C# requires when implementing interfaces, either explicitly or implicitly, why not follow the leader and use VB's declarative implements keyword? Reminds me of VB 6's name mapping interface implementation.
3) what's up with C#'s lack of some type of "when" keyword that allows you to add a conditional test to a catch block? (honestly, I just threw this one in there, I've never use, but on the same token I doubt you make extensive use of pointers in C# )
4) what's up with C# forcing you to declare an event's underlying delegate in addition to the event itself. Why can't it be done inline like VB .
5) what's up with C#'s weak "new" modifier? If you're given a means to hide for whatever odd reason what your base exposes, why limit it. VB's "shadows" is way more powerful. I just threw this one in there, I seldom use it.
6) what's up with C#'s lack of optional parameters? I know, I know, method groups (overloading) accomplish the same thing and in a cleaner fashion, but for heaven's sake COM is still around.
So there!, what you gotta say about that
Thanks for the feedback, and also, please no rush in a response, I know you've got other more important things to do than battle it out with me , too bad C#'s intellisense, at least until version 2.0 arrives, is pathetic and no better than VB 6's .
|
|
|
|
|
-----------------------------------------------------------------------------------------
Misy_Blue wrote:
i DO respect ur opinions as well "
Giancarlo Aguilera wrote:
Likewise, I respect your opinion as well, BUT I have ZERO respect for your language (C#) .
--> Well, i don't care how much respect u've for C#.Net
-----------------------------------------------------------------------------------------
Misty_Blue wrote:
"yes, it DOESN'T!! Like u said poor VB.Net has to look for some "add-ins"!!"
Giancarlo Aguilera wrote:
I can't tell the difference when writing XML comments in VB or C#, so it doesn't bother me. Besides in 2.0 it will come straight out of the box .
--> yeah well, we'r talkin abt language's power not some third-party add-ins. Besides you, yourself agreed in replying massimo's post tht even when .NEt 2.0 comes out, C#.net 2.0 will still have edge over vb.net, we can discuss tht 2 if u want
------------------------------------------------------------------------------------------
Giancarlo Aguilera wrote:
Well, I must say that this debate has been better than others because at least it seems you know something about VB. Others talk trash, but that's all, no words behind the talk. At least you were able to pick out a few insignicant features C# has that VB does not. Yet of course there's a flip side to that coin:
--> Well, obviously, unlike you, i don't have problem with any of those 2 languages. I just prefer C#.Net, thtz all and if there are people trashing VB.Net then you are doing the same thing with C#.Net so i don't think you should complain!! I mean, there's no point of trashing ne language whether it's C# or VB.NEt Anyways here's are some more things:
Giancarlo Aguilera wrote:
1) what's up with C#'s lack of declarative event handling that VB has via the withevents and handles keywords.
1) C# has a different way of even handling and so we can manually/automatically link, subscribe and publish events so it doesn't need tht withevents or handles keywords.
Giancarlo Aguilera wrote:
2) what's up with the name mapping C# requires when implementing interfaces, either explicitly or implicitly, why not follow the leader and use VB's declarative implements keyword? Reminds me of VB 6's name mapping interface implementation.
2) Well, the "leader" (says who??) was buggy so thank god C# is NOT following the "so called leader" looolz I mean why doesn't C# use "Implements" keyword is just way 2 funny
Giancarlo Aguilera wrote:
3) what's up with C#'s lack of some type of "when" keyword that allows you to add a conditional test to a catch block? (honestly, I just threw this one in there, I've never use, but on the same token I doubt you make extensive use of pointers in C# )
3) Well, exactly, i've never used it too but okay, it's there in VB.Net (no biggie though).
Giancarlo Aguilera wrote:
4) what's up with C# forcing you to declare an event's underlying delegate in addition to the event itself. Why can't it be done inline like VB
4) Well, obviously thtz y i don't like VB.NEt! It's more structured and more powerful and i know at least what i'm doing.
Giancarlo Aguilera wrote:
5) what's up with C#'s weak "new" modifier? If you're given a means to hide for whatever odd reason what your base exposes, why limit it. VB's "shadows" is way more powerful. I just threw this one in there, I seldom use it.
5) I don't agree tht shodows is more powerful tht "new" modfier but in any case, it's pointless since it's not a big deal neways.
Giancarlo Aguilera wrote:
6) what's up with C#'s lack of optional parameters? I know, I know, method groups (overloading) accomplish the same thing and in a cleaner fashion, but for heaven's sake COM is still around.
6) So???? :->
Giancarlo Aguilera wrote:
Thanks for the feedback, and also, please no rush in a response, I know you've got other more important things to do than battle it out with me , too bad C#'s intellisense, at least until version 2.0 arrives, is pathetic and no better than VB 6's .
Well, this is a healthy arguement n i liked it so far, Thx 4 ur feedback as well
Neel.
|
|
|
|
|
One of the main reasons .NET was developed was to provide a clean slate and end the continued evolution of the windows api; which has become ever more complex as windows itself has evolved.
C# is a new languages specifically designed for .NET, a clean slate. This argument that VB is superior because it doesn't force you to work in object orientation is IMHO absurd. Object orientation is and has been the future of software development (and a major part of what .NET is). Procedural programming is still a part of OOP and it is possible to code outside of the OOP paradigm using a language designed for it (although I really don't see an advantage).
In the end the reason to use another managed language over C# is to continue to use what your comfortable with. If you've been developing in VB, the transition to .NET is easier with VB.NET. If you extending a legacy application that was written in VB, extend it with VB.NET. If your extending a legacy application that was written in C++, use Managed C++.
If your writing new software, use VB if it suits you (or any other managed language for that matter), personally I don't care. Though if you want to be paid more, you might think about using c# (see latest salary reports).
-Paradox
|
|
|
|
|
paradoxdev wrote:
"This argument that VB is superior because it doesn't force you to work in object orientation is IMHO absurd."
Yes, and I do make perfectly clear to the reader that this is the case, as is the case when C# is argued to be a superior language and that VB programmers, including myself, are idiots.
paradoxdev wrote:
"Object orientation is and has been the future of software development (and a major part of what .NET is)."
No dispute there.
paradoxdev wrote:
"Procedural programming is still a part of OOP and it is possible to code outside of the OOP paradigm using a language designed for it (although I really don't see an advantage)."
Sure, in C# just create a type with some static fields and methods, include it into your source file, and off you go into the wild destined to get eaten alive when things get serious. But it's good that C# as a language can give itself the luxury to force the programmer to at the very least type the word "class" or right click->Add New Item->Add Class. Whether or not he or she knows what the heck it is that's another story.
paradoxdev wrote:
"Though if you want to be paid more, you might think about using c# (see latest salary reports)."
Here I have to disagree. If you want to get paid more, or at least try, then you must be fluint in both, the sacrifice for doing so being negligible thanks to the CLR and the BCL. If you just don't have the time or the option to mix but are sharp with the CLR and BCL, never discard a project that involves the other language and your type of work, rather just give it a shot and try to express your knowledge of the framework to the interviewer, assuming it's technical, and hope that knowledge hits solid and foreshadows the lack of syntax familiarity.
Thanks for the feedback.
|
|
|
|
|
I totally agree with your dismissal of the claimed "advantage" of VB's lack of strictness, and also your observation that structural programming is still a part of OOP - the toolset if not the mindset. But I want to comment on your failure to see any advantages to programming outside of the OOP paradigm.
The thing I have in mind is servers. The problem with OOP when applied to servers is that objects in the real world, and therefore in well-designed OOP apps, have state. An instance of a chair may have such state as the angle of inclination (reclination? and the direction in which it is facing, and methods such as Recline() and Rotate() to allow a user to modify this state. However, in the context of a server the consumer of such operations will generally not be known to connect again in the future, so you generally can't keep your objects around for future use. Thus, to do the equivalent of rotating the chair the consumer would have to first specify the chairs initial state as well as how to rotate it, and then obtain the result. And on the server, one would have to instantiate a new chair every time, set up the initial state, and then perform the operation and return the result.
In short, where a static method would have been more appropritate, using good OOP design can lead to a huge amount of instantiation/garbage collection overhead in a server.
This is one area in which ASP.NET controls could be dramatically improved. A server-side ASP.NET control is basically logic that knows how to render itself as HTML, how to load postback data, and how to save and load viewstate. Each time a page is requested, all the controls are instantiated and initialized, and on postback given the opportunity to load postback data and fire postback events. But once the response is sent the object goes out of scope and becomes eligible for garbage collection. This is not really a good idea, since all textboxes on all pages are the same type and they must always be created from scratch every time a page containing a textbox is processed. If controls, here the textbox, provided all their logic with static methods depending only on the parameters, there would be much less memory (de)allocation going on. (With the existing design something could perhaps be achieved by adding object pooling to the classes.)
If you believe this is a non-issue I suggest you make a simple page to test for yourself. Add a datagrid and write a simple query to select a hundred rows from a northwind table, or whatever, and databind the grid. Then add a script line to post the form after half a second ("setTimeout(500, form1.post)" inside the head section of the ASPX suffices), and then open up a few browsers and point them at the page. This isn't an unrealistic load at all - it's quite relaxed actually. Then take a look in PerfMonitor and check how much time is spent just on garbage collection. I've read (I think it was here on codeproject) of people who had to abandon the use of databinding as a direct consequence of GC overhead.
|
|
|
|
|
All the languages lend different functional advantages when developing. The battle has always been fought on that battle field and that is the wrong battle field. It is not the IL that wins unless you are comparing C++.NET to “VB.NET and C#”. It is how the IL is achieved with VB.NET and C#, and that is in the C# and VB.NET "code" design. VB.NET is a much more dangerous language.
VB.NET enables the VB 6.0 developer to continue to develop in a non-OOP fashion by using extra VB namespaces provided by Microsoft that wrap other .NET namespaces. This allows for some very dangerous developing to take place when it comes to performance and coding best practices.
THIS IS NOT TRUE OF ALL VB.NET DEVELOPERS. Some have taken the time to learn how to avoid the VB.NET pitfalls of developing in a non OOP way. So if you are one of those guys, don’t start blasting me.
In truth VB.NET is harder to use that C#. Because it makes it harder to do “Code” design, because it’s syntax is not an OO syntax.
I am a firm believer that all Enterprise level applications should be developed in C# and if needed C++. VB.NET is great for Rapid Application Development of front end applications. C# is geared to be a RAD code level development tool, where as VB.NET is geared to be a designer RAD development tool.
Microsoft of course says the languages are equal, but that is a marketing ploy to not loss their VB community of developers. Culturally however, in the architect and developer community, an enterprise framework coded in VB.NET is not viewed as being very credible. I have seen more VB 6 developers develop unusable code in VB.NET, than I have seen successful development since .NET has come out.
The same is true in ASP.NET. ASP developers that have not been properly trained on OOP make complete messes out of ASP.NET applications. ASP.NET site can be 10 times better than an ASP application, or 100 times worse. Many have been built without the proper training, and are ending up 100 times worse.
I always try to do what MS does, and try to avoid doing what they say to do. MS never used DNA internally. They only did that at customer sites to make it easier for them to develop. They provided Web Applications through an ISAPI filter. Now they are using C# development for any product that goes to the world. BizTalk is a good example. BizTalk 2004 has been developed in C# by Microsoft.
In truth I would be quicker to hire a 5 year veteran of Java to code C# than I would be to hire a 10 year VB 6 veteran to code VB.NET or C#. Java developers understand OOP, Most, not all, VB guys have been fooled into thinking that they understood it. By the way, I hate Java.
If I were a VB 6 guy coming to .NET, I would move to C# for a minimum of a year before going to VB.NET.
|
|
|
|
|
I would agree with everything said above, with just a couple of added points:
1. I have run across very few VB.NET programmers who knew how to use the FCL properly, and had practical OOP/OOD skills. Most of them just happened to one day stop using VS 6.0, and opened up a copy of VS.NET. They then assumed they were .NET programmers. The majority do not realize that VB.NET under the hood is a totally different machine that VB 6.0 - the similarities between them are only skin deep if you know what I mean. I would say the author of this article is an exception to this rule.
2. As I was once a VB 6.0 programmer, I know that when I was taking my classes, my instructor constantly, (even the text book) stated that I was learning OOP! When I started to make the jump to .NET and C#, I was quite upset to learn that dropping a "button object" on my form designer was not necessarily OOP.
While I prefer C#, and do not write VB.NET as I am ashamed of my VB 6.0 background , I have to say that of all the bad VB.NET code I have seen was the programmer's fault - not VB.NET. Many of the VB.NET apps I have see were simply VB 6.0 code that was cut and pasted into the VS.NET IDE - didn't even use the code migration tool. They just added some namespaces that allowed them to use the old VB 6.0 constructs or calls. They then claimed to have re-written the app in .NET. Rubbish! When it performs like a snail on a cold day, management claims .NET is the problem, not their star VB 6.0 programmer. Only when the requirements that the bad app are trying was to meet was thoroughly analyzed and a solid OO design developed, then implemented in C#, did management realize that it wasn't .NET, it WAS the programmer! But even then, it wasn't the c# code that allowed me and my team to deliver a fast, efficient, scalable app. It was the upfront requirements analysis, the time we spent learning the business rules, and the resulting design.
And I all fairness, I have seen some pretty darn bad C# code, too. For example, at a previous company I worked for, one "C# programmer" (at least that what she said she was), wrote a WebForm with one method in it. The only problem was that this method was over 4000 lines long made up of basically 20 or 30 chucks of code that were essentially the same thing, except for variable assignments. She was fired the next a few days later.
|
|
|
|
|
DasBose wrote:
"I would agree with everything said above, with just a couple of added points:"
You agree with what everything he said? Please read my response to DasBose.
DasBose wrote:
"While I prefer C#, and do not write VB.NET as I am ashamed of my VB 6.0 background"
Dude, I'm sorry but you've got issues. Please don't get offended but you must have been writing some pretty bad code in VB 6.0 because I'm sure not as hell ashamed of my VB COM background. On the contrary, COM gave me discipline, and, furthermore, my .NET transition wouldn't have been as easy had it not been for my work with COM and VB.
Thanks for the feedback
|
|
|
|
|
Dude, you took my comments the wrong way,--
I said:
"While I prefer C#, and do not write VB.NET as I am ashamed of my VB 6.0 background , I have to say that of all the bad VB.NET code I have seen was the programmer's fault - not VB.NET."
1. The VBB 6.0 comment was a joke! Did you not see the little smile face sticking tongue out in the post? Or did you just read the text email where you can't see the little smiley guy?
2. I basically backed you up when I said:
"...all the bad VB.NET code I have seen was the programmer's fault - not VB.NET..."
3. I also gave equal examples of bad C# I had ran into. Read the last paragraph that starts with:
"And I all fairness, I have seen some pretty darn bad C# code, too..."
4. I also excluded you from the batch of VB.NET programmers that I have ran into:
"...The majority do not realize that VB.NET under the hood is a totally different machine that VB 6.0 - the similarities between them are only skin deep if you know what I mean. I would say the author of this article is an exception to this rule."
Lighten up, dude
If you decide to respone, please re-read this message from the comments at the bottem of the article before you do.... ;) 
|
|
|
|
|
My sincere apologies if I offended you or misinterpreted your comments. Certainly no bad intentions involved, nor are they ever.
Thanks for your feedback and I will make sure to lighten up, although how you can possibly agree with sanderson is beyond me.
|
|
|
|
|
Well, let me clarify, for the most part, I agree with Sanderson, there a few points Sanderson makes that I am neutral on like the C++/C# for enterprise. In my experience, you leverage your developers' existing skillset when ever possible.
What I gleened from Sanderson is that a good software design up front is the key: If the design is bad, simply implementing the design C# will not make it better. If the design is sound, VB.NET will not degrade it.
In reality, I believe a .NET developer really should be functional with both languages, and strive to understand the FCL. Understand the FCL and how the CLR works, and you'll write good solid code in any .NET language...........except for Cobal.NET. I mean, hey, what's the deal with Cobal.NET? 
|
|
|
|
|
Hehehehehehe ohh maaaaaaaaan!! This is funny!! I do appreciate the author's love 4 his WheeBee.Net language though. 
|
|
|
|
|
Misty_Blue:
"Hehehehehehe ohh maaaaaaaaan!! This is funny!! I do appreciate the author's love 4 his WheeBee.Net language though."
You're very welcome, and what's up with the "WheeBee"? Ohhhh, I get it, WheeBee sounds like VB! Good One !
|
|
|
|
|
tadanderson:
First and foremost, thanks for taking the time to read the article and I appreciate your feedback, although as you are about to read, I strongly disagree with almost everything you said.
tadanderson wrote:
"All the languages lend different functional advantages when developing. The battle has always been fought on that battle field and that is the wrong battle field. It is not the IL that wins unless you are comparing C++.NET to “VB.NET and C#”. It is how the IL is achieved with VB.NET and C#, and that is in the C# and VB.NET "code" design. VB.NET is a much more dangerous language."
Yes I know there are no significant differences in MSIL code between VB and C#. I believe the final words in the article imply that. Furthermore, there's no doubt VB has an unlocked door that leads to the darkside. If you want to open it, go ahead. Otherwise, use the force. Let me decide that. Besides there's a time and place for everything.
tadanderson wrote:
"VB.NET enables the VB 6.0 developer to continue to develop in a non-OOP fashion by using extra VB namespaces provided by Microsoft that wrap other .NET namespaces. This allows for some very dangerous developing to take place when it comes to performance and coding best practices."
Err! Wrong, pardon me but the existence and use of the two VB specific namespaces, or any namespace for that matter, has absolutely nothing to do with OOP. Do you know what a namespace is? No doubt you do, so then why must I remind you that we use namespaces simply to organize types, hence, the word namespace. The functionality provided by the the two VB namespaces is NOT what causes the drift away from OOP rather it is the ability to create simple ordinary modules. At least you're half right though, because it is true that the functionality provided by the two VB namespaces is implemented by delegating the tasks to the BCL. Any good VB programmer knows what to use and what not to use from the VB namespaces given the development context. I can't speak for the compatibility namespace, because I have neved used it nor should anyone else unless context overrules. However, the other one exposes a bunch of functionality that when used appropriately, especially with UI development, is fantastic. I am sorry but your statement is completely inaccurate and has therefore assured me that you know nothing about VB, which is typical of individuals who make assertions like this.
tadanderson wrote:
"THIS IS NOT TRUE OF ALL VB.NET DEVELOPERS. Some have taken the time to learn how to avoid the VB.NET pitfalls of developing in a non OOP way. So if you are one of those guys, don’t start blasting me."
Every language has pitfalls, especially languages that have been around for a while. I cannot predict the future but I am fairly confident that when C# grows out of its diapers and reaches puberty it will have issues of its own, but who cares, since a good C# programmer will know how to deal with them, just like a good C++ programmer knows how to avoid chomping away memory like PacMan.
tadanderson wrote:
"In truth VB.NET is harder to use that C#. Because it makes it harder to do “Code” design, because it’s syntax is not an OO syntax."
Pardon my French but what the hell are you talking about? First of all, and especially within the .NET world, no one language is more difficult to learn than the other. As long as you're familiar with the CLR and BCL, moving from one language to another should be trivial, and if it's not, then you're either a hobbyist or a poor excuse of a professional programmer. Can you give some specifics how the syntax of a language is OO while an other's isn't, like you claim? This is totally absurd. Let's battle some code examples, and please be specific.
tadanderson wrote:
"I am a firm believer that all Enterprise level applications should be developed in C# and if needed C++. VB.NET is great for Rapid Application Development of front end applications. C# is geared to be a RAD code level development tool, where as VB.NET is geared to be a designer RAD development tool."
Man, you have made my day. The amount of trash you talk reminds me of myself when I first graduated from college, after over five years of having been fed tons of C++/Pascal by instructors that loved making the students laugh with VB jokes. Fortunately, soon the real world hit me, hard enough that I left behind all the academic bullshit. It's obvious by your remark that absurd "academia" is a strong factor you consider when selecting an implementation language. I myself could care less whether it's VB or C#, although lately it's been all C# ONLY because, first of all, I fortunately work in an environment where just recently policy has given the programmer the discretion to use either VB, C#, or both, for managed application development, and second, I've written so much VB code that I need a breath of C# air, and finally third, C# is awesome, but soon no doubt I'll be back coding in VB. But back to your erroneous point, please give me some specific examples that justify your claim that serious development must be done in C# and never VB. Otherwise, if you fail to do so, then no doubt academic bias is what's troubling you.
tadanderson wrote:
"Microsoft of course says the languages are equal, but that is a marketing ploy to not loss their VB community of developers. Culturally however, in the architect and developer community, an enterprise framework coded in VB.NET is not viewed as being very credible. I have seen more VB 6 developers develop unusable code in VB.NET, than I have seen successful development since .NET has come out."
Of course MS doesn't want to loose its millions of VB customers, nor will it ever loose them since VB is only getting better! Sure VB has got a bad name, especially among academics, and in many cases rightfully so, but I honestly could care less, since at interview, design, coding, and delivery times, I always make sure to clear up any misconceptions.
tadanderson wrote:
"Now they are using C# development for any product that goes to the world. BizTalk is a good example. BizTalk 2004 has been developed in C# by Microsoft."
So what if it's written in C#? So is almost the entire framework. Nothing new here.
tadanderson wrote:
"In truth I would be quicker to hire a 5 year veteran of Java to code C# than I would be to hire a 10 year VB 6 veteran to code VB.NET or C#. Java developers understand OOP, Most, not all, VB guys have been fooled into thinking that they understood it. By the way, I hate Java."
Completely disagree, as usual. I would never hire someone solely based on the programming language they've used the most. I could care less about the language. If you give me good answers to the few questions I give you, you're hired.
"If I were a VB 6 guy coming to .NET, I would move to C# for a minimum of a year before going to VB.NET."
It's obvious you're not a VB guy, given your complete ignorance of the language, so don't bother putting yourself in a VB guy's position. Just please give me some specifics as to why you think C# is a prerequisite to VB? That's just straight out silly.
|
|
|
|
|
I read the article and I found it very interesting.
Im am a professional (but not good) VB6 programmer, 48 y.o. , and I'm fighting with the idea to upgrade to .net.
Till now I was very unsure in the choice between VB and C#, now I believe that VB is the the right one.
I know that this is not the right place for this thread, but I think that the discussion about VB v. C# should also help the beginners in a constructive way.
It would be very nice if "YOU" could help "US" in this choice and maybe give some tips about the RIGHT books to buy and read.
I have another question: I own VB.NET first version and not VB.NET 2003, is this a big problem?
Thanks to everyone who writes in the code-project - you're a big help.
|
|
|
|
|
massimo wrote:
"Im am a professional (but not good) VB6 programmer, 48 y.o. , and I'm fighting with the idea to upgrade to .net."
please don't fight it any longer, .net will make your life easier regardless of the language you choose. certainly I am not implying that you MUST use .NET, that all depends. From a pure programming perspective, .NET rocks , and YES you MUST upgrade. However, and this is just my opinion, there's always a business context you MUST take into account before making these type of decisions. For example, a friend of mine from college, who is now an accountant, refuses to look at .NET and remains faithful to VB COM. Well, given his context why should he upgrade? First of all, he does not make a living programming. Second, none of his apps are "mission critical", just a couple of forms and modules (it's not a pretty sight) that do very basic things, and, furthermore, I never understood why he just didn't use Access instead of VB. Third, he could care less about OOP, web services, and a whole bunch of other "out of the .NET box" features. I don't know you so I really can't say for sure that you should upgrade to .NET, however, given the fact that you described yourself as a "professional" programmer, from that I must imply that you make a living programming. Therefore, if this is the case, then YES, by all means do upgrade. In the long run, although not in the short run, your survival may depend on it. And honestly, it's not that bad, rather it's all good, although if I were you, assuming you haven't worked with .NET 1.X yet, I would start playing with the beta 1 version of .NET 2.0 rather than spend the time with the current stuff or maybe wait for beta 2 which is coming out in a couple of weeks and which MS claims is much more stable than beta 1, and believe me beta 1 has all kinds of issues.
massimo wrote:
"Till now I was very unsure in the choice between VB and C#, now I believe that VB is the the right one."
Of course VB is the right one, it blows C# away . Seriously though, in this article I somewhat trashed C# but my comments were no doubt biased and just a nasty response to all the VB trash lots of folks around here talk. C# is an awesome language, almost as awesome as VB . Unfortunately, however, and this is just my opinion, in version 2.0 C# will have a pretty significant "language" edge over VB, and if you're interested in what this edge consists of read chapters 21 (anonymous methods), 22 (iterators), and 24 (nullable types) of the C# 2.0 specification. On the other hand, however, rest assured that VB 2005 will make your transition to .NET a whole lot easier than it would be now, one of the main reasons being the beatiful "My" facade, although I don't see myself using it much for purposes other than RAD and UI development. Honestly, one of the main objectives of the VB team for 2005 is to make it easier for VB COM programmers to make the switch, with this objective being so important that it left the VB team without time to include the "language" features I just mentioned. Remember that what makes .NET so damn cool is that you're not forced to use one language. You may want to even follow the trend and make a backwards shift and learn C# since you already know VB.
massimo wrote:
"It would be very nice if "YOU" could help "US" in this choice and maybe give some tips about the RIGHT books to buy and read.
Have you ever seen one of the many Nike commercials? If not, just do it! Don't think about it so much and just make the move. As far as books are concerned, man there are so many out there it's really hard to choose, but in line with my earlier advice, look for books that will help you get up to speed with VS.NET 2005 (.NET 2.0) and forget about the current stuff. I know right at this moment there aren't many out there that teach 2.0, however, they're sure to arrive by the dozens now that beta 2 is just around the corner, similar to what happened when beta 2 of .NET 1.0 was released. Also, if you really want to get down and dirty with .NET 2.0 I must recommend the c# 2.0 specification, although it's not the easiest reading.
massimo wrote:
"I have another question: I own VB.NET first version and not VB.NET 2003, is this a big problem?
The main difference between the two has to do with the fact that the former uses .NET 1.0 and the latter uses .NET 1.1. Whether or not it makes a difference, well that depends. To me it made a huge difference since my applications MUST be able to run on windows 98, and fortunately .NET 1.1 fixed many but not all windows 98 bugs, especially those relating to printing. And of course finally in 2003 VB was given the ability to declare the for loop counter in line with the for loop itself, a feature long over due, yet at the same time who cares other than folks like myself. In any case, like I've said one hundred times before, since you haven't jumped on the .net bandwagon yet, and this is just my humble opinion, don't waste your time with the current stuff rather jump straight into the new stuff. beta 1 baby!
thanks for taking the time to read the article and I appreciate your feedback
|
|
|
|
|
Thank you Giancarlo, that you took so much time answering my thread.
You have been very big help for me. I downloaded the Visual Basic 2005 Express from the Microsoft website and "I'll beging to upgrade to .Net 2.0". My actual VB6 project is at the moment too big to convert it, but I can start with the little auxiliary applications.
Thank you again, you have been very gentle.
|
|
|
|
|
I think you got a lot of very good advice from Giancarlo, but I would like to add one thing. If your experience does not include much object-oriented programming, and you have any interest in your own learning, I would definitely get a book or two on that subject as well.
OOP is a different way of thinking about systems and as with anything else it takes practice to get a solid practical grasp that allows you to apply the principles in a good way. But its not very difficult and once you get the hang of it many programming tasks are in fact much easier to accomplish.
The last bit, programming tasks becoming easier, is also a reason to make the switch. Even if you don't care about oop (it is possible to program in basically the same way you did in VB6, usually called structured or modular programming) there is so much functionality under one mostly consistent programming model in the .NET base class library (BCL) that this alone justifies the move.
Good luck!
|
|
|
|
|
I'm still a VB6 programer day to day as the bank I work for won't/can't upgrade to .net.
However when I tried to self tech myself bits of .net I found it very very hard to go to vb.net as I kept trying to use the old (and often incorrect) vb6 approaches.
Switching to learning C# made the process much easier, I could concentrate on learning the right way of doing things.
|
|
|
|
|