Analysis and Summary of the current mainstream development technologies to the monopoly)-dedicated to the brothers in confusion

Source: Internet
Author: User
Tags virtual environment
Now let's start my text. First, let me complete the first goal of this article: Introduce and evaluate the current mainstream technologies. I am referring to the following mainstream technologies:

* Programming language: C ++/Delphi (originally objectpascal, but for simplicity, I should confuse the language with the tool)/Java/C # (although he just launched, however, because Microsoft has devoted a lot of effort to it, it will certainly become an important development language)

* Desktop application framework: MFC/VCL

* Enterprise application framework: windowsdna/J2EE/. net

* COM technology: I propose this technology separately because it cannot be simply regarded as a language, desktop application framework, or enterprise application framework. It has something to do with it.

2.1 Programming Language

2.1.1 C ++ language evolution

It's too far away to start with binary code and assembly. Let's start with the process-oriented language (including basic/C/FORTRAN/Pascal ). This process-oriented High-level language has finally brought computers into common application fields. The C language makes great software such as UNIX and Windows because of its simplicity and flexibility.

Object-oriented language is a logical evolution of computer languages, because it provides a better way to organize data without too much influence on efficiency and simplicity, it makes the program easier to understand and manage. This may lead to different opinions, but C ++ makes the C language's territory smaller and smaller, today's living computer languages are more or less object-oriented, so this does not cause too much confusion. The success of C ++ is largely attributed to C. C ++ is a logical product of its appearance today. Because in the process-oriented era, C has almost unified the world. Today's well-known languages like Java/C # have learned a lot from C. C # originally meant C ++. In fact, C ++ once had a good reason to unify the object-oriented programming language, but it is a pity that C ++ is too complicated. Even a skilled programmer may have a headache if you want to explain some problems clearly. For example:

What are the differences and connections between = overload/member Conversion Function/copy constructor/conversion constructor?

Define a class member function PRIVATE: virtualvoidmemfun () = 0; what does it mean?

INT (* X (INT) [4]) (double); what does it mean?

There are other features, such as typedef and macros that can be used to create a new language (although macros are not part of C ++, they are closely related to c ++ ), A memory problem that allows you to throw accidentally (as long as new and delete are enough? Is there a situation where an object is stored in a container ?)...... C ++ is so complex that it takes a long time to learn it, and you will find that even if you have been using C ++ for several years, you will also find that there are often new things to learn. You want to solve a problem in the application field-for example, querying data from the database and changing data, but you need to have a headache for C ++ for a while. Yes, you are proficient in C ++. You can easily answer my questions, but have you ever wondered how much you have paid? I don't want to condemn C ++ too much. I like C ++ myself. I even suggest a programmer who carefully develops common application systems to learn about C ++, some features in C ++, such as pointer operations, templates, and STL, are almost confusing. Macros can use a few characters to replace a lot of code. For system-level programmers, c ++ is irreplaceable. Java virtual machines are written in C ++. C ++ will continue to exist and have vigorous vitality.

2.1.2 Java and C #

Java and C # have two major differences with C ++: the first is that they run in a virtual environment, and the second is that the syntax is simple. For developers, Java and C # can be considered the same language in terms of syntax and language mechanism. C # It is more a political product than a technical product. If Sun is not difficult for Microsoft, I think Microsoft will not bother to launch a C ++ similar to Java. Do you remember Visual J ++? Do you remember WFC? Look at those things and you will know how much effort Microsoft has devoted to Java. In addition, from a broader perspective, the two are very similar-C # and Java are facing the same problem, which is oriented to the application field: transaction processing, remote access, WebService, web page publishing, and graphical interface. So in this section, I will use the Java name to refer to the Java and C # languages for the moment-although the two are indeed different in details. Java is a language suitable for solving problems in the application field. The biggest reason is that Java is very simple for users. Think about how long it takes you to learn and use Java, and how long it takes you to learn and use C ++. Java largely shields memory management issues, and there are not so many special content defined for minor performance improvements (for example, there is no keyword "virtual" in Java, java does not allow you to create objects directly on the stack. Java clearly distinguishes bool and integer variables.) It allows you to operate everything in the same way as possible, except for the basic data type, all things are objects and you must reference them. In addition, Java also provides a wide range of class libraries to help you solve application problems-because they are application-oriented languages, it provides you with multi-threaded, JDBC, and GUI standards, which do not exist in C ++, because C ++ is not directly oriented to users who solve application problems, some people try to add this content to C ++, but it is not successful because C ++ is too complicated, using this complex language to implement this complex application framework is itself a tough task, and we will mention this attempt-COM technology later. Gradually, people will not use C ++ to develop software in the application field. Something like MFC/QT/COM will eventually exit the stage of history.

