Development tools Visual C ++ vs. Delphi (3)

zhaozj2021-02-08  484

Database development: Delphi An Decree Database Support is a strong term of Delphi. This is mainly reflected in the seamless integration of Delphi and BDE, as well as the large pile of ready-made database operating controls from Delphi. This is a vc looks like it. At present, Delphi supports the three database access methods of BDE, ADO, and InterBase. All ways can be dragged into the application to implement visual operations. It is because Delphi packages for database classes, so that the user operates the database unlike to intervene from the beginning to the end of Visual C . Obviously increased the development speed.

Using the WebBroker control in Delphi can easily construct a database-based web page, manage web databases via HTML.

Visual C access data is mainly adoped by ADO and OLEDB, and many ActiveX controls can also add database functions. But there is no desktop database like Paradox, and Access is relatively too lightweight. Maybe SQL Server is a good choice.

COM: power for new technology

COM is an abbreviation for the component object model. It is the foundation of OLE and ACTIVEX technology. COM defines a set of APIs and a binary standard that makes different programming languages, and different platforms.

COM is the industry standard developed by Microsoft. However, Delphi also provides powerful language support for COM. Support interface, Variant, wide string function. These packages for COM are really more convenient than C . For example, when C (without a class frame) for COM programming, variants are defined as OAIDL.H files in the German Variant structure. To handle variants, you must manually adjust the VariantXXXXXXXX in oleaut32.dll to initialize and manage it, such as Variantinit (), Variantcopy (), VariantClear (), and more.

Visual C implements a special way to use ATL. ATL uses Visual C unique multiple inheritance to implement COM interface. Although it is not easy to implement COM services and control, the interface between ATL and the latest COM technology is stronger than Delphi. ATL is more conducive to establish a small, fast COM component program.

According to current conventional perspectives, Visual C is applied to the COM service program more advantageous, and Delphi is applied to COM components more appropriate.

Yesterday, today, the progress of tomorrow technology is many times. At the beginning, Borland's Turbo C and Borland C were almost the only choice for C / C programmers. Microsoft's Quick C (now someone knows this product?) And Microsoft C / C have never become mainstream. But how many years is Borland C ? Soon, I was pressed by the newly rising Microsoft Visual C / C . So INPRISE (original Borland) picked up the glory of Turbo Pascal and Borland Pascal (in fact the first PASCAL compiler of Borland), fully launched Delphi. Delphi is now called VB killer during initial, but VB is still very good. After all, Microsoft is a home in Basic, VB is not so easy to be defeated. Inprise thought I didn't think of VB, using Delphi IDE and VCL with C language, launched C Builder, and launched an clamping to the Visual C market. C Builder seems to be a good compromise? Think carefully! The advantages of C Builder Delphi have, but Delphi's advantage C Builder does not necessarily. For example, the compilation speed of C Builder is slower than Vc, which can be compared with Delphi? Moreover, because VCL is written by Object Pascal, the C language and VCL are not good. C Builder's bug is more than Delphi, and even in the Sample code is wrong. Partial features of the VCL cannot be used, and access to Pascal code is accessed. The third-party control available by C Builder is far from Delphi. Oh, it is really gold. Microsoft and Inprise, who will laugh in the end? Fish and bear's paw: tough choice

Choosing a development tool relies on many different factors, everyone can abandon learning or use this language because of a certain defect in some language. Any programmers want their favorite tools to achieve the ideal realm, through the imperfect comparison above, I want everyone to have their own opinions. We believe that the factors affecting you choose to develop languages ​​mainly include:

1) Which language is easier to get started?

Learning a language requires a lot of time and effort. The development cost of development procedures is a reality worth considering. A skilled Delphi programmer and a skilled VC programmer work efficiency are the same. However, becoming skilled programmers must quickly master a language skill. Unfortunately, the current skilled Visual C programmer is ten miles. Relatively speaking, Delphi is more suitable for beginners.

2) Which language has more inherited code?

The reusability of language code is to accelerate the significant development efficiency, from the early process, function to the current component technology is struggling with this goal. These two languages ​​are different for understanding of code reuse. Delphi mainly implements code reuse through VCL controls, and Visual C is more complicated.

3) The nature of language itself.

For technology (mainly referring to the application framework), Delphi is currently leading to Visual C . But the lack of stability and robustness makes me "I don't want to say that you love you". Although VC has been very perfect today, the MFC framework is already a tomorrow. If MFC is not used, there is no suitable alternative.

Do your choice based on your needs and the actual situation. In fact, Visual C and Delphi are not single competitive relationships. They do not overlap in many fields, even complementary. How to pay, to decide on your project characteristics. If you develop something on the system, it takes excellent compatibility and stability, select Visual C . You can only call various APIs of Windows, without MFC. If you write traditional Windows desktop applications, the Visual C MFC framework is "orthodox" selection; if the interface part occupies the proportion of this application code, or if there is a control of the control in Delphi, Delphi is a half-time selection. . If you develop databases for enterprises, high-level applications such as information management systems ("high-level" are relative to "low-layer / underlying", not technically advanced or low.) And have a tight time limit limit, and Delphi is better. If your familiar language is Object Pascal, it is not intended to learn complicated C , then Delphi is almost the only choice. The traditional view is: Delphi is suitable for writing Internet / Intranet, table mapping, database operation, advanced user interface, and more. Visual C is suitable for writing device drivers, COM service, scientific computing, console programs, WinCE applications, and some small tools, and more. Different requirements for the application range are well popular in these two languages. 4) Prospects and expansion of language.

Delphi is one of the flagship products of Inprise, and the prospect should be more optimistic, and Inprise is already enrolled in Linux, and Microsoft has no action. Unfortunately, the founder of Inprise Delphi has already hopped to Microsoft to host the Visual J project. I hope that INPRISE is not too big.

What is the prospect of Microsoft Visual C ? Visual Studio 7.0 is to be launched. This version will strengthen the characteristics of network development. It seems that Microsoft is judged, the development strength is not a discount.

In addition, although the MFC has been slightly behind, it is not worth learning. In fact, I don't learn MFC is equal to no learning VC. Using the MFC framework development program is still mainstream mode currently developing desktop applications, and it remains a very long time. STEVE Ballmer said. Net is still 2 ~ 3 years. Then, the MFC has at least 2 to 3 years of life space. In the technical suncelody IT world, it is a long time for 2 to 3 years. Grasp it. Even if you don't use the MFC framework, take some time to see the MFC package mechanism is also very beneficial to the OOP mechanism you are familiar with C and the Windows underlying function. The source code of VCL is Object Pascal, and there is no such "additional" for C / C programmers.

References: Programming Microsoft Visual C , 5th Edition, by Scot Wingo & George ShepherdMSDN, by Microsoft Corp.Visual C versus Delphi, by John M. JacobsonBorland C Builder 3 Unleashed, by Charlie Calvert, et al.Borland Delphi 5 - Developer's Guide , by Inprise Corp.

转载请注明原文地址:https://www.9cbs.com/read-436.html

New Post(0)