Tuesday, April 20, 2010

Introducing Windows Azure Platform

Using computers in the cloud can make lots of sense. Rather than buying and maintaining your own machines, why not exploit the acres of Internet-accessible servers on offer today? For some applications, both code and data might live in the cloud, where somebody else manages and maintains the systems they use. Alternatively, applications that run inside an organization—on-premises applications—might store data in the cloud or rely on other cloud infrastructure services. However it’s done, exploiting the cloud’s capabilities can improve our world.
But whether an application runs in the cloud, uses services provided by the cloud, or both, some kind of application platform is required. Viewed broadly, an application platform can be thought of as anything that provides developer-accessible services for creating applications. In the local, on-premises Windows world, for example, this includes technologies such as Windows Server, the .NET Framework, SQL Server, and more. To let applications exploit the cloud, cloud application platforms must also exist.
Microsoft’s Windows Azure platform is a group of cloud technologies, each providing a specific set of services to application developers. As Figure shows, the Windows Azure platform can be used both by applications running in the cloud and by on-premises applications.




The components of the Windows Azure platform are:
Windows Azure:
Provides a Windows-based environment for running applications and storing data on servers in Microsoft data centers.
SQL Azure: Provides data services in the cloud based on SQL Server.
Windows Azure platform AppFabric: Provides cloud services for connecting applications running in the cloud or on premises.

Monday, April 19, 2010

Mastering the iteration of an agile development

The heartbeat of Agile development is the iteration – the ability of the team to create working, tested, value delivered code in a short time box.

Iteration: The heartbeat of agility

The base construct of agile and iterative development is the iteration—the ability of the team to create working, tested, value-delivered code in a short time box—with the goal producing an increment of potentially shippable code at the end of each iteration. This is a significant challenge for the team, and mastering the process takes some time to accomplish. In this article I will try to be brief and just hit the important points I want to share.

The standard Iteration Period

Most people agree that iterations are a fixed, constant length and typically should not vary in length over the course of a release or a project. But the length of the iteration is an agile variable. From the literature, experts recommend a length of 1 to 4 weeks. But a week may be too short and a month is too long, so finally they typically arrive at is to standardize on iterations of 2 weeks in length.

There are many advantages to this approach:

  • There is some overhead in planning and closing iteration; in a 2-week iteration, the overhead is well proportioned to the amount of work that can be accomplished in the period.
  • Two weeks is sufficient time to get some amount of meaningful development done.
  • This cycle provides more opportunities to succeed or fail early.
  • The 2-week rhythm is a natural calendar cycle that is easy for all participants to remember.
  • Scheduling is trivial: "If it's the second Wednesday, I need to be preparing my demo for Friday.""Demo day" occurs every other week, at exactly the same time and place, allowing key stakeholders to attend.
  • Velocity can be measured and scope can be adjusted more quickly.

Planning and executing the iteration

No matter the length, all iterations have the same pattern, and that is part of the discipline and manufacturing-like routine of agile development. An iteration consists of three phases, as Figure illustrates.

  • The first phase is a short planning session (less than a day) during which the iteration backlog is reviewed and prioritized, estimates are established, and the team commits to the work in the iteration.
  • The second is the development phase, when the backlog items are implemented in code and tests.
  • The final phase involves delivery of the new system increment built during the iteration and assessment of the iteration.

Iteration Planning

At the beginning of each iteration, the team holds an iteration planning session during which it reviews the prioritized items in the backlog, selects and reviews the stories for the current iteration, and defines and estimates the tasks necessary to deliver the increment of work. There is a high degree of granularity involved because tasks are typically estimated in "ideal developer days" or even hours. In keeping with the agile practice of just-in-time design, it is during this session that the details of the requirements are discussed and negotiated.

The primary concern of iteration planning is to define and accept a reasonable scope for the iteration. Iteration planning begins with revising and refining the list of prioritized work in the backlog. Product owners and the development team may add or reduce features, defects, and other infrastructure work on the basis of the current business situation. Business priority, risk, and rough estimates are assigned to new items or may be revised for existing items. The product owners then re-rank the work items and select a scope of work to propose for the iteration.


