Labels

Tuesday, September 29, 2009

Desert Island Web Development Tools

Desert Island Web Development Tools

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

WebsiteSpark Program

WebsiteSpark Program

 

Microsoft has announced a new program – WebsiteSpark

 

WebsiteSpark is designed for independent web developers and web development companies that build web applications and web sites on behalf of others.  It enables you to get software, support and business resources from Microsoft at No Cost For Three Years, and enables you to expand your business and build great web solutions using ASP.NET, Silverlight, SharePoint and PHP, and the open source applications built on top of them.

 

What does the program provide?

 

WebSiteSpark provides software licenses that you can use for three years at no cost.  Once enrolled, you can download and immediately use the following software from Microsoft:

 

  • 3 licenses of Visual Studio 2008 Professional Edition
  • 1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)
  • 2 licenses of Expression Web 3
  • 4 processor licenses of Windows Web Server 2008 R2
  • 4 processor licenses of SQL Server 2008 Web Edition
  • DotNetPanel control panel (enabling easy remote/hosted management of your servers)

 

The Windows Server and SQL Server licenses can be used for both development and production deployment.  You can either self-host the servers on your own, or use the licenses with a hoster.  WebsiteSpark makes it easy to find hosters who are also enrolled in the program, and who can use your licenses to provide you with either dedicated or virtual dedicated servers to host your sites on.

In addition to software, WebsiteSpark provides partner opportunities to grow and build your business (including customer referrals through our partner programs).  It also includes product support (including 2 professional support incidents) and free online training for the products.

 

Who can join the program?

 

WebSiteSpark is available to independent web developers and small web development companies.  The only two requirements to join the program are:

 

  1. Your company builds web sites and web application on behalf of others.
  2. Your company currently has less than 10 employees.

 

If you meet these requirements you can visit the WebsiteSpark website and sign-up today. 

 

What happens after the 3 years?

 

WebsiteSpark is a 3 year program.  There is no obligation to continue to use any of the software after the three years is over, and there are no costs for the three years other than a $100 program fee at the end of the three years.

At the end of the three years, WebsiteSpark participants can optionally choose to purchase all of the software in the WebsiteSpark program via a $999/year package.  This includes 3 copies of VS Professional, 1 copy of Expression Studio (including Blend and Sketchflow), 2 copies of Expression Web, and 4 processor licenses of Windows Web Server 2008 and 4 processor licenses of SQL Server Web edition that can be used for production deployment.

Alternatively, if you want to purchase only the production server licenses, you can take advantage of a $199/year offering that includes both 1 Windows Web Server processor license and 1 SQL Server Web edition processor license.  You can buy the quantity you need of this package at $199/year each. 

 

 

Hope this helps,

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

Microsoft AJAX CDN

Microsoft AJAX CDN

Recently Microsoft has launched a new Microsoft Ajax CDN (Content Delivery Network) service that provides caching support for AJAX libraries (including jQuery and ASP.NET AJAX).  The service is available for free, does not require any registration, and can be used for both commercial and non-commercial purposes.

 

CDNs are 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.

 

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. Basically, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster – which makes your pages load quicker). 

 

e.g.  Instead of using the hard path approach, better is to use CDN.

 

<script src="Path with your Web Server" type="text/javascript"></script>

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>  // CDN Approach

 

 

Using CDN with the ASP.NET 4.0 ScriptManager

 

In addition to allowing you to reference script files directly using a <script> element, ASP.NET 4.0 will make it easy to use the CDN from ASP.NET Web Forms applications that use the <asp:scriptmanager/> server control as below.

 

<asp:ScriptManager ID="atlSMMaster" EnableCdn="true" runat="server">

</asp:ScriptManager>

 

When you enable the CDN with the ScriptManager, the application will use the Microsoft CDN to request JavaScript files automatically i.e your application will retrieve all JavaScript files that it normally retrieves from the System.Web.dll or System.Web.Extensions.dll assemblies from the CDN instead.  This includes both the JavaScript files within ASP.NET AJAX, as well as the built-in Web Forms JavaScript files (for example: the WebUIValidation.js file for client-side validation, and the JavaScript files for controls like TreeView, Menu, etc).

 

This provides a nice end-user performance improvement, and means that users accessing your ASP.NET website won’t need to re-download these files if they have visited another ASP.NET website that uses the CDN.

 

 

Reference: Link

 

Hope this helps.

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

Wednesday, September 23, 2009

Why & What - Soft Skills

Recent surveys show that, soft skills are more important than technical skills to reach to the top of the career.

Communication skills and the interpersonal skills (soft skills) is important contributor in achieving carrier success.

 

What are Soft Skills ?

 

-          Ability to communicate effectively

-          Ability to promote teamwork

-          Ability to present ideas

-          Ability to manage project and people

-          Ability to solve problems and provide excellent customer care

-          Ability to manage time (Time Management)

 

Why Soft Skills ?

 