2.1.3 Delphi

Delphi is an intermediate product from developing an application system with C ++ to developing an application system with Java. It is simpler than C ++, and simpler is almost the same as Java, because it is simple, it is possible to define and use a wide range of class libraries, and Delphi has done the same, the result is VCL and other component libraries. On the other hand, it is more efficient than the Java running in the virtual environment, so that in the balance between simplicity and efficiency, Delphi finds its own living space. In addition, it is expected that this space will still exist in the future. Obviously, Microsoft gave up this field and focused on two aspects: the system Language C ++ and the future Java (actually. net ). Perhaps this is a lucky thing for Borland. If I could give Borland some advice, I would not make Delphi more and more complex. If so, I would just drive my users to the territory of C ++ or Java. Users of Delphi and Delphi will survive well until the virtual machine does not ultimately occupy all application development fields.

2.2 desktop application framework

At present, there are only two truly successful desktop application frameworks, one being MFC, the other being VCL, and some others, but they have not actually entered the application field. Unfortunately, I am not proficient in both desktop application frameworks. However, this does not prevent me from making correct comments on him.

2.2.1 MFC

MFC (also known as OWL) is the result of the normal evolution of SDK programming, just as C ++ is the result of C evolution. MFC itself is a great but not so successful piece, and it is outdated. This is my conclusion. MFC embodies the wisdom of many geniuses-of course, the same is true for Owl and VCL. Hou Jie's "Let's get down to MFC" puts these wisdom in front of us. However, it is estimated that no one will feel very comfortable using this item. If you have been using Java, VB, or Delphi and then use MFC, the uncomfortable feeling will become more intense. I cannot explain why MFC does not ultimately develop a desktop framework that is as simple and easy to use as VCL. It may be that Microsoft has no energy or motivation. In short, MFC is like that, and there will be no further development, and it has been abandoned. I sometimes think that it may be wrong to develop something like MFC based on a complex language such as C ++-you can develop such a framework, however, people who use it should not be familiar with the entire framework before they can use the system. However, obviously, if you do not understand the internal mechanism of MFC, it is unlikely to use it well, I cannot explain why this problem occurs.

2.2.2 VCL

In contrast, VCL is much more successful. I believe that many people who use VCL may not have studied the internal mechanism of VCL as hard as the MFC users have studied MFC. But this does not prevent them from developing good-looking applications. This is enough. What else can be said? VCL provides a simple and consistent mechanism for you to write complex applications. As mentioned in the Borland story by Li Wei, after Borland C ++ 3.1 was launched, Borland was proposed to develop software similar to C ++ builder. Yes. If C ++ builder appeared at that time, what would happen to the software development field today? It is really hard to imagine. Maybe in a while, these will be no longer important. Because new languages such as Java and C # provide desktop application frameworks similar to VCL. At that time, with the simplicity of Java and C #, if their speed was sufficient, the language of Delphi would disappear. What is the argument? But for today's desktop developers, VCL is indeed the best choice.

2.3 Enterprise Application Framework

2.3.1 Windows DNA

