Lập trình iphone chuyên nghiệp part 19

Sau khi Apple đưa ra quyết định chiến lược để hỗ trợ các ứng dụng trên nền Web cho iPhone và iPod touch hơn là các ứng dụng gốc, tối ưu hóa nổi lên như một vấn đề ghi trước cho nhà phát triển ứng dụng | Bandwidth and Performance Optimizations Once Apple made the strategic decision to support Web-based applications for iPhone and iPod touch rather than native applications optimization emerged as a front burner issue for application developers. With native applications programmers can code in their personal style efficient or not because the actual performance hit is negligible even on a mobile device like iPhone. What s more in a decade where broadband is now the norm many Web developers have fallen into those same tendencies and allow their sites and applications to be composed of ill-formed HTML massive JavaScript libraries and multiple CSS style sheets. However when you are developing applications for iPhone and iPod touch you need to refocus your programming and development efforts toward optimization and efficiency. What makes it different from normal Web apps is that the developer can no longer rely on the fact that the user is accessing the application from a broadband connection. iPhone users may be coming to your application using Wi-Fi or a much slower EDGE connection. Therefore as you develop your applications you will want to formulate an optimization strategy that makes the most sense for your context. You ll want to think about both bandwidth and code performance optimizations. Your Optimization Strategy If you spend much time at all researching optimization strategy and techniques you quickly discover that there are two main schools of thought. The first camp is referred to as hyper-optimizers in this book. A hyper-optimizer will do almost anything to save a byte or an unneeded call to the Web server. They are far more concerned with saving milliseconds than they are about the readability of the code that they are optimizing. The second camp perhaps best described as relaxed optimizers are interested in optimizing their applications. But they are not interested in sacrificing code readability and manageability in an effort to save a nanosecond .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.