Mvnforum設計者概述MvnForum論壇的架構和設計

 mvnforum是一個非常不錯的開源論壇,由於工作關係,我研究了這個論壇的構架,雖然不是十分完美,但也異常的強大和易於擴展,在這裏轉貼一下那位越南開發者對構架的簡單描述:

        I will try to describe the framework, the sequence of an app in this framework, the initial design of it and some reasons for these design:
       At the beginning, I decide to learn the j2ee technology because I think it is a promissing technology. What I learned at that time was the Blueprint Java Petstore, and I love its MVC model very much. I also need a forum for my site, but there is not any good opensource forum, so I and my friends at MyVietnam.net decide to build one. Next is the decision to use Jsp/Servlet instead of EJB, and we build a version based on the Petstore ideas, but specially designed for Jsp/Servlet, now it is the core library and is released as the MyVietnam framework, and the forum are open source for everyone (naturally mvnForum are using MyVietnam framework )
        We dont just want mvnForum to only be an independant java webapp, but a plugin that can integrate seamlessly to any existing apps, so you can say that mvnForum is a web plugin (look at the package net.myvietnam.mvnplugin.mvnforum)
       All the plugins will use the same core lib, that is MyVietnam Core Library, or MyVietnam Webapp Framework (note that it is not a full feature framework)
       All plugins will base on the MVC model, and can include as many modules as you want (mvnForum has 2 modules: user and admin). Each module has a Controler servlet (eg: ForumUserServlet), this servlet call a processor (eg: UserModuleProcessor) to handle the control of the module. the actual mapping is in a MapHandler (eg: ForumURLMapHandler).    Next, the processor call the WebHandler (eg: PostWebHandler), and the WebHandler call WebHelper (eg: PostWebHelper) for access database functionalities.
       If there is an error, then the Processor will catch and forward to an error page. Otherwise, the Processor will forward to a correct View based on the info in the MapHandler.
       All the view (*.jsp) should not process any thing, instead it only display the data that the WebHandler has prepared. It means that if there is an error in jsp page, then it can be considered as a serious error (look at the error page in each of the jsp files)
That is a summary, if you need to further explaination, just ask here

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章