Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Monday, October 3, 2011

Visual Studio 2011 and .NET Framework 4.5 developer

There is a Fantastic news from the Microsoft for developer because microsoft recently announced the Visual Studio 2011 and .NET Framework 4.5 developer preview in Anaheim, California. There are some new features at this movement with Visual Studio 2011 and .NET Framework 4.5 developer preview are as under

1.) Visual Studio 2011 developer preview Features

- Develop Metro style Apps for Windows 8
- Enhancements for Game Development
- Code Clone Analysis
- Code Review Workflow
2.) .NET Framework 4.5 developer preview Features

- State machine support in Windows Workflow
- Improved support for SQL Server and Windows Azure in ADO.NET
- ASP.NET has increased investments in HTML5, CSS3, device detection, page optimization, as well as new functionality with MVC4

Monday, November 15, 2010

Difference between Web Service and WCF Service

  • Web services can be hosted in IIS as well as outside of the IIS. While WCF service can be hosted in IIS, Windows activation service,Self Hosting,WAS and on lots of proctols like Named Pipe,TCP etc.Here lots of people disagree how we can host the web service outside of the IIS but Here is the article for that.http://msdn.microsoft.com/en-us/library/aa529311.aspx.
  • In Web Services Web Service attribute will added  on the top of class. In WCF there will be a Service Contract attributes will be there. Same way Web Method attribute are added in top of method of Web service while in WCF Service Operation Contract will added on the top method.
  • In Web service System.XML.Serialization is supported while in the WCF Service System.RunTime.Serialization is supported.
  • WCF Services can be multithreaded via ServiceBehavior class while web service can not be.
  • WCF Services supports different type of bindings like BasicHttpBinding, WSHttpBinding, WSDualHttpBinding etc.while Web services only used soap or xml for this.
  • Web services are compiled into a class library assembly. A file called the service file is provided that has the extension .asmx and contains an @ WebService directive that identifies the class that contains the code for the service and the assembly in which it is located while in WCF.WCF services can readily be hosted within IIS 5.1 or 6.0, the Windows Process Activation Service (WAS) that is provided as part of IIS 7.0, and within any .NET application. To host a service in IIS 5.1 or 6.0, the service must use HTTP as the communications transport protocol.

Wednesday, October 6, 2010

Solving problems with relational database

Data Independence

For a large enterprise, there is a very large body of crucial information. These are the “crown jewels” of the information technology part of the company. This information lasts for the whole lifetime of the enterprise. But applications come and go, like migrating birds. The next application to come along might want access data in a different way, for important reasons. The structure of the database structure must adapt well to these new and changing demands.
With the older styles of data organization (called “network” or “CODASYL”, roughly speaking), sometimes the new application could not be done efficiently. Many times, for all practical purposes, it was impossible to write the application with acceptable performance. You can find the details of this in many books, but to give just one analogy: suppose you have a program with nested loops. In many cases (not 2D arrays), it’s pretty obvious which loop ought to be on the outside. Well, imagine if you forced to do it the other way, even if it made the program very much slower. And that’s just one example.
To solve this, we want data organization that can do two things. First, give every application a view of the database that doesn’t change over time, so that the application keeps working. Second, have a way to change the physical organization of the data without changing any of the software that uses the database system, which may be needed to make the new applications faster without hurting the old ones, or not hurting enough that it matters much. This is called “data independence.”

The Relational Model

A novel and effective solution to data independence, the “relational”, was created by E. F. Codd, in 1970. By representing data in relations, in normalized form, you can solve both of the above problems. I won’t go over all that here; I recommend “An Introduction to Database Systems” by C. J. Date.
(By the way, notice that the name of the book isn’t “… to Relational Database Systems,” even though that’s what the book is. Why bother with a superlative adjective, when “everybody knows” that all database systems, other than ancient ones, are relational?)
The relational model, as an abstract concept, is an excellent and brilliant solution to the data independence problem. Later we’ll see that that is not the only problem for which people want to store data. But in the next post, I’ll look into how well actual relational database systems implement the concept.

Ways to screw up your database design

Database developers often fall into certain design traps — and it’s generally the users who pay the price. See how you can improve your design process and build a more flexible, reliable, and efficient database. 


1: The data’s unimportant; it’s the architecture that matters
It doesn’t matter if your code sings, if you don’t know the data. You want the two to work in harmony and that means spending some time with the people who use and manipulate all that data. This is probably the most important rule: Before you do anything, you absolutely must get intimate with the data. Without that firsthand knowledge, you might make errors in judgment that have far-reaching consequences — like dragging the whole application to a complete halt.