A growing number of organizations believe that people ability to understand and to manage their emotions improves below.

 

-          Improves their performance,

-          Improves their collaboration with colleagues and

-          Improves their interactions with customer

 

Few Glimpse –

 

-          Self Awareness  Self Confidence & Positive Attitude

-          Understanding others – Empathy & Interpersonal Relations

-          Effective Communication

-          Self Motivation

-          Time Management

-          Emotional Intelligence

-          Accelerated Learning

-          Problem Solving

-          Feedback Handling – Criticism & Praise

-          Stress Management – Health & Fitness

 

Reference: Link

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

Tuesday, September 22, 2009

JQuery - Ajax Events

Ajax Events

 

Ajax requests produce a number of different events that you can subscribe to. Here's a full list of the events and in what order they are broadcast.

These events are used while making an $.ajax request call in Jquery – as below.

 

<script type = "text/javascript">

   

    function Fire$AJAX()

    {

        $.ajax({

                type: "GET",

                url: "Test$AJAX.aspx",

                data: "name=John&location=Boston",

                success: function(msg) {alert(msg);}

 

            });

    }

 

</script>

 

There are two types of events:

 

Local Events

 

These are callbacks that you can subscribe to within the Ajax request object, like so:

 $.ajax({
   beforeSend: function(){
     // Handle the beforeSend event
   },
   complete: function(){
     // Handle the complete event
   }
   // ......
 });
 

Global Events

 

These events are broadcast to all elements in the DOM, triggering any handlers which may be listening. You can listen for these events like so:

 $("#loading").bind("ajaxSend", function(){
   $(this).show();
 }).bind("ajaxComplete", function(){
   $(this).hide();
 });

Global events can be disabled, for a particular Ajax request, by passing in the global option, like so:

 $.ajax({
   url: "test.html",
   global: false,
   // ...
 });
 

Events

 

This is the full list of Ajax events that are broadcast, and in the order in which they are broadcast. The indented events are broadcast for each and every Ajax request (unless a global option has been set). The ajaxStart and ajaxStop events are events that relate to all Ajax requests together.

 

  • ajaxStart (Global Event)
    This event is broadcast if an Ajax request is started and no other Ajax requests are currently running.

 

    • beforeSend (Local Event)
      This event, which is triggered before an Ajax request is started, allows you to modify the XMLHttpRequest object (setting additional headers, if need be.)
    • ajaxSend (Global Event)
      This global event is also triggered before the request is run.

 

    • success (Local Event)
      This event is only called if the request was successful (no errors from the server, no errors with the data).
    • ajaxSuccess (Global Event)
      This event is also only called if the request was successful.

 

    • error (Local Event)
      This event is only called if an error occurred with the request (you can never have both an error and a success callback with a request).
    • ajaxError (Global Event)
      This global event behaves the same as the local error event.

 

    • complete (Local Event)
      This event is called regardless of if the request was successful, or not. You will always receive a complete callback, even for synchronous requests.
    • ajaxComplete (Global Event)
      This event behaves the same as the complete event and will be triggered every time an Ajax request finishes.

 

  • ajaxStop (Global Event)
    This global event is triggered if there are no more Ajax requests being processed.

 

Reference: Link

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

Thursday, September 17, 2009

Automatic Properties - Where the fun stops

Using Accessibility Modifiers on Auto Properties

 

This post could be older for you. Below is the way to define properties.

 

public class Person

{

    private string firstName;

    public string FirstName

    {

        get { return firstName; }

        set { firstName = value; }

    }

}

 

You get to write the same in C#3.0 as below.

 

public class Person

{

    public string FirstName { get; set; }

}

 

Unfortunately, for most developers, the above use of automatic properties is where the fun stops. Once they get to the point where they need to have a read-only property, they fall back to their old tricks and write this:

 

public class Person

{

    private string firstName;

    public string FirstName

    {

        get { return firstName; }           

    }

}

 

You don’t need to do that silly way. You just need to do this:

 

public class Person

{       

    public string FirstName { get; private set; }

}

 

public class Person

{       

    public string FirstName { private get; set; }

}

 

public class Person

{       

    public string FirstName { get; protected set; }

    public string LastName { get; internal set; }

}

 

 

Hope this helps.

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead

 

 

Thursday, September 10, 2009

Google SiteMap File

Generating a Google SiteMap File

 

Google provides a free service, named Google SiteMaps, that you can use to improve the way that Google indexes the pages on your website.

For example, you can use Google SiteMaps to discover which Google search queries have returned pages from your website and the ranking of your pages in Google search results. You also can use Google SiteMaps to view any problems that the Google crawler encounters when indexing your site.

 

You can sign up for Google SiteMaps by visiting the following URL:

http://www.google.com/webmasters/sitemaps

 

To use Google SiteMaps, You Must Provide Google With The Url Of A Google Sitemap File Hosted On Your Website.

