Thursday, November 25, 2010

Programming in Cloud using Goolge App Engine

It is pretty much agreed in the industry that there are three major varieties of cloud computing: software-as-a-service (SaaS), platform-as-a-service (PaaS) and infrastructure-as-a-service (IaaS). So when I decided to get my hands dirty (with the PaaS) by developing and deploying an application on the cloud, my preferred options were Amazon, Google and SalesForce.

Serious thought led me to Google App Engine for the following reasons

We will give you a Virtual Machine of any configuration   with which you can do anything you wish - this approach proposed by Amazon sounds good; but  it can  turn out to be a lot  more tricky and complicated for the first timer like me, who wants to have a feel of cloud development  with out serious commitment. So I decided to check  out  Amazon's path latter.

Learn our proprietary language and realize high productivity as much of application development can be accomplished without programming - this approach proposed by Force.com, kindled my  interest; but still  had  a few lingering questions:  why should I learn one more way to do the same thing ?. Can I not reap the benefit based on what I know already?. Should I lock myself with this vendor? Plus having seen the benefit of all those open source re-usable libraries which has helped me to concentrate on the business logic for years, I was reluctant to select the option of Force.com.

With both Amazon and SaleForce out of my way, I decided  to check Google App Engine which provides me the following benefits: First I can program in Java and I don’t have to learn another language. Second, my web application will be portable  which can be hosted on any Java EE server, as they provide a subset of Java EE standards. Three, it's absolutely free : no charge and with no commitment.  The big catch is however if you decide to use  services  like authentication, scheduler etc (provided by Google) and later want to move away from Google infrastructure, additional efforts will be needed.

My intention was not to build a unique world class web application with load balancing and clustering in place, but to find out for one self how flexible and simple it will be to build and deploy  applications on the Google platform while utilizing needed standard services provided by Google.  So decided to build a  simple reminder web application.  Here a scheduler will  be run every day  which will  compare, what you have entered as the events and dates for various tasks with current system date and notify the user through email about the upcoming events which needs attention. Of course only user with proper permission should be able to see his  or her upcoming task as well as add/delete task list.

As I have already a Google Account (if you own @gmail.com email id, you too have one!!),  I registered my application at https://appengine.google.com/   by providing a unique application Identifier and received an acknowledgment as well as the ‘registered ID’ from Google through a SMS (You need a phone, which can receive SMS or else good luck!!, as it seems a mandatory requirement for now. This might change in the coming months).


As the first step download and installed the Java SE Development Kit (JDK) and Eclipse Galileo as well as the Google plugin using the Software Update feature of Eclipse. The installation location is http://dl.google.com/eclipse/plugin/3.5 . This provided me the 2 important features : New  wizards to create App Engine web app  project and a tools to deploy/upload the developed web app in the Google platform with a click of a button .

Once I had the necessary software on my local machine, developed the web application like what I do often during my normal application development including configuring web.xml in the war/WEB-INF/ directory.  The application made use of Google user authication service, email service and scheduler service along with App Engine datastore.

Only additional work that needs to addressed for the app engine was the configuration of war/WEB-INF/appengine-web.xml, with the ‘registered ID’ and version information of the application.

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application> registered ID </application>
    <version>1</version>
</appengine-web-app>

Once development is completed,  selected the RUN command from the menu to execute the application using the built in server  which simulates the App Engine environment and services, including the data store, and the login services. 

After completing the local testing, uploaded the application from Eclipse by clicking the App Engine deploy button on the toolbar, which prompts for my Gmail id and password before publishing the app in the Google platform - the very same infrastructure in which Googl’s Gmail also runs.

This article glossed over few of the details of making a basic application, so if you feel you need more technical development information, make sure you go through the complete official tutorial http://code.google.com/appengine/docs/whatisgoogleappengine.html and the video at http://www.youtube.com/watch?v=bfgO-LXGpTM 

Google has to prove itself worthy of business to the world. It has made baby steps into the corporate world with Google Apps and Google Docs. And I am pretty sure that in the months to come, Google App Engine will significantly change the way applications are delivered, managed and integrated. And with Microsoft also pushing hard on Azure, it is sure  that we will see good competition and see the rapid adoption of PaaS in corporate world which is currently dominated by SaaS and IaaS  The next two years will decide who will have the laurel.

Monday, November 1, 2010

Career Guide: .NET Developer

One of the most frequently asked questions about web application development using Microsoft .NET platform goes something like this,

"I am interested in becoming a .Net developer, but I don't know where to begin. There seems to be so many technologies in the field of web development that I feel lost. How do all these technologies relate to each other, which ones do I need to learn in order to be considered for becoming a serious professional, and which one should I learn first?"

However, there is no single answer to these types of questions and truly no unique set of technologies   can address all requirements of a web application built upon .NET platform.

This article’s focuses on those who are trying to make their first step into the IT industry and  beginners who wish to find the right guidance (set of technologies to master) while developing Microsoft based web applications.

The essential requirement is sound knowledge in the following areas.