A nonchalant attitude that the data isn’t important isn’t a sign of laziness. It’s a mistaken perception that anything that doesn’t work quite right early on can be fixed later. I just don’t agree. Doing it right from the bottom up will produce a foundation that can grow and accommodate change quickly. Without that foundation, any database is just a few Band-Aids away from disaster.

2: I can do anything with a little code
Some developers are so skilled that they can make just about anything happen with a bit of code. But you can take a good thing too far. One of my biggest complaints about the developers’ psyche is that they want to solve everything with code, even when a system feature exists to handle the need. They claim it’s just easier — easier for them, maybe, but not necessarily easier for those maintaining the database. My recommendation is to use the built-in features, when available, unless you don’t know the RDBMS well enough. If that’s the case, see #3.

3: I can use whatever RDBMS you have
This brings me to the next point: Developers who think the system is unimportant because their coding ability is the only magic they need. Wrong! Unless your hands are tied, choose the best system for the job. You’ll save your client time and money and build a reputation as an honest and comprehensive developer. You might not have a choice, of course. If you find yourself stuck with a system you’re not familiar with or that’s just not right for the job, you might want to excuse yourself from the project. You’re going to take the fall for that decision eventually, even if you didn’t make it.

4: That doesn’t need an index
Very little affects performance like failing to apply an index or applying an index incorrectly. It isn’t rocket science, and there are guidelines that help. But many developers still avoid the task altogether. Without proper indexing, your database will eventually slow down and irritate users. Perhaps the only thing that causes as much trouble as no indexing is too much indexing.

There’s a lot of free information on indexing, but here are my simplest recommendations on the subject:

    * Learn about the index construction the RDBMS uses.
    * Learn when to apply those indexes for optimum coverage.
    * Run the RDBMS’s index analyzation or tune-up tool for hints.

5: This database doesn’t require referential integrity
Enforcing referential integrity protects the validity of your data by eliminating orphans (foreign keys that have no related primary key entity). For instance, in a sales database, you might have an ordered item that doesn’t point to a customer — not a good idea. If your RDBMS supports referential integrity, I recommend that you use it.

6: Natural keys are best
Relational database theory relies on keys, primary and foreign. Natural keys are based on data, which of course has meaning within the context of the database’s purpose. Natural keys are obsolete now that we have systems that can generate sequential values, known as surrogates. They have little purpose beyond identifying entities. (They are usually an auto-incrementing data type).

The superiority of natural versus surrogate keys is a hotly debated topic. Just bring it up in your favorite development list or forum, sit back, and watch the show. Here’s the nitty-gritty though:
    * Natural keys can be unwieldy and awkward to maintain. It might take several columns to create a unique key for each record. It’s doable, but do you really want to accommodate that kind of structure if you don’t have to?
    * Primary keys are supposed to be stable; nothing about data is stable. It changes all the time. In contrast, there’s no reason to ever change a surrogate key. You might delete one, but if you have to change a surrogate key, something’s wrong with your design.
The biggest argument for natural keys is one of association. Proponents insist that you need to be able to associate the key to the actual record. Why? Keys are used by the RDBMS, not users. The other most commonly heard argument is that surrogate keys allow duplicate records. My response is to apply indexes appropriately to avoid duplicate records.
I recommend surrogate keys — always, which is an invitation to hate mail, but it’s my recommendation just the same. I can think of no circumstance where a natural key would be preferable to a surrogate.

7: Normalization is a waste of time
Just writing that title hurts. Unfortunately, I do run into developers who don’t take normalization seriously enough. Normalization is the process of removing any repeating groups and redundant data to related tables. This process supports the RDBMS by theory and design. Without normalization, a RDBMS is doomed. Despite its importance, many developers make a cursory pass through the data and normalize very little, and that’s a mistake you should avoid. Take the time to break down your data, normalizing at least to 2nd or 3rd Normal form.

8: You can’t normalize enough
The previous point may seem to imply that normalization is the panacea of database design. But like code, too much of a good thing can slow things down. The more tables and joins involved in pulling data together into meaningful information, the slower the database will perform. Don’t overdo it — be thorough without being obsessed.

If your normalization scheme requires several tables to generate a common view, you’ve gone too far (probably). In short, if performance slows and there’s nothing wrong with the connection, the query, and so on, excessive normalization might be the culprit.

9: It’ll perform just as well with real data
Failing to test a database for scalability is a huge mistake. During the development stage, it’s acceptable to work with a scant amount of data. On the other hand, a few rows of test data just can’t provide a realistic view of how the database will perform in a production environment. Before going live, be sure to test your database with real data, and lots of it. Doing so will expose bottlenecks and vulnerabilities.
You can blame the database engine for choking on real data — nice work if you can get it (and the client believes you).

