Home > Backend Development > PHP Tutorial > At present, domestic mainstream programs mainly have the following problems_PHP Tutorial

At present, domestic mainstream programs mainly have the following problems_PHP Tutorial

WBOY
Release: 2016-07-13 17:23:40
Original
976 people have browsed it

At present, the mainstream programs in China mainly have the following problems (reposted) Author [Travel] 1. Low code efficiency - (take the post.cgi code of a famous domestic forum to obtain the number of the next thread as an example) I have no intention of attacking, nor do I Do you know if this code is still available now? This is the May 2001 version. I only make a comment on this fragment: $dirtoopen = "$lbdir" . "forum$inforum"; //Open the directory of the corresponding forum section opendir (DIR, "$dirtoopen"); @dirdata = readdir(DIR); //Read all files closedir (DIR); //Close directory handle @sorteddirdata = grep(/.thd.cgi$/,@dirdata); //Get all theme files @newdirdata = sort numerically(@sorteddirdata); //Sort @neworderdirdata = reverse(@newdirdata);//Reverse order $highest = $neworderdirdata[0];//Get the file name with the largest number $highest =~ s/.thd.cgi$//;// Get the maximum number $newthreadnumber = $highest + 1; //Add 1 to get the number for this publication. As you can see, when publishing a new topic, although the code is very short, all the files in the entire section directory are scanned. Once and sorted twice assuming this directory has NN multiple topics, the speed can be imagined. Therefore, whether the argument that "the forum seems slow is actually due to too much JS" is valid, please consider 2. The code is not standardized and belongs to the manual workshop type. For example, in a well-known domestic CGI forum, the naming of its program components is inexplicable, and it is bbs, and bbs1, bbs2, there are cjyh, xiu, which I don’t know where they came from, and there are also Chinese abbreviations + English abbreviations like yhreg. Worse situations usually occur inside Chinese programs, where someone often consciously writes X million lines of programs (It can be called a program group) It's amazing. Unfortunately, the code is really a mess, and the variable/function naming is messy. Compared with the excellent foreign works, it pales in comparison and is out of the question to upgrade and maintain. Most of the reasons for the low level of domestic programs are often said. There is something more serious here. Taking a well-known commercial Perl text forum in China as an example, the price is quite high. Unfortunately, when I open the program, I can't find the flock function from beginning to end. The first lesson of self-learning network programming, I know the concept of locking. I really don't understand how this program can ensure its "commercial" stability (if it has any amazing conceptual breakthroughs, that's another matter, but I'm sorry for being stupid, I didn't see it) 3. Function It is fancy and impractical, which is popular among Chinese people, but it does not conform to the international trend. In fact, more background setting management is more important, and VB has given a good example. 4. Others such as the core concept is too old, the degree of modularity is poor, etc. cannot be said. I have overcome all these problems, but I am trying hard. I want to promote these ideas and strive to promote Chinese Internet software to reach a higher level

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532212.htmlTechArticleThe current domestic mainstream programs mainly have the following problems (reposted) Author [Travel] 1. Low code efficiency - (to Take the post.cgi of a famous domestic forum to obtain the code of the next thread as an example) I...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template