Newsletters- Spring 2005

So much for the $15.00 per hour programmer

Offshoring? Know Before You Go
by John W. Stout

Once thought to be a cost saving panacea for software development, it is now clear that the realities of offshore outsourcing are more sobering. Lured by promises of vastly reduced costs, many American companies have sent programming work to Asia, Eastern Europe and elsewhere. Although more IT jobs are projected to move overseas in the next five years, many U.S. firms may not be aware of transition problems and hidden costs which greatly reduce or even eliminate their expected savings.

While firms like Citigroup, American Express and GE Capital have been outsourcing for years, inexperienced companies may move too quickly to jump on the bandwagon. Some of the leading problems that have surfaced include: knowledge transfer issues, hidden costs, security breaches, and intellectual property theft.

Knowledge Transfer Problems

Companies need to address such specific issues as:

· Offshore vendors will likely lack company-specific understanding. · Offshore IT professionals have higher turnover rates than their American counterparts. Attrition rates average 25% to 30% in India, according to a 2002 study by Hewitt Associates and India’s National Association of Software and Service Companies.

· offshore workers often don’t know what certain business processes mean and cannot support a specific business system, since they don’t understand the context of the code.

Hidden Costs

Companies going offshore have to invest more up front than they expect, and often discover that projected savings are eaten away by such hidden cost as:

· The Cost of Selecting a Vendor - these costs include documenting requirements, sending out RFPs and evaluating responses, contract negotiation, legal fees and travel expenses.· The Cost of Transition - companies have to bring some offshore developers to their U.S. offices to analyze the technology and architecture before those developers can return home to begin the actual work. · The Cultural Cost - a common sense project for a U.S. worker may be a foreign concept offshore. Offshore vendors also often lack developer experience (average experience of offshore developers is six years).

· The Cost of Managing Offshore Work - managing the ongoing relationship is a major cost and includes ensuring that cost centers are charged correctly and that time is properly recorded. Time zone difference is a scheduling, and hence, a cost problem.

Other Problems

If a company does not properly qualify outsourcers and their subcontractors by verifying their financial health, customer references and software-certification levels, they can find themselves in serious trouble. The offshore company’s employees often pose the most risk. Background checks in emerging markets can be difficult, since many of them don’t have criminal databases or credit reporting agencies.Other problems are theft of intellectual property and violations of licensing agreements. Plans to outsource must include review of software licenses to ensure that these are up to date and that fees are paid.

Beyond my research into the issues of offshore outsourcing, some of our clients that have done offshore projects confessed to experiencing the same issues described in this article. The message from them was "know what you are getting into before you make assurances to your management about cost savings, security and schedule."

John W. Stout is the founder and president of Stout Systems. He has twenty-five years experience in the software industry. He is also sought after as a technology speaker, presenting sessions at developer conferences and user groups. E-mail .

-back to top-


Practical Cross Platform SOAP and XML in C# using Mono
by Richard Herrell

Mono is a free and open source implementation of the C# programming language for Linux or Windows. Mono can act as a bridge technology to help Windows programmers transfer their .NET skills to the Linux platform. Linux continues to show strong growth. A recent IDC study showed that while Linux has relatively small server operating system revenues of $1.2 billion, it has a strong 35% growth rate. Conversely, while Windows has substantially greater server operating system revenues of $4.2 billion, it has a smaller 12% growth rate. If both Linux and Windows continue to grow at their current rates, they will reach parity sometime in 2011 (see graph).

SOAP (Simple Object Access Protocol) is a successor to RPC (Remote Procedure Call) and XML-RPC which uses XML (Extensible Markup Language). These older technologies allowed computer programs to make function calls to a remote server, but SOAP adds OOP (Object Oriented Programming) and state, so a server and client can more easily engage in complex conversations with multiple interactions. Fundamentally, SOAP is a way to let computer programs access the power of the Internet as we do now.The simplest way to start with SOAP and Mono is to write a client application for an existing service such as Google’s SOAP API, one small part of which is a spell checker. The API is described in an XML file named GoogleSearch.wsdl (Web Services Description Language). Using that file, the wsdl program can create a C# proxy class (GoogleSearchService.cs). mcs (Mono Compile System) can then compile that C# file into a dynamic link library (GoogleSearchService.dll). Then mcs can compile our spell check client (SpellChecker.cs) to make an executable (SpellChecker.exe). Finally, mono can run that application. Here is an example:

Using the Google Search Service

wget http://api.google.com/GoogleSearch.wsdl
wsdl -o:GoogleSearchService.cs googleSearch.wsdl
mcs /target:library -r:System.Web.Services.dll GoogleSearchService.cs
mcs /r:GoogleSearchService.dll SpellChecker.cs
mono SpellChecker.exe girraffe
giraffe