10: Only the most elegant code is good enough for my clients
This attitude is another example of how too much of a good thing can be bad. We all want to write the best code possible, but sometimes, good enough is, well, good enough. Time spent optimizing routines that already perform well and accurately can be money down the drain for your client. If the database runs great with a bit of ugly code, so what? Is the trade-off worth the extra time and money you’ll spend to optimize the code to its fullest? I’m betting your client would answer in the negative. I’m not saying write clunky code. Nor am I suggesting that you write code that performs poorly because doing so makes your job easier. I’m saying, don’t put your client’s money into optimizing something that works fine as is. Put that time into good design and a solid foundation — that’s what will support the best performance.

11: You can back it up later
If the data is important enough to store, it’s important enough to protect. Hardware breaks. Mistakes happen. A backup plan should be part of your development process, not an afterthought: I meant to do that. How often should you back up the database, where will you store those backups, and so on, are questions to answer up front, not after your client losses important data.

12: You promised that wouldn’t change
The client promised that a specific business rule would never change and you believed it. Never believe them! Don’t take the easy way out on this one; apply the best design and logic so that change is easy. The truth is, once users become accustom to the database, they’ll want more — and that means change. It’s just about the only part of the whole development process you can depend on.

13: Yes, I can give you the moon
Some developers are so ambitious. Wanting to give users everything they want in the first version is a nice sentiment, but it’s also impractical. Unless the project is small with a specific focus, producing a foundation version that can go into production quickly is preferable. Users won’t get everything they asked for, but they’ll have a production database much sooner. You can add features with subsequent versions. The client gets work quickly and you get job security.

Tuesday, October 5, 2010

Rules for Faster Loading Web Sites

Rules for Faster-Loading Web Sites

These rules are the key to speeding up your web pages. They've been tested on some of the most popular sites on the Internet and have successfully reduced the response times of those pages by 25-50%. The key insight behind these best practices is the realization that only 10-20% of the total end-user response time is spent getting the HTML document to the browser. You need to focus on the other 80-90% if you want to make your pages noticeably faster. These rules are the best practices for optimizing the way servers and browsers handle that 80-90% of the user experience.
These pages are the companion web site for the book High Performance Web Sites. The examples referenced in the book are hosted here. Navigate through the rules listed below to find the associated examples. Each rule page also contains a link to the Yahoo! Developer Network Performance Blog. There you will find a brief summary of the rule along with comments.
  • Rule 1 - Make Fewer HTTP Requests
  • Rule 2 - Use a Content Delivery Network
  • Rule 3 - Add an Expires Header
  • Rule 4 - Gzip Components
  • Rule 5 - Put Stylesheets at the Top
  • Rule 6 - Put Scripts at the Bottom
  • Rule 7 - Avoid CSS Expressions
  • Rule 8 - Make JavaScript and CSS External
  • Rule 9 - Reduce DNS Lookups
  • Rule 10 - Minify JavaScript
  • Rule 11 - Avoid Redirects
  • Rule 12 - Remove Duplicate Scripts
  • Rule 13 - Configure ETags
  • Rule 14 - Make AJAX Cacheable

New Features to have in C# 5.0

C# 4.0 is out with lots of new specs this year. Few of them are really good, like the support of Task level Parallelism, Dynamic behavior of objects, etc. So C# is very rich now in all respects. But this is not the end of everything. We would love to have new things to come up with C#. So let's discuss a few things which I would love to have.

There is already a buzz around on C# 5.0 specifications in forums. A notable discussion around should be some threads like:
  • What features you want to see in C# 5.0
  • C# language speculation 4.5 /5.0
etc. These community links are really great where a lot of people voted for new language specs, while quite a few things are already in process like...

Binding Operators

Binding Operators may be C# 5.0. The support for Binding on .NET objects is awesome. I came to know this from Chris on his post where he speaks how Binding operators looked like long ago. The Delphi assignment operator := is now being used for this purpose. :=: would be used for two way binding. Thus:

comboBox1.Text :=: textBox1.Text; 
means there would be two way binding between the properties so that when ComboBox1.Text changes its Text, it will automatically change the value of Textbox1.Text. Binding is actually not a new thing to the system. In WPF, we already have Binding in place, but for that we need the properties to have implemented from INotifyPropertyChanged. So it is not in the language, the WPF objects are doing this internally by handling the PropertyChanged event on the object. But if that is included as an operator, it would be a cool feature to add on.

Support for Dynamic to the Compiler

