Code-Tips.com - Web Development, Programming, SEO View RSS

Web Development & Programming in PHP, ASP.NET, XML, VB, .NET Framework, JavaScript and HTML/CSS for Web Applications, Internet Marketing and SEO
Hide details



VBScript Web Services / SOAP (References) 5 Jul 2012 4:56 AM (12 years ago)

The following is a set of resources to help when working with SOAP Web Services from VBScript.  Resources include tutorials, examples and forum threads relating to working with SOAP Web Services via VBScript (VBS).


XML SOAP (Tutorial)
Tutorial explaining how to call SOAP Web Services using a VBScript client, including a sample XML document containing the details of the SOAP request to be sent to the Web Service / Server.

Using SOAP With Classic ASP / VBScript
This tutorial by AdamNThompson demonstrates the use of SOAP Web Services from classic ASP / VBScript with an example that updates an existing record, or adds a new record if one doesn't already exist.

SOAP Example (VBScript)
This article contains example VBScript code to send a SOAP request and get an XML Response.  An XML request is generated and sent to the Web Service.  The response (if successful request) is parsed to extract the value from a specific element within the result XML, which is saved to a text file.

Consuming and using a web service from within VBScript to create a WHOIS tool
This article demostrates how to consume a Web Service using VBScript to create a WHOIS tool.  The WHOIS Web Service in the article is a free public Web Service.

An Introduction To XML SOAP Using ASP and VB6 (5 pages)
Tutorial providing an introduction to working with XML SOAP Web Services using AXP and VB6.

VBScript SOAP - Samples
A range of VBS code samples on PocketSOAP.com for working with XML SOAP from VBScript.
Examples:
Controlling Array Type Serialization in scripting language
Calling Weblogs.com [XML-RPC]
Calling the Google API
Edgar search
Interop demos
Handling Type mappings
VBScript Stock Quote
Arrays from Scripting
Calling Weblogs.com [SOAP]


Forum Threads/Questions about XML SOAP / Web Service Requests using VBScript

VBScript SOAP Call (Thread)
Simple example requried to assist with getting started with SOAP requests using VBScript.
"You need to create a proxy to use SOAP (Web Services) within VBScript."
User jrv, answered the question by building a simple working example for returning data from a Web Service.

Calling an ASMX web service from VBScript run-time
Issue with formatting of CDATA tag.

Using SOAP with VBScript (Thread)
Question regarding working with SOAP (MSSOAP.SoapClient) from VBScript.  Connection to SOAP is ok, but only 1 line is returned.  Issue in this case relates to character encoding on the XML sent as the SOAP request.

Sending a 'application/soap+xml' SOAP request using Classic ASP (Thread)
Suggestions from multiple users to troubleshoot/resolve a SOAP Request issue ("HTTP 400 Bad Request" error) using Fiddler or SoapUI.

Sending soap over http - .NET (Thread)
Custom Web Service - Querying the custom Web Service using VBScript.
wsdl.exe tool (.NET), SOAP Toolkit (VBScript)



Related:


Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

DIY SharePoint Marketing Tips & Tools - Do Follow SharePoint Article Libraries 5 Sep 2011 12:50 AM (13 years ago)

Looking for places to help promote your SharePoint products or website using legitimate means?  In this article I provide information and tips about how you can promote your products or services yourself for free.  The article has a focus on promoting a website relating to SharePoint, but the tips are applicable to any type of product or service being marketing online.  A few websites providing free (Do Follow) SharePoint Article Libraries are also provided.

Submitting articles can be a great way of gaining exposure to your SharePoint website or products, giving you complete control over the quality of content used to market your products.  Don't leave the job to a company who may use unethical or immoral tactics to promote your site.  The people behind these "shady" services will almost never disclose the actual methods used to promote their client's site because they would be putting their own business at risk, or wouldn't be selected as a viable service to assist with online marking at all.  Popular Search Engines are working constantly to eliminate spam and other types of pollution from their search results, so why risk using cheap outsources SEO services who use these methods, that will provide little benefit to you, or in many cases have a negative effect?

If the reputation of your company, website, products and services is important to you, then you need to be very careful about who you choose to market your website when outsourcing.  You will generally get what you pay for, but not in every case.  To help manage or eliminate this risk, there are many things that you can do to promote your own site that keep you in control of the quality of content used to promote your site.


Writing and submitting high quality and useful articles that relate to your company's SharePoint products and services is one method that presents little or no risk.  Each article should be submitted to a website that is relevant to your own to increase it's promotional value.  There are a few key benefits that submitting to a website related to yours will provide:
  1. Readers of your article will be more interested in your website, product or service and much more likely to visit your website as a result of reading the article.
  2. People that stumble across your article when browsing the site are more likely to be interested, not relying on Search Results.
  3. The article and links to your website provide more value and impact in regards to positioning in Search Engines.
Some Other Marketing Tips & Considerations for Article Submission:
As mentioned earlier, the following are a few SharePoint related websites with article libraries that you can use for free.  Articles submitted to these libraries are included in Search Engines, and links to your site are followed (Do Follow).

Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

How to Generate Feed Using Php (Atom 1.0 and RSS 2.0 Compatible) 13 Aug 2011 8:05 AM (13 years ago)

In this tutorial, I demonstrate how to generate a feed using Php that can be displayed from a website in multiple formats, including Atom 1.0 and RSS 2.0.  I will be using functionality from the Php FeedWriter class library to generate the feed, which is available for free at http://phpFeedWriter.webmasterhub.net/.

I have broken up the process below into separate components, and provided additional information to help you learn each aspect of creating the feed using Php.  A download of the completed script written in this tutorial is also provided if required.

Summary


Prepare your feed script/page - Instantiate a (Php) FeedWriter Class Object

  1. Download the latest version of the Php feedWriter Class library (free)
  1. Extract the package to a new directory on your web server that supports Php.  
For the purpose of this example,  have copied the Php FeedWriter class files to a "feed/" sub-folder.
  1. Create a new file called "feed.php".  
This file will be used to serve the feed content, so must be accessible from your website.
  1. Paste the following code into the file.


/* Example Feed using Php FeedWriter http://phpFeedWriter.webmasterhub.net/ 
 * Example feed: http://phpfeedwriter.webmasterhub.net/samples/1/feed.php
 *
 * View the tutorial: http://www.code-tips.com/2011/08/how-to-generate-feed-using-php-atom-10.html 
 */
require_once('feed/FeedWriter.php');

//Block 1 ----------------------------------------------
//Title if the feed
$feed_title = 'Example Feed using Php FeedWriter';

//Feed Link.  This should be a URL to the website, or blog that content displayed in the feed is from.
$feed_link = 'http://www.code-tips.com/';

//A short description of the feed.
$feed_description = 'This is an exmaple feed created as part of the tutorial on code-tips.com for generating RSS / Atom feeds using Php.';

//Instantiate the FeedWriter class
$feedWriter = new FeedWriter(
	$feed_title, 	//Feed Title
	$feed_description, //Feed Description
	$feed_link, //Feed Link
	6, //indent
	true, //Use CDATA
	null, //encoding
	true //enable validation
	);

//Enable debug
$feedWriter->debug = true;


  1. In the code you have just pasted, replace the example title, description and feed link with your own.