1. Web and .NET(www.microsoft.com/net) fundamentals

  • Internet , HTML, CSS, JavaScript
  • Object-oriented programming (OOPS) , Microsoft .NET Framework, C#


2. ASP.NET (www.asp.net) is web development framework within the .NET regime that provides you all the foundation and services necessary to develop Enterprise Web applications. While many language options exist, C# is generally acknowledged to be the language of choice for ASP.NET development. So a solid understanding of ASP.NET framework, C# programming language, HTML and JavaScript, AJAX is a must for developer who wishes to develop a world class enterprise web application.

3. Relational databases are generally the preferred choice for storing application data. Relational Database Management Systems (RDBMS) help to organize, store, and retrieve the data in a very efficient manner. Since C# applications traditionally uses the ADO.NET components to access data and data services from data sources using Transact-SQL(T-SQL), clear understanding the basics of Relational Database Management Systems like Microsoft SQL Server and ADO.NET and T-SQL is essential.

4. Integrated Development Environment (IDE) like Microsoft Visual Studio provides comprehensive facilities for faster and efficient software development and is always preferred over others.  An IDE consists of source code editor, compiler, build automation tool and debugger together in a packaged form and provide a favorable environment for development.

Mastering the above technologies, equips one with the required minimum skill sets but it doesn’t mean you would be getting a job in IT Company simply.  Many people fail miserably in job interviews when it comes to presenting their strengths in right form. So, work on your soft skills especially communication skill which will give you, an ability to express your ideas clearly and effectively.

Once these  basic requirements are met one could add the following technologies to move up the ladder.

5. Even though an applications could make use of the ADO.NET and T-SQL to persist data into relational databases, Object Relationship Mapping tools such as LINQ  or ADO.NET Entity Framework, that provide a layer of abstraction between the application and the database is preferred by most development teams nowadays.

6. Understanding the basics of Web Servers like  Internet Information Services (IIS) will be helpful as such applications provide the run time environment for the deployment in production environment.

7. Version control is a critical aspect of any software project, and its importance is generally understood. Version control systems serve several key purposes. First of all, they allow you to sequentially store successive versions of your source code. In addition to providing a secure backup copy of the source code, this process ensures  that you can step back to a stable version when things go drastically out of control. Version control systems also help team members to work simultaneously on a project's source code without stepping on each other's toes. So understanding a Version Control System such as Visual SourceSafe (VSS) or Subversion (subversion.tigris.org) and its vital functions  is helpful.

8. Substantial amount of developer’s time is spent on automating tasks which will ease the development. Even though IDEs automate much of the work, many developers look to an external tool to assist critical activity; like the build process. Build tools automate many tasks which a software developer encounters while developing, compiling, testing, or deploying applications. So a good understanding of build processes and build tools like NAnt (nant.sourceforge.net) which eliminates the hassle out of the build process and the maintenance is desirable.

9. Frequent testing during development is one of the practices growing in popularity in IT industry now. It provides a powerful approach for combating the inevitable continuous changes of inputs in software projects. But this simple mantra “unit testing” is much easily said than done. In the past major obstacle for implementing “unit testing” was the lack of suitable testing framework. Now with  the availability of many “unit testing” frameworks like NUnit (www.nunit.org) and VS Test (comes with Visual Studio  Professional editions), providing the basic plumbing for developers to quickly generate whole test suites that validate their programs with the click of a button, implementing “unit testing” has become  simple.

10. One of the most significant problems in software development is ‘assumptions’. Assumptions  pass  required parameter values, or a particular configuration parameters  This process can lead to a situation where a developer will spend precious development hours  tracing items which don't exist. Assumptions in software development often results in considerable wastage of time and add to risks. Continuous Integration (CI) can help to reduce assumptions associated problems on a project by resorting to rebuilding software  frequently.(whenever a change occurs as logged by version-control system) The benefit  arising out of CI has been proven beyond doubts and  thus it has become the De Facto software development practice for all projects. Spending some time on the non-glamorous fundamental activities and use of CI tools like Cruise Control.Net (confluence.public.thoughtworks.org/display/CCNET) will provide ample time for important and visionary activities.

11.  A code review is a useful exercise that helps to ensure code quality. But checking thousands of lines of someone else's code for items like hardcoded locale specific strings, Finalizers are protected, and naming conventions can be a real pain. To make matters worse, code reviews are typically constrained by tight project schedules. There is never enough time for detailed evaluation of code. Despite the best intent of the reviewer, optimization and logic checking take a back seat. Code reviews often become just an exercise in code beautification. Tools like FxCop which examines managed code assemblies for conformance to Microsoft's .NET Framework design and custom guidelines, conformance to recommended coding standards and practices are the real boon to code reviewers. Able team lead leverages these tools to measure and monitor the entire codebase, thereby controlling and ensuring system quality throughout the development life cycle.

Nevertheless these are not the only frameworks, tools and libraries used by all IT companies to develop .NET based web application. But this step by step approach provides a good starting point for the new entrants.