Another important candidate for C# 5.0 would be the support for dynamic objects to the compiler itself. There are quite a few occasions where we already did face the flavor of Dynamic behavior of object. You can now defer the determination of type for the object to runtime using the keyword dynamic which is a compile time dynamic while runtime static. The introduction of Expression Trees also defers the compilation of an expression at runtime. You can create objects dynamically at runtime using either inheriting from DynamicObject (which is very easy to do) or by using CodeDom to compile a code at runtime and run the code using reflection. But what if these things are supported by the compiler itself.
As pointed out by Magnus in his post, The future of C# 4.0 and then 5.0, he clearly pointed out what the next version of C# would add up. The compiler must be supporting quite a number of APIs which lets you tweak your code to generate and compile the code at runtime.
But these are not the end of C# 5.0. People all around the globe are putting efforts to make a Wishlist on C# 5.0. A few of those might be:
Pavel's Wishlist on C# 5.0 where he specified quite a number of interesting specs on C# 5.0 but will it be all.
Probably if you ask me what would be your own language features which you like to see, I may name quite a few which I miss:

1. Support for parametrized constructors in Generics.

Yes. it would be nice to have this option in. As we have:

public class T MyClass : T: class, new()

//we might have 
public class T MyClass : T:class, new(int)
This might need adjustment to the compiler. I don't know if it is possible or not. But I definitely miss this in C#.

2. Support for WeakDelegate or WeakEvents

Thomas, rightly identified that WeakDelegate does not work now. You cannot have WeakDelegate defined in your scope.

3. Better treatment for Null

Working with Null has always been a problem for me. We have to treat nulls separately because there is no type associated with Nulls. With the introduction of Nullables around or Null coalesce operators, still there is scope of improving the Null treatment in the language. Say for instance,

int x? = null;
int y? = x + 40;
which results Y to be null. But don't you think there is a scope of betterment here where the nullables might be treated better in case of working with Operations.
Other than that, we could also have ??? operator in place to treat situations like this:

Myobject obj = null;

Myotherobj obj2 = obj.MyProperty ??? new Myotherobj();
It was introduced by Earlz in his post. Really looks nice, huh.

4. Smart Case support

Yes, Switch - Case could allow expressions. While working with it, I miss it very often. Just like what Charles pointed out, I agree with him totally. I would like to have the option to specify:

switch(myobj)
{
   case string.IsNullorEmpty(myotherobj):
                  .....
   case myotherobj.Trim().Lower:
         ....
}

5. Extension properties

Just as we support extension methods, we could also have extension properties which could probably be used from Extension methods only. It is nice to have in certain cases.

[Associate(string)]
public static int MyExtensionProperty { get;set;}
Something like this might come in very handy at times. Probably some other syntax than Attribute Associate would be more fruitful.
Finally, I would like to see your feedback on the topic. Any other things which you miss? You can point them out to me.
Thanks for reading. 

Reference / Author : Abhishek Sur

Thursday, September 9, 2010

What is WCF?

WCF is a .NET platform for developing services .Service is any functionality that can be consumed by the outside world. A service defines well defined communication protocols to communicate with it.
A service can be located anywhere , it could be on local machine on the intranet or even internet.A client consumes the functionality exposed by the service.A service can be anything it can be an independent application like asp.net or it can be another service.
Client and Service communicate with each other by sending messages.
 
SOAP Message SOAP Message
Client HTTP/TCP /MSMQ HTTP/TCP/MSMQ Server







Since the functionality of the service is hidden to the outside world. Service exposes metadata that client uses to communicate with the service. Metadata can be in any technology neutral format like wsdl.
Client always uses proxy to communicate with the service irrespective of where service is located. In WCF every service has endpoints and the client uses theses endpoints to communicate with the service.
Every endpoint has three important pieces of information.
Address , Binding and Contract.
Address specifies the location of the service.
Binding specifies how to communicate with the service(protocol).
Contract specifies what the service does.

A typical endpoint in the configuration file appears as :
<endpoint address = "http://localhost/TestService/" binding="wsHttpBinding"
contract = "MyNamespace.IContract"/>

WCF has four types of contracts
  1. Service Contract: Describes the operations of the service
  2. Data Contract: Define the data types passed to and from the service

  3. Fault Contract: Define the erros raised by the service

  4. Message Contract: Allows the service to interact directly by using the message.
Basic WCF service

System.ServiceModel.dll is the main assembly for WCF services. To create a WCF service we need to apply the service contract attribute either on the interface or the class.

namespace WcfService1
{
     [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        string HelloWorld();

    }
    public class Service1 : IService1
    {      
          public string HelloWorld()
            {
                return "Hello WCF";
            }
      }
}


We can also use explicit interface implementation like this :

         string IService1.HelloWorld()
            {
                return "Hello WCF";
            }