The origin of Windows DNA cannot be explored. With the launch of. net, Windows DNA will become a historical phenomenon. Although Windows DNA is a term that almost all enterprise application developers know, I believe that the most widely used Windows DNA is ASP rather than COM +. How many people really master com development, let alone COM + (I need to explain that COM + is the execution environment of COM, it provides a series of basic services such as transaction processing and security, allowing application developers to spend as little effort as possible on infrastructure design) -- of course, the com development I mentioned here does not refer to the com development under VB. Therefore, it is because I don't think C ++ can be used for com development, therefore, we cannot really understand the COM technology. If a technology is not widely understood and used as a sign of failure, Windows DNA actually fails, but it is not its own fault, it is caused by the failure of C ++-based COM technology. The concept of separation of multi-layer applications and system development roles is still not outdated.

2.3.2 J2EE

J2EE is the first successful enterprise application development framework. It brings the concepts of transaction processing, remote access, and security into ordinary people's homes. I think this success is due to Java's simplicity. Java is as important as J2EE container vendors. Developing a Java-based application server is easier than developing a C ++-based application server. In addition, due to the simplicity of Java, there will be fewer opportunities for application system developers to make mistakes and will not suffer as many setbacks as those of C ++ developers. Java-based enterprise application systems can be developed in a shorter cycle. This is an indisputable fact. In any case, J2EE makes transaction processing, remote access, and security almost all of these concepts used in financial systems and are also used by general enterprise users for benefits.

2.3.3. net

Is there anything to say about. Net? In fact, it is only Microsoft's J2EE. Transaction processing, security, and remote access are all found in. net. More effectively, Microsoft also uses. Net to implement a PetStore. Therefore,. NET and J2EE are almost equivalent. However, Microsoft is indeed a respectable company-I mean technically, something like web form. I believe many web application developers have dreamed of or even implemented it on their own, but Sun has been indifferent, and it seems that Borland has not made too much effort for it. It seems that there have been similar things, but it is definitely not very successful-Borland is already admirable, we may not be able to ask too much.

2.4 COM technology

Com should be a broader term. In fact, I think axtive X, Ole, auto mation, and COM + should all be mentioned, because if you do not understand COM, you cannot understand the above. Besides, I just want to explain that com is a technology that is about to die out. Just talking about the complexity of COM and its problems is enough, so I won't mention those things. Why does COM technology appear? The fundamental goal of COM is to achieve binary re-use of code to achieve software componentization and division of software development work. This requires him to do two things: first, to be able to span different languages, and second, to span different compilers in the same language. COM technology has paid a heavy price for this goal, especially to span different compilers, so that it is a painful Technology for users and developers. But fortunately, it's all about to end.

Let's start with this purpose to see why COM is what it looks like now. In fact, COM is not a new thing. The initial DLL is the technology to reuse binary code. Dll may be good in the C era, but it won't work in the C ++ era. The reason is that if you are in. the class definition (adding or removing member variables) is changed in the H file. The code of the user in the code library must be re-compiled, otherwise, your code will allocate memory for your new class according to the structure of your old class. What are the consequences. This is why the interface inheritance and operation of objects through interfaces become the mandatory specification of COM, and the ability to organize code through objects is an important effort of COM. So what is the well-known iunknown interface? This is to allow C ++ developers using different compilers to share the fruits of their work.

First, let's look at QueryInterface. Because COM is based on interfaces, a class may implement several interfaces. for users, you can only operate classes through the operation interfaces, in this way, do you have to shape the class into a specific interface using dynamic_cast? No, because it is related to the compiler, so we have to put it in the implementation code of the class, which is the origin of QueryInterface. As for addref and release, the first reason they generated is that the delete operation requires a class to have a virtual destructor (otherwise, the destructor of the parent class will not be called), but unfortunately, the positions of the destructor in vtbl are different in different compilers, this means that you cannot allow users to directly call Delete, so your COM object must provide its own method to delete it. The other reason is that a COM object may be used by users as several interfaces at the same time, if a user deletes an interface, other interfaces cannot be used, we have to ask the user to notify the COM Object "I want to use you, you have an additional user" Through addref when they want to use an interface ", instead, call release to tell the COM Object "I don't need you anymore, you miss a user". If the COM Object finds that it has no user, it will delete it.

