gsoc:2009:phdoe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
gsoc:2009:phdoe [2009/07/15 03:33] – cvs2svn update mrkschangsoc:2009:phdoe [2011/04/17 09:28] – add doc-editor live url mrkschan
Line 9: Line 9:
   * Mailing list: phpdoc@lists.php.net   * Mailing list: phpdoc@lists.php.net
   * Blog: [[http://mrkschan.blogspot.com/search/label/gsoc]]   * Blog: [[http://mrkschan.blogspot.com/search/label/gsoc]]
 +  * Live at: [[https://edit.php.net]]
 ===== Abstract ===== ===== Abstract =====
 Currently, the documentation work is synchronized by cvs. But still, there are potential conflicts due to redundant work. Besides, it's not that easy to share the works or even pipelining the works in a distributed environment. Therefore, a centralized environment is introduced. Currently, the documentation work is synchronized by cvs. But still, there are potential conflicts due to redundant work. Besides, it's not that easy to share the works or even pipelining the works in a distributed environment. Therefore, a centralized environment is introduced.
Line 36: Line 37:
   * June 21 - It's a GDay! The refactoring work is close to finish... The next task is to complete the rest and wrapping up. Read the story at [[http://mrkschan.blogspot.com/2009/06/my-gsoc2009-june-21.html]]   * June 21 - It's a GDay! The refactoring work is close to finish... The next task is to complete the rest and wrapping up. Read the story at [[http://mrkschan.blogspot.com/2009/06/my-gsoc2009-june-21.html]]
   * July 03 - The first milestone is reached =] JS namespace is clear and going to work on the second milestone. Read the story at [[http://mrkschan.blogspot.com/2009/07/my-gsoc2009-july-03.html]]   * July 03 - The first milestone is reached =] JS namespace is clear and going to work on the second milestone. Read the story at [[http://mrkschan.blogspot.com/2009/07/my-gsoc2009-july-03.html]]
 +  * July 24 - Php files are factored, going to complete a SvnClient for the svn-migration ... Read the story at [[http://mrkschan.blogspot.com/2009/07/my-gsoc2009-july-24.html]]
 +  * July 28 - cvs2svn is somehow EVIL!!! I'm digging into how svn authenticate from the Http / WebDav perspective ... Read the story at [[http://mrkschan.blogspot.com/2009/07/my-gsoc2009-july-28.html]]
 +  * July 29 - a script is written to simulate "cvs-login" operation with subversion~ Read the story at [[http://mrkschan.blogspot.com/2009/07/my-gsoc2009-july-29.html]]
 +  * August 5 - SvnClient has been implemented and testing are made. However, problems still remain. Read section "cvs2svn" in [[http://svn.php.net/viewvc/web/doc-editor/trunk/TODO?revision=286827&view=markup]]
 +  * August 13 - I completed the tasks list on my gsoc proposal :p But still... I'm going to keep working on doc-editor ^^ Story at [[http://mrkschan.blogspot.com/2009/08/my-gsoc2009-august-13.html]]
  
 ===== UI Structure ===== ===== UI Structure =====
Line 79: Line 85:
 } }
 </code> </code>
 +
 +===== Factored Php Classes =====
 +  * JsonResponseBuilder (utility class) created for constructing json responses
 +    - success (ExtJsController.getSuccess)
 +    - failure (ExtJsController.getFailure)
 +    - response (ExtJsController.getResponse)
 +  * DBConnection created for manipulating database connection
 +    - singleton
 +    - query (mysqli->query)
 +    - insert_id (mysqli->insert_id)
 +    - real_escape_string (mysqli->real_escape_string)
 +  * AccountManager created for manipulating user account
 +    - singleton
 +    - updateLastConnect
 +    - isLogged
 +    - login
 +    - register
 +    - updateConf
 +    - eraseData
 +    - email
 +  * VCSFactory created for replacing VCS specific operation
 +    - getInstance (obtain VCS client based on config DOC_EDITOR_VCS)
 +  * CvsClient created for cvs i/o
 +    - singleton
 +    - passwdEncode
 +    - authenticate
 +    - checkout
 +    - update
 +    - log
 +    - diff
 +    - commit
 +  * SvnClient created for svn i/o
 +    - singleton
 +    - authenticate
 +    - checkout
 +    - update
 +    - log
 +    - diff
 +    - commit
 +  * RepositoryFetcher created for fetching phpdoc-all repository
 +    - singleton
 +    - getLastUpdate
 +    - getModifies      (get all modified files in pending commit)
 +    - getModifiesById  (get modified files in pending commit queue by id)
 +    - getPendingUpdate
 +    - getPendingReview
 +    - getNotInEn
 +    - getPendingPatch
 +    - getPendingCommit
 +    - getFilesByExtension
 +    - getFileByXmlID
 +    - getFileByKeyword (perform searching on file-path)
 +    - getFilesByDirectory
 +  * RepositoryManager created for managing phpdoc-all repository
 +    - singleton
 +    - checkoutRepository (exec cvs checkout, called in install/firstRun.php)
 +    - cleanUp
 +    - updateRepository (exec cvs update)
 +    - checkbuild (exec php configure.php)
 +    - addPendingCommit
 +    - delPendingCommit
 +    - addPendingPatch
 +    - addPendingDelete
 +    - commitChanges
 +    - clearLocalChange
 +    - setLastUpdate
 +    - postPatchAccept
 +    - postPatchReject
 +    - updateFileInfo
 +    - updateTranslatorInfo
 +    - updateNotInEN
 +    - applyRevCheck
 +  * File created for modeling php-doc files
 +    - isModified
 +    - read (read original/modified file content, depends on passed param & file state)
 +    - save
 +    - parseAttribute (class.php - revParseAttrString)
 +    - getEncoding
 +    - getInfo
 +    - rawDiff  (exec 'diff -uN file file.ext' with stdout output)
 +    - htmlDiff (exec php-file-diff with html output)
 +    - cvsDiff  (exec cvs diff with html output)
 +  * TranslatorStatistic created for computing statistic about translator
 +    - singleton
 +    - getTranslators       (get info about all translators for lang)
 +    - getUptodateFileCount (count up-to-date file contributed by every translator)
 +    - getOldFileCount      (count out-dated file contributed by every translator)
 +    - getCriticalFileCount (count critical file contributed by every translator)
 +    - getSummary           (summary of the statistic about translators)
 +  * TranslationStatistic created for computing statistic about translation
 +    - singleton
 +    - getFileCount         (count all file)
 +    - getTransFileCount    (count translated files for lang)
 +    - getOldFileCount      (count out-dated files for lang)
 +    - getCriticalFileCount (count critical files for lang)
 +    - getNoTransFileCount  (count not translated files for lang)
 +    - getMissedFileCount   (count not translated files for lang TODO... merge with getNoTransFileCount)
 +    - getNoTagFileCount    (count files with no revcheck tag for lang)
 +    - getSummary           (summary of the statistic about translation)
 +  * LogManager created for handling all logging activities
 +    - singleton
 +    - getCommitLog
 +    - addCommitLog
 +    - saveOutputLog
 +    - readOutputLog
 +    - saveBuildLogStatus
 +    - getBuildLogStatus
 +  * Utility (a namespace) created for different utility task
 +    - debug (*NOTE: under global namespace)
 +
 +
 +===== Brainstorming idea =====
 +This section list out ideas for future development.
 +
 +==== Further re-structuring the entire thing ====
 +=== Ideas ===
 +  * Create a core module /core, replacing the /php and /js. The core module basically include glues.
 +  * There will be a folder containing all the available modules ... /module-available.
 +  * The core will look for modules from /module-enabled. Modules inside /module-enabled are soft link (or clone) from /module-available.
 +  * /module-available contains the modules available to be used, like /module-available/mod_patch. In each of the module folders... there will be something like /module-available/mod_patch/{view.js, model.sql, controller.php}.
 +  * Core will basically glue (concat) controller.php under /module-enabled/{all}/, and it also glues view.js for the ui
 +  * Installer will become a script that glues the model.sql under /module-enabled/{all}/.
 +  * ui module naming convention? mod-{module_name}-what?
 +=== Concerns ===
 +  * How to handle inter-module interaction? Using central registry?
 +    * For UI, may try having a central registry that register module
 +    * any interaction will be passed through this single agent
 +    * event listener could be used in case for interaction
 +    * if interaction beyond this scope ... may try returning js from XHR that would invoke appropriate handler
 +
 +==== WYSIWYG doc-book edit ====
 +=== Ideas ===
 +  * we may try using http://www.wymeditor.org/. In one of it's demo http://files.wymeditor.org/wymeditor/trunk/src/examples/15-rdfa-editor.html#, the wymeditor parse a RDF for display
 +  * we may supply doc-book elements and attributes, providing appropriate CSS. Plus, doc-book xml <-> html mapping
 +=== Concerns ===
 +  * Is wymeditor support doc-book xml <-> html mapping and additional element for its parser?
gsoc/2009/phdoe.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1