Note when using explicit interface implementation we can't use the public access modifier.

Method Overloading
 
To use method overloading we need to use the name attribute of the OperationContract attribute.

If we write the following implementation for method overloading it will throw an exception at service host load time.

        [OperationContract]
        string HelloWorld();

        [OperationContract]
        string HelloWorld(string Message);


To use method overloading in WCF service we need to use the Name attribute of the OperationContract attribute.

        [OperationContract(Name="HelloWorld")]
        string HelloWorld();

        [OperationContract(Name = "HellowWorldMssg")]
        string HelloWorld(string Message);


In the later articles we will see how to host the service and call it using the client application.

Data Contracts

We can pass only the primitive datatypes to OperationContracts .If we want to pass custom data types to OperationContracts we need to use the DataContract Attribute on the Custom datatype.

    [DataContract]
    class Customer
    {
        int name;
        [DataMember]
        public int Name
        {
            get { return name; }
            set { name = value; }
        }
        int address;
        [DataMember]
        public int Address
        {
            get { return address; }
            set { address = value; }
        }
    }

Thursday, September 2, 2010

The Top Three hottest new majors for a career in technology.

The following is my list of the Top Three hottest academic areas for a future career in tech:
Data Mining/Machine Learning/AI/Natural Language Processing
All of these fields help us sift through and organize huge amounts of information or data. When you apply your knowledge in these areas to a challenging problem in the online space, you know that you are working at a scale that is just immense.  It’s much easier said than done.  If you have a passion for this area and have a technical background there are a multitude of open positions that might hold a long-term career for you.  With the move to the cloud and the sheer amount of information on the web, this area of expertise will continue to be in great demand. Microsoft has a great need for both people interested in the research space and the applied space which is very refreshing.
Business Intelligence/Competitive Intelligence
The ability to see trends, make sense of data to a business audience and help to understand your customers requires a special person. Someone with a mix of engineering, BI/CI experience and a business mindset can take this field to the next level. You will help increase any employer’s bottom line and be able to provide organized data that is extremely valuable to any business. You can help drive business decisions and help your internal audience understand what the data is telling or showing you.
Analytics/Statistics – specifically Web Analytics, A/B Testing and statistical analysis
All of these subjects are offshoots of traditional degrees in CS and mathematics. They all apply to the online world we live in and will also be in great demand as we continue to monetize the web. Retailers, web services, and advertisers will need people in these fields as they try to get the most for their advertising money. As we continue to see the dollar amounts spent for online advertising worldwide, these fields will be hot and we will see online advertising change over time as a result of these positions.
If these fields interest you and you want to find out what some of these jobs really entail, visit our website and search on the terms above to get a more detailed look at the positions. These fields are very HOT and looking long term, the demand will be just that much greater in these areas.

Thursday, August 5, 2010

10 HTML tags which are not used as often as they deserve

1. <fieldset> is a way to group a set of form fields such as inputs or textareas. It's not a usability advantage to have long forms, but when you must you can divide the form in several sections using this block element.

2. <legend> goes hand in hand with <fieldset>: when you insert it into a fieldset, its content will be displayed as the title of the group of fields:
Code : <form><fieldset><legend>My fields<legend><p>Enter your name... <input type="text" name="nickname" /></p></fieldset></form>

3. <label> has both a semantic and practical power which I commonly never seen employed for the good. A label should be associated with a form field in one of the two ways I will show. When the label is linked to the field this way, it acts as an extension for it; for example, clicking on the label of the checkbox will turn on and off the box itself. Instead, clicking on the label of a text field would give the focus to it and put the cursor in it, making the user ready to write. Thus, labels extend the clickable area available to the users.
But that's not all. Labels have also a semantic association with form elements, and as such are read out by screen readers when they access a form. There's no reason to invent styled <div> tags for your forms: put in labels instead.
You can link a label to a field by including the field in the label itself:
Code : <label><input type="checkbox" name="agree" /> I agree to the terms and conditions</label>
Or you can use an id on the input tag which you refer to in the label. Which method you should use is a matter of simplifying the application of styles to both elements.
Code : <label for="nickname">Nickname</label>
<input type="text" id="nickname" name="nickname" />

4. The <button> block element is by far more flexible than its cousin <input type="button"> and <input type="submit">. The reason is you can nest other tags in <button>'s content.
Thus you can go from a simple button:
Code : <input type="button" value="A button" />
To a more complex one:
Code : <button><strong>A strong button</strong></button>

5. <dl> stands for Definition List. It is the equivalent of <ol> and <ul> when the basic element is a tuple composed of two values: name and content. This were originally used for glossaries, but you can find many more creative solutions in the web.