Let's look at the strange hresult, which is the cost of cross-language and cross-compiler. In fact, exception handling is the result of a race of things-even c ++, which has always been advertised as efficiency, are willing to sacrifice efficiency to implement this try-catch. This shows its significance, however, in order to take care of those low-level languages, com discards this feature. The result is hresult. We can see how stupid he is. First, we need to pass the error information through an integer and use ierrorinfo to find the true error description. a try-catch problem can be solved in modern languages, now, we need to allow users and developers to take many steps to solve the problem. How do you evaluate this result? Second, because the location of the returned computing result is occupied, we have to use the weird out parameter to return the result. Think of a simple int add (struct P1, struct P2) that turns into hresult add (partition P1, struct P2, int * result) in COM. I don't know what you think about it. In addition, because the com method cannot return an object but can only return one pointer, in order to complete a simple STD: String getname () operation, how much do you need to pay-you need to allocate a piece of memory space first, then copy a string to the space in the com implementation, and delete the space after it is used up, I don't know if you think this kind of job is very happy, but it is very painful. In addition, does COM add automation technology to take care of explanatory languages? For a simple method call, you need to pass a flag variable to you, and then perform the corresponding operations based on the variable. (I still don't understand why an interpreted language needs to execute a method in this way ). "I have enough, I feel a headache," you will say, yes, I think all people have enough, all these factors actually turn the COM technology into an unmanageable monster.

After all, the ability of people to control complex things is limited. c ++ itself is already complex enough. The complexity of COM is beyond the control capability of most of us, what you need to endure is not worth the cost compared to what you pay? We are learning to solve the problem, but now we need to spend too much energy to learn it. There are too many painful things. What I mentioned here is actually only a small part. Computer technology serves humans, not a few games (I think COM technology may be the game of his designers and some technical authors). Are we willing to become slaves to computers? Abandoning all people through a complicated technique is actually equivalent to being abandoned by all people. I believe there are no lack of experts who have chosen J2EE for so many years, is it because of the complexity of COM that you choose J2EE? Because it can achieve almost the same goal in a simple way-software "binary" reuse, componentization, and professional division of labor (the division of labor between container developers and application developers ). In fact, you have been abandoned by Microsoft, and you have also abandoned Microsoft.

Now let's get back. I 've brought you into the com maze. Now let me get you back. Let's take a look at what COM really wants to achieve. It's actually very simple, but it's just binary code reuse. That is to say, you don't have to give others source code, and your components can be "Plug and Play" like computer hardware ". Let's look back at java. In fact, the difficulty of binary reuse is caused by C ++ (this is not the error of C ++ itself, but the error of static compilation ), when Java occurs, many problems no longer exist. You don't need a header file. Because Java's bytecode is self-explanatory, it illustrates what it looks like and what it can do. Unlike C ++, a header file is required to explain these things. You do not need to know the object's memory structure in advance because the memory is allocated during running. If we go back and solve the problem that com is going to solve, what would you do? First, you will no longer choose the C ++ language to implement the "binary" reuse of code. Second, you will compile all the languages into the same "binary" code (in fact, it should be called bytecode). This is obviously a more intelligent method. In the past, com tried to smooth the binary hierarchy differences at the source code level, this is actually something that people should have done by machines. Is it silly? But they have been doing this for so many years and have brought this pain to the entire computer world-because they have mastered the standards of facts, for the sake of users, for profits, and to be able to run on windows, although you know that you are doing a very unwise thing, you still do it.

COM technology is a waste of energy to take care of the little brother of VB and fulfill the ambition to unify the binary world. First of all, the demise of backward things is inevitable. Just like the demise of C and Pascal in the application field, the basic 1.1 point improvement movement is not in line with the historical trend, advanced things are combined with backward things. Either advanced things are dragged by backward things, or they are assimilated to backward things. Obviously, we prefer to see the latter, now basic has finally been assimilated by modern computer languages. Second, it seems that it is not that simple to unify the binary world, and there is no need for it. Microsoft's COM technology has been fighting for 10 years and now only supports Borland and himself ,. net finally gave up this ambition. This is the end.

