优化Web应用程序开发策略 [英] Optimising strategies for web app development

查看:72
本文介绍了优化Web应用程序开发策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如今,许多网络应用程序都在使用他们自己没有使用的API或代码,并且经常使用它效率低下。一些谷歌地图mashup浮现在脑海中。

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.

使用php / asp后端,HTML,javascript(特别是现在所有的AJAX) - 存在很多潜在的瓶颈,问题

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[...]

对于特定于PHP的开发,请查看:

PHP Code Sniffer

PHP AST

PHP Sat

PHP依赖

PHP Lint

PHP调用图

xDebug


[...]以及$ b的浏览器$ b客户端?

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

对于客户端调试,请查看:

JSLint

Firebug

YSLow

歌剧 - 蜻蜓

WebKit(Safari / Chrome浏览器) - Web Inspector

IE - Microsoft脚本调试器

有关'减速'的帮助请查看c疼痛,使用

ob_start (例如 ob_start('ob_gzhandler'); )和 ob_end_flush

ETags

.htaccess Gzipping ,也这里

PHP Memcaching

您还可以使用:

CSS Sprites

减少HTTP请求

缩小CSS和JS

除了这些工具之外,非常重要的是要注意的是你的生产能力整个代码(您的整个应用程序)依赖于您依赖的第三方API以及您自己需要的代码(代码)。通常情况下,您总是会被您选择的API(您更改其来源的能力有限)所限制,尤其是您选择的API的组合。您的核心重点应该是分析您自己的编码层,尽可能多地遵循每个API的指导原则......说起来容易做起来难。

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.

这篇关于优化Web应用程序开发策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