|
|
||||||||||||||||||||
| Home > Software Quality News > Ajax performance issues: Everything old is new again | |
| Software Quality News: |
|
||
Bob Buffone was involved with Rich Internet Applications before they were called Rich Internet Applications. For a long time, he has been interested in the performance issues that can challenge the creators of Web applications.
As chief architect at Web client development tool maker Nexaweb Technology, Buffone is often called upon to help customers solve newly emerging Ajax performance issues. He discussed those matters last month at The Ajax Experience conference in Boston. After listening to Buffone, at least one conclusion that can be made is that some Ajax performance issues are similar to those found in server-side object-oriented development. To avoid pitfalls, developers have to go back to basics, yet again. Buffone told Ajax Experience attendees that the number of requests and the size of requests required at "startup time" (when the JavaScript of a page is invoked) is important to the ultimate performance of an Ajax application. Moreover, in his research, Buffone has uncovered some basic JavaScript performance "gotchas" -- few of which are actually surprising. For example, he advises developers that global property access is much slower than local property access. Too, calls to get data or data objects can be extremely slow, and so developers must take care in writing related portions of code. In general, in using an operator, "it should be very particular to what you want to accomplish," Buffone said. "Simple objects are always faster." In short, knowing your code, and how it does what it does, is more important than ever. And it can be even more difficult, Buffone chided, in an era in which there is a lot of "cutting and pasting" going on as developers reuse existing JavaScript code. We spoke with Buffone after his session on performance tuning Ajax applications. Q: On some level in terms of performance issues for Ajax it seems the "gotchas" are similar to object software issues that predate Ajax. As you have pointed out, simple objects are faster than complex ones. And data access is an issue. The migration to the Web has been such that a lot of people are using JavaScript who aren't familiar with it. They are coming from a different background -- from Java, C# or C++. And, for example, people coming from Java -- when they first start working in JavaScript -- don't worry about the issues of working with it.
But really what is happening as people try to leverage the Web as a platform, is they are really trying to push the envelope of what JavaScript can do and what the browser JavaScript engines can do. So you really need to go back kind of to the basics and think about how you write every line of code, which really is not a bad thing. I just think the methodology that people have taken is kind of a hack-and-attack mode, not really starting with a structure and understanding the basic concepts. Q: Even in the early Web days, teams would test out to different browsers, but in some places they got away from that. So what ends up happening, and this is a trap everybody falls in, people use FireFox and Opera to develop their applications, and their applications run really great, but most of the world is using IE 6 and IE 7. You have to be really diligent. You have to understand how things run on the different browsers and take a function-by-function look at things. When I first started -- maybe it was just the environment I came up in -- people were very diligent about looking at the code and doing code reviews and making sure that in each line of each iterator your looping over-stop was constructed in the right way. And that has been lost in the last few years. Q Well the hardware was getting faster …
'); // --> |
||||||||||||||||||||||||||||||||||||||||||||||
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
| |
|
|||||||