Can C++ develop web-based applications? RRS feed

  • Question

  • Hi, All

    New to C++ programming. and have put resource in C++ and VC books and time learning it. But now I  was told that C++ can not develop web based apllications. Is this true or some extensions of C++ can go around this limit?

    I need develop a web-based database, so the users can input company names, location,   phone numbers. etc. and the users can have a full text search on this database.

    Do I have to learn C# and and SQL to do this?



    Wednesday, January 25, 2006 1:46 AM


All replies

  • You need to learn SQL no matter what. 

    You can write web apps using VBscript and C++, that's call ASP.  It really sucks.  You should learn C# and ASP.NET, you'll find the jump from c++ pretty easy, because the syntax is very similar.   And ADO.NET beats the hell out of ADO.



    Wednesday, January 25, 2006 1:50 AM
  • Hi, Cgraus, thanks for the input. Looks like C# is lan. tool  that holds future.

    But switch is not that easy. I noticed a developer site done a survey, saying C but not c++ is the second of top 20 lan tools used today, guess that the old habits holds.

    But looks to me Microsoft is made up its mind to flagship C#, not C++,  since most recent samples are in C#. Am I right on this?

    Wednesday, January 25, 2006 2:08 AM
  • As far as I know, it's not possible to write ASP.NET sites in C++.  Switching IS easy, the syntax is very similar.  There will always be a survey that supports whatever conclusion anyone wants to push.  You will find plenty of samples for ASP.NEt in C# and VB.NET.  VB is a nightmare for a C++ developer, because the syntax is a mess.  At least, that's how I find it.


    Wednesday, January 25, 2006 2:13 AM
  • Thanks.

    Can you suggest me some ASP.NET and C#  web links which have good tutorials ?

    Wednesday, January 25, 2006 3:01 AM
  • The real power comes in using both C# and C++. ATLServer can be used with ASP.NET where performance is critical and the nice thing is its based more on web services rather than COM.

    I agree with cgraus about VB, it nearly made me go blind, one side is blue and the other is black, I just couldn't focus.

    Wednesday, January 25, 2006 3:08 AM
  • If ATL server(server?) can develop COM objects like Automation Server(like the one you mentioned?) and Active X controls, can ATL be used to develop web based database that allow users' input, transaction,  search, or all main attributes that a web database should have?
    Wednesday, January 25, 2006 3:20 AM
  • Its got loads of stuff. It's all about web sevices.


    The only reason I mentioned it is because I was thinking if it would be any good for gaming since DirectPlay is being phased out.

    I doubt if you'd need in most cases, but as a C++ programmer it seems pretty handy.

    Wednesday, January 25, 2006 4:52 AM
  • Thanks, BH

    I'm just off the wikipedia site, reading on the concept of CLI, Bytecode, JIT, Managed C++, etc.  It jdawns on me that Microsoft's .NET Framework( still a key part of VS 2005)makes C++ no longer a precompiled Lan tool anymore! The C++ code is precompiled by .NET engine to Bytecode, which is transmitted to the user, then translated into machine code by .NET virtual machine on the users's computer, just before runtime. (Just In Time-- JIT)

    This is exactly like what Java does. So .NET Framework makes C++ like Java?

    Here is my question, if .NET Framework makes C++ portable now, why bother with C#? as web tool creating ADO.NET or ASP.NET applycations?

    Can I stay with C++ to creat a powerful ASP.Net apps?


    Wednesday, January 25, 2006 5:44 AM
  • Server side while something like C# for the user interface maybe, you'll find that some of the .Net web stuff written i C++ is actually converted to C#, that's why I said both. ATL Server is unmanaged but it runs on the same principle of making it easier to use. All these things in the end are tools, the more tools you have in your tool box the more valuable you are and the easier your job becomes.

    You here people say things like C is rubbish because of OOP, but if someone said to you that they have a few 8051 micro-controllers that they wanted you to program then suddenly C is your best friend because these high-level languages are of no real use for real low level programming.

    I had to learn how to program in a Basic style language so I could make a simple timer with a Parrallax chip for an artist who made this metallic flower where the petals mimicked the time as they opened and closed. Since I knew about loops and the like it wasn't that hard to read up on what to do and in the end I made myself some money.

    Wednesday, January 25, 2006 6:53 AM
  • "All these things in the end are tools, the more tools you have in your tool box the more valuable you are and the easier your job becomes."

    You said that.

    A universal tool might not cut it in a particular situation like you mentioned.

    Wednesday, January 25, 2006 7:16 AM
  • thanks for the links.
    Thursday, January 26, 2006 1:18 AM
  • For inline code and for code-behind, you have to use either C# or VB (both are similar languages). But you can put most of your core code in managed or mixed-mode DLLs written in C++.
    Friday, January 27, 2006 2:13 AM
  • *grin* G'day Nish.  Really, why would anyone want to do this, except to support a legacy system ?


    Friday, January 27, 2006 2:15 AM
  • Hi, Nish

    Thanks for the lead to your web.  I checked your post on MFC(if there is future). I dropped C++  learning six years ago. So now I'm trying to minimize learning curve and resource before diving into anything. From what I've checked,  MFC , RIGHT NOW, holds certain advantage in some aspect of windows programming, take wiinsock as an example.

    But I'm afraid if learning curve in MFC( complexity in design and learning ) is harder than that of other competing methodology. It just might be another loser to the law of efficiency.

    I understand your passion in your post for MFC, but if not many developers get involved to change it.(I mean make it efficient, or can it be done?) We likely see it is dwindling faster than our attachment to it..

    Another BIGGER problem, MFC's originator, the sole proprietor is now having second thought on MFC, Everyone can see that Microsoft is no longer pushing as hard as before, despite of its “gestured” statement on MFC.


    Friday, January 27, 2006 6:02 AM
  •  cgraus wrote:

    *grin* G'day Nish.  Really, why would anyone want to do this, except to support a legacy system ?


    Three letters - S T L

    The .NET collections are a toy version of what C++ programmers have had for nearly 10 years.  .NET 2.0 got it way better than 1.x, but if you need to do anything other than simple containment, System.Collections{.Generic} will leave you sorely wanting if you're accustomed to having the STL at your fingertips.

    OK, more than 3 letters.  Where it really counts, you'll still get better performance out of well written C++ than the best written C# in most cases.

    Saturday, January 28, 2006 5:20 AM
  • I would agree 100% that the STL leaves the .NET library far behind.  It DOES indeed leave me sorely wanting, because I had the STL at my fingertips for many years.

    Having said that, I started web development as 'the C++ guy', writing all the COM code that our ASP pages would call.  That was fine, for what it was, but IMO it was no way to design a system.  Sure, one could build pages in ASP.NET and do the business layer in C++, in fact the system I've been working on for the last few years started that way. 

    However, while accepting the fact that C++ is faster, I still would not consider doing my business logic in C++ unless I saw a need first, if C# failed me in terms of speed or anything else.  It simply makes no sense to me to reach for C++ for my business logic, just because that's how I've always done things, or because I like the STL.

    And FWIW, I saw this as someone who still does a lot of C++ work, and enjoys it a lot.


    Sunday, January 29, 2006 9:07 PM