Community Server Topic One: Overview Community Server_ practical tips

Source: Internet
Author: User
Tags sql injection sql injection attack
Community Server topic One: Overview Community server

Community Server (CS) is a very good asp.net open source software, the current official release of the system includes three parts: ASP.net forums, Dottext, Gallery. If you are a member of a CS architecture website, you can easily have a blog, a photo album, and also discuss with others in the forum, thus forming a user-centric community, which is the meaning of the name Community server.

CS structure is very ingenious, three sets of original open source software in the Telligent systems together, unified user management and permission settings (menbership), the unification of exception handling, unified localization resource management (multi-language implementation) and so on. Although this is not fully viewed as the portal implementation, but from the point of view of the code is very modular, you can quickly expand at the same time to achieve good performance. To achieve these are mainly dependent on two projects in the project: Communityservercomponents and Communityservercontrols.

Communityservercomponents contains a number of global business logic classes, such as: Globals, context, and some interfaces and parent classes used to inherit, such as: Group, section, Thread, Post, etc., There is the entity class that implements membership. Exception handling and URL rewrite is implemented by inheriting IHttpModule interface, of course, to achieve IHttpModule inheritance must be configured, the project through the class csconfiguration to achieve some global configuration. HttpHandler has also been used, mainly to deal with a number of non-existent URLs, such as reading the user's avatar is the use of HttpHandler. Caching is one of the most effective ways to improve running efficiency as a Web program in the project is mainly in the Cscache class, the class has no advanced code is mainly to the caching method packaging, and then for global unified management.

Communityservercontrols focuses on the business logic of UI performance, which includes many common user-defined controls, typically editor, Resourcelabel, Resourcelabel several items in the Web page under the basic has his figure. This project also has an important purpose is to provide skin functionality, Templatedwebcontrol for forums, Blog, gallery several projects to provide skin base class, of course, if you expand CS Add your own project, Also need to inherit Templatedwebcontrol, specific how to achieve the skin after the theme of a separate introduction, asp.net forums Original skin use is the full name (such as: Skin-postview.ascx), However, in current projects, the full name is not required to provide only "skin-{0}.ascx" in the base class, followed by GetType (). Name gets {0}, and the combination is the full name. In other words, as long as the need to expand the skin class name and the skin of the {0} name is the same, you can automatically find his corresponding skin, small improvements convenient many. CS uses membership to unify user and privilege management, and user and Rights management is the foundation of all extension projects, so Communityservercontrols implements membership UI business logic.

Communityserverforums, Communityservergalleries, Communityserverblogs is the implementation of three projects, three-tier structure, through a large number of inheritance, abstraction and so on completed. Communityserverguestbook is a simple extension project, analysis code you will find that the CS extension is very easy, and efficient.

CS in the database has some excellent design, such as the full use of stored procedures, many times the master will tell you that all the use of stored procedures in the project is not sensible, but CS do this. The key point is that he has a sqlgenerator class and some XX query classes that generate SQL text (mostly variable search and post queries) as required, and then these SQL text is passed in as a parameter to the stored procedure. Finally use exec to perform it to get the desired results. SQL text is more flexible than a stored procedure, but vulnerability is finally exploited by a SQL injection attack, and CS is a way to kill two birds, of course, it takes more time to write code. There is the use of stored procedures to achieve data paging reading.

The Communityserverweb project is a collection of all webpage HTML, resource files, configuration files, JS, and so on. The project itself does not have logical code, the analysis is mainly the structure and arrangement of the directory.

CS and ASP.net 2.0 closely related, membership, Localization, MasterPage, Url rewrite these in the ASP.net 2.0 familiar words in CS you can easily see their implementation, not just use, You can see through the code how they are implemented.

Said a lot of advantages, and finally said the disadvantage: because the predecessor of CS is asp.net forums, in the current release version can also easily see the shadow of forums residue, if you do not understand the development of the people to analyze some variables will let you not feel the mind, The other part of the infrastructure also has a bit of code with forums, but I think with the next release, or the next version of the release CS will be more attractive, I am very much hope that the next version of CS to add WebPart and other features.



You can download the source code from the following address: http://communityserver.org/
Official station http://communityserver.cn/Yubaoyu launched the Chinese language station

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.