6. <dt> is the definition term, used in the definition list above. Stay tuned for three rows to see a code sample which involves both.

7. <dd> is the definition content.
Code : <form><dl><dt>Nickname:</dt><dd><input type="text" name="nickname" /></dd></dl></form>
And it's indeed a way to delete some of the <div class="label"> rules.

8. <optgroup> is used to group options inside a select element. When there are many <option> tags, a simple layer of hierarchy can go a long way in aiding the user in its choice. Only the options themselves would be selectable, but the optgroup labels would acts as a title for the group.
<select name="enemy">
    <optgroup label="Milky Way">
        <option value="Apophis">Apophis</option>
        <option value="Anubis">Anubis</option>
        <option value="Replicators">Replicators</option>
    </optgroup>
    <optgroup label="Pegasus galaxy">
        <option value="Wraith">Wraith</option>
        <option value="Genii">Genii</option>
    </optgroup>
</select>

9. <blockquote> is a block element dedicated to quoting other sources. It's probably one of the most adopted of the tags described in this article. You can saygoodbye to <div class="quote"> if you haven't already.

10. <col> and <colgroup>, when inserted between a <table> tag and its contents, respectively act as placeholders for a column or a columns set. Whenever you want to apply column-based styles, instead of repeating classes on all the cells of the table you can simply organize them around columns:
<table>
    <col style="background-color: grey;" />
    <col style="background-color: blue;" />
    <tr>
        <td>A</td>
        <td>B</td>
    </tr>
</table>
I hope you have gained some tips which you weren't aware of - feel free to add your commonly neglected HTML tags in the comments if you feel they would be actually useful.

Tuesday, August 3, 2010

Common Windows issues you can fix with a registry hack

In this article, I want to share with you 10 handy registry hacks for Windows XP and Vista.

1: Disable AutoPlay
I always find it a bit annoying to insert a TechNet CD and have Windows open Internet Explorer and display a bunch of information I don’t care about. I would rather just be able to navigate through the disc’s file system and go directly to what I need. Fortunately, it’s easy to create a registry setting that disables AutoPlay:
  1. 1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.
  2. 2. Create a DWORD named NoDriveTypeAutoRun.
  3. 3. Set the value to 000000FF.

2: Increase the maximum number of simultaneous downloads
As a technical writer, I’m constantly downloading files. Sometimes I need to download a lot of files, and Windows’ limit on the number of files that can be downloaded simultaneously gets in the way. If you’re in the same boat, you can tweak the registry so that Windows will let you download 10 files at a time:
  1. 1. Navigate through the Registry Editor to HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
  2. 2. Create a new DWORD named MaxConnectionsPerServer and assign it a value of 0000000a.
  3. 3. Create a new DWORD named MaxConnectionsPer1_0Server and assign it a value of 0000000a.

3: Change the name of the registered user
When you install Windows, you’re prompted to enter a username and a company name. But since it’s fairly common for companies to merge, you may want to change the name of the company Windows is registered to by using this hack:
  1. 1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows NT\CurrentVersion.
  2. 2. Change the values that are assigned to the RegisteredOwner and RegisteredOrganization keys to reflect the new ownership information.
4: Prevent the Recycle Bin from being deleted
If you’ve ever right-clicked on the Windows Recycle Bin, you know there’s a Delete option, which can be used to get rid of it. If you want to prevent the Recycle Bin from accidental deletion, follow these steps:
  1. 1. Navigate through the Registry Editor to HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}.
  2. 2. Create a new registry key called Shell.
  3. 3. Create a new registry key named Delete and put it beneath the Shell key. The path should look like this: HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\Delete.
  4. 4. Modify the Default key and assign it a value of Recycle Bin.
5: Eliminate cached logons
Windows is designed to allow users to log on using cached logins if no domain controller is available to authenticate the request. If you want to make sure that a login request is always authenticated by a domain controller, you could change the number of cached logons that are allowed from 10 to 0 (or you could increase the number of cached logins allowed to 50). To do so, follow these steps:
  1. 1. Navigate through the Registry Editor to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\winlogon.
  2. 2. Create a new REG_SZ setting named CachedLogonsCount.
  3. 3. Assign this new setting a value that reflects how many concurrent cached logins you want to allow.
6: Encrypt and decrypt from a shortcut menu
Normally, when you want to encrypt or decrypt a file in XP Pro or Vista, you just right-click on the file or folder and choose the Properties command from the shortcut menu. When the properties sheet appears, click the Advanced button on the General tab and then use either the Encrypt or the Decrypt option.
If all that seems like a lot of work, you can add those options to the shortcut menu you see when you right-click on a file:
  1. 1. Navigate through the Registry Editor to HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced.
  2. 2. Create a new DWORD called EncryptionContextMenu and assign it a value of 1.