The development team is given an opportunity to discuss the proposed work with product owners until each item is well enough understood for the development team to prepare a list of engineering tasks and provide detailed estimates. The development team then estimates the engineering tasks for each proposed backlog item. The development team then presents its estimates to the product owners.

By adding up the development team's estimates, the team can calculate the apparent scope of the iteration and have an indication of whether the scope can be achieved. However, the final scope of the iteration is the result of a negotiation between product owners and the development team. During this negotiation, product owners may adjust certain backlog items in ways that make them less costly to develop, trade out entire backlog items for others, or ask for adjustments to certain estimates provided by development.
The team should keep the following guidelines in mind during the iteration planning meeting:

• Have the iteration planning meeting on the first day of the iteration, first thing in the morning. The meeting should last no more than 4 hours.

• Create task estimates for each story on the basis of ideal effort hours, or points.

• When estimating, if a story breaks out into seven or more tasks, consider splitting the story.

• Be sure that there is at least one story with a demonstrable function included in the iteration.

• Remember that the product manager owns the story priorities, and the development team owns the tasks and the estimates for those stories.

• When first implementing agile practices, consider setting a "code freeze" a few days prior to the end of the iteration, because the team is likely still practicing waterfall within the iteration.

• Remember that the team's velocity (available resources factored by existing velocity) changes from iteration to iteration.

• Once the iteration is underway, no change requests by the product manager are allowed. Any new or changed stories should go into the backlog.

Iteration Cycle


Iteration cycle is repeated until all backlog items are completed. The following figure illustrates the iteration cycle:

Take Responsibility

Having committed to the iteration plan, the team is faced with the question of how to allocate that work to the members of the development team. The two basic approaches to allocating work are that the Agile/Scrum. Master can assign work to developers or the developers can choose the work they will do.


The process of developers taking responsibility for work must be supported by a visible indicator showing who is responsible for what work and by daily status meetings during which status and issues can be discussed.


Develop


Once a developer takes responsibility for a backlog item, he or she then:

• Elaborates requirements (if not already elaborated).

• Designs.


• Writes the test (first in some practices) and writes the code.


• Executes the test suite on the build.

• Integrates program code and tests into a build of the system.


Deliver Story

The developer delivers the new functionality or defect fix by checking the code into the source control system and including it in a build of the system. The unit test suite and other appropriate tests are run before the code is checked in to ensure that the changes do not break the build.

Declare Story Completion

Once the developer has integrated his or her work into a build of the system, the backlog item is declared complete, signaling other members of the development organization that the backlog item is ready. For example, the testing group now knows it can include the new functionality or defect fix in its testing efforts and can start automated tests of various kinds (functional, acceptance, performance, etc.).

Accepting the Iteration

The final activity in an iteration is to reflect on and assess the results. The goal of assessment is to mine the lessons learned during the iteration and then adapt the development process accordingly. The assessment allows the team to continually improve the throughput of the development process and the quality of the resulting system.

The other major activity that occurs during assessment is a "closing" process whereby unfinished items are put back into the release backlog as work to be done. The iteration is concluded, and the closed iteration backlog becomes a record of the work completed during the iteration.

Tracking Iteration

Since there are relatively few stories in an iteration, tracking the status of each is a fairly simple matter, and it provides an objective look at progress. Status can be tracked by hanging visual indicators of state information (defined, complete, accepted) on the wall, moving cards from one area of a wall to another, or for larger and distributed teams, using automated tools.

Since iterations are fixed in duration, another primary way the team and its managers can gauge progress in the aggregate is to continuously monitor current status and also estimate how much work remains. Computing the estimated remaining work in the iteration at a given point in time requires two pieces of information: the total of the estimates for all backlog items that are not yet started and the estimated remaining effort for any in-progress backlog item. The sum of those two amounts represents the estimated remaining work to be completed during the iteration. Plotting this value each day of the iteration produces what is called a burndown chart, as the example in Figure illustrates.

References

  • Mastering the Iteration: An Agile White Paper, Rally Software Development Corporation.
  • ScalingSoftware Agility: Best Practices for Large Enterprises, Addison-Wesley, 2007

Thursday, April 15, 2010

Silverlight Cross-Domain Web Services Calls

