Which web-development language is best for a C pro

2020-07-21 05:25发布

Question

I program in C (ANSI C89/ISO C90) in a *n*x environment on a regular basis. I am now in a position where it would be beneficial for me to learn a web-development language. In particular, I'm looking to learn a language which:

  1. ...exploits my background as a C programmer.
  2. ...can produce the level of interactiveness of a web-site like stackoverflow.com.

I hear many good things about PHP. Do any of you have other suggestions?

Notes

  1. Other languages I am familiar with: Java, Perl, Tcsh, and Scheme.
  2. I forgot to mention that I'm interested in learning a web-development language which is capable of doing things on the client-side. I'm sorry if this was unclear.
  3. I plan to use my knowledge of the language to develop a web-site which is stylistically similar to stackoverflow.com (with a very different concept, of course).

标签: php c
13条回答
▲ chillily
2楼-- · 2020-07-21 05:37

With Perl and C background I would think that PHP is going to come easy. The learn about frameworks and that sort of things.

查看更多
何必那么认真
3楼-- · 2020-07-21 05:38

By far, I would recommend C#. OOP in it is amazing, and you can easily work with Design Patterns well. It is built from the ground up to be OOP. It is also a {} language.

查看更多
走好不送
4楼-- · 2020-07-21 05:40

If you're a good C programmer, why not simply continue to code in C? There are valid reasons to use a different programming language, but just because you are going to be coding for the web is not one of them. There are two popular ways to use C for web development:

  • (F)CGI, where data is passed in the environment and on the command line
  • Write your own mini-webserver that either talks to port 80, or some higher port and use mod_proxy or nginx
查看更多
手持菜刀,她持情操
5楼-- · 2020-07-21 05:40

I worked with several colleagues who've learned PHP after C and/or JAVA. They are really happy with it. If you want to be a .net guy and hve knowledge about that environments, you'll find the C# familiar, but for me, it is full of l'art pour l'art stuff.

查看更多
祖国的老花朵
6楼-- · 2020-07-21 05:49

If you already know C, Perl and Java then in all honesty you already know PHP, you just don't know it yet. Make sense? Perhaps not. But it will once you start playing with it.

You don't say why you're learning a Web development language or what it's for. That's key information in providing any sort of recommendation like this. In the absence of such information I would suggest PHP for several reasons:

  • It's Web-centric;
  • It's extremely popular. Finding answers to problems is very easy;
  • It's very easy to learn (you already know C, Perl, and Java, but its easy even if you didn't)
  • As Cal Henderson put it in his keynote "Why I Hate Django" (at DjangoCon 2008 no less) "PHP is a serious language". It powers 4 of the top 20 sites on the internet (Wikipedia, Flickr, Facebook and one other I forget;
  • It's not too dissimilar to Perl although Perl does have a somewhat differen typing system and regular expressions are more first-class in Perl. Plus PHP doesn't have the $_ operator but in spite of all that there are many similarities;
  • As a dynamic scripted language, it'll help you get out of the strongly-typed mould, which should make for a bit of a change and useful experience;
  • In spite of PHP supporting objects (I subscribe to the view that PHP is not object-oriented), most PHP is written in a procedural fashion, making it more familiar to the C programmer;
  • It has an incredibly rich set of libraries;
  • Requiring only Apache, it's extremely lightweight and, as a result, hosting is extraordinarily cheap compared to Java or ASP.NET hosting; and
  • There is something satisfying about just saving your text file and clicking reload on your browser to see what happens rather than having separate compile, build and deployment steps.
查看更多
家丑人穷心不美
7楼-- · 2020-07-21 05:51

You need to consider both language and platform. ASP.NET MVC in C# would be my recommendation. The syntax will be very familiar. MVC is a good pattern with support for jQuery baked in, giving you good cross-browser support for javascript. MVC also gives you a lot more control over the HTML that's generated. It is, in fact, the platform the SO is based on.

查看更多
登录 后发表回答