7: Delay Windows Activation
Typically, when an organization deploys Vista, it will create a master image, run SYSPREP, and deploy the image. The problem is that it might be a while between the time that SYSPREP is run and when Vista is actually deployed.
Microsoft will allow you to extend the activation period by 30 days, but you can do that only three times. You can, however, use a registry hack to get around this limitation:
  1. 1. Navigate through the registry to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SL.
  2. 2. Change the value associated with the SkipRearm key to 1.
  3. 3. Open a Command Prompt window and enter the following command: slmgr -rearm.
8: Relocate your offline files
When you use Vista’s Offline Files feature, the offline file cache is automatically placed on your C: drive. But my laptop has two hard drives in it, and I wanted to configure Vista to place my offline files onto my secondary hard drive. I accomplished the task by following these steps:
  1. 1. Open the Control Panel and click on the Network and Internet link, followed by the Offline Files link. Windows will display the Offline Files properties sheet.
  2. 2. Disable offline files if they are currently enabled.
  3. 3. Click OK and reboot the machine.
  4. 4. When the computer reboots, open the Registry Editor and navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CSC.
  5. 5. Create a new string value named Parameters.
  6. 6. Assign this value to the Parameters key: \??\e:\csc, where e: is the drive letter you want to use.
  7. 7. Exit the Registry Editor and reboot the computer.
  8. 8. When the machine reboots, enable offline files.
  9. 9. Reboot the computer one last time. Now, you can start making folders available offline.
9: Disable User Account Control
One of the things about Vista that seems to irritate a lot of people is the User Account Control feature. In essence, an administrator is treated as a standard user. Administrators who attempt to perform an administrative action receive a prompt asking whether they initiated the action. I think that this prompt is a valuable safeguard against malware, but since a lot of people don’t like it, here’s how to use the registry editor to suppress the prompt:
  1. 1. Navigate through the registry editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System.
  2. 2. Change the value of the ConcentPromptBehaviorAdmin key to 00000000.
10: Don’t display the last user who logged in
Windows Vista is designed so that when you press Ctrl+Alt+Delete to log in, it will display the name of the user who logged in most recently. This can be a bit of a problem if multiple users share a common PC. They may forget to check to see who was logged in previously and key in their own password in association with another user’s login name. If they try this enough times, they could lock the other user out. You can get around this problem by using a simple registry tweak to tell Windows not to display the name of the user who was logged in previously:
  1. 1. Navigate through the Registry Editor to HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System.
  2. 2. Set the DontDisplayLastName key to a value of 1.

Friday, March 19, 2010

IIS (Internet Information Service) 7 Features


·         ASP.NET and PHP Support
·         Modular and Extensible Web Server
·         Integrated Media Platform
·         Centralized Web Farm Management
·         Delegated Remote Management
·         Powerful Admin Tools
·         Scalable Web Infrastructure
·         Dynamic Caching and Compression
·         Rich Diagnostic Tools
·         Enhanced Server Protection
·         Secure Content Publishing
·         Access Protection
·         For more details click here

Tuesday, March 9, 2010

Web standards and why should we use them?

>> What is the W3C?

The World Wide Web Consortium (W3C) is an international industry consortium dedicated to "leading the Web to its full potential". It's led by Tim Berners-Lee, the inventor of the Web. Founded in 1994, the W3C has more than 330 member organizations - including Microsoft, America Online (parent company of Netscape Communications), Apple Computer, Adobe, Macromedia, Sun Microsystems, and a variety of other hardware and software manufacturers, content providers, academic institutions, and telecommunications companies. The Consortium is hosted by three universities - MIT in the US, INRIA in Europe, and Keio University in Japan. 

>> What does it do?

The W3C develops open specifications (de facto standards) to enhance the interoperability of Web-related products. W3C Recommendations are developed by working groups consisting of Consortium members and invited experts. Working groups obtain general consensus from companies and other organizations involved in creating applications for the Web, and create Working Drafts and Proposed Recommendations. These are then submitted to the W3C membership and director, for formal approval as W3C Recommendations. More information regarding this process and the review stages can be obtained from the W3C Web site.

>> What are the W3C standards?

1. HTML 4.0 - HyperText Markup Language
HyperText Markup Language (HTML) is widely used on the Web for adding structure to text documents. Browsers interpret these documents, representing the structure in media-specific ways to the user. For example, visual browsers typically display the strong element ( ... ) as bold text, while text-to-speech readers might emphasize that text when pronouncing it.
With the help of Cascading Style Sheets (CSS) the author may define how structural elements are to be represented, overriding the browser defaults.