The client application code, Spellchecker.cs

using System;
class SpellChecker {
   public static void Main(string [] args) {
      const string licensekey = "YOURKEYHERE";
      GoogleSearchService Service1 = new GoogleSearchService();
      String correction =
Service1.doSpellingSuggestion(licensekey, args[0]);
      if (correction == null)
         Console.WriteLine("OK");
      else
         Console.WriteLine(correction);
   }
}

The spell checker works by creating an instance of the automatically generated GoogleSearchService class. Using a key available from Google and the first command line argument, it calls the doSpellingSuggestion() method. The proxy class converts this method call into a SOAP request which is sent via HTTP to Google. When Google responds, the proxy class creates a string result from the SOAP response. Using the string result, the application either indicates that the word was spelled correctly or it offers a suggestion for the correct spelling.

Lets take a look at a simple SOAP web service. Summer.asmx uses state information to sum a list of numbers sent to it and returns the result:

Using the Google Search Service

<%@ WebService Language="C#" Class="Summer" %>
using System;
using System.IO;
using System.Web;
using System.Web.Services;
using System.Web.SessionState;[WebService(Namespace=http://localhost/,
  Description="Sums a list of numbers with internal state")]
public class Summer : System.Web.Services.WebService {  public Summer() {
  }

  [WebMethod(Description="Add another number and return current sum", EnableSession=true)]
  public int Sum(int newnum ) {
    int total;
    if ( null != Session["total"] )
    {
      string s = (Session["total"]).ToString();
      total = System.Convert.ToInt32(s);
    }
    else
    {
      total = 0;
    }
    total += newnum;
    Session["total"] = total;
    return total;
  }
}

The spell checker works by creating an instance of the automatically generated GoogleSearchService class. Using a key available from Google and the first command line argument, it calls the doSpellingSuggestion() method. The proxy class converts this method call into a SOAP request which is sent via HTTP to Google. When Google responds, the proxy class creates a string result from the SOAP response. Using the string result, the application either indicates that the word was spelled correctly or it offers a suggestion for the correct spelling.

To run this web service, use the xsp stand alone Mono ASP.NET web server. Make sure to run it in the same directory as Summer.asmx. Run as ‘xsp –verbose’ for debugging. Open firefox and enter http://localhost:8080/Summer.asmx in the location bar.

xsp automatically compiles the Summer.asmx into a web service and provides a convenient HTML interface to it. Click "Service Description" to get a wsdl file or "Client Proxy" to see an automatically generated C# client proxy file.

To test, click the "Sum" method and "Test Form". The first time that you invoke the test, the answer will be the number that you entered into the test form (e.g. 2), whereas the second and subsequent times, the result will be the sum of all of the numbers you have entered (e.g. 2+3=5).

State information is tracked with the ASPSESSION cookie from localhost in your web browser. If you delete the cookie and restart your browser, the sum will be cleared.

In addition to testing the SOAP service with the web form, it can be used by a client application. SummerClient2.cs (sidebar) shows how to build and test one such application.

Building and Running SummerClient2.cs

wsdl -o:SummerProxy.cs http://localhost:8080/Summer.asmx
mcs -out:SummerClient.exe -r:System. Web.Services.dll SummerProxy.cs SummerClient2.cs
mono SummerClient2.exe
suma is 10

SummerClient2.cs

using System;
using System.Web;
using System.Net;public class SummerClient {
   public static void Main( string [] args ) {
      int suma;      Summer summera = new Summer();      // enable state
      summera.CookieContainer = new CookieContainer();      summera.Sum(2);
      summera.Sum(2);
      summera.Sum(2);
      suma = summera.Sum(4);

      Console.WriteLine("suma is {0}", suma );
   }
}

SummerClient2 starts by creating an instance of Summer, which is the automatically generated proxy class. Because they are required for the web service, it enables cookies before calling the sum method four times, summing and displaying 2+2+2+4=10.

Whether writing a client to use an existing web service, creating new web services, or writing clients for new web services, it’s possible to create powerful distributed SOAP enabled applications and services with C# and Mono on Linux.

Richard Herrell is a professional embedded, networking, and Linux-related software developer with over 10 years of experience in the Ann Arbor area. He is the ExpressWay Service Management Platform Project Leader for Tut Systems, and Vice President of the Ann Arbor Computer Society. He can be reached at  or .   

-back to top-

 

 


Current Job Opportunities

View Our Candidates

Subscribe to Our Newsletter

Stout Systems, P.O. Box 2934, Ann Arbor, MI 48106 · Voice 734-663-0877 · Fax 734-663-7659 ·
Copyright © 1995-2008 Stout Systems Development Inc. All Rights Reserved. Trademark & Legal Notice. Site Map Design by Fast Forward