开发者

Optimising strategies for web app development

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?


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.


This is a great place to start and has served me well:

http://stevesouders.com/hpws/rules.php

in addition the above mentioned pagespeed is a must.

Beyond that Ergo is right, this is an expansive area, and nearly every inefficiency will need different tools and methodologies to overcome it. You're talking about potentially an entire career's worth of knowledge. But it sounds like you're asking the right questions. Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