2. XML 1.0 - Extensible Markup Language
Extensible Markup Language (XML) is a markup language like HTML, but instead of having a single, fixed set of elements, it allows you to define your own - or use a set made by someone else. It even allows using multiple sets within a single document - by using XML namespaces.
Some applications of XML, such as XHTML and MathML, have already become W3C Recommendations. Others are currently W3C Working Drafts.
Style sheet standards, such as CSS and (in the future) XSL, can be used to specify how XML elements are to be rendered. CSS and XSL both allow you to specify different styles for different media, so that you can have separate sets of styles for visual, voice, braille and other media.
XML is more flexible than HTML, primarily because of the ability to add your own elements and make your own structural systems. This makes it an ideal format for the organization of large quantities of data - it is already in use in many databases and search engines.

3. CSS - Cascading Style Sheets
Cascading Style Sheets (CSS) is a mechanism for changing the appearance of HTML or XML elements, by assigning styles to element types, self-defined classes of elements or individual instances.
Stylesheets can be used to consistently define the appearance of an entire site. Following the introduction of CSS, the W3C recommended that layout-specific features in HTML be phased out and replaced by stylesheets, creating a simpler and more structural World Wide Web.

4. DOM 1 - Document Object Model Level 1
The DOM allows the full power and interactivity of a scripting language (such as ECMAScript, the standardized version of JavaScript) to be exerted on a Web page. (In programming terms, the Document Object Model (DOM) Level 1 is an Application Programming Interface (API) for interacting with Web pages.) It gives the scripting language easy access to the structure, content, and presentation of a document which is written in such languages as HTML and CSS.
The DOM is compatible with future improvements in technology; it will allow any scripting language to interact with whatever languages are being used in the document. This standard will not only make it easier to program dynamic HTML, but will also make adapting to future Internet technology much less painful.

5. Emerging Standards
The W3C is constantly at work on creating new standards; the most important of these right now are are XHTML and XSL. XHTML, Extensible Hypertext Markup Language, is a reformulation of HTML 4.0 in XML; XSL, the Extensible Stylesheet Language, is a language for transforming and displaying XML documents, using an XML vocabulary.

>> Advantages of W3C standards?

1. For software/machines
Complying with Web standards can give your Web pages greater visibility in Web searches. The structural information present in compliant documents makes it easy for search engines to access and evaluate the information in those documents, and they get indexed more accurately.
Because use of Web standards makes it easier for server-side as well as client-side software to understand the structure of your document, adding a search engine to your own site becomes easier and gives better results.
Standards are written so that old browsers will still understand the basic structure of your documents. Even if they can't understand the newest and coolest additions to the standards, they'll be able to display the content of your site. The same, of course, applies to robots - systems that collect information from your site on behalf of search engines and other indexers.
Compliant code gives you the opportunity of validating your page with a validation service.Validation process your documents and present you with a list of errors. This makes finding and correcting errors a lot easier, and can save you a lot of time.
Compliant documents can easily be converted to other formats, such as databases or Word documents. This allows for more versatile use of the information within documents on the World Wide Web, and simplified migration to new systems - hardware as well as software - including devices such as TVs and PD-As.
2. For Users
Accessibility is an important idea behind many Web standards, especially HTML.Not only does this mean allowing the Web to be used by people with disabilities, but also allowing Web pages to be understood by people using browsers other than the usual ones - including voice browsers that read Web pages aloud to people with sight impairments, Braille browsers that translate text into Braille, hand-held browsers with very little monitor space, teletext displays, and other unusual output devices.
As the variety of Web access methods increases, adjusting or duplicating Web sites to satisfy all needs will become increasingly difficult (indeed, some say it's impossible even today). Following standards is a major step towards solving this problem. Making your sites standards-compliant will help ensure not only that traditional browsers, old and new, will all be able to present sites properly, but also that they will work with unusual browsers and media.
Some consequences of ignoring standards are obvious: the most basic consequence is that you will restrict access to your site. How much business sense does it make to limit your audience to only a fraction of those who wish be a part of it? For a business site, denying access to even small portions of a target audience can make a big difference to your profit margin. For an educational site, it makes sense to allow access not only to affluent, able-bodied school-children with graphical browsers, but also to children in Third-World countries who only have text-based browsers access, or disabled students using specialized browsers.
The same principle applies to all types of Web site - while straying from the standards and taking advantage of browser-specific features may be tempting, the increased accessibility which comes from standards-compliance will lead to far greater rewards in the long run.