nginx部署ssl证书
1.下载SSL证书
我们主要用到.crt文件和.key文件
2.上传证书到服务器
这里使用winCP上传到/etc/nginx/ssl
3.修改/etc/nginx/nginx.conf
1 | # Settings for a TLS enabled server. |
4.检验
1 | nginx -t |
成功如下
1 | systemctl restart nginx |
重启Nginx服务
总结:
分析了软件工程中的编程方法,比较了面向对象、面向过程和泛化三种方法,阐述了它们各自的特点和存在的关系,以便在应用中加以选择。
关键词:软件工程;编程;结构化的客观化;一般化
0导言
软件工程实际上出现在1960年底。在软件不断发展的过程中,其问题逐渐凸显,导致了一场“软件危机”。软件危机的出现创造了软件工程。后来,软件工程逐渐被人们所认识和认可,并得到了广泛的应用。直到今天,随着信息技术的发展,软件工程也是软件和计算机技术发展的基础。软件工程中的一个重要内容是程序设计。程序设计的质量和科学性直接关系到软件开发的质量和用户的需求。因此,我们必须重视程序设计。只有形成良好的设计意识和规范化思想,才能使程序设计更加完善,提高软件的生产效率和质量。下面主要对几种常用的程序设计方法进行比较和分析,为软件工程的发展打下良好的基础。
1软件工程概述
1.1软件工程的概念
实际上,软件工程研究的是软件的开发和后期维护,它结合了标准化、系统化和量化的特点,以实现软件实际开发和维护的价值,并能有效地将现有技术与以前更好的技术结合起来,从而更好地保证软件的质量。软件工程包括很多内容,主要包括数据库、软件开发工具、程序语言设计、系统平台等。在现代信息时代,各个领域都离不开软件的应用。最常用的软件主要包括操作系统、游戏、办公软件、电子邮件和手动界面[1]。软件工程的出现和应用不仅提高了软件生产效率,降低了投资成本,而且在一定程度上促进了经济和社会的发展,促进了人们生活质量的提高。
1.2软件工程的基本目标和原则
软件工程也可以看作是一个解决软件问题的项目,即指导和处理软件中遇到的问题。在软件工程的概念中,软件的开发应该根据市场的需求进行。虽然开发过程由团队主导,但仍应充分考虑客户的需求,根据客户的要求和标准,在给定的成本和流程下,开发出高效、适应性强、可靠性高、可维护性强、操作方便、能满足客户需求的相关产品。但需要注意的是,在实施软件工程的过程中,必须按照相关原则来完成。主要原则包括:信息隐藏、模块化、抽象化、确定性、一致性、本地化、可验证性和完整性。
⑴ 信息隐藏是指利用封装技术完成对程序模块细节的隐藏,从而简化模块的接口。
(2) 模块化就是把程序分成几个独立的系统,每个系统都有自己独立的程序。应该注意的是,模块的数量应该得到很好的控制,不能太大或太小。太大容易增加内部复杂度,太小容易增加整个系统的复杂度。
⑶ 抽象的原则是保持事物最基本的特征,用层次抽象的方法从上到下逐个细化,从而完成对软件开发过程的控制,简化复杂性。
(4) 确定性原则是,软件开发过程中应用的相关概念的表达必须准确、标准化和明确。
(5) 一致性原则要求外部接口与内部接口一致,系统要求与运行过程一致。
(6) 本地化的原则是确保模块之间和模块内部的松散耦合和高内聚性。
(7) 可验证性原则:软件开发完成后,应对其进行全面的检查、测试和评审,以确保整个软件系统的性能。
(8) 完整性原则是确保软件中相关功能和组件的完整性。
2.程序设计概述和方法类型分析
2.1编程概念
所谓程序设计就是解决问题的过程。它在软件结构中起着非常重要的作用。通常,编程基于语言,并使用相应的语言进行编程。其流程主要包括设计、分析、编码、检测、故障排除等环节[2]。由于编程需要很强的逻辑思维,因此必须进行规范化,主要从以下几个方面进行:第一,规范源程序中的文档,即规范程序的名称、注释和视觉组织;第二,规范数据信息,即严格要求程序显示变量和顺序,以便有序地找到变量,更复杂的数据应标注注释;第三是规范语言的结构,也就是说,任何语言都不能太长。它应该简洁明了,尽可能减少goto语句的使用,最多选择三种最基本、最常用的编程方法;第四,规范输入输出数据。应检查每个输入和输出数据,使其一致,以确保报告的准确性[3]。
2.2通过编程方法分析需求
所谓需求分析,就是根据客户的需求和客户的要求,在软件功能、运行和设计方面进行设计和分析。分析的过程实际上是发现需求、完善需求、建立模型和完成需求的过程。模型通常包括三种类型:功能模型、控制模型和数据模型。在需求分析过程中,我们必须经历四个环节:理解需求、需求分析、需求标准、需求准备和需求评审。编程中通常使用三种常用的方法,即过程编程法、面向对象设计法和通用设计法。对于其需求分析,我们主要采用结构化分析方法。结构化分析方法也可以成为程序化分析方法。其主要功能是全面了解用户,掌握用户对软件的总体需求。常用的工具包括数据字典、数据流图、决策表和决策树[4]。(1) 数据流图是以图形方式显示数据在系统中的移动。它主要反映系统的逻辑性能,也是逻辑模型的工具之一。绘制数据流图时,应自上而下、自外而内逐条细化其内容,以确保数据整体的准确性和可靠性。(2) 数据字典是集成系统相关数据的程序列表,主要包括五个部分:数据流、数据项、数据结构、处理和存储。通过这种方式分析客户需求,不仅可以准确、全面地了解客户需求,而且可以提高软件开发质量,有利于提高软件效率。
3编程方法的比较
程序设计方法也可以称为结构化方法。它起源于1970年之后,在软件工程中发挥着重要作用。工艺法的设计原则是自上而下、精益求精、模块化。所谓模块化,就是在软件系统中设置独立的子模块,将所有模块拼接后形成一个完整的软件系统。然而,在软件工程不断发展的过程中,问题逐渐暴露出来,其中软件生产效率低、维护困难是最常见的问题。由于其低抽象性和易于实现,更适合处理一些简单的小规模问题。
面向对象设计方法最早是在1980年发现并应用的。它的出现改善了过程编程中存在的问题,极大地提高了软件的生产效率,为软件的维护提供了方便。在现阶段,它也已成为最常用的设计方法。面向对象设计是将软件系统划分为单个对象,每个对象的存在取决于对外部世界的分析。可以说,它更类似于我们的认知方式,它可以利用继承和类来实现建立符合我们认知方式的软件系统与程序设计方法相比,面向对象设计方法用对象代替了以往的功能分解。它的主要特点是封装,即代码和相关数据存储在对象中,并用对象封装,这样数据和代码就不会受到外部影响,不能被修改或访问。继承也是对象化的一个主要特征,即可以重新定义父类中获得的相应操作或属性;另一个特性是多态性,即父对象定义的方法。子对象还可以根据自己的需要和方式对其进行改进,以自行完成相应的操作。面向对象的设计方法更加注重对象的分析和设计,具有高度的抽象性和复杂的实现过程。它主要适用于相对复杂的问题,尤其是对象之间的层次关系问题。
随着我国软件技术的不断发展,通用设计方法得到了发展和广泛应用。通用设计方法是根据类型需求分析需求之间的关系,完成软件结构和逻辑的建立。通用设计方法的主要目的是将算法与对象行为分离,使算法的设计与数据的整体结构无关。通过改变它们之间的关系,可以将强或和关系转化为弱或和关系,从而确保软件复用功能[6]。它主要包括三个部分:一是概念,即一组与目标数据实际上不相关,但可以实际操作数据的定义;第二种是模型,即将数据应用于相应概念时形成的模型;第三是加强。当一个概念整合了其他概念的所有功能时,这个概念就是对其他概念的强化。通用设计方法注重软件的抽象性和通用性。它的优点是具有高度的抽象性和广泛的程序应用。它既能满足多数据分类的操作,又能保证原始效率,但同时也使其实现更加复杂。因此,它的主要应用对象是具有高度通用性和抽象性的问题。综上所述,这三种方法具有不同的特点和共同的特点,即良好的可靠性和安全性。三种方法的比较如表1所示。
通过对相关图表和上述内容的分析,可以看出本文研究的三种方法都有其独特性。对于小规模、简单或单一的问题,可以采用程序方法;面向对象方法非常适用于行为多态性和继承性问题;对于需要相同类型需求分析的问题,通用方法是最可行的。
4结论
根据以上编程方法的对比分析,我们可以根据客户的需求和特点选择合适的方法来提高用户的满意度。编程方法的比较和分析对软件开发非常有益。我们应该深刻理解这些方法,充分发挥基于它们的不同方法在未来发展中的作用。我们相信我们会走得更远。然而,尽管如此,问题的存在也是不可避免的,因此我们应该继续改进和创新,并逐一解决问题,以促进其发展。
Summary:
This paper analyzes the programming methods in software engineering, compares the three methods of object-oriented, process-oriented and generalization, and expounds their respective characteristics and existing relations for selection in application.
Key words: software engineering; Programming; Structural objectification; Generalization
0 Introduction
Software engineering actually appeared at the end of 1960. In the process of continuous development of software, its problems have gradually become prominent, leading to a “software crisis”. The emergence of software crisis created software engineering. Later, software engineering was gradually recognized and recognized by people, and has been widely used. Until today, with the development of information technology, software engineering is also the basis of the development of software and computer technology. Programming is an important part of software engineering. The quality and scientificity of program design are directly related to the quality of software development and the needs of users. Therefore, we must pay attention to program design. Only by forming a good design consciousness and standardized thought can we make the program design more perfect and improve the production efficiency and quality of software. The following mainly compares and analyzes several common programming methods, so as to lay a good foundation for the development of software engineering.
1 Software Engineering Overview
1.1 concept of software engineering
In fact, software engineering studies software development and later maintenance. It combines the characteristics of standardization, systematization and quantification to realize the value of software actual development and maintenance, and can effectively combine the existing technology with the previous better technology, so as to better ensure the quality of software. Software engineering includes many contents, mainly including database, software development tools, program language design, system platform and so on. In the modern information age, all fields are inseparable from the application of software. The most commonly used software mainly includes operating system, games, office software, e-mail and manual interface [1]. The emergence and application of software engineering not only improves the software production efficiency and reduces the investment cost, but also promotes the economic and social development and the improvement of people’s quality of life to a certain extent.
1.2 basic objectives and principles of software engineering
Software engineering can also be regarded as a project to solve software problems, that is, to guide and deal with the problems encountered in software. In the concept of software engineering, software development should be carried out according to the needs of the market. Although the development process is led by the team, we should still fully consider the needs of customers, and develop relevant products with high efficiency, strong adaptability, high reliability, strong maintainability, convenient operation and meeting the needs of customers under the given cost and process according to the requirements and standards of customers. However, it should be noted that in the process of implementing software engineering, it must be completed in accordance with relevant principles. The main principles include: information hiding, modularization, abstraction, certainty, consistency, localization, verifiability and integrity.
(1) information hiding refers to the use of encapsulation technology to hide the details of program modules, so as to simplify the interface of modules.
(2) Modularization is to divide the program into several independent systems, and each system has its own independent program. It should be noted that the number of modules should be well controlled, not too large or too small. Too large is easy to increase the internal complexity, and too small is easy to increase the complexity of the whole system.
⑶ the principle of abstraction is to keep the most basic characteristics of things and refine them one by one from top to bottom with the method of hierarchical abstraction, so as to complete the control of the software development process and simplify the complexity.
(4) The principle of certainty is that the expression of relevant concepts applied in the process of software development must be accurate, standardized and clear.
(5) The consistency principle requires that the external interface is consistent with the internal interface, and the system requirements are consistent with the operation process.
(6) The principle of localization is to ensure loose coupling and high cohesion between and within modules.
(7) Principle of verifiability: after the completion of software development, it shall be comprehensively inspected, tested and reviewed to ensure the performance of the whole software system.
(8) The integrity principle is to ensure the integrity of relevant functions and components in the software.
- Program design overview and method type analysis
2.1 programming concepts
The so-called programming is the process of solving problems. It plays a very important role in software structure. Generally, programming is based on language and programmed in the corresponding language. Its process mainly includes design, analysis, coding, detection, troubleshooting and other links [2]. Because programming needs strong logical thinking, it must be standardized, mainly from the following aspects: first, standardize the documents in the source program, that is, standardize the name, annotation and visual organization of the program; Second, standardize data information, that is, strictly require the program to display variables and order in order to find variables in order, and more complex data should be annotated; The third is to standardize the structure of language, that is, no language can be too long. It should be concise and clear, reduce the use of goto statements as much as possible, and select at most three most basic and commonly used programming methods; Fourth, standardize input and output data. Each input and output data should be checked for consistency to ensure the accuracy of the report [3].
2.2 analyze requirements through programming method
The so-called demand analysis is to design and analyze the software function, operation and design according to the needs and requirements of customers. The process of analysis is actually the process of discovering requirements, perfecting requirements, establishing models and completing requirements. Models usually include three types: functional model, control model and data model. In the process of requirements analysis, we must go through four links: understanding requirements, requirements analysis, requirements standards, requirements preparation and requirements review. Three common methods are usually used in programming, namely process programming method, object-oriented design method and general design method. For its demand analysis, we mainly use structured analysis method. Structured analysis method can also become programmed analysis method. Its main function is to fully understand users and master users’ overall needs for software. Common tools include data dictionary, data flow diagram, decision table and decision tree [4]. (1) Data flow diagram is to graphically display the movement of data in the system. It mainly reflects the logical performance of the system and is also one of the tools of logical model. When drawing the data flow diagram, its contents should be detailed one by one from top to bottom and from outside to inside, so as to ensure the accuracy and reliability of the data as a whole. (2) Data dictionary is the program list of integrating system related data, which mainly includes five parts: data flow, data item, data structure, processing and storage. By analyzing customer needs in this way, we can not only accurately and comprehensively understand customer needs, but also improve the quality of software development and improve software efficiency.
3 Comparison of programming methods
Programming methods can also be called structured methods. It originated after 1970 and plays an important role in software engineering. The design principle of process method is top-down, excellence and modularization. The so-called modularization is to set up independent sub modules in the software system and splice all modules to form a complete software system. However, with the continuous development of software engineering, problems are gradually exposed, among which low software production efficiency and difficult maintenance are the most common problems. Because of its low abstraction and easy implementation, it is more suitable to deal with some simple small-scale problems.
Object oriented design method was first discovered and applied in 1980. Its appearance improves the problems existing in process programming, greatly improves the production efficiency of software, and provides convenience for software maintenance. At this stage, it has also become the most commonly used design method. Object oriented design is to divide the software system into single objects. The existence of each object depends on the analysis of the external world. It can be said that it is more similar to our cognitive way. It can use inheritance and classes to establish a software system in line with our cognitive way. Compared with the programming method, the object-oriented design method uses objects to replace the previous functional decomposition. Its main feature is encapsulation, that is, the code and related data are stored in the object and encapsulated with the object, so that the data and code will not be affected by the outside and cannot be modified or accessed. Inheritance is also a main feature of objectification, that is, the corresponding operations or attributes obtained in the parent class can be redefined; Another feature is polymorphism, the method defined by the parent object. Sub objects can also be improved according to their own needs and ways to complete the corresponding operations by themselves. The object-oriented design method pays more attention to the analysis and design of objects, and has a high degree of abstraction and complex implementation process. It is mainly applicable to relatively complex problems, especially the hierarchical relationship between objects.
With the continuous development of software technology in China, the general design method has been developed and widely used. The general design method is to analyze the relationship between requirements according to type requirements and complete the establishment of software structure and logic. The main purpose of the general design method is to separate the algorithm from the object behavior, so that the design of the algorithm has nothing to do with the overall structure of the data. By changing the relationship between them, the strong or sum relationship can be transformed into weak or sum relationship, so as to ensure the software reuse function [6]. It mainly includes three parts: one is the concept, that is, a group of definitions that are not actually related to the target data, but can actually operate the data; The second is the model, that is, the model formed when data is applied to corresponding concepts; The third is to strengthen. When a concept integrates all the functions of other concepts, this concept is the reinforcement of other concepts. The general design method pays attention to the abstraction and generality of software. Its advantage is that it has a high degree of abstraction and a wide range of program applications. It can not only meet the operation of multi data classification, but also ensure the original efficiency, but also make its implementation more complex. Therefore, its main application object is the problem with high generality and abstraction. To sum up, these three methods have different characteristics and common characteristics, that is, good reliability and safety. The comparison of the three methods is shown in Table 1.
Through the analysis of relevant charts and the above contents, it can be seen that the three methods studied in this paper have their uniqueness. For small-scale, simple or single problems, procedural methods can be adopted; The object-oriented method is very suitable for the problems of behavior polymorphism and inheritance; For problems requiring the same type of requirements analysis, the general method is the most feasible.
4 Conclusion
According to the comparative analysis of the above programming methods, we can choose appropriate methods according to the needs and characteristics of customers to improve user satisfaction. The comparison and analysis of programming methods are very beneficial to software development. We should deeply understand these methods and give full play to the role of different methods based on them in future development. We believe we will go further. However, despite this, the existence of problems is inevitable. Therefore, we should continue to improve and innovate, and solve the problems one by one to promote its development.