Wednesday, November 9, 2011

reStructuredText Primer — Sphinx 1.1.2 documentation

reStructuredText Primer — Sphinx 1.1.2 documentation

Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.

It was originally created for the new Python documentation, and it has excellent facilities for the documentation of Python projects, but C/C++ is already supported as well, and it is planned to add special support for other languages as well. Of course, this site is also created from reStructuredText sources using Sphinx!

Sphinx is under constant development. The following features are present, work fine and can be seen “in action” in the Python docs:

  • Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), manual pages, plain text
  • Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information
  • Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children
  • Automatic indices: general index as well as a module index
  • Code handling: automatic highlighting using the Pygments highlighter
  • Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and more

Sphinx uses reStructuredText as its markup language, and many of its strengths come from the power and straightforwardness of reStructuredText and its parsing and translating suite, the Docutils.

Tuesday, November 8, 2011

3-tier

Ref from:

http://blog.cemschool.com/home/space.php?uid=1&do=blog&id=348

主從式(client/server)架構

在傳統的主從式(client/server)架構當中,為兩層式(2-tier)架構,包括用戶端的使用者介面層(presentation tier),和伺服器端的資料服務層(data services tier)。

用戶端的使用者介面層(presentation tier),負責接收使用者的資料輸入,和將結果顯示出來,譬如用戶端應用程式。一般會包括商業邏輯(business logic)的工作,包括計算、輸入核對、用戶端電腦管理、與伺服器溝通等工作。

伺服器端的資料服務層(data services tier),負責伺服器的工作,包括資料庫的資料處理和網站伺服器(web server),有時也會一一些商業邏輯(business logic)的工作。

傳統主從式(client/server)架構最大的缺點,為隨著功能的增加,用戶端的應用程式會愈來愈複雜,不但維護不易,用戶端電腦的負荷也愈來愈大。

三層式(3-tier)架構

三層式(3-tier)架構與傳統兩層式架構最大的差異處,為將商業邏輯(business logic)單獨分離出來,以減輕放置於用戶端或伺服器端電腦的負擔。

於三層式(3-tier)架構當中,所謂三層係指使用者介面層(presentation tier)、商業邏輯層(business logic tier)、和資料服務層(data services tier)。

使用者介面層(presentation tier),負責接收使用者的資料輸入,和將結果顯示出來,譬如瀏覽器或其他用戶端應用程式。

商業邏輯層(business logic tier),作為使用者介面與資料庫的橋樑,負責商業法則(business rules)、與業務有關的資料處理、網站伺服器(web server)等工作,譬如使用IIS的網站伺服器,採得ASP撰寫程式,並透過DCOMMTSMicrosoft Transaction Server)的元件相溝通,再透過ODBC與各種支援ODBC的資料庫相連接。

資料服務層(data services tier),負責資料庫或訊息的處理,譬如使用SQL Server資料庫的預儲程序(stored procedures),或使用MSMQ做訊息的處理等。


##HIDEME##