The Google SiteMap file is an XML file that contains a list of URLs you want Google to index.

The Google SiteMap XML file has the following format:

 

Google Sitemap File
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
  <url>
    <loc>http://localhost:2905/SiteMaps/Default.aspx</loc>
    <lastmod>2005-10-30T03:13:58</lastmod>
  </url>
  <url>
    <loc>http://localhost:2905/SiteMaps/Products/Default.aspx</loc>
    <lastmod>2005-10-28T21:48:04</lastmod>
  </url>
  <url>
    <loc>http://localhost:2905/SiteMaps/Services</loc>
    <lastmod>2005-10-30T04:31:57</lastmod>
  </url>
  <url>
    <loc>http://localhost:2905/SiteMaps/Employees/Default.aspx</loc>
    <lastmod>1601-01-01T00:00:00</lastmod>
  </url>
  <url>
    <loc>http://localhost:2905/SiteMaps/Products/FirstProduct.aspx</loc>
    <lastmod>2005-10-30T03:43:52</lastmod>
  </url>
</urlset>

 

 

The Google SiteMap file contains a simple list of <url> elements that contain <loc> elements representing the location of the URL and <lastmod> elements representing the last modified date of the URL.

Note

The Google SiteMap file also can contain <changefreq> and <priority> elements. The <changefreq> element indicates how frequently a URL changes, and the <priority> element represents the priority of a URL relative to other URLs in your site. These elements are optional and are ignored here.

 

When you sign up at the Google SiteMaps website, submit the URL of the above file when you are asked to enter your SiteMap URL. The Google service retrieves your SiteMap from the handler automatically.

 

How to generate the ‘Google SiteMap XML file’ file automatically -

 

You can generate a Google SiteMap file automatically from an ASP.NET SiteMap. The below HTTP Handler generates a Google SiteMap File that conforms to Google's requirements for a valid SiteMap file.

 

HTTP Handler
<%@ WebHandler Language="VB" Class="PublicSiteMap" %>
Imports System
Imports System.Web
Imports System.Xml
Imports System.Text
Imports System.IO
 
Public Class PublicSiteMap
    Implements IHttpHandler
 
    Private _xmlWriter As XmlWriter
 
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler
.ProcessRequest
        context.Response.ContentType = "text/xml"
 
        Dim settings As New XmlWriterSettings()
        settings.Encoding = Encoding.UTF8
        settings.Indent = True
        _xmlWriter = XmlWriter.Create(context.Response.OutputStream, settings)
        _xmlWriter.WriteStartDocument()
        _xmlWriter.WriteStartElement("urlset", "http://www.google.com/schemas/sitemap/0.84")
 
        ' Add root node
        AddUrl(SiteMap.RootNode)
 
        ' Add all other nodes
        Dim nodes As SiteMapNodeCollection = SiteMap.RootNode.GetAllNodes()
        For Each node As SiteMapNode In nodes
            AddUrl(node)
        Next
 
        _xmlWriter.WriteEndElement()
        _xmlWriter.WriteEndDocument()
        _xmlWriter.Flush()
    End Sub
 
    Private  Sub AddUrl(ByVal node As SiteMapNode)
        ' Skip empty Urls
        If String.IsNullOrEmpty(node.Url) Then
            Return
        End If
        ' Skip remote nodes
        If node.Url.StartsWith("http",True,Nothing) Then
            Return
        End If
        ' Open url tag
        _xmlWriter.WriteStartElement("url")
        ' Write location
        _xmlWriter.WriteStartElement("loc")
        _xmlWriter.WriteString(GetFullUrl(node.Url))
        _xmlWriter.WriteEndElement()
        ' Write last modified
        _xmlWriter.WriteStartElement("lastmod")
        _xmlWriter.WriteString(GetLastModified(node.Url))
        _xmlWriter.WriteEndElement()
        ' Close url tag
        _xmlWriter.WriteEndElement()
    End Sub
 
    Private Function GetFullUrl(ByVal url As String) As String
        Dim context As HttpContext =  HttpContext.Current
        Dim server As String =  context.Request.Url.GetComponents( UriComponents
.SchemeAndServer,UriFormat.UriEscaped)
        Return Combine(server,url)
    End Function
 
    Private Function Combine(ByVal baseUrl As String, ByVal url As String) As String
        baseUrl = baseUrl.TrimEnd(New Char() {"/"c})
        url = url.TrimStart(New Char() {"/"c})
        Return baseUrl + "/" + url
    End Function
 
    Private Function GetLastModified(ByVal url As String) As String
        Dim context As HttpContext =  HttpContext.Current
        Dim physicalPath As String =  context.Server.MapPath(url)
        Return File.GetLastWriteTimeUtc(physicalPath).ToString("s")
    End Function
 
    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return True
        End Get
    End Property
 End Class

 

 

Hope this helps.

 

Thanks & Regards,

Arun Manglick || Senior Tech Lead