At this point, the an object has been created from the FeedWriter class, which will now be used to add items and later display the feed.  The additional options included when instantiating an object from the FeedWriter class control how the feed is outputted.  
    For more information about using the FeedWriter class constructor, see the online documentation: FeedWriter Constructor.

     

    Add additional (Channel) data to the feed

    There is a range of additional meta information that can be added to a feed, including dates (Published/Modified), author details, refresh intervals and categories.  This information is used by feed readers and aggregators when updating and displaying your feed.  Some feed formats require additional information to be included in the feed to be valid.
    Many of the functions provided by the FeedWriter class can be used to add information to the feed as well as individual items in the feed.  When these functions are called before items have been added to the feed, the data is associated with the feed itself.  After items have been added, the data passed to one of these functions will be added to the item most recently added to the feed.
    1. Paste the lines of code in the following steps one after another, after the first code block included in the file.  Change the values as necessary.
      $feedWriter->set_image('WebmasterHub.net', 'http://www.webmasterhub.net/img/logo.jpg','http://www.webmasterhub.net/');
      
        $feedWriter->set_language('EN-US');
        
          $feedWriter->set_date('2011-08-12T00:00:00Z',DATE_UPDATED);
          
            $feedWriter->set_author(null, 'Daniel','http://www.code-tips.com/');
            
              $feedWriter->set_selfLink('http://phpfeedwriter.webmasterhub.net/samples/1/feed.php');
              
              Refer to the FeedWriter Class Documentation for a list of functions that can be called to add additional information to the feed.

               

              Add Items to the Feed

              Items are added to the feed simply by calling the add_item() function.  Different information is required depending on the specified output format, so it is good practice to include all, or as much information as possible.  Some formats require that at least one of the title, description/content or link be included.
              For the purpose of this example, I have added a number of static/hard coded items to an array.  In reality, building a feed that retrieves information from a database or other dynamic source is a more common and practical solution.  The “items” array is created for the purpose of demonstrating how to generate a feed using Php.  You should replace this array with a similar array or source of information from your website.   Using an associative array of a database query result is probably the easiest way to put the code in this example into practical use.
              1. Paste the following code block into the file, after the previous code



              //Block 3 ----------------------------------------------
              //Create/Retrieve array containing data for the sample items 
              //this array should be replaced with your database query result array or similar
              
              //## Section 3.1 - Items Array
              $items = Array();
              $items[] = Array( 
              	//Example Item 1
              	'item_title' => 'Php FeedWriter Example Feed: Item',
              	'item_content' => 'This is an example item. 
               This HTML should be rendered when the feed is displayed in a browser or reader that supports HTML output...',
              	'item_link' => 'http://www.code-tips.com/link_to_post.html',
              	'item_published' => '2011-08-12T00:00:00Z',
              	'item_updated' => '2011-08-12T00:00:00Z');
              $items[] = Array( 
              	//Example Item 2
              	'item_title' => 'Php FeedWriter Example Feed: Item 2',
              	'item_link' => 'http://phpfeedwriter.webmasterhub.net/',
              	'item_published' => '2011-08-12T00:00:00Z',
              	'item_updated' => '2011-08-12T00:00:00Z');
              
              
              //## Section 3.2 - Loop through the items array, add items to the feed
              foreach($items as $item)
              {
              	//Get the title, content, link for the current item if supplied.
              	if(isset($item['item_title']))
              		$item_title = $item['item_title'];
              	else
              		$item_title = null;
              		
              	if(isset($item['item_content']))
              		$item_content = $item['item_content'];
              	else
              		$item_content = null;
              		
              	if(isset($item['item_link']))
              		$item_link = $item['item_link'];
              	else
              		$item_link = null;
              	
              	//Add the current item to the feed
              	$feedWriter->add_item($item_title, $item_content, $item_link);
              	
              	//Add additional data to the current item if available
              	if(isset($item['item_updated']))
              		$feedWriter->set_date($item['item_updated'], DATE_UPDATED);
              		
              	if(isset($item['item_published']))
              		$feedWriter->set_date($item['item_published'], DATE_PUBLISHED);
              }
              


              1. Set the items array (section 1 of code block 3) to your data source, or leave the example array in place to continue and test the feed.
              2. Update the Loop component (section 2 of code block 3) so that the array key values match your items array, or replace with your own values as required.
              Refer to the FeedWriter Class Documentation for a list of functions that can be called to add additional information to feed items.

               

              Get the specified feed output format

              The “feed.php” script that is being written in this example will take one query string (GET) parameter ”format”, that indicates which format to use when displaying the feed.  If none is supplied, or the value supplied does not correspond to one of the supported formats, the default format (Atom 1.0) will be used.  The formats that are supported by Php FeedWriter are: Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91.  
              1. Paste the following code into your php file on an empty line after the code block added in the previous step.

              //Block 4 ----------------------------------------------
              //Get the format to display in, 
              //set to RSS 2.0 as default or if format is not found
              $format = Atom_1;
              if(isset($_GET['format']) && $_GET['format'] != null)
              {
              	foreach($feedWriter->getFeedFormats() as $curFormat)
              	{
              		if($curFormat[0] == $_GET['format'])
              			$format = $curFormat[1];
              	}
              }
              

              We are retrieving the feed format at this point to allow the output to be modified to allow HTML to be rendered when the feed is displayed.  This can be done at any point in the script prior to calling the getXML() function to generate and display the feed.  getXML() also has a default format if non is supplied, which is RSS 2.0.
              The loops through an array containing each of the supported format, and sets the output format for the feed if one matches the value passed to the “format” query string parameter.
              The default format can be changed by changing the ATOM_1 constant to another format. ($format = ATOM_1;).  For a list of constants used by the class, see Php FeedWriter Constants.

               

              (Optional) Set the “Content” element of each feed item as type “HTML”

              1. Paste the following code into your Php file on an empty line after the code from the previous step.
              //Block 5 ----------------------------------------------
              //Set the item body/content output type to html for the selected output format
              $feedWriter->set_feedConstruct($format);
              $feedWriter->feed_construct->construct['itemContent']['type'] = 'html'; 
              
              This code adjusts the “Feed Construct” for the specified output format so that the “itemContent” element is set to type HTML.  The Feed Construct is a class the builds a representation of a feed schema for use when validating and outputting a feed using Php FeedWriter.  
              We first set the specific format using the set_feedConstruct() function.  Once set, each “construct” from the specified output format can be accessed and modified using the FeedConstruct class functionality (a “construct” represents a single element in the XML schema of a feed format).  The element/construct that we want to update is “itemContent”.  

                 

                Output the Feed XML

                The feed is outputted using the getXML() function.  The format is passed to the getXML() function as a parameter, which defines the output format.  The value obtained earlier in the script will be passed to the function.
                When validation is enabled, the getXML() function will validate the feed before outputting the XML.  If the feed is not valid in the specified output format, a feed will be generated by Php FeedWriter containing information about why the feed was not valid.  When debug is enabled, additional information is included about the specific components that were not valid.  Both debug and validation can be disabled once you are happy with the feed to prevent this validation feed from displaying on a live website.
                1. Copy the following code into the file after the block added in the previous step
                //Block 6 ----------------------------------------------
                //Build and output the feed XML in the specified, or default format
                //--------------------------------
                echo $feedWriter->getXML($format);  
                

                 

                (Optional) Writing to a file / caching feed content

                It is also possible to write the output to a file for scenarios where the feed content should be cached, where the output file would be used to display the feed from your website instead of building the feed and generating the feed XML each time.
                To write the feed output to a file, use the code below.  Please ensure that you understand the security risks associated with allowing the web server to write files before attempting this on a public website.  The code below would replace the block added in step 12 that includes the call to the getXML() function.
                $feedWriter->writeToFile('filename.xml',$format);
                

                The Php FeedWriter website provides full documentation on the classes that make up the solution.  Sample feed scripts are also available to download from the site.

                View the feed created in this tutorial: Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92, RSS 0.91.

                Download the full Php script created in this tutorial.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Php FeedWriter Released - Version 3.0 Beta - Universal Feed Generator 29 Jun 2011 4:53 AM (13 years ago)

                Generate Atom 1.0, RSS 2.0 and RSS 1.0 feeds for free using Php.


                Php FeedWriter 3.0 beta has been released for download.  The update to the class and functionality builds upon the previous version RSS2Writer v2.1, which limited output to an RSS 2.0 compatible feed only.
                Php FeedWriter 3.0 now supports multiple feed formats: Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91.  Php FeedWriter povides a set of easy to use functions to handle both feed input and output.


                New FeedConstruct Class
                Php FeedWriter uses a custom "FeedConstruct" class to consttruct a representation of each supported feed output format.  Specific elements that make up part of the XML document for a feed can be added and configured using the FeedConstruct class to control validation and XML output.  This class is used as an  abstraction layer between each feed fomat allowing data to be included in the feed once, but included in any of the output formats that support the data.


                Online Documentation
                The Php FeedWriter website now provides online documentation supporting the solution.  This includes doucmentation for each of the funtions in the FeedWriter and FeedConstruct class to assist when adding data into the feed, and for cases where you need to change or control how the data is outputted, such as using type "html" instead of "text" for the feed item body.


                Instructions for how to install Php FeedWriter on a website for first use are also provided.  Tutorials for using php FeedWriter will be posted to the blog in future, which will also be accessible under the "Additional Resources" heading of the documentation page for a particular function.

                Samples
                A number of sample feed generator scripts have been made available on the Php FeedWriter website to assist with creating a feed.  Samples include single scripts that handle multiple feed formats, as well as preset (fixed) formats.  Both simple and more extensive examples are provided.


                Version 3 Beta Release
                Version 3.0 of Php FeedWriter has been released as a beta version to allow for more thorough testing to be completed and bugs/issues resolved prior to releasing a "stable" version.  Version 3.0 beta has been successfully tested on a number of platforms to date, so is expected to be close to a "stable release".  If you come accross a bug or unexpected behavior, including descrepencies between a feed generated by Php FeedWriter and the corresponding schema for the feed output format the details can be submitted to the bug Library.  Before submitting a new bug, be sure to browse or search the existing bugs to ensure that someone else hasn't already submitted the same bug.   Enhancements or suggestions for improvement can also be submitted to the Bug Library.

                For more information about this release, please see the related post on the Php FeedWriter blog:  Php FeedWriter 3.0 (beta) Released.


                Universal Feed Generator
                Php FeedWriter can be viewed as a universal feed generator due to the feed format abstraction capabilities.  There are currently a number of different formats supported by Php FeedWriter, which are configured using the FeedConstruct class.


                The FeedConstruct class also provides capabilities to be able to easily integrate additional output formats into the solution, or ammend the configuration of one of the existing "Predefined Feed Constructs" for a particular format.


                Highly Compatible
                The output formats currently supported by Php Feedwriter cover all formats used commonly on websites and by Feed Readers / Aggregators.  This gives you the choice of allowing a more extensive feed to be generated from content on your website using a format such as Atom 1.0, but at the same time allow the feed to be generated in an older format sich as RSS 0.91 to maximise compatibility with feed readers.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                WordPress Breadcrumb Navigation on Pages & Meta Title 12 Jun 2011 6:24 PM (13 years ago)

                Today I needed to include page breadcrumbs on a WordPress blog site.  I only wanted the breadcrumb navigation to be visible on pages, and to not display at all on the homepage (static).

                The following solution by Dimox was perfect for what I needed:
                WordPress Breadcrumbs Without a Plugin

                The solution was easy to implement and satisfied more than my initial requirements, so it gives me great pleasure to make a mention on my blog here.

                By default, the solution does not display the breadcrumb on the homepage, although this is easy to amend if required (see early comments).  I placed the "short code" for the main function in only the page template so that the breadcrumb would not display on posts or category/search pages.

                As the solution worked so well, I decided to use to display a breadcrumb title.  To do this, I first adjusted the dimox_breadcrums() function to include one parameter: ($meta_title = false)

                I then adjusted each part of the function that builds the breadcrumb to only include HTML output before and after each item in the breadcrumb ($before / $after) if the $meta_title variable is true. This meant that only the page title text and delimiter were included in the breadcrumb when $meta_title is true, allowing me to include in the title tag in the page meta data.

                To incorporate the breadcrumb into the title, I modified the header template for the theme that I was using, to include the following for the meta title:


                <title><?php bloginfo('name'); ?> » <?php if(is_page()) dimox_breadcrumbs(true); else wp_title(); ?> </title>

                This meant that if a page, it would include the breadcrumb in the title overriding the default title, and include the default title when another type of page (post, search, category/tag, etc).

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Query String Manipulation Functions 12 Feb 2011 5:56 AM (14 years ago)

                Javascript Query String Manipulation Functions

                The following is a series of articles with Javascript functions that can be used to manipulate the query string parameters and variables in the current url.  Use the links below to go to a specific function:

                Javascript Add Query String Parameter
                Add a query string parameter to the url of the current page.

                Javascript Check if Query String Parameter Exists in current URL
                Test if the query string of the current URL contains a specific parameter.

                Javascript Remove a parameter from the query string if found in current url
                Remove a parameter from the query string of the current page.

                Javascript Get the value of the specified Query String Parameter
                Find the value of a specific query string parameter in the current URL.  Return the value of the parameter, or false if not found.

                Javascript Get all parameters and values as an Array
                Returns a multidimensional array containing parameters and values from the query string of the current page.

                Javascript Return the url of the current page with no query string parameters (strip params)
                Removes all parameters from the query string of the current URL.

                Javascript Add query string parameter dynamically to some or all links on the current page
                Update all links on the current page to include a specific query string parameter and value.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Add query string parameter dynamically to some or all links on the current page 12 Feb 2011 5:01 AM (14 years ago)

                This Javascript function retrieves all <a> tags (hyperlinks) from the current page, and updates each link to include the supplied query string parameter and value.
                The third (optional) parameter passed to the function is an array of strings containing the domains that should be included when updating links on the page.
                If a link points to a domain that is not in the array passed to the function, the link will remain unchanged.

                If no Array of domains to include is supplied when calling the function, only the current domain is used.  For each link on the current page that the function loops through, the query string parameter is added to the link if the host matches one of the hosts in the array of domains.


                function updateLinks(parameter, value, includeDomainsArray)
                {

                   var links = document.getElementsByTagName('a');
                   var includeDomains = new Array();
                   
                   if(arguments.length == 3) //has include domains
                   {
                       //Links will be updated only if they point to one of the following domains:
                       //includeDomains = includeDomainsArray.split("|");
                       includeDomains = includeDomainsArray;
                   }
                   else
                   {
                       //Links will be updated only if they point to one the current domain only:
                       includeDomains[0] = self.location.host;
                   }
                   
                   for (var i=0;i<links.length;i++)
                   {
                       if(links[i].href != "#" && links[i].href != "/" && links[i].href != "" && links[i].href != window.location) //Ignore links with empty src attribute, linking to site root, or anchor tags (#)
                       {
                           var updateLink = false;
                           for(k=0;k<includeDomains.length;k++)
                           {
                               if(links[i].href.toLowerCase().indexOf(includeDomains[k].toLowerCase()) != -1) //Domain of current link is inlcluded i the includeDomains array.  Update Required...
                                   updateLink = true;
                           }
                       
                           if(!updateLink)
                           {
                               //Do nothing - link not is includeDomains array
                           }
                           else
                           {
                               var queryStringComplete = "";
                               var paramCount = 0;
                           
                               var linkParts = links[i].href.split("?");
                               
                               if(linkParts.length > 1) // Has Query String Params
                               {
                                   queryStringComplete = "?";
                               
                                   var fullQString = linkParts[1];
                                   var paramArray = fullQString.split("&");    
                                   var found = false;
                                   
                                   for (j=0;j<paramArray.length;j++)
                                   {
                                       
                                       var currentParameter = paramArray[j].split("=");
                                       
                                       if(paramCount > 0)
                                           queryStringComplete = queryStringComplete + "&";
                                       
                                       if(currentParameter[0] == parameter) //Parameter exists in url, refresh value
                                        {
                                            queryStringComplete = queryStringComplete + parameter + "=" + value;
                                            found = true;
                                        }
                                        else
                                        {
                                            queryStringComplete = queryStringComplete + paramArray[j]; //Not related parameter - re-include in url
                                        }
                                       
                                        paramCount++;
                                   }
                                   
                                   if(!found) //Add new param to end of query string
                                       queryStringComplete = queryStringComplete + "&" + parameter + "=" + value;
                               }
                               else
                               {
                                   queryStringComplete = "?" + parameter + "=" + value;
                               }
                                   
                               links[i].href = links[i].href.split("?")[0] + queryStringComplete;        
                           }
                       }
                       else
                       {
                           //Do nothing - link not is includeDomains array
                       }
                   }
                }

                Previous: Javascript Return the url of the current page with no query string parameters


                Javascript Query String Manipulation
                (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Return the url of the current page with no query string parameters 12 Feb 2011 4:57 AM (14 years ago)

                This Javascript function strips/removes any existing query string parameters from the url and returns the 'cleaned' url.


                function stripParameters()
                {
                   var loc = window.location.href;
                   return loc.split("?")[0];
                }



                Next: Javascript Add query string parameter dynamically to some or all links on the current page

                Previous: Javascript Get all parameters and values as an Array

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Get all parameters and values as an Array 12 Feb 2011 4:55 AM (14 years ago)

                This Javascript function extracts each parameter from the query string and returns a multi dimensional array containing the parameter names and values.

                Array( Array(parameter_name1, parameter_value1) , Array(parameter_name2, parameter_value2) )



                function getAllParameters()
                {
                   fullQString = window.location.search.substring(1);
                   paramArray = fullQString.split("&");
                   var finalArray = new Array();
                   for (i=0;i<paramArray.length;i++)
                   {
                     currentParameter = paramArray[i].split("=");
                     finalArray[i] = Array(currentParameter[0], currentParameter[1]);
                   }
                   
                   return finalArray;
                }


                Next: Javascript Return the url of the current page with no query string parameters

                Previous: Javascript Get the value of the specified Query String Parameter

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Get the value of the specified Query String Parameter 12 Feb 2011 4:52 AM (14 years ago)

                This Javascript function checks the address of the current page for the supplied query string parameter.  If found, the value of the parameter is used, if the parameter is not found, false is returned.

                See also: checkParemeterExists(), which returns true or false if the specified parameter is found or not.



                function getParameter(parameter)
                {
                   fullQString = window.location.search.substring(1);
                   paramArray = fullQString.split("&");
                   
                   found = false;
                   for (i=0;i<paramArray.length;i++)
                   {
                     currentParameter = paramArray[i].split("=");
                     if(currentParameter[0] == parameter)
                        return currentParameter[1];
                   }
                   return false; //Not found
                }


                Next: Javascript Get all parameters and values as an Array

                Previous: Javascript Remove a parameter from the query sring if found in current url

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Remove a parameter from the query sring if found in current url 12 Feb 2011 4:48 AM (14 years ago)

                This Javascript function removes the supplied parameter from the query string if it is present in the current url.  This is done by converting the query string into an array of parameters and values, then rebuilding the final string to exclude the parameter supplied to the function.  The browser is then redirected to the current page with the new query string.


                function removeParameter(parameter)
                {
                   //Get Query String from url
                   fullQString = window.location.search.substring(1);
                   
                   paramCount = 0;
                   queryStringComplete = "?";

                   if(fullQString.length > 0)
                   {
                       //Split Query String into separate parameters
                       paramArray = fullQString.split("&");
                       
                       //Loop through params, check if parameter exists.  
                       for (i=0;i<paramArray.length;i++)
                       {
                         currentParameter = paramArray[i].split("=");
                         if(currentParameter[0] == parameter) //Parameter already exists in current url
                         {
                            //don't include existing (will be appended to end of url)
                         }
                         else //Existing unrelated parameter
                         {
                            if(paramCount > 0)
                               queryStringComplete = queryStringComplete + "&";
                           
                            queryStringComplete = queryStringComplete + paramArray[i];
                            paramCount++;
                         }
                       }
                   }
                   
                   window.location = self.location.protocol + '//' + self.location.host + self.location.pathname + queryStringComplete;
                }


                Next: Javascript Get the value of the specified Query String Parameter

                Previous: Javascript Check if Query String Parameter Exists in current URL

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Check if Query String Parameter Exists in current URL 12 Feb 2011 4:45 AM (14 years ago)

                This Javascript function checks if the parameter supplied exists in the query string.  If the parameter supplied is found in the query string of the current URL, the function will return true.  If the parameter is not found, false is returned.

                See also: getParameter() - This function returns the value of the parameter if found, and false if it is not found which can be used instead of the checkParameterExists() function below



                function checkParemeterExists(parameter)
                {
                   //Get Query String from url
                   fullQString = window.location.search.substring(1);
                   
                   paramCount = 0;
                   queryStringComplete = "?";

                   if(fullQString.length > 0)
                   {
                       //Split Query String into separate parameters
                       paramArray = fullQString.split("&");
                       
                       //Loop through params, check if parameter exists.  
                       for (i=0;i<paramArray.length;i++)
                       {
                         currentParameter = paramArray[i].split("=");
                         if(currentParameter[0] == parameter) //Parameter already exists in current url
                         {
                            return true;
                         }
                       }
                   }
                   
                   return false;
                }


                Next: Javascript Remove a parameter from the query string if found in current url

                Previous: Javascript Add Query String Parameter

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Javascript Add Query String Parameter 12 Feb 2011 4:40 AM (14 years ago)

                Redirect to the current page including the specified query string parameter and value
                This Javascript function redirects the browser back to the current page with the query string parameter data included that is passed to the function.  If the current url already contains the supplied query string and value, no redirect will take place.  Existing parameters and values are retained in the url after the redirect.

                This function can be useful when a common query string parameter is required across multiple pages on a site, such as a session hash/id or similar.  
                The current page will reload to include the specified parameter and value if it doesn't already exist.  Use this function in combination with the updateLinks() function to add and manage query string parameters and variables across pages on a site dynamically.


                function addParameter(parameter, value)
                {
                   //Get Query String from url
                   fullQString = window.location.search.substring(1);
                   
                   paramCount = 0;
                   queryStringComplete = "?";

                   if(fullQString.length > 0)
                   {
                       //Split Query String into separate parameters
                       paramArray = fullQString.split("&");
                       
                       //Loop through params, check if parameter exists.  
                       for (i=0;i<paramArray.length;i++)
                       {
                         currentParameter = paramArray[i].split("=");
                         if(currentParameter[0] == parameter) //Parameter already exists in current url
                         {
                            //don't include existing (will be appended to end of url)
                         }
                         else //Existing unrelated parameter
                         {
                            if(paramCount > 0)
                               queryStringComplete = queryStringComplete + "&";
                           
                            queryStringComplete = queryStringComplete + paramArray[i];
                            paramCount++;
                         }
                       }
                   }
                   
                   //Add/Update query string if required.
                   if(paramCount == 0)
                       queryStringComplete = queryStringComplete + parameter + "=" + value;
                   else
                       queryStringComplete = queryStringComplete + "&" + parameter + "=" + value;
                   
                   window.location = self.location.protocol + '//' + self.location.host + self.location.pathname + queryStringComplete;
                   
                   
                }


                Next: Javascript Check if Query String Parameter Exists in current URL

                Javascript Query String Manipulation (TOC)

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Outlook (2007) Ribbon: Issue adding new group to Message tab 27 Jan 2011 12:44 AM (14 years ago)

                When writing a COM Addin for Microsoft Outlook 2007, I came across a scenario where I needed to add buttons to the Ribbon when composing or reading an email message.  Using the IRibbonExtensibility methods, I was able to add a new tab with groups and controls to the read and compose inspectors.  The issue was that I needed to include an additional group in the Message tab of an email when composing or viewing.  If I set the tab id to that of the read or compose message class (TabNewMailMessage or TabReadMessage), the group would not display at all.


                The new group would only display if added to a new tab.  When I set the tab id to that of the Message tab for the read and compose message classes, the new group would not display at all.  This was not ideal, as the solution required that the new group and buttons were displayed first before the standard groups within the Message Tab.  


                There were a number of reasons that the custom group would not display in the Message tab on the Ribbon:


                1. I was using the id attribute instead of the idMso attribute for the tab.  To reference the built-in Message tab, I needed to use the idMso attribute (idMso="TabNewMailMessage" or idMso="TabReadMessage", not id="TabNewMailMessage").


                2. Include startFromScratch attribute in Ribbon element (startFromScratch="true").  When I first included the startFromScratch attribute set to true, I was referencing a different tab to the Message tab, so the result was that all tabs were removed except for my new tab and groups contained.  After changing the id attribute to idMso and the value to the correct identifier for each Message class, my group was then added to the end of the built in Message tab.  I then moved the new group to the beginning of the tab using the insertBeforeMso attribute and the built-in message class tag ids.


                The code used to add the new group to the Message tab is below.  I first configure the button element to be added to the group, but a different button is added depending on the Message Class.  The next step was to create the Custom Ribbon XML to include the other elements required to render the customisations, and add to a single string variable that includes the required button element.  

                An alternative may be to read the entire XML file containing the new Ribbon elements from a file or application/addin resource.  As I wanted to use the same tab, but have a different button be added depending on the message class, I chose to generate the custom ribbon XML using VB below.




                (Note: Some lines of code may be spanned across multiple lines in the post.  Copy to a text file to fix)

                Public Function IRibbonExtensibility_GetCustomUI(ByVal RibbonID As String) As String

                Dim strXMLPath As String
                Dim strXMLOpen As String
                Dim strXMLClose As String
                Dim strXML As String
                Dim strIn As String
                Dim iFile As Integer
                Dim strBtnXML As String
                Dim strTabID As String
                Dim strInsertBeforeGroupID As String

                Select Case RibbonID
                Case "Microsoft.Outlook.Mail.Compose"
                ' Return the RibbonX markup stored as a resource in the project
                strBtnXML = "<button id=""VBBtn1"" size=""large"" label=""New Button 1"" onAction=""cmdPressed1"" getSupertip=""getSuperTip"" getImage=""getImageDisplay"" />" & vbCrLf
                strTabID = "TabNewMailMessage"
                strInsertBeforeGroupID = "GroupClipboard"

                Case "Microsoft.Outlook.Mail.Read"
                ' Return the RibbonX markup stored as a resource in the project
                strBtnXML = "<button id=""VBBtn2"" size=""large"" label=""New Button 2"" onAction=""cmdPressed2"" getSupertip=""getSuperTip"" getImage=""getImageDisplay"" />" & vbCrLf
                strTabID = "TabReadMessage"
                strInsertBeforeGroupID = "GroupShow"

                Case Else
                IRibbonExtensibility_GetCustomUI = ""
                Exit Function
                End Select

                strXMLOpen = "<?xml version=""1.0"" encoding=""utf-8"" ?>" & vbCrLf
                strXMLOpen = strXMLOpen & " <customUI xmlns = ""http://schemas.microsoft.com/office/2006/01/customui"" onLoad = ""Ribbon_OnLoad"" >" & vbCrLf
                strXMLOpen = strXMLOpen & " <ribbon startFromScratch=""true"">" & vbCrLf
                strXMLOpen = strXMLOpen & " <tabs>" & vbCrLf
                strXMLOpen = strXMLOpen & " <tab idMso=""" & strTabID & """ label=""Message"" visible=""true"" >" & vbCrLf
                strXMLOpen = strXMLOpen & " <group id=""GroupVBActions"" label=""" & ribbonGroupText & """ visible=""true"" insertBeforeMso=""" & strInsertBeforeGroupID & """ >" & vbCrLf

                strXMLClose = " </group>" & vbCrLf
                strXMLClose = strXMLClose & " </tab>" & vbCrLf
                strXMLClose = strXMLClose & " </tabs>" & vbCrLf
                strXMLClose = strXMLClose & " </ribbon>" & vbCrLf
                strXMLClose = strXMLClose & "</customUI>" & vbCrLf


                strXML = strXMLOpen & strBtnXML & strXMLClose

                IRibbonExtensibility_GetCustomUI = strXML

                End Function




                The function stores XML data in separate strings.  It first determines which button is required based on the Message class (reading or composing a message), the adds the button XML to the strBtnXML string variable.


                The remaining components of the XML are then added to the strXMLOpen and strXMLClose variables, and the complete XML constructed and stored in the strXML variable.  Storing the separate components of the XML is not a requirement, as it is only configured this way to allow the XML contents to be represented in code in a readable manner.


                Resources:

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Outlook VBA Macro Cause Close Loop 25 Jan 2011 6:31 AM (14 years ago)

                When developing a macro for Outlook 2007 Visual Basic Editor, part of the macro code caused outlook to close unexpectedly (“Unexpected Error has occurred”) while attempting to load. This meant that I was not able to easily access the macro to fix the issue.

                The article Outlook Close Loop - VB Macro Development suggested to adjust the macro security check option via the registry to allow Outlook to open again. This worked, which allow Outlook to open without the error. When prompted to enable or disable macros while loading, I opted to disabled macros. This allowed Outlook to full load, and gave me access to the VB Editor to fix the issue.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Web Development & SEO: Considerations / Gotchas when Outsourcing SEO Services 18 Sep 2010 9:55 PM (14 years ago)

                Web Development and online Marketing in the industry today often involves a large number of broad areas such as planning / BA, website or system design, system or application development, system testing., server configuration and maintenance, DNS configuration, Internet Marketing / SEO, etc. There are many cases where a developer will carried out similar tasks to the webmaster, SEO or internet marketing consultant, especially when the Web site is managed externally by a single company. Most companies and individuals who offer online services for the development of web sites may also need to configure and maintain the DNS and web server. Many developers become experienced in some of these areas, but to become a real expert in any given area requires a lifetime of knowledge and experience. This is often the deciding point between outsourcing website development and SEO services to an individual with lower prices, or a larger company higher prices, but have access to a much greater range of skills in each area. In business scenarios, outsourcing the company with a wide range of talent is required to get the site off the ground, and will generally be more worth while in the end in regards to return on investment.

                Professional SEO Consultants and Internet marketers should have at least moderate web development skills in order to optimize a website internally for search engines. This may require an understanding of multiple programming languages, data sources and business integration and reporting platforms. This can be one of the gotchas when outsourcing SEO or development, as there are many web development companies that will also claim to provide the necessary SEO services for you site or company. If a company claims to provide a "SEO Services" consist primarily of developers and not professional SEO, Advertising and Internet Marketing consultants where high quality content, language and marketing skills are their main focus, you may find that the techniques employed to market you site are not ethical or legal, and certainly not useful enough to serve it’s purpose of marketing another place on the internet. Many development companies use their development skills to create automated solutions for marketing a websites on the internet, which can seem attractive due to the number of external links being obtained, but is in most cases a complete waste of time and money.

                If your SEO company uses forums to create content to market your site, make sure that the forums related to your site, and that the marketing content added to forums is informative, useful, and not the sales pitch unless published in the appropriate area. For external content to be most successful, it should be useful and relevant in the context of the website it has been placed on.

                For example, you might feel as though you are getting great value for the purchase of 10 000 or similar links for low price. Chances are that each of the previous customers/clients also have a link to their website on the same 10,000 pages or sites, regardless of the purpose of each external web page or types of products / services being offered. Although the price seems cheap, it will most likely be a complete waste of time, since most major search engines choose to ignore spammy content, or content from spammy domains. If the site is useful and worth sharing with others, websites and publishers will naturally link to your web site to help you build backlinks. Another downfall with purchasing links in bulk is that Search Engines may notice the unnatural growth in external links to your site, which can result in being penalised or even banned. This, and many other similar techniques would be termed 'Black Hat' SEO that may work at the time of purchase, but technology and other emerging black hat techniques will eventually be recognized by major search engines making use the techniques useless, a waste of time and risk severely damaging the reputation of the website (and SEO company).

                The thing that catches most people, is that is pretty widely known that backlinks help promote websites in search engines. When you see an offer for 10,000 backlinks for a small price, it can seem to good to be true as to create 10,000 pages manually to link back to your site would be impossible to do in a short time with quality (non duplicate) content. Purchasing links in bulk will in most cases be completely useless in terms of affect on SERPs and return on investment. Although building backlinks is important to help expose a website to the Internet and in Search Results, for maximum success in the marketing campaign you need to think in terms of content as apposed to links. If the content is not useful in some way, or published to a location that is not trusted by other websites and search engines it won’t be much use. In the past I was much more successful with between 5 and 10 backlinks from pages with high quality original, and highly related  content, as I have to thousands of links from sites and pages that are not closely associated with the primary purpose of your website. In my opinion you are not paying for the actual backlinks at all, but instead for the time necessary to create high quality and useful content that contains a link to your website. Paying for 10,000 backlinks may seem easy and cheap if compared with the amount of time required to create these links, but the process to create the links would be automated, taking less than a few hours to complete at worse. To get many links from high-quality content itself would take a very long time to complete and involve large costs.  When outsourcing or purchasing links from companies that provide bulk links offers at small prices, high quality content is certainly not what you are paying for.

                This is not to say that all Web Development / SEO companies that use forums (or similar) to create backlinks from relevant content do so using spammy techniques.  Many companies employ experienced content writers with the appropriate skills required to write high quality content relating to your website. High-quality marketing content on external websites will be most successful if engaging, useful and original in the context of the site or page the content is published on. Purchasing links from such content or paying professional writers themselves to create high quality content is much more expensive than buying a large number of generic links in bulk.  In the past, I have found that hiring professional writers will always result in effective and useful marketing campaign, which yields results greater than that of links from generic, duplicate and spammy content.  If you are hiring a professional writer, be sure to provide enough detail in the brief to ensure that the content produced is appropriate and written to target the required keywords and phrases in a non manipulative way.

                Further indication of the quality and professionalism of Internet Marketing SEO firm, is whether or not they are open to the techniques used to market your site. If information like this is withheld from you, then it's probably because they engage in unethical practices when promoting websites online. There are not many secrets of good SEO, which is why all of a well established professional SEO firms will certainly explain the process they go though to write and publish high quality content to trusted external sites. Some companies also offer SEO services, advising publishers and website owners to use techniques to continuously promote your website. Many also have a number of specialized forums, directories and Web sites that allow content to be added in the areas relevant to your site.  This is most successful when actively participating on the forums in constructive ways that result in the threads being indexed and followed promptly by search engines.

                When planning to outsourcing SEO or Internet Marketing services to promote your website, the most important things to consider if money spent is likely to bring higher returns in the long run. Be sure to analyze your competitor sites and SERPs, and websites of the chosen SEO company's previous clients to determine what marketing techniques are used. Avoid taking short-cuts, such as purchasing large amounts of links, which can result in your site being penalised or excluded from search engines all together.  You will generally get what you pay for, and be satisfied as long as you spend the time doing some research before handing over the money.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                User Acceptance of Innovations and new Solutions 13 Sep 2010 2:23 AM (14 years ago)

                The following provides some things to consider when developing and implementing new solutions for large volumes of end users, with a primary focus on user acceptance.  The information is my own personal opinion which is based on my experience as a Solution Architect and Developer.  I have struggled on many occasions to have users accept and adopt a new system or process, and as a result now incorporate number of techniques and methods to assist with user acceptance when designing and developing a solution.  Some of these would be common sense, but others are often overlooked as an important part of the planning, development, testing and implementation phases of a new innovation.  The main focus is on some of the reasons for the non-acceptance of new solutions and some techniques to help improve level of user acceptance.  This applies to the implementation of any new system or process for any large group of users, and is not dependent on the platform used to develop the solution.


                User Resistance Non-Acceptance
                Having users accept the use of new innovations in their day-to-day operations can sometimes be quite difficult.  When dealing with larger number of end users, there will almost always be some resistance from users, particularly if they have a personal stake or authority within the business.  Resistance may be caused by a number of reasons including the general lack of a technical understanding or abilities, as there will always be people who struggle with and avoid the use of technology and computers.  Other reasons might be that a solution was introduced to replace an existing system and processes that people were comfortable and failure with.  If the equivalent implementation of the existing system or process is not obviously easier and more efficient to use, as well as to provide some additional features or functionality users will be much less likely to adopt the new solution.


                Process Alignment
                When planning to implement an innovation or new solution, it is important to analyse existing systems and processes, as well as to consult with actual end-users of existing systems and users of the proposed system.  Ensuring that the implementation incorporates all functionality of the existing system will help with user adoption, as users will already be failure with the system and how it works.  On the other hand, if similar functionality is replicated in the new solution, but the interface and/or process is completely different, users may struggle to adopt the change.


                Champions
                In most small or large organisations, there are a number of people who actively seek out better and more efficient ways to do their day-to-day work and in many cases the work of others.  Many of these individuals would be referred to as Champions of the business, as they possess the confidence required to suggest something new that has not been implemented or considered in the past, or to make suggestions for changes to be made to existing systems or processes.  Champions are very valuable to a business, as they can nurture change into a business by instigating and promoting cultural change within an organisation.  Champions would have a firm understanding of the day-to-day operations of their own, and other colleagues roles.  Working closely with such people when designing and developing a system can help ensure that it provides the necessary functionality in an interface that is user friendly.  Once implemented, the champion will have a solid understanding of the functionality and how to use the system. As they came forward with the idea or concept in the first place, they will also feel and most likely have some sort of ownership over the idea within the business.  As feel as though they are partially responsible for the system being implemented, they will almost always hold others' hands during the initial stages after implementation and can also provide training to others in how to use the system.


                Solution Architecture & Developer Resource Management
                Although it might be great for people to be thinking proactively about how to improve their day-to-day operations or efficiency, it can also result in development time and resources being wasted if a system is not adopted after being implemented.  This is more likely to happen if a person has not consulted others for a advise or second opinion in relation to their idea or concept.  There are many cases where someone has a seemingly great idea, then after weeks of development the idea is implemented as a technical solution.  The user who made the initial request is delighted to see the results of their idea implemented as a solution, but others may struggle to see the same benefits.  In some instances, the requester will have a play with their new 'toy' for a few hours or days if your lucky, only to push it aside after the initial excitement has passed and resume the use of previous systems and processed.  You should always weigh up the pros and cons of a new implementation, considering the amount of development that is required to build the system.  Some small visual or functional enhancements may take days or weeks to develop, but provide no or minimal additional benefit overall.  Part of the role of a solution architect or developer during the planning phase should be to evaluate if the investment of development resources is likely to be money or time well spent.  There are often other alternatives available that will also satisfy requirements of a request.  In many cases, there would be much more efficient ways to achieve a similar result, but a compromise may have to be made to make it possible to implement a solution without wasting time and resources.  Usually after carefully explaining how an alternative and more practical method (in terms of development time and resources) can be used to turn their request into a solution, they are happy customers.  A demonstration using similar functionality implemented elsewhere may be required, as it also helps the person with the idea see how it could come together.


                System, User Interface and User Acceptance Testing (UAT)
                To further increase the chances of user acceptance for a solution developed using SharePoint or another platform, you should aim to and build a user interface that is intuitive and easy to navigate.  If users are able to use the solution without requiring training, they are also much more likely to use and continue to use the system.  When developing an interface, it can be hard to put yourself in the shoes of the end users as you would already have a much deeper understanding of the system introducing bias.  When you are certain that your interface is as easy and straight forward to use as it gets, think twice.  There will most likely be users that will interpret the interface different to yourself and others, particularly when there are icons or buttons used with symbolic graphics describing their function.  A good way to make sure that the interface is indeed intuitive and easy to use is to take a sample of end users who have no previous knowledge of the details of the solution, and to have them work through the processed and functionality using the interface provided.  You will soon know if the interface requires adjustment, or if it is logical and satisfactory to the sample users.  This is also a good way to find any issues, and to have others provide unbiased feedback about the interface, functionality and overall solution.  If the group of sample users is larger, the results will provide a more accurate gauge of the solution’s success.  If the sample group doesn’t represent the full group of end users, bias and other external factors can be introduced that will skew the results or feedback.  This may be caused by different levels of computer skills required for people in different roles.  A more extreme example would be selecting other developers as the sample test group for the new interface or solution.  Generally speaking, a developer, or anyone with a deeper understanding of computers and technology will interpret an interface differently than someone without the same skill level, who would be more likely to struggle.  Having the opinion or input from other developers is certainly valuable, but it is still essential to design and test the user interface and functionality of the solution with end users.
                There are formal procedures that can be followed when performing User Acceptance Testing to help ensure all aspects of the system are covered.


                Summary
                There are many contributing factors to why the may be resistance from users when adopting a new solution or process.  Careful planning, as well as consultation with the end users of a system is essential in order to develop a solution that will satisfy the needs of the end users.  Testing the system and user interface on a sample group of users is important to obtain feedback about the system and interface prior to implementation.  When a the user interface of a system is simple, intuitive and easy to use, the level of user acceptance will be much greater.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Optimise Database &amp; Application Scripts for Performance - Web Development 12 Sep 2010 6:37 AM (14 years ago)

                Improving the performance of a Web Application or website can sometimes be difficult depending on the factors that are contributing to downgraded performance. In some cases, performance issues may be related to server hardware or network issues to limitations which would usually cost money to improve. In other cases, there are many factors that can impact on the overall performance of a web application or website that can be changed easily.

                When a database is used to store data that is required by an application to function or display information to end-users, it is sometimes hard to know exactly how it should be developed before the system has deen in production. It will be much easier once a system is in production to see what works well and what doesn't, but it is too late by this stage as making major structural shanges to a database and schema with existing data will be difficult, time consuming or not possible at all without having to re-build some components from scratch.

                To prevent having to completely re-work a datanase schema ofter it has been developed an incorporated into a live application, you need to have a strong understanding of the goals and objectives of the system, major components / processes and their primary function, as well as how each component and process pull together technically. This will allow a database schema to be designed that caters for all of the intended data types, using appropriate primary and secondary keys on each table to allow associated data form different to be joined logically. Understanding the application as a whole will also help to indicate what DBMS would be appropriate to satisfy all requirements of the system, as well as to provide sufficient security measures to keep the database and data safe.

                Improving the performance of an application or website that is already in production can be achived by analysing traffic and usage data, as well as database statistics to determine which areas are more frequently used and if there are database queries that are slow, impacting on the overall performance of the application. Finding the specific scripts that are causing components of the application to function slowly and working to improve programming logic and database queries on these is a good start, but time is best spent working in areas that are also frequently used when in production. There is not much pojnt in optimising a script, database table and/or query if it it only saves a few seconds of loading time and the page is only accessed once a month or so.

                Optimising the hompage of a website on the other hand would in most cases be time better spent, as the volume of users is generally greater, resulting in a more significant improvement in the overall performance of the application. Finding a ballance, between pages / database queries that are slow and pages or scripts that are most frequently requested/executed will help to improve the performance in problem areas first, which will result in the most significant increase in overall performance.

                Improve Performance for Websites with a Database Back-end & Dynamic Content

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Text in textarea chopped off after quote or apostrophe 12 Sep 2010 6:05 AM (14 years ago)

                I had an issue, where the text in a textarea input was being cut off after a quote or apostrophe.  The form was submitting to a ‘confirm’ mode, which displayed the details entered into the form back to the user for confirmation.  The details were being passed between each page/mode using hidden fields.  I found that if there was a quote or apostrophe in the text entered into the textarea field, it would be chopped of once the data had been submitted, or if pressing the ‘modify’ button on the confirm page.  After having a look at the page source of the confirm page, I noticed that the value from the textarea field which was being stored in a hidden variable spanned across multiple lines in the code.  As the value of the hidden text field was wrapped in quotation marks, the result was that the parser would stop think that the textarea content had finished.  As the content spanned across multiple lines, the parser would resume rendering the page content even though it was still within the text inside the hidden field value.

                I tried a few things with limited success, including removing all line breaks from the text so that is it rendered on one line as well as encoding the quotation marks when including as an attribute value, but the solution I used was to store the value from the textarea field in a hidden textarea field on the confirm page instead of a hidden input field type.  I used the display attribute (display: none) to hide the text area from being displayed on the page.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                SharePoint Development at a Higher Level 8 Sep 2010 5:48 AM (14 years ago)

                SharePoint development may be required to provide an environment that is custom to a business as well as to enable additional features and integrate with existing and new technologies.  Many companies provide consulting services for SharePoint, allowing an understanding to be gained on the capabilities of the core features provided by SharePoint, and how they can be utilised or developed to build solutions for the business.  Custom SharePoint Development may include anything from the construction of an intranet environment to the development of complex workflow involving many people within the business, that may also draw from a range of existing sources for data such as project reporting or accounting systems.

                An Intranet environment would generally have appropriate team sites created for each division or team within the business, including document management tools, team communication and collaboration, task and resource management, security, etc.  Document repositories with version control and approval workflow can allow business documentation, forms and form templates to be maintained, distributed and controlled securely from a central or many locations.

                Once configured and secured on the network of a business, SharePoint provides a large range of easy to use features for creating and configuring sites, groups and permissions, individual lists & libraries such as calendars, tasks, discussions and document/form libraries and basic workflow.  With sufficient permission to a site collection, new sites, workspaces and site components can be created and maintained easily using the list / site settings & other components of the web interface provided by SharePoint.

                Some organisations may require custom SharePoint development to build solutions that automate existing processes within the business to improve efficiency and reduce the chance of human error.  This may even include the development of a web facing form for clients/customers that can be placed on an extranet that would also be powered by SharePoint, and could interact with other internal portals and site collections used by the business.

                SharePoint provides a range of predefined workflows that can be applied and configured on lists / document libraries on a SharePoint site.  No SharePoint development is required to configure or use these workflows, as the process is configurable using the browser.  In most cases, the approval workflow provided by SharePoint will be the most commonly used, as it allows documents, files and content to be maintained by all or a set of users, but changes need to be approved by an authorised person before they will become available to others.

                SharePoint Designer also provides functionality to build workflow and develop in SharePoint, allowing greater control over the process and number of options available without needing to use code.  Other third party workflow tools also exist to help ease the process of creating workflow in SharePoint, as well as making it possible for a general SharePoint user to understand and build workflow instead of a SharePoint Developer.

                In many cases, the core features provided by SharePoint and SharePoint Designer will not be suitable for, or capable of being used to build solutions in SharePoint.  This is where a SharePoint consultant or solution architect may be required to help design a solution that will best suit the needs of the business.  Companies providing SharePoint consultancy services can, and will generally assist with each of the planning, design, development an implementation phases of a SharePoint implementation, or the development of various solution for the business using or utilising SharePoint.

                Find SharePoint Development resources, including resources for SharePoint developers and a collection of companies providing SharePoint Development services.  Stay up to date with SharePoint development news and resources, or simply learn more about SharePoint and it's capabilities using the range of resources provided by DevSharePoint.com.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Php RSS 2 Writer Update (v2.1) - CDATA Enabled 31 Aug 2010 2:30 AM (14 years ago)

                The Php RSS 2.0 Writer class has been recently updated to include the option of writing CDATA in the RSS feed item title or description components. This allows the feed to be parsed even when the content within a feed item contains special characters that would usually be parsed as an XML element, such as HTML code. When the xml parser reaches a CDATA tag, the content within will be ignored, allowing special characters to be included in the content. Please note that you are still required to encode any special character that appears in a CDATA tag, which is commonly '<', '>' and '&' characters.

                View more details about the update and the Php RSS 2 Writer class file. Further information is also available ablut the recent updates to the class as well as general usage information for the class. The class file and sample constructor is also available for downloaded on this page.

                The CDATA update was prompted by an issue someone was having when trying to generate an RSS Feed using the class. View the RSS Feed CDATA Troubleshooting post.

                [Update: The Php RSS 2.0 Writer class that this post refers to has been upgraded, and has also moved to a dedicated site.  The updated package is now Php FeedWriter, which supports output of multiple RSS formats and also Atom 1.0.  A tutorial is available on this blog to help with: Creating a custom feed using Php FeedWriter.  A link to download the package for free is available from the post also. ]

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                C# Generate Random String of a Specific Length 31 Aug 2010 12:35 AM (14 years ago)

                The following function will generate a random string of the supplied length.  The function uses the Random object to generate random integer values that correspond to ASCII values within a specific range (a-z, 0-9).  Once a random string has been generated that is the required length, it is then returned.



                This can be useful if you are wanting to generate a unique code or id for use in a .NET application, or anything that supports C#.  For example, this could be used as an security code for authentication via links in an email.  The security code would be unique, and not be included in an email to more than one person.  The code can then be used to determine who clicked a link in an email by finding the user who corresponds to the unique code.

                Another use may be for general logging/reporting of links clicked in an email to know who clicked a link when other tracking mechanisms are not available.  As the email address would need to be know to be able to send an email to the user, it is possible to have a unique code associated with every email that is distributed.



                C#:

                public String generateRandomString(int length) {
                    //Initiate objects & vars    Random random = new Random();
                    String randomString = "";
                    int randNumber;
                
                    //Loop ‘length’ times to generate a random number or character
                    for (int i = 0; i < length; i++)            {
                        if (random.Next(1, 3) == 1)
                             randNumber = random.Next(97, 123); //char {a-z}
                        else
                             randNumber = random.Next(48, 58); //int {0-9}
                
                        //append random char or digit to random string
                        randomString = randomString + (char)randNumber;
                    }
                    //return the random string
                    return randomString;
                }

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                Windows Phone 7 Development Resources 29 Aug 2010 7:05 AM (14 years ago)

                The following page lists some good Windows Phone 7 Development articles and resources: Local database support for Windows Phone 7, Windows Phone 7 SDK, SharePoint & Windows Phone 7, Windows Phone 7 Development Training, Developer Tools and much more.

                See: Windows Phone 7 Development

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                RSS Feed CDATA Troubleshooting 25 Aug 2010 2:47 AM (14 years ago)

                RSS2Writer v2.1 has been updated to v3.0 beta.  The new version can be downloaded at the Php FeedWriter website:  http://PhpFeedWriter.WebmasterHub.net/

                Php FeedWriter (v3.0 beta) now provides the ability to output to various feed formats.  Php FeedWriter can currently generate Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92 and RSS 0.91 compatible feeds

                View more information about Php FeedWriter, including online documentation.  For information about the latest update and release, see the article Php FeedWriter 3.0 (beta) Released.

                A tutorial demonstrating how to build a feed using Php FeedWriter is also available on this blog:
                How to Generate Feed Using Php (Atom 1.0 and RSS 2.0 Compatible)


                RSS Feed CDATA was not working properly in the Php RSS 2.0 Writer class when trying to generate an RSS feed, as CDATA was not initially supported by the class. When the CDATA tags were included using '<![CDATA[' . $content . ']]>' as the value in the description element of the field, it didn't work.

                Some of the things considered were the RSS feed reader being used to test the feed and if it supported the use of CDATA in an RSS feed, and if special characters were being encoded properly.  The intention was to allow content which would usually be parsed as and xml element to be ignored by the parser and included as characters (CDATA). This applies to a range of characters, but more commonly &,<,>, etc. used in html/xml markup.


                Abdul Basit (abasit83) was able to fix the issue by including content in the xml element using the writeCData(...) method provided by the XMLWriter class.


                View details about the Php RSS 2.0 Writer class that was being used, and more information about the CDATA mods.

                The following resources provide some information about using CDATA in RSS feeds, and XML in general:
                · C.28 When should I use a CDATA Marked Section?
                · CDATA and formattedText in RSS XML
                · RSS CData Item

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?

                InfoPath SharePoint Development 16 Aug 2010 4:34 AM (14 years ago)

                SharePoint News & Development Resources
                DevSharePoint.com provides the latest SharePoint news and resources. Stay up to date with SharePoint 2010, MOSS 2007, WSS, SharePoint Designer (2007/2010), InfoPath.

                InfoPath & SharePoint Development Tutorials, Resources & How To's
                InfoPathSharePoint.net provides the latest InfoPath development tutorials, InfoPath Form Services administration tips, tricks and how to's. InfoPath SharePoint Integration: Integrate InfoPath Forms with SharePoint lists, libraries & workflow.

                SharePoint & InfoPath News & Resources
                SharePoint Administration, Development, Design & Customization Resources from around the internet. SharePoint & InfoPath News. InfoPath SharePoint Integration. InfoPath Form Template Design. InfoPath Form layouts, design tips & techniques.

                Add post to Blinklist Add post to Blogmarks Add post to del.icio.us Digg this! Add post to My Web 2.0 Add post to Newsvine Add post to Reddit Add post to Simpy Who's linking to this post?