The client-side Flickr widget is developed following the same principles as the clientside RSS widget.The server-side code does not fetch the Flickr HTML;instead,the client-side class does this via the Proxy.Get Xml method.It downloads the entire Flickr feed’s XML to the client, which allows the client-side class to offer paging functionality through all the photos it received right on the browser without making any asynchronous post backs or proxy calls.The user can look through the photos very quickly,and the returned XML is cached on the browser for 10 minutes. Sub sequent visits within 10 minutes delivers the photo’s XML from browser cache, and the widget loads instantly on the client without requiring any asynchronous post back or proxy calls.
The client-side class Fast Flickr Wid get is in the same format as the Fast Rss Wid get class.It’s available in Wid getsFast Flickr Wid get.js(see Example).
Constructor of load function of FastFlickrWidget
Constructor of load function of FastFlickrWidget(continued)
It takes the Flickr feed URL,a container div ID, and the next and previous link ID.These links are needed because the class toggles previous/next links based on page index during paging.
The showPhotos function (shown in Example) does all the work for creating a 3 × 3 table, images, and hyperlinks for the photo items.
The showPhotos function inFastDomainWidget.js
The showPhotos function inFastFlickrWidget.js (continued)
The server-side web control contains minimal UI besides the settings panel.It contains an empty container and the previous/next links (see Example ).
FastFlickrWidget web control’s Page_Load event
FastFlickrWidget web control’s Page_Load event (continued)
FastFlickrWidget web control’s OnPreRender event
The following are some benefits of the client-side widget over the server-side version:
• ViewState is not delivered to client during the first load or asynchronous postback because there’s almost no UI element.
• The Flickr photo XML is cached on the browser and saves roundtrips to the network.
• The proxy’s server-side caching (e.g.,thousands of users requesting the same interesting photos will not make thousands of calls to Flickr).
• Paging through photos is instant because it is done entirely on the client side, which makes this version a lot faster.
ASP.NET Related Interview Questions
|VB.NET Interview Questions||C#. NET Interview Questions|
|ASP.NET Interview Questions||ADO.Net Interview Questions|
|Windows Presentation Foundation(WPF) Interview Questions||Windows CE .NET Interview Questions|
|Dot Net Framework Interview Questions||Asp Dot Net Mvc 4 Interview Questions|
|Asp Dot Net Mvc Interview Questions|
Introducing Web Portals And Dropthings.com
Architecting The Web Portal And Widgets
Building The Web Layer Using Asp.net Ajax
Building The Data And Business Layers Using .net 3.5
Building Client-side Widgets
Optimizing Asp.net Ajax
Creating Asynchronous, Transactional, Cache-friendly Web Services
Improving Server-side Performance And Scalability
Improving Client-side Performance
Solving Common Deployment, Hosting, And Production Challenges
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.