Target : Silverlight 3.0
Silverlight allows you to make web service calls to web services that are a part of the same website with no restrictions. Additionally, Silverlight allows you to call web services on other web services if they explicitly allow it with a policy file. To make this possible, you must create a file named clientaccesspolicy.xml and place it in the root of your website (for example, in the c:\inetpub\wwwroot directory of an IIS web server).
The clientaccesspolicy.xml file indicates what domains are allowed to access your web service.

You will notice in that file that here I have configured the service to allow connection from a specific URI. You might insert an asteric '*' to allow unlimited access which is not a perfect solution.

You can restrict the resources to share. You can prevent subpaths and so on.

But where to put this xml file ?

This is an important question which I was googling for a long time. Although I wrote that you can put it in the IIS root directory, you will find that this is not the situation when you debug the solution and your project is not added yet to IIS or a specific server. In my condition I was having a silverlight project 'FileServiceApp' , an ASP.net web site that uses the xap file of 'FileServiceApp' and a service project 'WcfFileService' that has the WCF services that I want to use. This file should be used in the 'WcfFileService' Project.

If your services are inside a web project so the xml file should be placed on the root path and not in the assemblies path.

I tried and It works perfectly.




Monday, April 12, 2010

Resolving MVC Paths Problem

Target: ASP.NET MVC
If you are using MVC approach while using ASP.NET you might notice the problem of relative paths specially if you use
JQuery with it.

This issue can be solved using Url.Content method which converts relative path to absolute path
I hope it helps


<%= Url.Content("~/content/...") ... %>

Configure SQL Server 2005 to allow remote connections

Configure SQL Server 2005 to allow remote connections


 

To configure SQL Server 2005 to allow remote connection you have to do the following steps:

Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition

  1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
  2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
  3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.

    Note Click OK when you receive the following message:

    Changes to Connection Settings will not take effect until you restart the Database Engine service.

  4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.

Enable the SQL Server Browser service

  1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
  2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
  3. On the Surface Area Configuration for Services and Connections page, click SQL Server Browser, click Automatic for Startup type, and then click Apply.

    Note When you click the Automatic option, the SQL Server Browser service starts automatically every time that you start Microsoft Windows.
  4. Click Start, and then click OK

Create exceptions in Windows Firewall

These steps apply to the version of Windows Firewall that is included in Windows XP Service Pack 2 (SP2) and in Windows Server 2003. If you are using a different firewall system, see your firewall documentation for more information.

If you are running a firewall on the computer that is running SQL Server 2005, external connections to SQL Server 2005 will be blocked unless SQL Server 2005 and the SQL Server Browser service can communicate through the firewall. You must create an exception for each instance of SQL Server 2005 that you want to accept remote connections and an exception for the SQL Server Browser service.

SQL Server 2005 uses an instance ID as part of the path when you install its program files. To create an exception for each instance of SQL Server, you must identify the correct instance ID. To obtain an instance ID, follow these steps:

  1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Configuration Manager.
  2. In SQL Server Configuration Manager, click the SQL Server Browser service in the right pane, right-click the instance name in the main window, and then click Properties.
  3. On the SQL Server Browser Properties page, click the Advanced tab, locate the instance ID in the property list, and then click OK.

To open Windows Firewall, click Start, click Run, type firewall.cpl, and then click OK.

Create an exception for SQL Server 2005 in Windows Firewall

To create an exception for SQL Server 2005 in Windows Firewall, follow these steps:

  1. In Windows Firewall, click the Exceptions tab, and then click Add Program.
  2. In the Add a Program window, click Browse.
  3. Click the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe executable program, click Open, and then click OK.

    Note The path may be different depending on where SQL Server 2005 is installed. MSSQL.1 is a placeholder for the instance ID that you obtained in step 3 of the previous procedure.
  4. Repeat steps 1 through 3 for each instance of SQL Server 2005 that needs an exception.

Create an exception for the SQL Server Browser service in Windows Firewall

To create an exception for the SQL Server Browser service in Windows Firewall, follow these steps:

  1. In Windows Firewall, click the Exceptions tab, and then click Add Program.
  2. In the Add a Program window, click Browse.

Click the C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe executable program, click Open, and then click OK.

Note The path may be different depending on where SQL Server 2005 is installed.