March 2007Since my original post on the subject, there are 2 additional tutorials for handling data in the Flex Quick Starts area of the Adobe Flex Development Center.
If you have ASP code that you want to run on a scheduled basis, there is a way to do so that avoids you having to compile your code into a Console Application (or use a Console Application to call your main code in a Web Service on a periodic basis) and run it as a Scheduled Task in Windows. The technique described below leverages the callback feature of ASP.NET cache expiration to trigger the running of your desired code on a periodic basis. One key advantage of using this technique is that you have a tighter code base (without having to branch out into Console Application) that is easier to maintain and deploy. Another main advantage is that you can implement data-driven (robust and easy to maintain) scheduling rules instead of having your scheduling logic embedded within a Windows Scheduled Task (which has its own set of administrative burdens).
The Web Page (A) with frequent visitor traffic calls a Web Service Procedure (B) every time the web page loads. It is best if you use a web page that gets a page view approximately every minute. If the web page you use does not get frequent visitor traffic, then you will not be able to run your scheduled code with precise timing. [sample code] The Web Service Cache Procedure (B) stores a dummy value in cache for a specified time interval and defines a Delegate Procedure (C) to be called upon cache expiration. This code first checks for the existence of the dummy value in cache; if it does not exist, then the value is inserted into cache and set to expire in an amount of time that represents the periodicity with which you want your scheduled code to run. [sample code] The Delegate Procedure (C) calls a Web Service Procedure (D) to establish an HTTPContext, which is essential for proper subsequent code execution. It is important to appropriately set the timeout property of this web service call; the default value of 90 seconds may not be enough time for your scheduled code to finish running. [sample code] The Web Service Run Procedure (D) automatically establishes HTTPContext and calls a Scheduled Procedure (E) that contains the main code that should be run. [sample code] The Scheduled Procedure (E) executes the code that is to be run automatically at periodic intervals. Now that you have code that fires on a routine basis, you can wrap this code within custom processing logic to implement complex rules that dictate valid processing times. [sample code] Eylon put together a cool example of Flex's skinning capabilities, illustrating why there's no reason to rely just on the default look and feel when publishing a Flex application. Eylon's napkin skin example is presented in 3 stages (1 | 2 | 3) that explain the various skinning techniques employed. I found this information from Sho Kuwamoto's blog posting. Since my original post on the subject, there is an additional tutorial for building an advanced user interface with Flex in the Flex Quick Starts area of the Adobe Flex Development Center.
A few years ago, my longtime friend Kevin Peskin began using his creative and artistic talents toward producing unique works of art. His paintings are best described by Kevin himself: These surreal landscapes give the viewer the freedom to let the mind wander to a place unknown. The complexity of light, color and texture creates a visual experience that allows the imagination to run free. My paintings are a journey of the heart, mind and moods with the appearance of unfamiliar reality and solitude... Kevin has artwork for sale and produces commissioned pieces as well. Enjoy taking a look at his website, The Artwork of Kevin Peskin. |
about
contact
rg -at- ryangorer.com
tags
syndication
creations
|