doujiong9915 2010-12-02 10:07
浏览 40
已采纳

优化Web应用程序开发策略

Many web apps out there these days are using APIs or code that they've not worked with themselves, and quite often are using it inefficiently. Some google maps mashups come to mind.

With php/asp backends, HTML, javascript (especially with all the AJAX these days) - there are so many potential bottlenecks, problems, inefficiencies and double-ups.

What strategies can you suggest to investigating, identifying and resolving slow-downs, redundant code, leaks and other issues in web-apps - both server-side and in the browsesr on client-side?

  • 写回答

2条回答 默认 最新

  • dstobkpm908182 2010-12-02 10:15
    关注

    A very open ended and expansive question- it may be more productive to compartmentalise each area as opposed to looking at the bigger picture, which can be overwhelming. One very important aspect which has an impact on everything you mention is correctly auditing, analysing and debugging your code, some of the tools below can help with this:

    [...]investigating, identifying and resolving slow-downs, redundant code, leaks and other issues in web-apps - both server-side[...]

    For PHP specific development,Look at:

    PHP Code Sniffer

    PHP AST

    PHP Sat

    PHP Depend

    PHP Lint

    PHP Call Graph

    xDebug

    [...]and in the browsesr on client-side?

    For client side debugging, look at:

    JSLint

    Firebug

    YSLow

    Opera - Dragonfly

    WebKit (Safari / Chrome Browsers) - Web Inspector

    IE - Microsoft script Debugger

    For help with 'slow downs' look into caching, either using

    ob_start (eg. ob_start('ob_gzhandler'); ) and ob_end_flush

    ETags

    .htaccess Gzipping, also here

    PHP Memcaching

    You can also use:

    CSS Sprites

    Reduced HTTP requests

    Minified CSS and JS

    These tools aside, what it is VERY important to note is that your ability to produce great code as a whole (your entire app) is dependant on what third party APIs you rely on, and what you yourself require (your code). More often than not you will always be constricted by your choice of APIs (you have a limited ability to change their source) and notably the combination of APIs you choose. Your core focus should be the analysis of your own coding layer, adhering to as much of the guidelines for each API as you can...easier said than done.

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

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)