Over the years, C++ has become a very popular programming language. While C remains restricted to systems programming, C++ has been developed to become a universal language with a stronger, more static typification based on C; and it directly supports multiple programming styles.
Also, by contrast to many other programming languages, C++ is not owned by a company – many prominent individual programmers including P.J. Plauger, Bjarne Stroustrup and Pete Becker, as well as organisations such as Apple, British Standards Institute, Microsoft, IBM, Intel, Embarcadero and Google, have been involved in its further development, making it an open standards language.
C++ is used as a programming language for Microsoft Windows applications as well as for Linux based programmes.
C++ has been standardised twice by the International Organisation for Standardisation (ISO) in 1998 and 2003. In fact, C++0x, the current draft language standard, is due to be reviewed by the ISO standards committee, which will most likely yield C++11.
This language is here to stay and developers should harness its potential to quickly build interactive, user interface (UI)-oriented desktop, workstation, client server, touch-screen, kiosk and web applications. They can also modernise the look and feel of their old school C++ Windows programmes.
There are a number of C++ compilers available to developers today such as Microsoft Visual C++, IBM XLC++, Embarcadero C++ Builder, GNU C++, Apple C++, Sun C++ and Intel C++, to name a few.
These compilers vary in their level of support of the draft C++ 0x draft language; and offer developers a rapid application development environment to meet the evolving application demands of the market.
With the aid of a compiler, C++ is easily translated into native machine code, which makes it possible to generate highly efficient code. Today, C++ combines the object-orientated with the procedural, the abstract and the generic programming. It is particularly the generic programming that delivers a high degree of flexibility.
In doing so, developers have the choice and styles available to them, which can be combined at will to deliver rich functionality in applications. In fact, most of the shrink wrap software such as AutoCAD, Adobe Acrobat, Adobe PhotoShop, continue to be written in C++.
There are a number of areas that developers should particularly leverage when using a C++ compiler:
Standard Libraries, Widget Libraries and more
Some C++ compilers offer GUI visual component libraries (VCL). These are used in conjunction with the C++ Standard Library, Technical Report 1 library update and the C++ community sponsored BOOST library. Using libraries means that less direct programming is required. This significantly reduces the development time and is particularly useful when constructing small to medium applications.
Also, VCLs offer rapid prototyping ability, which helps with building rich UIs. This, supplemented with specifically written code and additional functionality with components and libraries from open source, freeware, or commercial sources, can enable developers to go from prototype to production stage very quickly.
Gesture and Touch Support
Today touch-based UIs are all the rage and already the hardware industry is beginning to respond with multi touch-capable devices. This trend will only increase and developers need to be able to respond to these demands.
Using C++ compilers, developers can not only build graphic UI, tablet, touchpad, and kiosk applications, but also easily touch-enable existing applications, by using the gesture support functionality. For instance, using gesture recognition features in compilers for Windows 7, Windows XP and Windows Vista; developers can incorporate support for input from multiple sources including mouse, stylus and touch screen, into their applications.
Database access frameworks offered by C++ compilers provide developers with native, high performance access to all the popular database management systems including Microsoft SQL Server, IBM DB2, Oracle, MySQL, Sybase SQL Anywhere, InterBase, Firebird, and more. By maximising their use, developers can easily access, create, read, update and delete data, either from the visual controls offered by the VCL or in code.
The drag and drop functionality offered by C++ compilers via ribbon controls deliver higher productivity as it allows developers to quickly build in mouse and touch screen operations, greatly enhancing the UI of applications. In most compilers, this component supports multiple Windows APIs including previous versions. These specifically help create the Microsoft Office look and feel.
Debugging and Unit Testing
Given the current state of technology, it is not possible to write fault-free programmes. While syntax errors can be found very quickly in programme creation, the content errors are much more difficult to recognise. However, a bug-free code is essential to developing quality applications. Some C++ compilers provide rich, full featured debuggers embedded in the development environment.
So when a programme in the development environment is launched, the debugger is automatically enabled. Further, developers can set conditional breakpoints, view stack traces, track variables, inspect the depths of any object, and peek into the CPU itself. Using multi-threaded debugging and debugger data visualisers, developers can further enhance their ability to create bug-free code.
Also, developers should leverage the unit testing facility offered by C++ development environments as part of their programme build.
By using Unicode data, developers easily enable their applications to seamlessly interact with users and data in any language, currency or character. Further, by utilising the language support and translation utilities, they can then easily create localised versions of their applications. All this greatly increases the global reach of applications, which is imperative in today’s business environment.
Also, developers will do well to cover support for Unicode in programmes, UIs and databases. Whilst C++ has had Unicode support in the language and the libraries for some time, it is the VCL/UI complete support for localising applications that is newer and required.
Unicode is a computing industry standard for the consistent representation and manipulation of text. It is a long-term digital code for each meaningful character or text element from all known written cultures and character systems. (Reference: the Unicode Consortium )
Industry Standard Protocols
Applications seldom reside in a vacuum. C++ compilers enable developers to easily connect to a wide variety of servers using industry standard protocols such as COM, XML, SOAP, REST and Web Services. This means that developers can connect their application to any IT infrastructure and Service Orientated Architecture.
In today’s dynamic technology environment, developers cannot afford to be locked in to a particular platform. C++, as a language, offers the flexibility to develop applications for multiple platforms.
With the backing of a number of organisations and universities, C++ is being constantly enhanced to enable the language to address new programming requirements as well as to make it easier to use for developers. C++0x is a case in point. It represents the first major improvement to the language since 1998 when the C++ language standard was approved and 2003 when the standard was updated.
C++ compilers in turn leverage the language to further enhance developers’ productivity, performance and speed to enable them to deliver modern, functionally rich applications, to meet market demands. Developers will do well to cleverly maximise their use.
Jason Vokes, Senior Director, Technologies & Marketing International, Embarcadero Technologies