![]() |
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
|
|
C/C++ database demoWriting a whole website in C/C++ can be a nightmare. And try maintaining it. But if there is the need for that extra bit of performance, it is incomparable - short of using assembly code.C is the paradigm systems programmer's language - it can be used to do almost anything you can conceive of doing on a computer and, because it addresses the machine on a level very close to its hardware-based ('low-level') functions, it can be used to create extremely fast (and frequently very compact) programs. For these reasons, many of the important applications, operating systems and - in particular - games, that are in use today were originally implemented in C. But C is not without its flaws. It has been described as a 'write-only' language - C code is frequently very clever, but almost impossible for anyone other than the original author to decipher (and even then there can be problems). It is also not that easy to integrate with web design elements. Unlike, say, Cold Fusion, C is an example of a 'compiled' language. Scripting languages like CF, VBScript and PHP are embedded within the HTML design assets on a website. They require no special authoring systems and their functioning is easy to interpret. C, on the other hand (like Visual Basic, another compiled language), being a 'classic' computer language, does exactly the reverse. HTML content is generally embedded in the C source code. This code must then be compiled to give an executable file that embodies the web functions. (A further problem is that C is not the world's greatest text-processing language - this is why Perl found an early niche in web programming as a Unix-based complement to C/C++ programs.) We would not normally recommend the use of C to create a simple database example like the demo here (although this is as functional as any of the others we have created - it is fully integrated with the same database they are using). So why bother with it at all in a web context? Quite simply - Special Circumstances. Few people would consider implementing an entire site in C, but there can be situations where high performance or high-level access to the operating system are needed, and/or where budgets and sales permit (an important example is in the creation of packages or add-ons that will be used by many users, be these commercial, shareware or freeware) Our add-ons for Cold Fusion are such examples. And, with the language's unparalleled number crunching abilities, it may be important to consider commissioning C/C++ modules if you are doing a lot of calculations.
Note 1: The grandparent of web programming languages is an almost-dead language called Algol. The greatgrandparent is the Ur-language, Fortran - still very much alive. Between them, these two gave rise to Basic and Pascal as well as C.
|