Related
We're rewriting an old VB6 app in .Net and WPF. I'm going to be helping some co-workers who support the old app get up to speed in WPF and MVVM. My background is in .Net and C# so I don't know VB6, but I'd like to understand where they're coming from. What is VB6's native design pattern (assuming it has one)? Looking at the code it looks like it might be MVC, but is that right?
Was the original program a desktop program or a web program (classic ASP)?
Frameworks:
Desktop VB6 programs are similar to .Net WinForms. WPF is going to seem strange. MVVM is likely to be unfamiliar.
Classic ASP. Fairly similar to PHP, but with a way to call up DLLs. So, like PHP, some people developed organised frameworks of their own, and others wrote spaghetti. [Can anyone improve on this part of my answer?]
Do your coworkers like reading? You could recommend
Dan Appleman's excellent book for ex-VB6 programmers Moving to VB .NET. Now ten years old, but still very insightful. It doesn't cover MVVM or WPF. It targets VB.Net rather than C#, but most of it is still relevant.
Microsoft Visual Basic 6.0 Migration Resource Center (an excellent resource)
Other things to bear in mind: VB6 is an object-based language (it has objects, polymorphism, and interface inheritance through Implements, but no implementation inheritance). It is event-based, like .Net. Object lifetimes are deterministic because it uses reference counting. There are no generics.
It uses no design pattern. As a language, VB6 is a general one. The IDE and framework uses RAD approach, in procedural event driven style. The same thing applies to C#, except it uses object oriented event driven instead.
I have made an attempt to explain MVVM using VB6 here.
One tip I will like to add is with VB6 migration projects it is always best to refactor/modify code before hand. Although VB6 to VB.net conversion wizard in visual studio does a good job but there are too many pain points. Avoiding them by modifying VB6 is lot easier than fixing the issues in VB.net.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've made simple programs in C and C++ with simple compilers (learned it in university; I'm Statistics student). Also I'm amateur PHP programer.
Now I want to start programming for Windows.
apps with user interface
apps without user interface
My aim is just to see how it is done. And I might make a basic app that interacts with a database which is in a web server.
Where should I start? Windows Visual Studio? .NET? What should I know?
If you actually want to learn the underlying API then you should start off without one of the frameworks.
Learn it the way we did it all those years ago with Charles Petzold's book, Programming Windows. A really good foundation of knowledge of how windows and messages work will serve you well.
In the longer term, a good framework, e.g. WinForms, Qt, VCL etc. will increase productivity. But if you start with one of them, then you are in danger of not knowing the difference between sent and queued messages, not knowing the difference between an HWND, an HDC and a HANDLE, and so on.
A good framework, is great, but you'll get more out of it if you understand what's underneath it.
See this question:
C# GUI programming for beginners: Where to start?
Especially this answer there.
I think you should start with Windows Form, WPF is the new thing for Windows Dev and its getting all the lime light, but I would really not recommend starting off with it.
Get Visual Studio 2010 Express
See this MSDN page on Windows Forms
Programming Windows Forms by Charles Petzold is nice book (Charles is very cool) , windows forms hasn't changed all too much since Visual 2005, you should learn C# 4, the latest language.
Visual C# 2010 Step by Step is a good book to get a gist of the .NET world and all your options (including WPF)
See these SO questions:
Beginners book for .NET and C#?
https://stackoverflow.com/questions/4807574/best-c-programing-books-for-absolute-beginner-or-someone-just-starting-with-net
https://stackoverflow.com/questions/52926/beginning-c
Hope that helps.
Update
Incase you were thinking of going with C or C++ for windows development, is it not easy. I've done some Win32 API and believe me you'll be writing seriously long/complicated programs for even simple things
You have two MS options, you can just use the C or C++ language and call the Win32 API functions.
This book is the Bible for that.
The other MS option is using MFC, people have some rather strong (bad) views about MFC. I haven't done much of it myself so can't say too much.
See : https://stackoverflow.com/questions/557114/stick-with-mfc-or-go-to-net
There are of course tons of non-MS options, which again I wouldn't recommend.
See : Native Windows Application Development Options
Bottom line, in my opinion, C# is a very well done language, you will get TONs of support here, Visual Studio is one of the best tools around, and you will have fun learning C#/.NET, and the biggest advantage is you can use your C# knowledge to write even Web Apps, Cloud and Mobile apps and lots more.
I'm not sure why people don't use cross-platform GUI toolkits more often. I tend to write my GUI in Java, and transfer control over to C++ for the actual program logic. If you know about the MVC architectural pattern, you can use Java to implement the view and controller, and C++ to implement the view. If the program is simple and performance isn't critical, then I often code everything directly in Java. I've listed a few pros of cons of using Java for coding UI instead to other languages below.
Pros
Java already has a large library full of useful utilities, and is a good starting point from which one may learn other languages. There's many well-tested Swing components that are ready to use, and tutorials online that give you good starting points for many common use cases.
Check out the JogAmp website, and try out their demos. I prefer using C/C++ to do the rendering and Java only for the user-interface, but if performance is not critical, the JogAmp APIs a lot of flexibility in terms of controlling which subset of OpenGL you would like to use.
Java has extensive support for databases and servlets - check out the JDBC API.
Java is open-source, and does not restrict you to using a particular IDE (or operating system!).
Java comes with a builtin documentation generator called Javadoc, and it works really well. In fact, documentation for the JDK is generated using it.
Cons
Java is an interpreted language, so performance will typically be worse than that of other compiled languages.
Java forces you to frame your entire program logic using objected-oriented principles, even when they aren't a good fit for your particular use case (e.g. simple, one-off experiments). Sometimes your code can end up being much more verbose than it needs to be in order to accomplish a particular task.
Edit: There are plenty of resources for beginners, such as this one.
I'm going to go out on a limb and recommend C# using Visual Studio 2010 C# Express. It keeps you familiar with the C/C++ style your probably familiar with.
There are various sample codes available for download. I found them very helpful when I was starting to learn to program for windows phone.
Visual Studio works great for C#. You should probably consider creating an account with microsoft whether via outlook.com if you plan on publishing what you develop.
If you want to develop for windows 8, I would advise that you install windows 8 and develop using that.
I think you can start with C#.net and then ASP.net
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Are there still enough VB6 shops to make learning the language worthwhile?
I work for a fortune 25 company and we have a few legacy apps there were written in VB6. However all new development (in the Windows world) is strictly .NET. I would suggest learning VB.NET if you're interested in learning VB.
Computing languages don't die easily, and there are always niche markets where those skills are needed. Languages like Smalltalk, Lisp, COBOL, etc. have there loyal followers and clients that need those abilities. There will probably be some need for VB6 for a while yet.
The chief difference between VB6 and the other languages I mentioned is that the newer version of VB (VB.Net) has been declared by Microsoft to replace VB6. That tells me that VB6 will have a shrinking market as newer versions of Windows makes it near impossible to have VB6 apps that look like current modern applications.
My advice is: if you have a current need for VB6, like maintaining a legacy application, by all means learn it. The more useful you are to a company, the longer they'll keep you. If you don't have a current need for VB6 then learn the newer version of the technology. In the Microsoft world, the .NET CLR based languages are the current vision of the future. You'll also have more success finding help for problems you're facing day to day.
I do not think it is worth to learn VB6.
I work for company where main product is written in VB6 and know one another company where main product is written in VB6 too.
In both cases:
All new products/development is done in .NET (mainly VB.NET to keep syntax similar).
None of developers know VB6 when joined company.
In other words:
VB6 is probably still widely used, but companies migrate to VB.NET. Moreover VB6 is so easy to learn that you can start using it really fast with no previous experience.
I also work an Fortune 25 company with a world-wide presence and many legacy VB6 apps are still widely used through the company. Myself, I am a .NET developer and only learn as much VB6 as I need to fix a production issue or to convert something to .NET (typically C#). So no, don't invest time in learning it unless you must on the job.
I don't use vb too often - I know a lot of larger businesses (Insurance, IT you name it) who do use VB functions so managers can input data into their DB's through some kind of 'Excel' sheet.
Learning any language is worthwhile! VB is easy to understand and M$ has many libraries that are easy to use (i.e. look at connecting to Databases/creating Forms... if you're interested in what real world applications are built on it).
I've used it once for the SOAP api (very easy), and some other applications. I thought it was nice enough.
There are still companies using VB6. Where I'm active for example. But we're migrating to .NET. (the sooner the better in my opinion)
So, as mentioned by aioobe, why would you want to learn VB6? I'd say it's a waste of time and I would spend my time in, for example, VB.NET.
Unless you have a really good argument for VB6 ofcourse.
I wouldnt waste my time learning VB6. I worked with it 10 years ago and I'm still thankful everytime I look at my CV that I had the opportunity to start working in C#.NET. VB6 felt like a mickey mouse language.
You might do a search on indeed.com for "VB6" and draw your own conclusions. I find about 900 jobs there as opposed to 112,000 jobs on a search for ".net".
Google
VB6 - About 5,080,000 Results
Visual Basic 6 - About 33,700,000
Results
VB.NET - About 35,200,000 Results
Visual Basic .NET - About 20,800,000
Results
StackOverFlow
vb6 - 1920
VB6 applications are probably still used quite a lot but I believe for new development over the years VB6 has been chosen less and less as a primary platform to develop an application with people opting for .NET alternatives.
In terms of learning it, I would only do this is you need to work with old VB6 applications that will not be upgraded to .NET, or if you are upgrading VB6 applications to .NET then by all means learn it but dont waste to much time on it.
I would hazard an educated guess, based on my own experience, that there are many more programmers writing new COBOL programs than new VB6 programs. VB6 is ten years replaced and, as far as I can tell, no longer supported in any way by Microsoft.
There are still products around that are written in it (I have two myself) but Microsoft have meant to have said that Windows 8 will not work with VB6 programs, also Visual Studio 6 (required to build VB6 projects) does not easily run on Vista and Win7.
VBA is very similar in syntax and it looks like this will be supported for the next few years at least.
My advice: learn VBA if you need it, but only learn VB6 if you have a maintenance project that requires it. If you really want to learn BASIC then go for VB.NET. It is difficult to suggest other alternatives (there are lots!) unless we know about what you want to learn and why. Eg. If you wanted to learn about OOP then I think C# or Java would be better.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I hear that Visual Basic 6 is not good.
I want to make very generic program. Would Visual Basic 6 suffice?
The very first reason is that Microsoft no longer offers support for VB6 development. This product is end of life.
http://support.microsoft.com/lifecycle/?p1=2971
http://msdn.microsoft.com/en-us/vstudio/ms788708
It worked well in its time, but it doesn't have a simple path forward. If you want to migrate to a newer version of Visual Basic, it can be a fair bit of work. And no new tools are being developed for it.
If your major interest is in a cheap VB development environment, as previously mentioned, the Visual Studio Express editions are free from Microsoft.
I can't think of many good reasons to use VB6 instead of one of the express versions. Also as previously noted whatever VB skills you learn won't be particularly portable and the apps you build won't be able easily to migrate to more up-to-date environments.
I will also have a look at Real Basic. It is a cross-compiler and your applications will run on different platforms. There are many options available in the market. It all depends on what your definition of "generic program" is.
Real Basic
I have ever listen bad comments about Visual Basic 6 programming, I have written thousands of VB6 lines of code, in the same manner I have written code in object oriented languages (C++, C#, Java). But It seems to me that VB6 is a very good programming language, because it allows you to write powerful-simple applications. VB6 syntax is easier that C/C++ syntax but C#/Java aren't so much difficult that VB6. Also developing enterprise application is such new languages (Java, C#, VB.Net, Rubby) is easier that VB6 because they rely on Frameworks, every body can write C#/Java code that function, but it requires, tricks, good practices and some of imagination to write VB6 strong and rehusable code.
Many developers become quickly frustrating by using VB6 and then are happy programmers using C#/Java. All depends on practices and discipline there is no bad language, each language was designed with some purposes on mind, by selecting the appropriate language, problems solving could be easier.
Forget VB6. It's a dead system. No support, no future. Use the Visual Basic Express Edition, as suggested above. It's free, useful, and about as "generic" as it gets anymore.
Or, you could use something even better: Python (www.python.org). Or IronPython. (www.codeplex.com/IronPython).
Much better system.
If you are approaching the programming world, and you want to do some programs, Visual Basic is more than sufficient.
Once you learned it, you will keep to use it.
As Visual Basic Express (which is the version that was before called Visual Basic .NET) is given free from Microsoft, maybe you could be interested in that.
Depending on what you mean by "Generic Programs" there are plenty of other environments/languages that you can create simple apps with, even at no cost.
Visual Basic is old and no longer supported by Microsoft, sounds like you may just have access to a copy.
Yes you certainly can create generic programs with it, but where do you go from there? Is this hobby programming?
I'd say VB6 is still ok for (throw away) prototyping and probably better than VB.NET in that regard. A larger problem is the lack of true inheritance and being able to use the idioms available in .NET. As such it makes writing clean and maintainable code more difficult.
even bill gates wont suggest you to use it!! they stopped its support to make migration to newer versions faster. So now dont go and start a new project in a dead language. also there is no backward compatibility.
Like others have said, Microsoft's support for VB6 has been discontinued. But no company "supports" C, so I would say that's not really a reason inherent to the language.
Another reason is support for objected oriented programming, which may or may not be important to you. To me, it is.
VB6 is handicapped in this area. It doesn't really support interfaces. Also, arrays are some pain to work with. Checking whether an array has been properly intialized (a fairely trivial task, imho) involves some workarounds. It's not as simple as
If myArray Is Not Nothing Then ...
If you already know some Visual Basic syntax, then switching to VB.NET shouldn't be hard. You'll just have learn your way around the framework class library.
If someone tell you for any language the it's "not good" then just erase this person from your contact list.
There no good/bad languages. Horses for the courses.
As for disadvantages - you'll find such in any language.
vb 6 is very good to approach the programmation with object and to know basic structure of programming . If you understand one language you CAN know the other. Is not important only the programm language, but the FLOW of data.
Check out Xojo as a modern replacement for Visual Basic. It is as easy to use as VB6, but also build cross-platform desktop apps, web apps and iOS apps.
As far as beginner programming is concerned, I suggest to start playing around with VB6, for its BASIC programming style, GUI that is not so complicated, and a bunch of code is available online. I myself start coding using VB6.
But honest advice, if you want to find a job, start learning C++, C#, JAVA, HTML, PHP, and better yet, ANDROID DEVELOPMENT.
Even if VB6 is not suitable for our life today, you can still stick to its new generation: VISUAL STUDIO - which offers a more complex GUI, yet more flexible platform. It offers VB.NET, C# and creates your own Database with powerful connection.
Just want to thank VB6 for teaching me how to code!
Some years ago I used to program in VB6, I really liked it because it was very simply and fast, when VB.net came out, I abandoned it because they changed a lot of things.
I wonder if after all this years there's a new language or IDE that helps programming in an easier and faster way than VB6.
I'm not very interested in academic/personal issues like, very high performance, great movility through OSs, open source, etc. I would like to know if there's is something to program small and medium desktop apps. in an very easy and fast way.
Excuse me if my english isn't very clear.
Edit answering Nicholas:
Well, I must admit that I didn't try VB.Net too much, I was a little disappointed because I would had to learn a lot of new things and I've had learned VB6 not so long before (in that moment).
VB.Net is the natural progression of VB6, and has a lot of free tools and resources online to get started. Microsoft even provides a free development environment as well as a free database for development/bundling in your applications.
Check out this website for information and download links on all the free Microsoft software.
Also, you said you tried VB.Net and didn't like it-- I'd be curious to know why? Yes, there's a little learning curve, but the abundance of getting started information on the internet surely can help that. I was a bit overwhelmed by .NET at first (particularly ASP.Net) not seeing the value in switching/learning a new language.
I always felt Microsoft Access was far and away the best for this kind of requirement.
edit - I realize this isn't a politically correct answer. But the total package of a built in DB, a great GUI development package, a great report generator (far superior to crystal reports, for example), the easy development of tables and queries, all put in one friendly package, make it nearly trivial to develop with. For rapid development, it's the best I've used.
FWIW, I do Java, C++, C, VB4/6, ASP, JSP, Perl, PHP, CSS/ DHTML, JavaScript, Pascal, Fortran, Kenemy and Kurtz Basic, BAL, unix shell scripting, Oracle, mySql, RPG III, COBOL, some proprietary stuff, various macros, various distributed technology, Job control language, CPL, etc. etc. I got out of developing in Access because of scalability limitations.
Powerbasic may be to your liking -
http://www.powerbasic.com/
One of the easiest languages to learn and use is Python.
FLEX / AS3 / MXML / AIR (tnx le dorfier) comes very close to that VB6 feel from many years ago. But understands stuff like CSS and produces output that works in browsers on any platform (or desktop with AIR). You write code and run it, the coding cycle is very fast. And AS3 is at least as powerful as VB6 ever was, plus there are myriad add-ons and libraries to support all sorts of applications, all the major web-services, database interface, animation, video, 3D, auto-generation of PHP code, etc.etc.etc...
And Flex Builder 3 is free for students and educators.
alt text http://www.infoworld.com/infoworld/img/17TC-adobe-flex-builder.jpg
Python or Ruby.
Dynamic languages has a number of advantages (and disadvantages) but for what you propose they seem perfect.
I would recommend python or ruby bindings of a high level toolkit as a perfect environment. For instance Qt library gives most functionality you would need and dynamic languages let you easy experimentation
Microsoft has a new dialect of BASIC called Small Basic. From the website:
Small Basic is ... a small and easy to learn
programming language in a friendly and
inviting development environment,
Small Basic makes programming a
breeze. ...
Small Basic derives its inspiration
from the original BASIC programming
language, and is based on the
Microsoft .NET platform. It is really
small with just 15 keywords ...
The Small Basic development
environment ...provides
powerful modern environment features
like Intellisenseā¢ ...
The first two versions of VB.NET had serious shortcomings compared to Visual Basic 6. However most of these issues has been fixed since Visual Studio 2005. Today, for new projects, I feel that everything that made VB6 so easy to use is available with VB.NET plus you get new language constructs, and the .NET framework. There also refactoring, and the VB Power Pak which brings back the older simple to use print engine.
Of course there is a learning curve involved. But no more than the leap from QuickBASIC/PDS to VB 1. If you have to maintain or transfer an older project then the differences between VB6 and VB.NET are much more serious.
Finally there is the Mono Project which support the VB compiler. This provides a degree of relative immunity from Microsoft deciding to break backwards again.
You could try FreeBASIC.
It's syntax is very similar to that of VB and it is an actively worked on open-source project, it is also portable across different platforms.
You can grab a download here and there are several exemplary works that can be found here.
If it already wasn't done I'd recommend python. It's one of the easiest languages to learn.
My first language was Pascal and I think it's also one of the easiest languages and with Delphi getting popular again I think it's a very good alternative to VB6.
I've always found Delphi to be easier than VB despite popular belief.
take a look at Lua
very small core language, the whole documentation is a single (very readable) webpage. you can easily learn the basics in a weekend.
very good (small) books with good tips.
very helpful community.
very fast, both with the standard bytecode VM, and the JIT.
used a lot in games, both because it's fast and easy to embed in the application, and because it's easy to explain to players interested in extending the game.
readable sources.
MIT license, use for whatever you like, no strings attached.
Perhaps Clarion is what you're looking for? Personally, I don't have much experience with it, but you can build some nice apps with virtually no coding skills.
I think C# is a very good language to program GUI apps quick and easy.
While this might not be a complete answer to your question, I would recommend spending some time learning a more complex language (Objective-C, Java, C#, etc). With the experience you learn with OOP design patters etc, in the future you won't have to shop around for the "easiest" language to program with.
visual basic.NET is much more easier and have complete features than VB6 as I've experienced.
I recently messed around with Microsoft Lightswitch and found it extremely VB like. Very fast for binding to a database and generating forms, grids, etc.
More than 10 years after this question was asked, the best answer is...
...to continue using the VB6 programming language.
VB6 still works on Windows 10 and Windows Server 2019. Just as it has since Windows 98.
Microsoft's support policy for VB6 is here VB6 support policy