"Win32 programming"
Unfortunately, I have been learning programming for a long time (the learning environment of the last century is evident ). For a long time, I have never understood what 32 means. I have used Dos, Win31, win95, win97... but I have never used an operating system named Win32? A long time later, I learned that 32 here is not the version number of the operating system, but 32 bits. The Microsoft operating system is a dos system in win31 and earlier versions. windows is just a large program running under dos. Later, win95 was slightly changed. In addition to the DOS core, windows became a part of the operating system and provided services provided by various operating systems. It should be said that windows after win95 (before the recent 64-bit win system) can be called a win32 System Platform (95/98 is actually a 16-32-bit mix ). Therefore, on such a platform, Win32 programming is called directly or indirectly using the API programming provided by the system. For Visual Studio, Win32 programming generally refers to SDK, MFC, and ATL development methods. Among them, ATL is not widely used in China, it is generally used for medium and large software products with COM components as the architecture.
"SDK": Software Development Kit, often translated as a Software Development (Tool) package
In the Win32 programming field, it is generally different from the framework programming such as MFC. It directly calls the API development method provided by Windows, which is different from the literal intent. Another common saying is that a software (hardware) has its own SDK, which generally refers to a set of API library functions or class libraries for developers to call. For example, the dx sdk is a set of COM components developed by Microsoft for upper-layer developers. In short, a relatively complete code library for programmers can be called an SDK;
"MFC": Microsoft Fundation classes Microsoft basic class library
As we all know, the SDK programming method often has a lot of fixed and unchanged code repeated every time. To improve programming efficiency, reducing thousands of Apis brings great mental pressure to developers, microsoft has developed such a class library. Note that this class library has nothing to do with the operating system itself. It only encapsulates APIs in an object-oriented manner. Of course, A series of programming frameworks are also provided. You can also use Visual Studio to call Windows APIs using SDK. MFC has written some fixed code and only links it during compilation. Therefore, we cannot see WinMain () in our code. In fact, the whole program is running, there is no difference with the SDK method. Please remember this for beginners. In addition, I personally think that the initial intention of MFC has brought more convenience to developers. I don't think it is too successful. The effort required to learn MFC is not very proportional to the final income.
"API": Application Programming Interface, Application Interface
The term appears frequently. In a sense, it can also be seen as a subset of the SDK. This is also a program for programmers, But it generally refers to the function library that provides services by exporting functions, excluding Class Libraries and components.
"GDI": Graphic Device Interface, graphical Device Interface
This is the most commonly used display method in Win32 programs. It is at the same level as DirectX and OpenGL. It is not easy to display some things in DOS. The simplest thing is to call some C graphics library functions for display. However, it is generally just a few lines, colors, and outputs, the effect is very weak (DOS program interfaces are generally not very complex, and implementation is not very complex). To make animations/images more complex, hardware interruption is often used, call the subroutine of the video card itself (solidified in the video card. Because each video card is different, DOS game compatibility is often poor due to different video cards. In Windows, everyone is much happier. Windows shields the hardware layer and uses a table (Device Context) to represent a display, what we need to do is to fill in the relevant parameters in this table, then draw what we want to draw, and then the operating system will follow this table (DC ), transmits the corresponding display content (usually a display memory) to the specified video memory of the specified video card, and then transmits it to the display card. We no longer need to make traffic with different video cards. This is a great victory! The most common technology in GDI is the dual-cache technology. That is to say, you can create (replicate) a dc in the memory, but what is displayed in this DC is no longer transmitted to the monitor. What is the purpose? Because its parameters are consistent with the current screen DC (COPY, of course, this result), its display content can be completely transmitted to the screen DC without distortion. We usually draw a picture on the memory DC, such as drawing a circle, then draw a straight line, and then transfer it to the screen DC at a time, so that the screen is refreshed only once for the user, it can solve the flickering problem caused by refreshing the screen when you draw a little content. Of course, dual buffering and even multi-buffering have many other functions, so we have to figure out them on our own.
"DirectX"
It is usually referred to as DX (pronunciation: low cross). This is a very eye-catching term, and it is very easy to read :). Windows has done a lot of work to shield the underlying hardware. DX is one of the most well-known technologies. Operating systems must deal with various types of hardware, especially multimedia-related ones, such as video cards, sound cards, handle inputs, and network transmission of Multimedia Streams, that's too much (these are generally related to the underlying system, and it's hard for you to do it yourself ). DX is the interconnectivity between multimedia hardware and programmers provided by such an operating system. DX itself generally does not implement processing capabilities. It is a standard that requires hardware to meet, for example, DX provides a function name and hardware to implement the function content. With it, we can easily and quickly call various services provided by hardware. It mainly includes DirectDraw (providing fast image processing capability by directly accessing the display hardware), DirectSound (providing low-latency sound mixing and playback for software and hardware, and direct access to audio devices ), directPlay (which explicitly provides universal environment connection capabilities to simplify communication services between your applications), Direct3D (3D version of DirectDraw ), directInput (simplifies the ability of your applications to access the mouse, keyboard, and joystick devices). After DX5.0, you have added some (such as DirectShow), which will not be detailed. An important feature of DX is that you can directly access the hardware without knowing the details of the hardware. For example, DirectDraw can directly access the video memory over the memory, which is much faster than GDI, not on an order of magnitude. Add: DX is provided in the form of components, rather than the usual export API form. The latest version of dx sdk is 9.0.
"COM": component object model, which is generally referred to as a component.
This is an important mechanism for Microsoft to solve code reuse. The simplest way to reuse code is to reuse the source code. Add the written functions and classes to your current code and compile the code. The simplicity is simple, but it is obvious that there are many problems. Another common method is to separate modules and distribute them as DLL. DLL exports functions or classes, and the client program loads them using dynamic/static links, this is obviously better than the method of the previous source code, which is not difficult and most commonly used. However, DLL has some shortcomings. The most fundamental one is that it is not Binary compatible. Once the DLL version is upgraded, it needs to be re-linked with the client program code. In some cases, this is almost impossible. In order to make programming as simple as building blocks, so that modules can be perfectly cooperated and replaced perfectly, COM was born. COM is not a class library, it is not a code, it is not a service of the operating system, but a set of programming models. Theoretically, it has nothing to do with the language, it has nothing to do with the operating system, and it can also be used as a COM in unix. COM is a program structure model standard. If your DLL or EXE meets such a standard in structure, the DLL or EXE is a component, it will become Binary compatible on the platform. COM mainly uses the Registry to register information of this module. When calling a client program, first check the registry, find the location of the required component (which achieves location transparency), and then load it in using Loadlibrary, which is essentially different from normal calls, the difference is that the user program does not know the component location, the class instantiation process, and how to destroy the component because of the special implementation method of the component. It cannot directly access any implementation details of the component, users only deal with several public interfaces of components. This will implement real independence between modules. For user programs, there is no idea about the target components except interfaces. Without changing the interface, the component can be replaced with any other component, and the client program does not need to be compiled, in the process of module integration of medium and large programs, a considerable amount of time will be saved.
"STL": Standard Template Library, Standard Template Library
This was first completed by Alexander Stepanov and Meng Lee (just like the Chinese name) and submitted to the ANSI/ISO Standard C ++ Committee in 1994 and passed it as part of the standard C ++. We can see that this is a code library standard, not a syntax standard. In short, STL is a set of code libraries that contain basic data structures and algorithms based on the template syntax in C ++. STL is characterized by the implementation of "type parameterization", that is, the STL code can process any custom type objects. If the template technology is not used, this is quite difficult. For this reason, the support for template syntax is added to the latest java and C # syntaxes to show its importance. Another important topic about STL is GP (Generic Programming), Generic. This is another programming model parallel to object-oriented. It is based on templates, which weakens the differences between entity types and simplifies the problem abstraction model during programming, providing better encapsulation and elasticity, there is no doubt that complicated object-oriented programming is a relief, at least spiritual. GP is not used to replace object-oriented, but as a beneficial complement and a good partner of object-oriented. GP is a hot research topic in Software Architecture in recent years, but it seems that there are few real applications in China. This technology is still at the forefront of research. <> This book has a good interpretation of the GP application in C ++, and its lethal effect on brain cells is beyond the reach of other C ++ books. Do you want to know how the C ++ code skills can be achieved? Let's take a look at this book.
"ATL": Active Template Library, Active Template Library
This should be a relatively advanced topic in VC programming. It integrates COM and template technology, bringing an extremely convenient component writing method and an extremely high learning threshold. It can be said that, even in the ATL field, it has entered the intermediate programming field or above. ATL is generated for components, it aims to make it easier for programmers to write components (writing the simplest component in C ++ to implement a "Hello World" is terrible for beginners ), at the same time, it uses the template technology to establish a framework code library (Template Library) for Developing COM similar to MFC. Using this framework and template library can be relatively convenient for component development. One feature of ATL is that your class will become the parent class of some classes in the ATL code base. This is an interesting thing (this is also a feature of the template technology ).
"HANDLE": HANDLE
This is an odd word for Chinese translation. It cannot be understood by beginners. This is actually equivalent to void * (by the way, beginners are often puzzled by the various odd symbols, type tags, and Macros in VC code, in fact, most of them come from the basic type # define or typedef. Please move the cursor over these symbols (such as HANDLE), and then press F12, the compiler will take you to its declaration, after using it several times, you will eventually see its original appearance, and then breathe a sigh of relief: It's just that. For beginners who have never used it, remember: F12 ). Many beginners always want to know what a HANDLE represents. My advice is not to understand it as an object, but to understand it as an entry to access an object, in fact, HANDLE is usually an integer index (marking the position of the object in a table in the operating system, just like the subscript of an array). In Windows, the core is mainly several large tables, such an integer index is used to mark the position of the target in the table for query during operating system access. Occasionally, it is indeed a pointer to an object, and sometimes it carries some additional auxiliary information. In short, we should not directly access it and hand over the HANDLE access task to the operating system, unless you are too tired to write programs :).
"DLL": Dynamic Link Library
One feature of DLL is that it can be dynamically loaded (as the name suggests), that is, when the main program (I prefer to call it a client program) needs this module, it is loaded to the memory by the operating system. After all, we often use a small number of features for a large application, so some of the less commonly used function modules (DLL) are generally not loaded when the program is running, which can greatly save the memory overhead. DLL is also the most commonly used distribution module method for mutual collaboration. There are two main methods to call the DLL in the program: 1. For the DLL that uses the DEF file to export the function, use the API function LoadLibrary ("DLLModuleName") to load and then use GetProcAddress () obtain the function pointer, and then call 2 to directly export classes and functions. The client program uses the same header file declaration and adds the corresponding lib Link Library, you can directly use the classes or functions in the DLL in your program without LoadLibrary.
"Process": Process
A Process is a dynamic concept, including a Process Control Block (PCB) from the Process creation application. Generally, the operating system creates a table (struct, address space memory allocation. The module code is loaded and executed, and abolished after execution. The whole process is called "process ". In Win32, a process has 4 GB Logical space. But we often use it as a static concept. In Win32, the execution of an EXE is a process (if a new process is activated inside it, let alone ).
"Thread": Thread
To effectively improve CPU utilization and achieve multi-task concurrency, Microsoft further splits processes to implement a new pair of CPU task scheduling features: thread. A process has at least one thread. When implementing multi-task concurrency, we usually create a new thread (the system overhead of the thread is smaller than the process), and the thread uses our own function as the entry, the function is automatically revoked after execution is completed (you can also force the thread to end during execution ). By the way, there is no thread in UNIX, because UNIX is mainly based on multi-process concurrent services (so it is more suitable for server ), when the system runs, there are already too many processes, so there is no need to refine the process, because this will even reduce the system efficiency (CPU scheduling is not enough), of course, this is my personal conjecture :)
"C Language"
So far, the C language should be the most widely spread language, especially in the UNIX world, still playing the leading role, in other such as hardware development, embedded systems (such as mobile phones) both of them have outstanding performance, and even have a place in SDK development on the win32 platform. What's more, it is the Enlightenment language of most programmers in China (I dare not say it abroad). Many of its talents have understood the thinking of the program. The biggest feature of C is that it is fast. In addition to compilation, the efficiency can reach the highest level. Its flexibility and direct access to hardware fully conform to the programmer's free nature. If you are still hesitant to learn other technologies, you have only one sentence to learn C: Believe me, that's right! There are also many people who advocate that they can directly learn object-oriented languages. I don't agree. The abstraction of Machine Models by object-oriented language is very easy for programmers to confuse, and it is difficult to establish accurate models for running programs. After all, we are programmers, not users. We cannot take all the problems for granted to the compiler and operating system, nor can they solve them. At least one process-oriented language can be learned.
C ++
This is another masterpiece of Bell Labs. At the same time, it also breaks the hearts of too many programmers around the world, and brain cells are very lethal. C ++ is much more complex than most beginners think. It basically includes a class-based C language, template, and standard template library. many beginners only master C ++ as a subset of the class-based C language (if you don't believe it, take a look at the C ++ code in <> to see how much it can be understood ). What's more troublesome is that C ++ has to talk about the object-oriented programming style, which is also much more difficult than beginners think and requires a long-running war. What worries me this kind of C ++ fans is its current prospects in the Win platform. on the net platform, it is difficult to find out the reasons for using C ++ to write new code without using C :(. Compared with the complexity of java/C # And some dynamic languages (python/ruby), The development efficiency is obviously low, and there is a tendency to exit the development of upper-layer applications. I really don't want to give up this almost perfect language that contains the most paradigm. I can only pray that the path of C ++ can go further and better in the future.
Source code version control
This is a very important engineering method in software development and is almost a necessary Process ). Many workshop-style development teams often need to improve or increase the number of software engineering methods. For beginners, it is recommended that the source code version control be implemented at the beginning of the Practice phase, because it will be used in future work.
The basic principle of source code version control is as follows:
Create a database for the project on the server side and save the first version of the source file of the selected project. Any user on the client needs to check out the permission to modify a source file. After that, the client generally performs the check in operation every time it completes a version without compilation errors and wants to save the current version on the server end and becomes the latest version (note, not Overwrite previous ones ). Any client can easily obtain any version of the file on the server (if you have the permission ). Generally, an important feature is version comparison. Any client can use a version control tool to compare different versions of a file, it will mark the differences between different versions of files with the same name, so that you can easily see the evolution of the version content, which is very common. The following describes three version control tools I have used in China ):
VSS: Visual Sourcesafe
This is the source code version control tool provided by Microsoft Visual Studio. Its biggest feature is its ease of installation (integrated with Visual Studio, which can be done by the way when VC/VB is installed, you don't have to spend any extra time). It's easy to use (server side setting is relatively easy. Generally, you can easily do it with a little bit of exploration, and check in/out on the client). The basic functions are complete, the version is quite intuitive (I like it ). It is characteristic that after someone checks out a version, others will not be able to check out the version. That is to say, only one file can be modified at a time, this avoids conflicts between different people on the modification of the same file. (Note: You can set the server side to check multiple users, but this is hardly the case, as a result, one of the most important features of VSS is lost ). In addition, VSS can be integrated into the VS environment, but based on my experience, the check operation on the version directly in VC often does not take effect, therefore, it is best to perform the check operation in the VSS program. Note: VSS can also be used on a single machine. The advantage is that after some files are mistakenly operated or modified on a large scale, they can be restored to the latest version without errors, recover the loss to the maximum extent. VSS is widely used. If you are using Visual Studio, you must use it.
CVS: Concurrent Versions System
This is also a well-known open-source version control tool, mainly active in the UNIX world. CVS is rarely used. Generally, it seems that the function is more inclined to the command line method (many developers in UNIX also use the command line method ). Of course, several versions of CVS are also implemented in Windows, which can also be integrated into VS. It seems that another version can be attached to IE. I have never tried it. The famous open-source project management website sf.net also uses CVS. If you want to work with programmers all over the world, CVS must be installed. In the world of JAVA, CVS is also used.
Rational Clearcase
This tool is of a higher level. It is produced by Rational (Now IBM) and expensive. I used a short period of time when I first joined the work. This tool is characterized by complexity, and the installation and setup are very complicated. The client in my photo printing even has to be added to the NT domain, resulting in insufficient permissions on the local machine, installing new programs is very troublesome and depressing (I don't know if our company's related personnel have incorrect installation settings. I think so, but its complexity is evident ). For use, it has a very useful function, that is, it can automatically generate a version tree (a tree chart) based on the version number you check each time ), you can clearly see the version evolution process. So strictly speaking, such as CVS/Clearcase can really be called "version" control, and VSS is too reluctant. Clearcase is very powerful and I will not elaborate on it (I do not want to publish a book). It is suitable for large software companies to implement Software Configuration Management. Although it is well known, I don't know how many companies in China are actually using genuine tools such as Clearcase.
OpenGL
So far, OpenGL is quite a bit of a hero. This set of standards has been so good that it once became a standard of gorgeous game interfaces. Its low performance is also an inevitable trend. After all, Microsoft's strong suppression rarely fails. However, it has brought such pressure to Microsoft and is still widely used in the industry, most games/graphics cards still support it (OpenGL is my favorite in CS ). Compared with D3D in some aspects, its performance still prevails. Unfortunately, DirectX is constantly moving forward, and it is almost stuck, with bright prospects. OpenGL is widely used in the industrial field at present. Its excellent vector image processing performance and gorgeous colors are outstanding in the professional graphic image processing field. Games are used less and less than before. I recently heard that Microsoft's latest operating system, Vista, has put a lot of pressure on OpenGL. Not only does it offer performance discounts, but it only supports 1.4 (the latest version looks like 2.0 ), wait and see.
DirectDraw & D3D
Almost all decent 2-Dimensional Windows Games use this technology for display. DirectDraw has two modes: full screen and window. There are more full-screen applications. In full screen mode, DirectDraw has a very famous "Page feed" technology, that is, it uses "Swap" between two display pages to achieve display refresh, this speed is very fast, it's just a pointer exchange in a video memory, which is much faster than copying a screen using BitBlt. Most of the efficient animation effects of the game come from this technology. DirectDraw is mainly used in entertainment and real-time display scenarios with high requirements, such as medical images. D3D is currently the standard used by most 3D games. I have not studied it, So I dare not say more. It works well. You can see it when you play a game :)
UML: Unified Modeling Language.
This language is a graphical language, mainly used as a standard graphical model for modeling during design, facilitating communication between programmers and programmers, programmers and customers, designers and code workers, at the same time, it also helps designers to document the understanding of program functions based on program code in their minds, so as to facilitate clarification and further coding. In other words, the product of the design process can be represented as some text documents, some framework code, or some pseudo code, but more standard and common, is represented as a bunch of UML diagrams. UML includes two types: Dynamic and Static graphs. Class Diagrams in static graphs are most commonly used. Many people do not know how to design the software at the beginning. When writing small software, there is often no design process. In fact, it is very easy to make a picture of the software. When learning to design, you do not need to find a big bully like Together or Rational Rose. It is good to use some simple tools that can be used for UML diagrams. There are many small tools dedicated to UML diagrams, which are easy to find online. One more point: do not draw a UML diagram in all aspects, do not draw everything, highlight the key points for easy understanding, or even use nonstandard marks (when the UML function is a draft ).
RTTI: Runtime Type Information
In the program, when we get an instance or pointer of an object, most of the time we cannot directly affirm its type (it is caused by inheritance and type conversion). At this time, depending on the RTTI support provided by the VC4.0 or later version compiler, you can call the library function typeid () to obtain the "type information" of this object at runtime ", in some dynamic processing, "type information" is very important. After obtaining the type information, you can call related operations of this type, convert the type, or generate them dynamically. Because of its importance, in JAVA and. net Library has a more elegant approach to this by virtue of a single inheritance and "virtual machine". Each class inherited from an object naturally has the ability to express its own type information (the benefit of inheritance ), and it is easy to expand. When you need type information, you can directly ask the object: tell me, what type are you? It will tell you the answer.
Debug & release debugging & release
As we all know, debug is the debugging version, and release is the release version. The difference is that the program generated by debug contains a large number of scenario code for debugging and trial use (not required for actual running ), the release usually removes this information and performs some code optimization. Therefore, the release version program is much smaller than the debug version program and runs faster. At the same time, in order to facilitate debugging, the debug version often adds a macro such as DEBUG to the diagnostic code used for debugging, so that the Code is not compiled under release. Because of the differences in the source code used for compiling the two versions (and poor Optimization of release), the two versions often have different effects during running, A normal crash was encountered by most people. There are many possibilities for problems. For more information, see the excellent posts on various forums. In addition, if different versions are used for the link between the DLL of the same program (for example, EXE is the release version and dll is the debug version), the program may not run normally, therefore, my general practice is that each DLL uses two DEF files for different versions and compiles two files with different names (add d after the file name of the debug version). Each version is called for its own version during the call, this can avoid confusion to some extent. In addition, release can also be debugged. Open the debugging information in the project settings.
XP: eXtreme Programming
This is a development model that has just emerged in recent years. It has been widely publicized in China since 01/02.
It is mainly used for small and medium development teams in Small and Medium Projects with tight development time requirements and unstable requirements (this is the case for most software projects. It breaks the traditional software engineering framework and is very clever. For example, there are few documents throughout the development process, and a large number of "cards (such as CRC cards)" are used to describe the development plan and content; there is no software functional specification in the true sense, instead, there are a series of testable cases. There are no independent design and test phases, and they are always incremental and repeated in iterations; Design: as small as possible and simple as possible; generally, there is no code review. Everyone has the code together. One of its most significant external features is that it often uses "pair-by-pair development", that is, two developers sit in front of a machine for joint development (one view, one write ), this sounds really interesting at first glance: its basic starting point is that the efficiency of paired development is higher than the sum of independent development by two people under certain conditions. Don't think that the effectiveness of this practice has been proven in many projects.
The features of XP can be summarized by "fast, small, and spiritual". It is similar to the traditional Waterfall Model (from top to bottom) the difference is that it uses iterative increments (design-> code-> test-> Design-> code ...). The idea is simple: there are no goals that can be easily identified at the beginning. Using mountain climbing as a metaphor, the traditional method is to study the map below the hill, select a route, and then move forward along this route, XP is to take a walk, stop and take a look, make new choices for the next step. In many cases, this will allow you to select a better shortcut.
ICONIX:
I believe this word has never been seen by many people, and I don't know what it is. I 'd like to mention it to broaden my horizons. This is a development model between XP and Rational Unified Process. In other words, it is "larger" than XP and smaller than "RUP. It adopts a subset of UML, Which is case-driven and maintains good progress tracking capability. It aims to convert the use case into code in the shortest time. Specifically, for XP, this development model emphasizes the establishment, analysis, and Code of use cases, and the use case is its central position.
RUP: Rational Unified Process
As mentioned above, I believe you already feel that it is a rich software development model. This is a software engineering model proposed by IBM, which uses a complete UML diagram for various stages of development (requirements, design, code, testing, and maintenance) there are well-developed and complex standards, so we will not detail them in detail. In essence, RUP is iterative development. Each iteration completes the following four stages: inception, elaboration, and construction) and transition phase (transition ).
CMM: Capability Maturity Model Software Maturity Model
This is a masterpiece of the Software Engineering Institute of Carnegie Mellon University (My major is software engineering, so it has become a holy place in my mind, once formed a wave of CMM sweeping the global software development. CMM is divided into five levels, most software enterprises are in the first level, and there are not many in the world that have obtained the fifth level certification. In China, it is also rare to remove the dog meat from the goat's head (well, ). Therefore, the implementation of CMM generally starts from the second level, and the third level can be achieved by powerful software companies. CMM is a Process-centered model. Each level has several Key processes (Key processes) starting from the second level. Each KP is divided into several Key Active processes (Key activities ). In general, the implementation of CMM cannot be implemented more than one level, and the implementation of each level usually takes more than one year. Therefore, it is very difficult to reach a higher level. In addition, CMM can be used not only for large-scale companies, but also for small companies and small project teams (which many do not know ). The implementation may be cross-organized according to the specific situations. For example, some level-2 KP and level-3 or level-4 KP are used during implementation, but you only have implemented all level-2 KP, you can only pass level-2 certification, even if you adopt certain level-4 KP. The latest development of CMM is cmme (Integration), which mainly considers the relationship between software and non-pure software factors (such as systems) and collaboration between teams. The development of CMM in China seems to be on the same path as ISO, which is not a good news.
Callback Function: Callback Function
This concept was introduced at the beginning of Hou sir's <in-depth introduction>. The general reference is that the callback function is called by the operating system and you will never call it. This concept makes beginners feel a little daunting and thinks it is a deep and hard-to-comprehend core technology at the bottom of the system. Otherwise, this technology is very simple and often used. It is actually the basic application of function pointers (if you don't know what a function pointer is, flip the book ). In a module, some functions can be implemented by other modules. For example, a display module only needs to implement control functions such as resource allocation, screen refresh, and scaling, the code that draws a specific object (such as a circle or polygon) can be implemented by other modules. What should I do? Use the function pointer. Place a circular function pointer in your class, and assign a value to this function pointer from the outside (actually pointing to an external function ), you can directly call this function pointer in your code to draw the image (this module does not know how the external module draws the circle ). The external function is the callback function here!
This function callback method is used in many system APIs, so that the code implementation we develop can be embedded into the Code Implementation of the API, in fact, we just passed a function address to it. In other words, these APIs have developed some running code frameworks for specific implementation.
XML: Extensible Markup Language
Maybe you are still struggling to choose. net and j2ee. If so, you may want to learn a common basis: XML. With HTML, why do we need XML? HTML focuses on text, images, and multimedia content. It is difficult to express data because its tags are fixed, and the data type cannot be described at all .. Net and j2ee both need to solve a difficult problem of standardization of information transmission formats. This format must carry text/data, and it is best to describe the program interface, at the same time it should be as simple as HTML, it is universal and can work well under HTTP. In this case, XML is generated. It features the same features as HTTP. It is also a markup language, but its markup is not fixed and can be customized (or infinitely scalable, these custom tags can well describe the data type and corresponding data content (which is similar to the definition of a database table at first glance ). In addition, XML can also describe program interfaces, So XML can easily directly interact with network program components (such as COM and EJB. Because it is also an ASCII text stream, it is compatible with the current HTTP and can be unobstructed on the current internet (this is important ). With the above functions, XML is truly a standard information carrier of the new generation of Internet technology. in the network architecture of net and j2ee, information interaction between various "components" is handed over to XML, which is a long way to go.
I have never written XML myself. From the perspective of learning experience alone, I feel that the syntax is more trivial than HTML, with more small details, and less easy to achieve :) fortunately, the root source is better, it is easy to learn from the basics of HTML and even WEB development.
Java2:
This is the most popular language in recent years. It shines brightly in the world of Web development, network platforms, and mobile development. You don't need java, but you don't need to understand java. After all, this is a huge and rich field of software development. Some people in the VS camp who have never used java may not understand what the 2 in java2 means. Let me explain it first. When Java was officially launched 1.0, it was not so well received and criticized, so it was constantly introducing new versions to improve itself, one version with significant changes is 1.2 (I remember it). In addition to the syntax updates, each new version of Java also has a clear mark, that is, JDK (Java Development Kit, java SDK). java Versions later than 1.2 are called java2 in order to distinguish them from previous java versions. Currently, jdk 1.3/1.4 is widely used, and the latest JDK is 1.5 (codenamed tiger ). Java IDE mainly focuses on JBuilder in China, and Eclipse is widely used in open-source fields. sun also pushes its own open-source java IDE: Netbeans (which can be downloaded from sun's website, free of charge ). Java is a virtual machine mechanism, which is equivalent to adding a soft operating system to the operating system. The source code is compiled into a byte intermediate code, which is interpreted and executed by the Virtual Machine. As long as there is a corresponding virtual machine, java programs can be run on the operating system. This is the origin of a compilation called by java, and it runs everywhere. The unavoidable performance issues that come with it make Java hard to become the mainstream of desktop program development. I recommend using JCreator for the best Java IDE for beginners. This is a C ++ IDE, which is several MB in size and is faster than 10 times faster than Eclipse, it brings great convenience to beginners.
J2EE:
Java is actually divided into three categories: J2EE/J2SE/J2SE, different classes correspond to different JDK, J2EE is developed for the enterprise platform, J2SE is the standard edition, and J2EE is developed for the mobile platform. J2EE is really hot at the moment. I recently reviewed the magazine of early programmers and found that j2EE has been discussed in the first issue (2001.1), and now it is 2004.6, how much do you know about it? J2EE is not a pure technology, but an architecture and many standards that constitute the architecture. Enterprise platform development is very different from desktop/simple Web database development, and its program size is usually very large (not one or several EXE can be done ), it often uses massive databases and mass communication, and is often non-disruptive. These features make enterprise platform development focus more on architecture issues. However, writing a familiar java client program, message processing middleware, or database processing program is only a small part of this architecture. J2EE is very favored, so please do not write a few examples of EJB (this is a component in the java World, the concept is similar to COM) Programs and you feel proficient in j2EE.
In J2EE, a message manager middleware is often introduced when messages are transmitted. on the server side, EJB containers are used to manage and call ejbs. One important concept in J2EE is Transaction processing, which was first widely used in database technology. This is actually a unit that encapsulates a lot of operations. It is used to cancel any operation in the middle and automatically undo it in turn. Therefore, a transaction is the smallest unit for successful/failed operations, if only some operations are successful for a transaction.
BEA is a well-known company in enterprise service platform development (this is a good company and should know its name). Its product is Weblogic.
. Net
. Net is the technology Microsoft has prepared for the next decade. What about you ?. Net is also a platform technology, rather than a single technology. It is mainly divided into. net runtime platform (corresponding to the java Virtual Machine) and. net class library (corresponding to the java jdk ). Currently, only Windows2003 is integrated. net runtime platform operating system, so if you write.. net program to run on another operating system, the operating system must be installed first. net platform. This is a very annoying thing, and also why so far, not many people have switched to it. net to write programs (although it can greatly improve the development efficiency ). We hope that the emergence of Longhorn can reverse this situation. Then we can finally say goodbye to the outdated framework class library such as MFC. It's a big deal.
. Net uses a lot of the latest technologies and ideas. For those who take the VS route (especially those with the COM concept), it is relatively easy to learn and enjoyable. ". net Framework Program Design "and ". net essence "is a good book. Of course, before reading them, you 'd better master a. net language, such as C #, which is the easiest for us to master the language.