dongrouyuan5685 2011-11-28 13:24
浏览 48
已采纳

如何描述我的网络应用程序的内部工作原理

I have designed a web app, this application contains not only some complex controllers, models and views but also some custom libraries and a database.

On top of this there is an ajax layer so: javascript functions and their related server side functions.

I've developed this app by myself and I want some way to ensure that 1 year down the line, if someone else picks it up there is some reference to the logic flow.

Are there tools for this? Has anyone had this issue before?

  • 写回答

3条回答 默认 最新

  • dongpuchao1680 2011-11-28 13:56
    关注

    A good beginning would be to start using PHP Documentor (PHPDoc) before your code base gets too large. Even then, it's not too hard to go back and tag your classes, etc. PHPDoc will crawl the code base and produce documentation, typically a web-based (HTML) set of docs, but you can also produce PDF and more. The functions, methods, classes, etc. will have links to related elements of your code. I say before it gets too large, because you will want to go back and add comment tags to enhance the output of the documents. PHPDocumentor (PHPDoc) can be found here http://www.phpdoc.org/ , and information and tutorials can be found all over the web. If you have gone this far with PHP then surely you must have noticed comments like this...(doc blocks)

    /**
     *@todo something I need to do
     *@param [type] [$varname] [description]
     *
     */
    

    These tags/DocBlocks are to be parsed by PHPDoc, and are very useful...Most IDE's too are very friendly to using DocBlocks and will sometimes enhance code hinting, etc. based on the DocBlocks in your code.

    For the Database...there are many tools and teqniques but here is one suggestion...

    The database can be described by tools that will build diagrams. For instance, when using MySQL, you could install MySQL Workbench, and this will then give you the tools to connect to the database and build a diagram similar to the picture on this page... http://forge.mysql.com/wiki/MySQL_Workbench, plus many other tools for reverse-enginerring and/or designing, tools for ORM, and more. Sometimes to just diagram and existing DB can be very useful especially when there are many relationships. MySQL Workbench will give you the option to send the diagram to PDF or an image. All very useful.

    Not only will this help future developers, but these tools will help yourself too. We're all surprised to realize what we forget after a few weeks, months, etc. of not looking at the code. Even a busy weekend can make for a slow start again on Monday morning.

    For my last suggestion...and I will be simple here, but look into bug/issue tracking. There are many online or you can install your own. Some go along with version control (like at GitHub, Unfuddle, BitBucket, etc.)...or you can install your own. I find Bugzilla is pretty easy to install if your using Ubuntu it's right in the repository and installs with ease.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装