Recommended in this week's ASP. NET English Technical article [03/23-04/05]: C #, Visual Studio, MVC, deadlock, Web 2.0 API, jquery, iis7, fileupload

Source: Internet
Author: User

Summary

A total of 9 articlesArticle:

    1. 10 tips for improving the productivity of C # and Visual Studio by 2008
    2. ASP. net mvc action filter: cache and Compression
    3. ProgramStop working and Its Solution: Part 1: deadlock
    4. C # and VB. NET class libraries that call Digg, Flickr, Facebook, YouTube, Twitter, live services, Google, and other Web 2.0 APIs
    5. Use jquery to call the JSON Web Service of ASP. NET
    6. ASP. net mvc Framework: Part 2: Testing
    7. New iis7 modules: log reports, database management, etc.
    8. Add a filter function to the ASP. NET 2.0 fileupload Control
    9. Onload? Page_load? Or load events?

 

[1]10 tips to boost your productitables with C # and Visual Studio 2008(10 tips for improving productivity of C # and Visual Studio by 2008)

Such articles are relatively rampant and all are titled "10. However, it may be helpful to take a look occasionally. After all, do not spend too much time:

    1. Learn key bindings
    2. Generate xml comments with ghostdoc
    3. Auto-implement Properties
    4. Refactor
    5. Add commands to Visual Studio 2008
    6. Speed up compilation with project configuration
    7. Let Visual Studio generate unit test code
    8. Use interface-driven-design
    9. Make a mockery of Dependencies
    10. Data drive unit tests

Among them, the small tool introduced in 5th add commands to Visual Studio 2008 is very good, saving a lot of time.

 

[2]ASP. net mvc action filter-caching and Compression(ASP. net mvc action filter: cache and compression)

The author provides two action filters in ASP. net mvc, allowing us to easily add cache and compression support.

The cache filter can add attributes for the method as follows:

 
[Cachefilter (duration = 60)]
Public VoidCategory (StringName,Int? Page)

The compression method is also very similar:

 
[Compressfilter]
Public VoidCategory (StringName,Int? Page)

 

[3]Hangs and how to solve them-Part 1-deadlocks(Program stop and solution: Part 1: deadlock)

The article itself does not have much details, but the last series of links provided are very good. It is definitely a good resource for the system to understand problems related to deadlocks:

    1. Deadlock (critical sections)
    2. Deadlock (executive resources)
    3. Deadlock (mixed objects)
    4. Deadlock (LPC)
    5. Deadlock Monitor
    6. No more hangs-advanced techniques to avoid and detect deadlocks in. Net apps
    7. Detecting deadlocks in multithreaded Win32 applications
    8. Under the hood -- MSJ, January 1996

 

[4]C # and VB. NET libraries to Digg, Flickr, Facebook, YouTube, Twitter, live services, Google and other Web 2.0 APIs(C # and VB. NET class libraries that call Digg, Flickr, Facebook, YouTube, Twitter, live services, Google, and other Web 2.0 APIs)

Many Web 2.0 provides specialized APIs for other programs to call. Naturally, some class libraries encapsulate these Apis. This article lists the call class libraries of several popular Web 2.0 websites. For example, you only need to use the following syntax to call Flickr:

 
Photossearchoptions Options =NewPhotossearchoptions ();
 
Options. tags ="Blue, sky";
 
Options. Extras | = photosearchextras. datetaken | photosearchextras. originalformat;
 
Photos photos = Flickr. photossearch (options );

 

[5]Using jquery to consume ASP. net json Web Services(Use jquery to call the JSON Web Service of ASP. NET)

ASP. net Ajax client class library has built-in ASP. net JSON web service support, but as long as the same request is "Simulated", any JavaScript client class library can be called the same.

This article introduces how to use jquery to call the JSON Web Service of ASP. NET. In fact, there is no skill at all:

 
$ (Document). Ready (Function(){
 
$. Ajax ({
 
Type:"Post",
 
URL:"Rssreader. asmx/getrssreader",
 
Beforesend:Function(Xhr ){
 
Xhr. setRequestHeader ("Content-Type",
 
"App/JSON; charset = UTF-8");
 
},
 
Datatype:"JSON",
 
Success:Function(MSG ){
// Hide the fake progress indicator graphic.
 
$ ('# Rsscontent'). Removeclass ('Loading');
 
 
 
// Insert the returned HTML into the <div>.
 
$ ('# Rsscontent'Pai.html (msg. D );
 
}
 
});

 

[6]ASP. net mvc Framework-Part 2: Testing(ASP. net mvc Framework: Part 2: Testing)

It seems that the MVC framework has a high degree of attention to testing. Many articles have recently introduced this topic. This article also provides a step-by-step general usage method, from why to how to test.

The following code tests a controller.Code:

 
[Testmethod]
Public VoidAboutoverride ()
 
{
 
Homecontrollerfortest controller =NewHomecontrollerfortest ();
 
 
 
Controller. About ();
 
 
 
Assert. areequal ("Index", Controller. selectedviewname,
 
"Shocould have redirected to index");
 
}

 

[7]New log reporting, database management, and other cool admin modules for IIS 7(New iis7 modules: log reports, database management, etc)

Scott introduced some other management modules in fancy iis7. For example, this log report:

But in fact, I still think that the previous IIS 6 interface is quite pleasing to the eye, and the time for using IIS 7 is not short. I still haven't figured out where some functions are ............

 

[8]Adding filter action to fileupload control of ASP. NET 2.0(Add filtering function to the ASP. NET 2.0 fileupload Control)

The so-called filtering function is actually only allowed to upload files with a certain type of extension. In fact, HTML does not support such built-in functions. Therefore, to implement such functions, you still need to cooperate with the client JavaScript with the server-side custom verification logic. Of course, I personally think the best way is to use a special flash upload control.

 

[9]Onload vs. page_load vs. Load event(Onload? Page_load? Or load events ?)

If you want to perform some custom operations during page loading, You can override the onload method of the page, add it directly in the default page_load, or listen to the page load events, so what are the differences between the three? How should we choose?

This article compares the above three methods in terms of performance, programming style, code consistency, and object orientation ......

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.