±¾¿ÆÉú±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©
Õª Òª
ÂÛ̳Ìṩһ¿é¹«¹²µç×Ӱװ壬ÿ¸öÓû§¶¼¿ÉÒÔÔÚÉÏÃæÊéд£¬¿É·¢²¼ÐÅÏ¢»òÌá³ö¿´·¨¡£Óû§ÔÚBBSÕ¾µãÉÏ¿ÉÒÔ»ñµÃ¸÷ÖÖÐÅÏ¢·þÎñ£¬·¢²¼ÐÅÏ¢£¬½øÐÐÌÖÂÛ£¬ÁÄÌìµÈµÈ¡£
±¾ÎÄÌÖÂÛÁËÒ»¸öÍøÂçBBS µÄÉè¼ÆÓëʵÏÖ¹ý³Ì£¬ÏêϸµØ½²ÊöÁË¿ª·¢Ò»¸ö»ùÓÚWeb µÄBBS ÍøվϵͳËùÉæ¼°µ½µÄ¼¼ÊõºÍ·½·¨¡£ÏµÍ³Ê¹ÓÃMicrosoft Visual Studio 2005 Ϊǰ̨¿ª·¢¹¤¾ß£¬ÒÔSQL Server 2005 ΪÊý¾Ý¿âƽ̨£¬¸ù¾ÝÃæÏò¶ÔÏ󿪷¢ÔÀí£¬²ÉÓÃÁË»ùÓÚB/S½á¹¹µÄ¿ª·¢Ä£Ê½À´¿ª·¢±¾ÏµÍ³¡£ÆäÖÐÖ÷ÒªÔËÓÃÁËASP.NET ƽ̨£¬ADO.NET Á¬½ÓÊý¾Ý¿â¼¼Êõ£¬Ê¹ÓÃC# ÓïÑÔ±àд¡£¾ßÓÐÒ»°ãµÄBBS Ëù¹²ÓеÄһЩ¹¦ÄÜ¡£°üÀ¨Óû§µÄ×¢²áµÇ¼¡¢ÂÛ̳¹«¸æºÍ¶ÌÏûÏ¢µÄ·¢²¼¡¢ÂÛ̳ÉçÇøµÄÌÖÂÛ¡¢ÂÛ̳µÄÓÑÇéÁ´½Ó¡¢ºǫ́Êý¾Ý¿âÐÅÏ¢µÄ¹ÜÀíά»¤µÈ»ù±¾Ä£¿é¡£
BBSÂÛ̳µÄ´æÔÚʹµÃµØÇò´åµÄ¸ÅÄîÀëÎÒÃÇÔ½À´Ô½½ü£¬Ê¹µÃÈËÓëÈËÖ®¼äµÄ¹µÍ¨¡¢½»Á÷±äµÃ¸ñÍâµÄÈÝÒס£ÌرðÊÇÔÚITÁìÓò£¬Ö»ÓÐÓÐÁ˺ܺõĽ»Á÷£¬¼¼Êõ²Å»áµÃµ½½ø²½¡£Òò´Ë£¬ÕÆÎÕÈçºÎÉè¼Æ²¢¿ª·¢Ò»¸öÂÛ̳¹ÜÀíϵͳҲÏԵøñÍâµÄÖØÒª£¬¶øÇÒÒâÒåÉîÔ¶¡£
¹Ø¼ü´Ê£ºBBSÂÛ̳£»B/S½á¹¹£»ASP.NET 2.0£»ADO.NET
I
±¾¿ÆÉú±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©
Abstract
Forums provides a common electronic whiteboard, and each user can write on, or put forward their views may release information. BBS site users a variety of information services available, release information, discussions, and chat.
This article discusses a network design and implementation of BBS in detail about the development of a Web-based BBS website system involved in the technology and methods. System uses Microsoft Visual Studio 2005 development tools for the front to SQL Server 2005 database platform, according to principles of object-orienteddevelopment, adopted based on B / S structure of the development model to develop the system. The main use of the ASP.NET platform, ADO.NET database connections, use the C# language. The paper details the system analysis, system design methods applied in the actual development of the system, and summarizes some of the development process experience and understanding.
BBS Forum makes the existence of the concept of global village closer and closer, making communication between people, communication becomes particularly easy. Especially in the IT field, only a very good exchange, technology will beprogress. Therefore, mastering how to design and develop a forum for management systems is particularly important, and far-reaching.
Key words£ºBBS Forum£»B/S structure£»ASP.NET 2.0£»ADO.NET
II
±¾¿ÆÉú±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©
Ŀ ¼
µÚ1Õ Ð÷ ÂÛ........................................................................................................... 1
1.1 ¿ª·¢±³¾°.................................................................................................... 1 1.2 ϵͳĿ±ê.................................................................................................... 1 1.3 BBS¶Ô´óѧÉúѧϰÉú»îµÄÓ°Ïì ................................................................ 2 µÚ2Õ ¹Ø¼ü¼¼Êõ½éÉÜ............................................................................................. 3
2.1 IFrame¿ò¼Ü¼¼Êõ ........................................................................................ 3 2.2 µÚ3·½×é¼þFreeTextBox .......................................................................... 3
2.2.1 FreeTextBoxµÄ×÷Óà ........................................................................ 3 2.2.2 FreeTextBoxµÄʹÓ÷½·¨ ................................................................ 3 2.3 ADO.NET¼¼Êõ .......................................................................................... 4 2.4 Transact-SQL¼¼Êõ ..................................................................................... 6 2.5 JavaScript½Å±¾ÓïÑÔ ................................................................................... 6 2.6 ASP.NET¼¼Êõ ............................................................................................ 7 µÚ3Õ ÐèÇó·ÖÎö..................................................................................................... 8
3.1 ÐèÇó¸ÅÊö.................................................................................................... 8 3.2 ϵͳÓÃÀýͼ................................................................................................ 8 3.3 ϵͳ¹Ø¼üÁìÓòÀà...................................................................................... 10 µÚ4Õ ϵͳ¸ÅÊö................................................................................................... 11
4.1 ϵͳ½éÉÜ.................................................................................................. 11 4.2 Ö÷Òª¹¦ÄÜ.................................................................................................. 11 4.3 Ö÷Ҫģ¿é½éÉÜ.......................................................................................... 11
4.3.1 Ö÷Ò³Ãæ........................................................................................... 11 4.3.2 ÂÛ̳ע²áÄ£¿é............................................................................... 12 4.3.3 ÂÛ̳µÇ¼ģ¿é............................................................................... 13 4.3.4 ÂÛ̳°æ¿éÑ¡ÔñÄ£¿é....................................................................... 13 4.3.5 Ìû×Ó·¢±íÄ£¿é............................................................................... 14
µÚ5Õ ϵͳ·ÖÎö................................................................................................... 15
5.1 BBSÂÛ̳¹ÜÀíϵͳµÄ¼¼Êõ¿ÉÐÐÐÔ·ÖÎö .................................................. 15 5.2 ϵͳ½á¹¹.................................................................................................. 17 5.3 ϵͳ¿ª·¢»·¾³.......................................................................................... 17
III
±¾¿ÆÉú±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©
µÚ6Õ ϵͳÉè¼Æ................................................................................................... 18
6.1 ϵͳ×ÜÌåÉè¼Æ.......................................................................................... 18 6.2 Êý¾Ý¿âÉè¼Æ.............................................................................................. 19
6.2.1 Êý¾Ý¿âÐèÇó·ÖÎö........................................................................... 19 6.2.2 Êý¾Ý±íµÄ½á¹¹............................................................................... 22 6.2.3 Êý¾Ý±íÖ®¼ä¹Øϵͼ....................................................................... 25 6.2.4 Êý¾Ý¿â²Ù×÷ÀàÉè¼Æ....................................................................... 25 6.3 ÂÛ̳ע²áÉè¼Æ.......................................................................................... 26 6.4 ÂÛ̳µÇ¼Éè¼Æ.......................................................................................... 27 6.5 Ìû×Ó±êÌâÏÔʾÉè¼Æ.................................................................................. 28 6.6 ÐÂÌû×Ó·¢±íÄ£¿éÉè¼Æ.............................................................................. 28 µÚ7Õ ϵͳʵÏÖ................................................................................................... 29
7.1 ·¢±íÌû×ÓµÄʵÏÖ...................................................................................... 29
7.1.1 ʵÏֵĹؼü¼¼Êõ........................................................................... 29 7.1.2 ¹¦ÄÜʵÏÖ....................................................................................... 29 7.1.3 Ö÷ÒªÏà¹Ø´úÂë............................................................................... 29 7.2 ä¯ÀÀÌû×ÓµÄʵÏÖ...................................................................................... 31
7.2.1 ʵÏֵĹؼü¼¼Êõ........................................................................... 31 7.2.2 ¹¦ÄÜʵÏÖ....................................................................................... 31 7.2.3 Ö÷ÒªÏà¹Ø´úÂë............................................................................... 31
µÚ8Õ ϵͳ²âÊÔ................................................................................................... 33
8.1 ²âÊÔ·½°¸¼°²âÊÔÓÃÀý.............................................................................. 33
8.1.1 ²âÊÔ·½·¨½éÉÜ............................................................................... 33 8.1.2 µ¥Ôª²âÊÔ....................................................................................... 34 8.2 ²âÊÔ×ܽá.................................................................................................. 34 µÚ9Õ ½á ÂÛ......................................................................................................... 35 ²Î¿¼ÎÄÏ×................................................................................................................. 36 Ö л....................................................................................................................... 37 ¸½ ¼....................................................................................................................... 38
IV
±¾¿ÆÉú±ÏÒµÉè¼Æ£¨ÂÛÎÄ£©
µÚ1Õ Ð÷ ÂÛ
1.1 ¿ª·¢±³¾°
BBSÊÇÔÚ1992Äêµ×Ëæ׏ú¼Ê»¥ÁªÍøµÄ¿ªÊ¼Á÷ÐжøѸËÙ·¢Õ¹ÆðÀ´µÄ¡£»¥ÁªÍøµÄ²úÉúʹµÃÒÔÇ°Ö»ÄÜÔÚ±¾µØ·ÃÎʵÄBBS¿ÉÒÔ±»È«ÊÀ½çËæÒâ·ÃÎÊ£¬Õâ¶Ô´ó¶àÊýÈËÀ´ËµÊǼ«¾ßÓÕ»óÁ¦µÄ¡£BBSÊÇÒ»¸öÓжàÈ˲μӵÄÌÖÂÛϵͳ£¬ÔÚBBSÉÏ´ó¼Ò¿ÉÒÔ¶ÔÒ»¸ö¹²Í¬¸ÐÐËȤµÄÎÊÌâ½øÐÐÌÖÂÛ£¬×ÔÓɵط¢±í×Ô¼ºµÄÒâ¼ûÓë¹Ûµã£¬²¢ÇÒÄÜÖ±½ÓÓëÆäËûµÄÈ˽øÐйµÍ¨¡£°´ÕÕÍøÕ¾µÄÐÔÖÊÒÔ¼°·þÎñ¶ÔÏóÀ´·Ö£¬Æù½ñÓÐÒÔϼ¸ÖÖÀàÐÍ£ºÒ»ÊÇУ԰BBS¡£Ð£Ô°BBS×÷ΪÖ÷ÒªµÄ¼¯Öеأ¬ÔÚBBSÁìÓò¾ßÓоÙ×ãÇáÖصĵØλ¡£ ÓÉÓÚУ԰BBSµÄ·±ÈÙ£¬ÎüÒýÁ˺ܶàµÄÉç»áÈËÊ¿²ÎÓë¡£¶þÊÇרҵBBS¡£Ò»°ãÊÇÓɸ÷¸öÖøÃûµÄ´ó¹«Ë¾×齨£¬ÈËÃÇ¿ÉÒÔÀûÓÃÆä½»Á÷×Ô¼º¶ÔÉÌÆ·µÄ¿´·¨£¬¸üΪÖØÒªµÄÊÇ¿ÉÒÔ½â¾öÉÌƷʹÓÃÖеÄÎÊÌâ¡£ÈýÊÇÉÌÒµBBS¡£ËüÊÇÓÉISP½¨Á¢µÄBBSÕ¾µã£¬ÕâÀàBBSÕ¾µã¸÷ÖÖÐÅÏ¢±È½Ï¶à£¬ÄÚÈÝÏ൱·á¸»¡£ËÄÊÇСÐ;ÖÓòBBS¡£Ò»°ãÊÇÓɸöÈË»òСÐͼ¯Ì彨Á¢£¬ÎªÐ¡·¶Î§ÐÅÏ¢½»Á÷·þÎñ¡£ÎåÊÇÒµÓàBBS¡£Ò»°ãÓÉBBS°®ºÃÕ߸öÈËÀûÓÃһЩÃâ·Ñ¿Õ¼ä°ìµÄBBS£¬Ä¿µÄÊÇΪ¹ã´óÍøÓÑÌṩһ¸öÔÚijЩרҵÉϵĽ»Á÷³¡Ëù¡£ÁùÊÇÐÂÎÅýÌåBBS¡£ÊÇÓÉÐÂÎÅýÌåÍøÕ¾ÉèÁ¢µÄ£¬Îª¹ã´óÍøÓÑÌṩ¶ÔÐÂÎÅÐÅÏ¢½øÐÐÆÀÂÛ¡¢·¢±íÒâ¼ûºÍ¹ÛµãµÄ³¡Ëù¡£Ëæ×Å»¥ÁªÍøÊÂÒµµÄÅ·¢Õ¹¡£BBS£¬Õâ¸ö¾ßÓÐÇ¿´óʵʱ½»»¥¹¦ÄÜ£¬ÐÅÏ¢½»Á÷µÄƽ̨£¬Ê¹ÈËÃDz»ÔÙÏñµçÊÓ¹ÛÖÚ¡¢µç̨ÌýÖÚ¡¢±¨Ö½ÔÓÖ¾¶ÁÕßÒ»ÑùÖ»ÊDZ»¶¯µØ¹Û¿´¡¢ÊÕÌý¡¢ÔĶÁ£¬¶øÊÇ¿ÉÒÔ»ý¼«¶ø¼°Ê±µØ²ÎÓëÌÖÂÛ£¬ÔÚÁ˽âËûÈ˹۵ãÒâ¼ûµÄͬʱҲ¿ÉÒÔ·¢±í×Ô¼ºµÄ¿´·¨¡£
BBSÂÛ̳ϵͳÊÇΪÁË·½±ã´ó¼ÒµÄ¹µÍ¨ºÍ»ñÈ¡ÐÅÏ¢¶ø¿ª·¢µÄϵͳ¡£ÎÒÃÇÀûÓÃASP.NET֪ʶºÍSQL Server 2005¿ª·¢BBSÂÛ̳¹ÜÀíϵͳ¡£¸ÃϵͳÒÔInternetΪƽ̨£¬Ç°Ì¨¿ÉʹÈκÎÈË×¢²á¡¢µÇ¼¡¢µÇ¼ÔÚÂÛ̳ÉϽøÐз¢Ìû¡¢»ØÌû¡¢ä¯ÀÀÌû×ӵȡ£¹ÜÀíÔ±Ò²¿ÉÒÔÔÚºǫ́¶ÔÌû×Ó¡¢°æ¿é¡¢Óû§µÈ½øÐÐÏà¹ØµÄ¹ÜÀí¡£Ò»¸öСÐÍBBSÂÛ̳ϵͳµÄǰ̨¹¦ÄÜÖ÷Òª°üÀ¨ä¯ÀÀËÑË÷Ìû×Ó¡¢Óû§µÇ½ע²á¡¢·¢±í»Ø¸´Ìû×Ó¡¢¸öÈË×ÊÁϹÜÀíºÍÌû×Ó¹ÜÀí£»ºǫ́¹¦ÄÜÖ÷Òª°üÀ¨Óû§¹ÜÀí¡¢ÂÛ̳°æ¿é¹ÜÀíºÍÌû×Ó¹ÜÀíµÈ¡£
1.2 ϵͳĿ±ê
¿ª·¢±¾ÏµÍ³ÒâÔÚÎüÄɴ󲿷ÖÓÎÀëÔÚÖÚ¶àÂÛ̳µÄ´óѧÉú,´ïµ½Ð£ÄÚÍøµÈÂÛ̳µÄÄ¿±ê¡£ÏµÍ³¿ª·¢µÄ×ÜÈÎÎñÊÇʵÏÖÎÄÕµijɹ¦·¢±í£¬ÁôÑԵķ¢²¼Óë»Ø¸´¡£´Ó¶ø´ïµ½
1