tailieunhanh - Practical Web 2.0 Applications with PHP phần 10
trong cuốn sách này, chúng tôi đã phát triển một ứng dụng web có phần đầy đủ. Mặc dù tính năng có thể được thêm vào một ứng dụng, có một câu nói cũ rằng 10% cuối cùng của sự phát triển của một ứng dụng có 90% thời gian. Điều này thường đề cập đến tất cả các chi tiết nhỏ trong việc đưa ra một cái gì đó | Simpo PDF Merge and Split Unregistered Version - http CHAPTER 14 Deployment and Maintenance So far in this book we have developed a somewhat complete web application. Although features can be added to an application there is an old saying that the last 10 percent of the development of an application takes 90 percent of the time. What this typically refers to are all the little details in making the application something that can be used reliably by many people. In this chapter I will cover some of the details that this refers to such as handling errors and notifying the user accordingly that something went wrong deploying the application on a production server using application logs and backing up the application. Application Logging In Chapter 2 we set up logging capabilities for our web application meaning we can record when various events occur. Although the only events we actually recorded were related to user logins and blog indexing the idea was that we put a foundation in place that can easily be used anywhere in the application whenever required. Having said that a logging system isn t much use if there s no way to use the log. In the following sections I will talk more about the logging system and show how it can be extended and used. The reason for looking at the logging system first in this chapter is that the changes we will make later in this chapter for handling site errors rely partly on the features added here. E-mailing Critical Errors to an Administrator Zend_Log provides the ability to have multiple writers for a single logger. A writer is a class that is used to output log messages be it to a file as we have done so far a database or an e-mail. The Zend Framework doesn t ship with a writer that can e-mail log messages but we can easily write our own by extending the Zend_Log_Writer_Abstract class. We then register the new writer with the logger so critical errors can be sent to the e-mail address we will add to the application .
đang nạp các trang xem trước