C ++ or php website development language?

I want to create a forum like a website. I know C, C ++ well, but I have not used it in web development. I know a little PHP. What language should I use?

+4
source share
7 answers

C ++ can and has been used to successfully create highly scalable web applications. However, one of the main reasons C ++ is not so popular in this category is the lack of standard tools and libraries. There is simply no library with rich functionality that includes all the necessary boiler plate code needed to write web applications.

PHP is all that C ++ does not have when it comes to web development - a high-level scripting language designed primarily for web development. The PHP description on the home page sums up nicely:

PHP is a widely used universal scripting language that is especially suitable for web development and can be embedded in HTML.

If you are developing a simple forum, this solution is no problem: PHP. In addition to the obvious benefits of using it, you'll find familiar syntax like C-like. However, if you have all the time in the world, you feel brave, and this is for the sake of a hobby, do it with C ++!

+10
source

Of these, for web development, PHP is for sure.

+4
source

C and C ++ are not the right choice for development on the Internet, so if you know PHP it's better. also you can try python, ASP.net etc.

+1
source

To add most hosting, it does not support C ++, and they will not be in most cases, so if you were me, I would go to PHP and almost (almost) all hosting services support it. Also, the lack of features for web development in C ++ is also a shorthand.

+1
source

Actually, I wonder why you are not going to use both options! Use PHP for the web interface and write custom C ++ methods for the more complex actions you want to take. (Although PHP can handle most of them, too.) Basically, it will require less knowledge of PHP, and your knowledge in C ++ remains useful.

Keep in mind the limitations of hosting your web host if you are not going to host your site on your own system.

Also, understand that using C ++ for web development will limit you to the more general C ++ libraries. C ++ can be used to write platform-independent code, just like PHP. But not all libraries are supported on each platform.

Finally, PHP is already a powerful language, and there are many add-ons for PHP that you can reuse instead of writing yourself. However, most of PHP and all add-ins are written in C ++, although many simply forget that the code behind PHP had to be written in some language. Image processing, encryption, complex math, etc. All this has been done before for PHP. But this should not stop you from writing your own extensions ...

0
source

PHP, Python, ASP, JSP, C # .net should all work

0
source

C ++ is not commonly used for this purpose. Most hosting providers will not allow you to run your own executable files created by C ++ for security reasons (although I suspect that this would be manageable with finely configured rights) and portability (for example, you would need to find out which OS is shared the webserver host starts up and possibly installs additional libraries).

Even if you have your own dedicated server with root access, it will still be difficult to properly integrate the executable as CGI into Apache or IIS.

If you are not involved with PHP or C / C ++ for some other reason, you can also try C #. Selection of C # from C ++ is very simple, and ASP.NET allows you to write a complete site in C #. With ASP.NET MVC, you even have an MVC framework comparable in performance to Ruby on rails. Many hosting providers support ASP.NET through Mono, you can even host ASP.NET websites on Linux (I do this using my blog;))

0
source

All Articles