Mono-software.com

AspNet

Posts in category AspNet


Bookmark and Share
ASP.NET C# Twitter Module - Tweets Feed
This content has not been rated yet. 
A small and "optimized" UserControl that will display a Twitter Tweets Feed. Inspired by the Deepu MI's Blog post and Peter Bromberg article "ASP.NET Twitter Link Tracker for Friend Posts via Twitter and Otter APIs" I will describe how to optimize an existing Twitter Feed updater in a few simple steps.
Bookmark and Share
This content has not been rated yet. 

Asp.Net team has released new updated of MS Ajax library that includes (As ScottGu stated):

  • Better Imperative Syntax: A new, simplified, code syntax for creating client controls.
  • Client Script Loader: A new client-side script loader that can dynamically load all of the JavaScript files required by a client control or library automatically, and executes the scripts in the right order.
  • Better jQuery Integration: All Microsoft Ajax controls are now automatically exposed as jQuery plug-ins.

You can read more about it here.

If you take a closer look you can see that team has released new small tool called Microsoft Ajax Minifier which can be used to reduce the size of the javascript files. Ajax Minifier has the following components:

  • ajaxmin.exe – A command-line tool for minifying JavaScript files.
  • ajaxmintask.dll – A MSBuild task for minifying JavaScript files in a Visual Studio project.
  • ajaxmin.dll – A component that you can use in your C# or VB.NET applications to minify JavaScript files.

Other optimization tools that you might try:

- Telerik RadCompression http://www.telerik.com/products/aspnet-ajax/compression.aspx

- Microsoft Ajax Minifier http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34488

- MonoSoftware WAO http://www.mono-software.com/Pages/Web-Application-Optimizer.aspx

- Alachisoft nCache http://www.alachisoft.com/ncache/

Bookmark and Share
Microsoft AJAX CDN – good or a bad thing ?
This content has not been rated yet. 

Microsoft ASP.NET team announced the Ajax CDN (Content Delivery Network) service that provides caching support for AJAX libraries. The service is available for free, does not require any registration, and can be used for both commercial and non-commercial purposes.

CDN is “Content delivery networks (CDNs) composed of "edge cache" servers that are strategically placed around the world at key Internet network points.  These "edge cache" servers can be used to cache and deliver all types of content – including images, videos, CSS and JavaScript files.” - ScottGu’s Blog.

You also need to know that this isn’t the first CDN on the market, course Google has it’s own CDN – Google CDN

The good thing

- MS Ajax CDN allows you to use enterprise infrastructure for free to speed up your web applications by referencing Ajax scripts from CDN. So basically you just need to put few links inside your web application and you are set to use CDN.

- The requests are much faster than the requests to your web server

- You can lower you bandwidth by using CDN

- In .Net 4.0 CDN will be built-in with ScriptManager

The “bad” thing

- At the moment there is a small amount of script available at CDN

- It is unclear how script / resource version changes will be handled, so if reference to the script is changed you may end up with no reference (404) or changed reference that may have different methods, method signatures etc. (Maybe some of below links has detailed explanation about this issue)

Also you can checkout these links:

- ScottGu’s Blog post - Announcing the Microsoft AJAX CDN

http://weblogs.asp.net/scottgu/archive/2009/09/15/announcing-the-microsoft-ajax-cdn.aspx

- Speed test - Microsoft's CDN vs Google's CDN

http://www.timacheson.com/Blog/2009/sep/microsoft_launches_ajax_content_distribution_network#comment82

Bookmark and Share
Tip: Out of process session state management
This content has not been rated yet. 

Few days ago I have looking some information on the web related to out of process session state management and I have stumble upon few good articles that I want to share with you.

Asp.Net Built-in solutions

Some 3rd Party Session State Options

Bookmark and Share
Asp.Net Session Prolong (Session Keep-Alive)
This content has not been rated yet. 

More and more users complaint that they loose data when session expires and that they need to enter the data again in the form. If we take a look at this problem form user viewpoint we can see that this can be annoying, so lets try to implement a way for user not to loose the data.

 

There are few things that we need to have in mind before we start:

 

  • Keep in mind that session data will be lost if we loose session (So we need to prolong session)
  • If user is in secured part of the web site we need  to check credentials for returning user

 

Let’s start with counting down things that we need:

 

 

adsadsa