I am a computer major at Tsinghua University. Professor Tan also gave us a lecture. In fact, there are many types of computer languages. Generally speaking, they can be divided into three categories: machine language, assembly language, and high-level language. .
Every action or step performed by the computer is executed according to a program compiled in a computer language. A program is a collection of instructions for the computer to execute, and all programs are programmed using our Written in the language you master. Therefore, if people want to control the computer, they must issue commands to the computer through computer language.
The only language that computers can recognize is machine language, which is a code composed of 0s and 1s. But usually when people program, they don't use machine language because it is very difficult to remember and recognize.
There are currently two common forms of programming languages: assembly language and high-level language.
The essence of assembly language is the same as machine language. They both operate directly on the hardware. However, the instructions use English abbreviated identifiers, which are easier to identify and remember. It also requires programmers to write out each specific operation in the form of commands. Assembly programs usually consist of three parts: instructions, pseudo-instructions and macro instructions. Each instruction in the assembly program can only correspond to a very subtle action in the actual operation process, such as movement and increment. Therefore, assembly source programs are generally lengthy, complex, and error-prone, and programming in assembly language requires more computers. Professional knowledge, but the advantages of assembly language are also obvious. The operations that can be accomplished with assembly language are not possible with ordinary high-level languages. Moreover, the executable file generated by the assembly of the source program is not only relatively small, but also executes very quickly.
High-level languages ??are currently the choice of most programmers. Compared with assembly language, it not only synthesizes many related machine instructions into a single instruction, but also removes details related to specific operations but not related to completing the work, such as the use of stacks, registers, etc., thus greatly simplifying the instructions in the program . At the same time, because many details are omitted, programmers do not need to have much professional knowledge.
High-level language is mainly relative to assembly language. It does not refer to a specific language, but includes many programming languages, such as the currently popular VB, VC, FoxPro, Delphi, etc. , the syntax and command formats of these languages ??are different.
Programs written in high-level languages ??cannot be directly recognized by computers and must be converted before they can be executed. They can be divided into two categories according to the conversion method:
Interpretation type: similar execution methods Due to the "simultaneous translation" in our daily life, the application source code is "translated" into the target code (machine language) by the interpreter of the corresponding language and executed at the same time, so the efficiency is relatively low, and it cannot generate an independently executable executable. To execute a file, the application cannot be separated from its interpreter, but this method is more flexible and can dynamically adjust and modify the application.
Compilation class: Compilation refers to "translating" the program source code into target code (machine language) before the application source program is executed, so the target program can be executed independently from its language environment, using comparison Convenient and efficient. However, once the application needs to be modified, the source code must be modified first, and then recompiled to generate a new object file (*.OBJ) before it can be executed. There is only an object file but no source code, making modification very inconvenient. Most of the programming languages ????now are compiled, such as Visual C++, Visual Foxpro, Delphi, etc.
[NextPage]
Learn programming, where to start
If you want to learn programming, but don’t know where to start, then you might as well take a look at the following Several learning plans may give the poster some inspiration!
Option 1 Basic Language & Visual Basic
Advantages
(1) Basic is easy to learn and easy to use.
(2) Visual Basic provides powerful visual programming capabilities, allowing you to easily create beautiful programs.
(3) Numerous controls make programming as easy as building blocks.
(4) The Chinese version of Visual Basic makes those of us who have a headache when seeing English overwhelmed.
Disadvantages
(1) Visual Basic is not a true object-oriented development tool.
(2) Visual Basic has too few data types and does not support pointers, which makes its expression ability very limited.
(3) Visual Basic is not a real compiled language. The final code it generates is not executable and is a kind of pseudo code. It requires a dynamic link library to interpret and execute, which makes the compilation speed of Visual Basic significantly slower.
Overview: Option 1 is suitable for friends who are new to programming. It does not have high requirements for learners. Almost everyone can learn vB programming in a relatively short period of time and use VB to create their own works. . For those who regard programming as a game, VB is your best choice.
Introduction to Basic/Visual Basic
Option 2 Pascal Language & Delphi
Advantages
(1) Pascal language has a rigorous structure and can be used very easily. It is a good way to cultivate one's programming thinking.
(2) Delphi is a true object-oriented development tool and is completely visual.
(3) Delphi uses true compilation, which can compile your code into an executable file, and the compilation speed is very fast.
(4) Delphi has powerful database development capabilities, allowing you to easily develop databases.
Disadvantages
Delphi is almost perfect, but the overly rigorous Pascal language makes it a bit annoying.
Overview: Option 2 is more suitable for those who have a certain programming foundation and have learned Pascal language.
Introduction to Pascal language
Introduction to Delphi
Option 3 C language & Visual C++
Advantages
(1 ) C language has good flexibility and high efficiency, and can be exposed to relatively low-level things in software development.
(2) Microsoft's MFC library is extensive and profound, and learning it allows you to program as you like.
(3) VC is a product produced by Microsoft and is more closely integrated with the operating system.
Disadvantages
The requirements for users are relatively high. They must have rich C language programming experience and a certain WINDOWS programming foundation. It is too professional and is shocking. What is the best way to choose?
Overview: VC is a tool used by programmers. If you are a person who is never satisfied and can invest a lot of energy and time in programming, then you will not regret learning VC.
Introduction to C Language
Option 4 C++ Language & C++ Builder
Advantages
(1) All the advantages of C++ language are inherited.
(2) Complete butification.
(3) Extremely strong compatibility, supporting three major libraries: OWL, VCL and MFC.
(4) The compilation speed is very fast.
Disadvantages
Due to the short time it was launched, there is not much information about it.
Overview: I think C++ Builder is the best programming tool. It not only maintains the advantages of C++ language programming, but also achieves complete visualization.
Introduction to C language
Option 5 SQL Language & Power Builder
For some traditional data developers, the Foxpro series may make them feel more familiar. But for beginners, PowerBuilder is perhaps the best database development tool. A variety of controls and the powerful PowerBuilder language will help you develop your own database applications.
[NextPage]
Introduction to JSP
After Sun officially released JSP (Java Server Pages), this new Web application development technology quickly caused people's attention. JSP provides a unique development environment for creating highly dynamic Web applications. According to Sun, JSP can adapt to 85% of server products on the market, including Apache WebServer and IIS4.0.
A simple comparison between JSP and ASP
JSP is very similar to Microsoft's ASP technology. Both provide the ability to mix certain program code in HTML code and have the language engine interpret and execute the program code. In an ASP or JSP environment, HTML code is mainly responsible for describing the display style of information, while program code is used to describe processing logic. Ordinary HTML pages only rely on the Web server, while ASP and JSP pages require additional language engines to analyze and execute program code. The execution results of the program code are re-embedded into the HTML code and then sent to the browser together. ASP and JSP are both Web server-oriented technologies, and client browsers do not require any additional software support.
ASP's programming language is a scripting language such as VBScript, while JSP uses Java. This is the most obvious difference between the two.
In addition, there is a more fundamental difference between ASP and JSP: the two language engines use completely different ways to process the program code embedded in the page. Under ASP, the VBScript code is interpreted and executed by the ASP engine; under JSP, the code is compiled into a Servlet and executed by the Java virtual machine. This compilation operation only occurs on the first request for the JSP page.
Runtime environment
Executing JSP code requires installing a JSP engine on the server. Here we are using Sun's JavaServer Web Development Kit (JSWDK). To make learning easier, this package provides a number of examples that can be modified. After installing JSWDK, just execute the startserver command to start the server. In the default configuration, the server listens on port 8080, and the information content used are boring and rigid HTML documents. This is simply intolerable for those obsessed with WEB browsing. They are eager to see some interactive content in WEN, and developers are also eager to create a class of applications on the WEB that can be executed without considering the software and hardware platforms. Of course, these programs must also have great security guarantees. . Traditional programming languages ??are powerless to meet this requirement of users. The engineers at SUN were keenly aware of this. Starting in 1994, they began to apply OAK technology to the WEB and developed the first version of HotJava. . When SUN was officially launched under the name Java in 1995, almost all WEB developers thought: Oh, this is exactly what I want. So Java became a dazzling star, and the ugly duckling suddenly turned into a white swan.
2. Definition of Java
Java is a simple, object-oriented, distributed, interpreted, secure, structurally neutral, and reliably A portable, multi-threaded, dynamic language with excellent performance.
Java development environments have different versions, such as Sun's Java Developers Kit, referred to as JDK. Later, Microsoft launched the Microsoft Visual J++ Java development environment that supports Java specifications, referred to as VJ++.
3. Characteristics of Java
1. Platform independence
Platform independence means that Java can run on different platforms. Java introduces the principle of virtual machines and runs on virtual machines to implement Java interfaces on different platforms. Programs written in Java can be shared around the world.
The data types of Java are independent of the machine. The Java Virtual Machine (Java Virtual Machine) is built on the hardware and operating system to implement the interpretation and execution function of Java binary code and provide interfaces for different platforms.
2. Security
Java programming is similar to C++. Readers who have studied C++ will quickly grasp the essence of Java. Java abandons the direct operation of C++ pointers on memory addresses. When the program is running, the memory is allocated by the operating system, which can prevent viruses from invading the system through pointers. Java provides a security manager for the program to prevent illegal access to the program.
3. Object-oriented
Java absorbs the object-oriented concept of C++, encapsulates data in classes, and uses the advantages of classes to achieve program simplicity and ease of maintenance. The encapsulation, inheritance and other object-related features of classes allow the program code to be compiled once and then used repeatedly through the above features. Programmers only need to focus on the design and application of classes and interfaces. Java provides numerous general object classes, and the methods of the parent class can be used through inheritance. In Java, the inheritance relationship of classes is single and non-multiple. A subclass has only one parent class, and the parent class of the subclass has another parent class. The inheritance relationship between the Object class and its subclasses provided by Java is like an inverted tree. The root class is the Object class. The Object class is powerful and it and other derived subclasses are often used.
4. Distributed
Java is built on the extended TCP/IP network platform. Library functions provide methods for transmitting and receiving information using HTTP and FTP protocols. This makes it as easy for programmers to work with files on the network as with local files.
5. Key Robustness
Java is committed to checking program errors during compilation and runtime. Type checking helps catch many errors that occur early in development. Java's own manipulation of memory reduces the possibility of memory errors. Java also implements true arrays to avoid the possibility of overwriting data. These functional features greatly improve the development cycle of Java applications. Java provides: Null pointer detection, array boundary detection, exception exit, Byte code verification.
4. Java and C/C++ language
Java provides all the functions of a powerful language, but with almost no ambiguous features. C++ has poor security, but C and C++ are accepted by everyone, so Java is designed in C++ form to make it easy for everyone to learn.
Java has removed many functions of the C++ language, making Java's language functions very refined, and adding some very useful functions, such as automatic collection of fragments.
Java has removed the following C and C++ features:
Pointer arithmetic
Structures
typedefs
#define
Memory needs to be released
This will reduce 50% of usual errors. Moreover, Java is very small, requiring only 215K of RAM for the entire interpreter.
Object-oriented: Java implements the basic object-oriented technology of C++ and has some enhancements (some functions have been deleted for the sake of language simplicity). Java processes data in the same way as object data is processed using object interfaces.
5. Java and the Internet
We know that the earlier www could only transmit text and pictures. The emergence of Java enabled interactive pages, which was a great revolution.
Java is not designed for the Internet and WWW. It can also be used to write independent applications. Java is an object-oriented language. The Java language is similar to the C++ language, so programmers who are already proficient in the C++ language will find it much easier to learn the Java language! Java programs need to be compiled. There are actually two types of Java programs: A Java application is a complete program, such as a web browser.
A Java applet is a program that runs in a Web browser.
Java programs and its browser, HotJava, provide methods for your browser to run programs. You can play sounds directly from your browser. You can also play animations on the page. Java can also tell your browser how to handle new types of files. When we can transmit video images on the 2400 baud line, HotJava will be able to display these videos.
A major development trend of the Internet today is e-commerce, and Internet security issues are issues that must be solved. Usually large departments should set up firewalls to prevent illegal intrusions.
E-commerce is a hot topic today. However, traditional programming languages ??are difficult to cope with e-commerce systems. E-commerce requires program codes to have basic requirements: safe, reliable, and capable of interoperating with machines running on different platforms. of customers around the world. With its strong security, platform independence, hardware structure independence, simple language and object-oriented, Java has unparalleled advantages among network programming languages ??and has become the preferred language for implementing e-commerce systems.
The Java program is placed on the Internet server. When the user accesses the server, the Java program is downloaded to the local user machine and is interpreted and run by the browser.
[NextPage]
Introduction to PowerBuilder
The emergence of PowerBuilder
PowerBuilder is launched by PowerSoft, a famous American manufacturer of database application development tools. A successful product, the first version of which was officially launched on the market in June 1991. It is developed and designed entirely in accordance with the client/server architecture, using object-oriented technology and a graphical application development environment. It is a front-end development tool for the database.
Features of PowerBuilder
It supports application systems to access multiple databases at the same time, including large databases such as Oracle and Sybase, and small databases such as FOXPRO that support ODBC interfaces. , PowerBuilder is a completely visual database development tool. It provides a large number of controls, which greatly speeds up project development and makes it easier for developers to master database development.
The programming language it uses is called PowerScripr, which is also a high-level, structured programming language. PowerScript provides a complete set of embedded SQL statements. Developers can use the SQL language as freely as other statements, which greatly enhances the program's ability to manipulate and access the database. It can be said that PowerBuilder is not only suitable for beginners to quickly learn database development, but also allows experienced developers to develop powerful databases. It is a development tool with a very wide range of applications.
PowerBuilder is a complete visual development environment for client/server development. Using PowerBuilder, you can create your application's user interface and database interface in a visually intuitive way. This is a general concept. In fact, developers use PowerBuilder to develop applications. Since the various applications developed take full advantage of the graphical user interface (GUI), PowerBuilder is considered a graphical tool.
In client/server structure applications, PowerBuilder has the ability to describe multiple database connections and retrievals. In particular, PowerBuilder can access data from most popular RDBMS, regardless of where the data is stored; in addition, various applications can be independent of RDBMS because PowerBuilder can use the database's standard operating language SQL (Structured Query Language) )conduct.
Using PowerBuilder, you can easily develop powerful graphical interface applications that access server databases. PowerBuilder provides everything you need to build industry-standard applications (such as order registration, accounting and manufacturing systems). All tools needed.
PowerBuilder applications are composed of windows that contain controls with which the user interacts. Developers can use all standard spaces (such as buttons, check boxes, drop-down list boxes or edit boxes) as well as special controls provided by PowerBuilder to make applications easier to develop and use.
People usually regard PowerBuilder as a development tool. In fact, it is much stronger than other tools and is a powerful development environment. Developers can not only use it to develop various applications that are easy for users to use, but also modify the database through PowerBuilder, and use more than 400 internally defined functions to develop various applications that can interact with other applications.
PowerBuilder is becoming the standard for client/server application development. PowerBuilder enables developers to work faster, at lower cost, with higher quality and more functionality than any other client/server development environment.
PowerBuilder provides comprehensive and comprehensive support for application development, which can be summarized as follows:
Event-driven applications
Powerful programming Language and functions
Object-oriented programming
Cross-platform development
Open database connection system
PowerBuilder development environment
The PowerBuilder development environment consists of a series of integrated graphical drawing boards (Painter). Application developers can design, build, interactively verify and test client/server applications through simple mouse operations.
[NextPage]
Introduction to Delphi
The name Delphi comes from the name of the city in ancient Greece. It concentrates the advantages of third-generation languages. Based on Object Pascal, it expands object-oriented capabilities and perfectly combines visual development methods. Delphi has attracted people's attention since its launch in March 1995, and won many awards that year.
The emergence of Delphi broke V's dominance in the field of visual programming. And Delphi uses local compiler direct generation technology, which makes the execution performance of the program much higher than that of programs generated by other products. It is also a true object-oriented programming language. The rigor of the PASCAL language coupled with the advantages of visualization and powerful database functions make it fully capable of competing with Microsoft's VB. Many people believed that Pascal was the most promising programming language at the time and predicted that Delphi would become the mainstream environment for visual programming.
Delphi automatically converts it into an .EXE file after you compile the program. It runs faster than VB, and it can run without the need for other support libraries after compilation. Its database function is also quite powerful, making it an ideal programming tool for developing medium-sized database software. Delphi is suitable for the development of application software, database systems, system software, etc. Moreover, it has almost the same functions as VB, and can also use API functions, which is very useful in controlling Windows.
Delphi is a brand-new visual programming environment that provides us with a convenient and fast Windows application development tool. It uses many advanced features and design ideas of the Microsoft Windows graphical user interface, adopts a flexible and reusable complete object-oriented programming language (Object-Oriented Language), the fastest editor in the world today, and the most leading database technology . For the majority of program developers, using Delphi to develop application software will undoubtedly greatly improve programming efficiency, and with the deepening of the application, you will find that programming is no longer a boring job - every design detail of Delphi, All will bring you a joy.
The basic form of Delphi
Delphi is actually a version of the Pascal language, but it is very different from the traditional Pascal language. A Delphi program is first an application framework, and this framework is the "skeleton" of the application.
Even if nothing is attached to the skeleton, it can still operate exactly as designed. Your job is just to add your program to the "skeleton". The default application is a blank form, which you can run and get a blank window. This window has all the properties of a Windows window: it can be zoomed in, moved, maximized and minimized, etc., but you did not write a single line of program. Therefore, it can be said that the application framework lays a good foundation for the development of user applications by providing everything that is unique to the application.
Delphi has done all the basic work for you - the program framework is a completed runnable application that just doesn't handle anything. All you need to do is add the code to the program to complete the function you need. Behind the blank window, the application's frame is waiting for user input. Since you didn't tell it how to react after receiving user input, the window, in addition to responding to basic Windows operations (move, zoom, etc.), just accepts user input and then ignores it. Delphi puts the complex processes such as callbacks and handle processing of Windows programming under an invisible Romulam cover.