I just finished a class in C++ and was curious if there are any web programming languages that are similar to C++, so it will be easier to get a head start on. Look forward to hearing and happy holidays.

Thanks

Robert Bateman

12-29-2006, 07:03 PM

php is possible i guess.

AzHisoka

12-29-2006, 08:29 PM

Well, Perl is object oriented such as C++, PhP.. it's more a scripting language.. However, the language most similar to C++ is Java.. now Java is a desktop app language, but it can also be used to create web applications (servlets, etc). Download TomCat Apache and start playing around with it if u want to get a feel for it ^_^

vivaladan

12-30-2006, 01:12 PM

I would recommend using C# in ASP.NET for you web programming. Although C# isn't C++, it's within the C family so retains the same syntax. Much more updated and modern programming language and with all Microsofts documentation like MSDN I tihnk it's a good thing to try. I've dabbled with PHP but didn't really get very far with it. Although I've never tried ASP.NET web programming I do have a fair bit of experienne with Visual Studio and I think it will be very good for you.

fred_lemaster

01-02-2007, 12:53 AM

You could always use C++ with CGI (common gateway interface) to do web programming with C++ . That's what some of the big .coms use.

salmonmoose

01-02-2007, 01:44 AM

I personally wouldn't step outside PHP or Ruby. Whilst you can technically develop a web application in any language that can push data to a TCPIP stack, these languages are designed to work with webpages.

We use PHP here, and coding on the same page as the HTML and not having to compile means that our designers are free to edit the pages without having to know the ins and outs of coding.

It can work as an object oriented language, but can also work as a simple scripting language, meaning you can bash together something quick and nasty or quite elegant, and unlike many higher level languages like C#, it has very strong support for strings, mysql and html, whats more, it's free :)

darktding

01-02-2007, 03:29 AM

I heard that youtube's backend is python. Also I beleive the creator works at google now, dont quote me on this but I have a feeling that some of google's api stuff is probably python (I maybe wrong )... and yes python has good support for tcp/ip, protocols and plugs very nicely to php, asp, etc or what have you.

-Vormav-

01-02-2007, 06:57 AM

C# (for ASP.NET) is probably about the closest thing you'll get to C++. The framework for working with the web actually makes it quite tolerable. It's probably the best of the compiled langauges for web work, in my opinion.
But it can take awhile to get things up and running. And not only is it not really necessary (most of the time), but I think you'll find a far better setup with other languages.

Ruby is my favorite. I wouldn't call it similar to C++, but if you can handle C++, you should have no trouble picking it up. It's particularly nice if you use the Rails framework, but then you'd also have to learn your way around Rails as well. But it's definitely worth it, if you end up doing a lot of web work.
Python is alright. It's a nice language, just not my first choice for anything web-related. You'll really need to learn one of the Python web frameworks for Python to be of any use to you for web development, unless you want to go through a lot of grunt work first. But there are some good ones. Django, for instance. Turbogears is supposed to be good, too.

But for a quick start into things, I think PHP is the easiest way to go. It has a simple C-style syntax, and is just terribly easy to learn. Probably helps that it's one of the most widely used web languages right now, if not the most common.

Personally, I'd go with Ruby. Though strange at first, it quickly becomes one of the easiest and quickest languages to program with. And at the very least, maybe it can give you some new ways of thinking about programming. Or if you want to go with something that's more widely supported and easier to get into it, PHP is a safe bet.

mastergohan

01-07-2007, 03:35 AM

hmm..I'd say Java. From what i've heard, 90% of C++ and Java is the same. I'm not sure of all the differences, but I know for sure that Java doesn't have pointers.

vivaladan

01-07-2007, 11:34 AM

Although I haven't written any formal Java before, I can reconise it's code. With most modern languages it's part of the C family so similar in syntax to C++, C# and probably more that I don't know of. Java script has widespread use in webpages for client side processing. Stuff like menus on a webpage. Java server pages however which you would need to create full dynamic webpages isn't really used that much. The main big two for the web is ASP/ASP.NET or PHP. AJAX is getting a big thing if you wanta look into that but i don't know much about it. Plus Ruby on Rails. I'm hereing alot about that too.

gga

01-08-2007, 03:00 AM

Hey guys,
I just finished a class in C++ and was curious if there are any web programming languages that are similar to C++, so it will be easier to get a head start on. Look forward to hearing and happy holidays.

Hmm... you probably should be more specific about what you are trying to do. Unfortunately, more than likely is that you are not going to find what you are looking for.
I'll give you a quick run-down.

Java and C# are the languages most similar to C++ that can also do some web programming. Just like C++, they are static languages that require a compilation step. They are also very fast and have a syntax similar to C++ (but with much simpler to use OO).
Note, however, that unless you require a lot of fast number crunching, C# and Java are in general overkill for most web tasks, and will, more likely than not, make you work slower and make it harder to support your web site.

For most web programming, you are better using a dynamic language (also known as scripting languages) rather than a compiled language like Java, C# or C++. Even the slowest scripting language is usually well suited for most web tasks.

From the scripting languages used on the web...

PHP, Perl and, to a lesser extent, Javascript have *some* syntax similarities to C (use of semicolons, {} delimiters, . and -> for member function invokations, etc), and are or have been popular web languages for some tasks.

Ruby, albeit it uses quite a different syntax, is certainly one of the best choices you can make for web programming today as Ruby on Rails is probably the best and easiest web framework you can pick today (and also one of the nicest languages).

Overall, your choice could be dictated more for kind of web site you are lookin for (and what your web hosting service supports):

PHP: excels at creating web forums (like this one), as there are several good ones -- free and commercial ones. Somewhat poor OO support (particularly PHP4).
Ruby: excels at creating web sites backed by a database. Top-notch OO support.
Perl: a tad on the decline now, it used to power the web in its early beginnings. Perl is known for its convoluted OO support.

Javascript is usually not used as a server language, but it is more or less in a league of its own as a client language and you'll probably will have to deal with it eventually. The reason is that Javascript is a scripting language that is embedded with most browsers these days, and it is now slowly evolving into becoming more like a GUI toolkit for a more interactive web experience (what's usually referred as AJAX). AJAX allows you to create interactive menus, basic drag and drop support, and is in general multi-platform.

Finally, Macromedia's Flash is its own propietary variation of Javascript, that comes with a very nice toolkit for animations, etc. with a nice GUI for web creation but forces your users to download and install Flash (which is still not available on all platforms like Linux). Flash is probably the best choice if you are trying to create something more interactive like, say, a game to be played on the web. It is probably not well suited for database work.

salmonmoose

01-08-2007, 03:07 AM

Actionscript and Javascript are soon to be essentially the same thing; Wise move by Adobe.

There is also C++/CLI (http://en.wikipedia.org/wiki/C%2B%2B/CLI), managed C++ for .net framework.

scorpion007

02-06-2007, 10:22 AM

Why someone would want to use C++ for web programming is beyond me. Do you really need such complexity? Do you really want to manage your own memory and crash the webserver if you make a mistake? I hope not. Its almost like painting your house with a toothbrush.

Use PHP, Apache, (My|Pg)SQL. Stick to open source technologies for these things, they kick the sh*t out of MS proprietory crap.

CGTalk Moderation

02-06-2007, 10:22 AM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.