In the past, J2EE was soaring to occupy the territory of application development, and COM was pale and powerless in the face of such attacks. At last, Microsoft has something to do with J2EE. net. for developers, binary reuse of bytecode-based components is now a natural thing. You no longer have to do so many things in order to be able to publish components in class mode, because now everything is a class, and the division of labor for software development is quite natural. If you are a professional, use C #. If you are an application developer, you would like to use VB. net, you can use it. Everything you write is eventually translated into the same language (in fact, I think this is of little significance, it is normal that some languages that are not so easy to use are eliminated. The C style has become the mainstream style of programming languages, and there must be some reasons. The unification of languages is actually the trend of the times, just as Chinese people speak Mandarin, I think JAVA does not support multiple languages, which is a good-looking and easy-to-use language. Why bother with simple problems ?). Com will not die in a short period of time, because I guess Microsoft will not use C # To develop the graphic interface of office and windows immediately, but I believe that the days when COM technology exits the historical stage are not far away, as a general developer, forget this unpleasant history-you will not directly deal with COM in your world. After a few years, I think com may become a joke to satize the stupid smart man with ambitious ambitions and best practices.

Conclusion

I have said a lot, but it is time to come to a conclusion. I seem to have done something extraordinary in the world, because I spoke about mainstream technologies and tried to compare them. As if a celebrity said, "C ++ builder, Visual C ++, being able to establish a foothold in the market must have its own advantages. It is impossible for a person to be proficient in several development languages and tools ", the implication is that you should not comment on these things, but how can you not? It seems that the experts are eager to talk about which language is good or which language is bad. I don't know when this trend has taken shape. To put it simply, it is silly to say that C ++ is better than Java or that Java is better than C ++. However, if you want to write a driver in Java, is it silly to develop a MIS System Using C ++? Obviously more stupid. I think, as an independent person who can think about it, external things are always good or bad for you, and your life is limited, and you still need to enjoy your life, therefore, you must make a choice. Therefore, at least Rating these things is correct for myself-as long as I have the ability to rate them, I will give them my comments.

For computer languages, only three types of C ++, Java, and C # are really important languages in the future #. C ++ will be more suitable for professional computer companies to write graphical interfaces (such as KDE), virtual machines (such as Java virtual machines or. net runtime environment), anti-virus software, or other boxed software (such as Photoshop, Dreamweaver. In addition, C ++ is suitable for programmers to learn, and programmers who have certain understanding of C ++ should also be able to have a deeper understanding of Java, C #, this helps to write better software. It is better to develop a custom application system Java and C # for the customer. Includes desktop applications and Web applications.

Other languages such as VB. NET do not actually make much sense. Delphi will continue to exist in the future and will survive well. The most important reason is that, first, it has a rich set of Component Libraries, second, it is relatively efficient, and third, it is simple. If the execution efficiency of a virtual machine cannot keep up with Delphi, there is a reason for its existence. However, from the perspective of Visual J ++ in the past, Microsoft's virtual machine can indeed do a good job. NET Component Library and C # are not simple, so Delphi may be less optimistic in the long run.

In fact, the comparison above also includes the comparison of the desktop application framework. For now, VCL is undoubtedly the best. MFC has exited the stage of history .. The desktop application framework included in net will eventually unify the desktop application field (but not professional companies such as Microsoft and Borland, because they want to make the best-used and most efficient software ). As for the desktop application framework included in Java, it is a real joke. The variable in this conclusion is the execution efficiency of the. NET runtime environment. If. net Virtual Machine like Java, then Microsoft is unlucky, It is equal to give up the desktop application development tool field, but according to Microsoft's achievements in Visual J ++ and his promotion. net drive ,. net is unlikely to fail in the desktop field (but it is not none. At least the com-based technology is almost never used in the enterprise application field ).

In the enterprise application framework field, only J2EE and. Net can be the same. I didn't mention CORBA. It can also be regarded as an enterprise application framework, but its release and J2EE or. net is really not the same language, and the most important thing is that only a large Borland Company supports it (Sun, IBM, Bea, Borland support J2EE, not to mention Microsoft ), so I will not elaborate on him. So who will win in the end? I think Microsoft is more likely to win. This may make many people unhappy, and IBM's strength is also obvious to all. However, this is not a purely technical issue, just as Windows NT encroached on UNIX territory. At that time, Microsoft was also operating alone. J2EE has the following problems: chaos, and price. I believe many people have had unpleasant experiences with these two points. You know that the applications written to WebLogic can be transplanted to WebSphere without a smooth process, and the opposite is true. But. NET is different. It is Microsoft's work, and there is no transplantation problem at all.

If the J2EE camp does not want to defeat this, there are three methods. The first is to completely eliminate the porting problem by setting unified standards, the second is to develop a good Deployment Tool (not as large and slow as JBuilder) to shield the differences between different application containers. The third is also the most impossible, that is, someone in the J2EE camp can control the entire world. Obviously, these three solutions are not realistic. Second, the price is high. This is a tradition of sun, IBM, Bea, and Oracle, and it is also a weakness that keeps Microsoft attacking. I have never understood why they are so expensive. Let's think about it: Microsoft's. net SDK white to you, Bea's Web Logic is a CPU license 20 thousand, if you both technology will, if you give the customer's system price is the same, which development technology do you choose? This is really helpless. Some J2EE and. NET are available (except cross-platform platforms). What is the significance of technical nuances in the face of huge price differences? Of course, big companies such as sum and IBM are not waiting for the first time. Just like Windows NT does not eliminate UNIX, J2EE should coexist with. net like Windows NT and UNIX, but I am afraid. NET will prevail.

Gossip

Let's talk about the technical issues. I felt uncomfortable when I did not say anything, and I was able to spit it out quickly :)

Suggestions for beginners

I don't know if I had taken a detour while learning the computer. But I thought I would adopt some different methods if I had to start learning to write a program again. If you want to become a programmer, this may be helpful to you. I think it may be divided into several stages. The first stage should be a simple language entry, such as Java or C, select a simple book with examples (preferably not too thick) and finish the book step by step. At this time, it may be a bit ignorant, but it doesn't matter. You can start to make a small software. You need to think about important things in that language. If there is a project, it would be better. Later, you will feel a little bit. If you are not from a science class like me, you should take courses in computer science next. I think the most important thing is Data Structure-you may never do things on your own, c ++ has a beautiful STL, and Java has implemented a majority of things for you, but I think it is really necessary to learn those things, which will strengthen your ability to think about problems in computer languages. Further, if your entry language is not c ++, you can study c ++, even though you may never use C ++ to develop programs. In today's computer world, C ++ is like Mandarin, and it makes it easy for you to understand problems that are hard to understand in other languages. After learning C ++, you should be no longer a junior programmer. Welcome to the world of computer software development.

Indian software industry

I remember seeing an article on csdn, advocating India's software industry. And I remember him saying something mean: "The B and t of our company are big, one by one, so we can't see anyone ...... The interface is amazing, just a coincidence ......", In short, Programmers think that Function Specification is really a programmer only who is as good as a high school student in India and understands UML. I felt uncomfortable at the time. I think this person should not be B or T-big -- Oh, don't get me wrong, I am not -- but I think the person of B-Big T is not as he said. I don't understand why China's software industry must be aligned with India? As a company, if you want to earn business profits and learn from India, you can find a lot of high school students to train them into programming blue-collar (I didn't mean to despise high school students, I believe that many "High School Students" have achieved remarkable success in the technical field, but you should not make a small sum of money for programmers with flesh and blood. To be honest, the so-called blue-collar programming is just the assembler in the factory. If one day the factory has changed automation equipment, these people will all become useless! But you need to know that not these assemblers have invented automated machines. I don't need to say anything like this. I just say "too late". You may like to turn blue-collar, but don't push the problem to the extreme. If you push the problem to the extreme, mistakes will often occur. China can learn about India to some extent, but it seems that we should learn more about the United States-but we are not so rich now-but Microsoft is not such a great empire from the very beginning, the same is true for IBM.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.