Friday 31 October 2008

Using MSBuild in automated building and testing

MSBuild.exe command

  • Using this command we can execute some other commands (such as aspnet_merge or xcopy) or custom actions. We can pass a .proj file (a MSBuild script file) as an input argument to this command.
  • You can find it here: C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe
  • You can easily add this tool to Visual Studio; go to Tools/External Tools/Add tool

MSBuild script

MSBuild script file is an xml file with the extension of .proj in which we can define what actions we want the MSBuild.exe to execute.

Example of MSBuild script:

Using the following MSBuild script you can compile a website solution, merge the assemblies created and copy the contents of the compiled solution to a destination folder (Please remove the br elements):



Why using MSBuild?

Using MSBuild we can have automated build and testing. We can use CruiseControl.NET to listen to the events (such as a checkin or commit) happening in source controls (such as Visual SourceSafe or SubVersion), then to run a pre-defined MSBuild command. In which way, we can have automated build and testing.

Learn more:

Thursday 30 October 2008

Microsoft Office Live Workspace


Microsft announced office live workspace, something less functional than what google has but more user friendly interface.

In this "cloud" you can work with your documents on the fly (internet) without the need to save them locally on your pc.

For more information, please see http://workspace.officelive.com/

What you can do with it?
  • Create document, save it, edit it, add comment, see the version history, etc
  • Create to do list
  • Create workspaces for hom, work, etc
  • Adding events, removing, updating
  • Adding contact list
  • You can share your documents or to do list with whoever you want
  • ...

Tuesday 28 October 2008

Code Generator for Microsoft Enterprise Library

What is Microsoft Enterprise Library?

"The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development cross-cutting concerns (such as logging, validation, data access, exception handling, and many others). Application blocks are a type of guidance; they are provided as source code, test cases, and documentation that can be used "as is," extended, or modified by developers to use on complex, enterprise-level line-of-business development projects."

How to get started?
Download the latest version including the code examples. Check the quick start section which has sample applications to demonstrate how to use Enterprise Library.

Code Generator for Enterprise Library?

Why not using a code generator to build your business logic, business entities and data access layer for you?

One of the communities in CodePlex are working on this and I found it very interesting: http://www.codeplex.com/entlibrepositorygen

I will use this for my next project :)

Friday 17 October 2008

An Event from UK SQL Server User Group

Last night I attended an event about SQL Server from UKSSUG, and this is a summary:

SQL Server 2008 Videos on MSDN
It's great to know that they have uploaded Videos for SQL Server 2008 learning here.

SQL Server Integration Services on the web:
http://www.sqlis.com/

Kilimanjaro
Kilimanjaro is the code name for the next version of SQL Server for H1 2010.

Mandison
Mandison is the code name for the full integration of DATAllegro's technology into Kilimanjaro (SQL Server 2010).

Gemini
Gemini is the code name for a key component of Kilimanjaro and it is about self-service BI using Excel. "The vision behind Gemini is to free IT resources by giving business intelligence analysis and reporting capabilities to the end-users without IT losing control".

Disable temporary object caching:
Christian Bolton, MVP, showed us how to disable temporary object caching in SQL Server 2008. It's on by default.
The scripts for this should be found on his blog here soon.

Passing Table Value Parameters:
Traditionally, we had to pass xml data type to a stored procedure to do that which has high performance cost. James Boother showed us how to pass Table Value Parameters to db objects. For this to work, we need to

  1. Create a new user defined type (UDT) in SQL Server containing the data structure of the table we want to pass
  2. Create a stored procedure having an input parameter of this type
  3. Pass a DataTable, IList or DbDataReader object from code to this stored procedure directly.
INSERT INTO Improvement
in SQL Server 2008 you can do this

INSERT INTO MyTable (MyId) VALUES (1), (2)

instead of

INSERT INTO MyTable (MyId) VALUES (1)
INSERT INTO MyTable (MyId) VALUES (2)

Service Broker
Simon Munro presented about Service Broker, which is a platform to build asynchronous & queued db applications.

He also showed us how to use Service Broker to send messages and data from one location to the other. Then, there was about half an hour discussion about great advantages Service Broker has over Biztalk such as performance and reliability.

His slides and scripts can be found here.

Next
The next FREE UKSSUG event is on 20th November.

Thursday 16 October 2008

Understanding Scrum



What is Scrum?

  • An agile software development framework.
  • Requirements are captured as items in a list of product backlog
  • Work is structured in cycles of work called sprints, iterations of work that are typically two to four weeks in duration.
  • Sprint is analogous to Extreme Programming Iterations
  • During each sprint, teams pull from a prioritized list of customer requirements, called user stories, so that the features that are developed first are of the highest value to the customer.
  • At the end of each sprint, a potentially shippable product is delivered.

Main Roles

Main Artifacts

User Groups and Communities:
Scrum Project Management Tools/Platforms:

You don't have to use any tool and many team have succeeded without it but if you insist, here are some:
ok, thanks you managed to make me confused! which one to use then? perhaps doesn't matter; pick a good one and use it.

CollabNet and RallyDev are recommended from the free ones.

More Info

Wednesday 15 October 2008

jQuery Support in Visual Studio



jQuery is an open source javascript library to emphasize the interaction between javascript and html.

Microsoft announced that Visual Studio 2008 SP1 will have jQuery with intellisense annotation support which will benefit ASP.NET and ASP.NET AJAX developers.

However, it's good to know that there are many other javascript framworks available as well like http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
Click here to find great code samples using JQuery in ASP.NET MVC...
Prototype is another popular javascript framework.

Setup Visual Studio Intellisense for jQuery:
Read more:

Technology Event Providers

Why attending a technology event every month?
  • Meeting new people
  • Learning new things about technology
  • It's often fun


Workflow

1. Find an event from the list below:

http://msdn.microsoft.com/en-gb/community/aa905717.aspx

http://www.microsoft.com/emea/teched2008/developer/default.aspx

http://www.developerday.co.uk/

http://sqlserverfaq.com/Default.aspx

http://skillsmatter.com/go/home

http://msdn.microsoft.com/en-gb/bb905504.aspx

http://www.vbug.co.uk/events/default.aspx

2. Register for an event

3. Send an email to your friends to register for this event

4. Attend the event, with your friends possiblly, and write notes

5. Write a new post about the interesting points of the event in your blog

Next

Action!

Thursday 9 October 2008

Resharper

Resharper, it's coool!

http://www.jetbrains.com/resharper/

Agility - Agile Software Development

Change:

The world is changing and it's natural as well as inevitable. The world has been designed to change from the beginning. Nothing is stable and nothing can be insured in the real meaning.

That's why we have risks, because nothing is completely predictable and we are living in the world of uncertainty.

Our body, our neighbours, the earth, our parents, our society, our economy, our sky, seas, technology, structures.

There is no guarantee that when we sleep tonight, we will wake up tomorrow!
There is no certain guarantee that the job we have today, we will have tomorrow as well.
When driving everything is changing in the road.
Our body cells are changing every second.
Our economy is changing.
The weather is changing.
So many books that we have read and were the latest at the time, are joining the history.

It's important to acknowledge that everything is changing; few with our will and many without our will, some rapidly some slowly. This acknowledgement helps us think about the solutions to handle these situations.

Agility:


How can we control and manage the changes?






"Agility is the ability to respond rapidly and effectively to the changes which are happening in the world."

It's good to say that agility is contextual. Values are contextual. Priorities are contextual. Laws are contextual. Many things in our world are contextual. A law which is valid in a country might be totally invalid in another country. There are values which are valid in some countries and invalid in the others.

Everything in the world must be agile to succeed, otherwise it will die and fail soon.
e.g driving must be agile; you must have the ability to respond quickly and effectively to the changes which are happening in the road.

How to be agile in business? A business which is not agile will fail soon or late.

What are the principles/metrics of becoming agile?

I think the first step is to determine in which context we want to define agility, then to find principles for that context. Contexts like:


  1. Driving

  2. Software Development

  3. Consultancy

  4. Business

  5. Family

  6. Society

  7. Computer

Have a look at David Anderson presentation.


Agile Software Development - Principles/Best Practices

There are some methodologies and approaches that are Agile like AUP, SCRUM, XP and here I would like to share with you some best practices:

1) Develop quickly and deliver more often. In this way, the development will have more control over the changes of business environments. Business must be aware of this change and educated wherever required. Business must get involved consistently not just for gathering the requirements but also to provide feedback on the releases of the application.

2) Define iterations, each which for a period of 2-3 weeks. Plan for each iteration, when to start, what should be achieved at the end of the iteration (milestone), when the end of iteration is and who should work on this iteration.

3) Have daily standup meeting to review the progress of each iteration and tackle issues as soon as possible with prioritizing based on the importance to the business. Having consistent and proper communication is vital to the success of the project.


4) Reuse the existing code/components wherever possible and improve them whenever possible.


5) Use automated testing tools, so that you can test more code in less time e.g. write your tests using NUnit, then automate the tests to run using CruiseControl.NET. Automated testing improves productivity.

6) Test during the lifecycle of the development. Do not leave testing to the end. use Test Driven Development.

7) Use Web-Oriented Architecture, which means we should develop applications to be distributable over the web. SaaS (Software as a service)

8) Plan and schedule the security at the early stage of the software development. The later it's left, the harder it becomes to integrate it in the system.

http://www.computing.co.uk/computing/video/2227921/definitive-guide-software


http://agilemanifesto.org/














Visual Studio 2010 and .NET 4.0

Visual Studio 2010, codenamed "Hawaii", is under development. Though the full feature set has not been finalized, some features that the teams are considering have been made public.

"Microsoft announced the .NET Framework 4.0 on September 29, 2008. While full details about its feature set have yet to be released, some general information regarding the company's plans have been made public. One focus of this release is to improve support for parallel computing, which target multi-core or distributed systems. To this end, they plan to include technologies like PLINQ (Parallel LINQ), a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls. Microsoft has also stated that they plan to support a subset of the .NET Framework and ASP.NET with the "Server Core" variant of Windows Server 2008's successor."

Download Visual Studio 2010 and .NET 4.0 from here.

The product blog can be found here.

Learn more:

PDC

Professional Developers Conference, the latest and roadmap of Microsoft development technologies are always declared here:
http://microsoftpdc.com/Default.aspx

Cloud Computing





"Cloud" is a metaphor for the Internet and is an abstraction for the complex infrastructure it conceals. "Computing" refers to computer technology.



Cloud Computing refers to internet-based development that uses computer technology to provide software as a service (SaaS).



According to the IEEE Computer Society, "It is a paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include desktops, entertainment centers, table computers, notebooks, wall computers, handhelds, etc."

My comment is although there are some differences but I think this technology existed years ago but now they have just renamed it and packaged it in a more standard way e.g. UDDI existed years ago to provide web services globally to client applications.

For instance, Google few years ago introduced Google Docs and some other cloud tools, but it's good that Microsoft finally decided to invest on this.

Links:

http://jeffreypriebe.blogspot.com/2008/05/cloud-computing-comparison-of-current.html


http://en.wikipedia.org/wiki/Cloud_computing

Up-to-date with Technology

I'd recommend spending about few hours a week on these sites to keep up-to-date:

General:
http://www.computing.co.uk/

http://www.zdnet.com/

http://www.informationweek.com/software/

http://channel9.msdn.com/Unitedkingdom/


Software development:
http://www.infoq.com/
http://www.devtopics.com/
http://techrepublic.com.com/
http://msdn.microsoft.com/en-gb/default.aspx
http://code.msdn.microsoft.com/Project/ProjectDirectory.aspx

ASP.NET:
http://www.asp.net/

SQL Server:
http://www.sqlmag.com/
http://www.databasejournal.com/

Screencasts/Videocasts/Podcasts:
http://www.microsoft.com/uk/msdn/screencasts/default.aspx

Windows Cloud

Windows Cloud is the next generation of Windows, which is an operating system for internet!

See this article discussing what Ballmer has discussed:
http://www.computing.co.uk/vnunet/news/2227472/ballmer-talks-cloud

Tuesday 7 October 2008

Domain Specific Languages

http://www.infoq.com/presentations/domain-specific-languages

http://en.wikipedia.org/wiki/Domain_Specific_Language

After understanding its definition, I realized the fact that I created a DSL tool in 2007 myself. This tool was to map table fields to Flex page fields using a new interface and kind of language to define and manage the mappings:

Table Field -> Field Data -> Page Field

IT and Business

http://www.infoq.com/presentations/New-Alliance-Shaw-Fowler;jsessionid=36299A91CF0A6240558C74417E3DABF4

I found this very interesting and the reason was I could associate what are said here with my works e.g. at Game Group Ltd.

Important notes:

  • There is a large gap between IT and Business which is the main reason of many project failures and it must be shortened by having proper and consistent communication
  • Almost every IT company wishes and plans to attract talented IT people and there is a war in the market to do so.
  • The whole team, including business members, Tester, Developer & Manager, must be responsible for the quality of the software.
  • Collaboration benefits: Higher responsiveness, higher quality, richer communication, more organized development
  • Motivation is highly important to improve productivity. How do you motivate your people?
  • Developing a software is an art more than a science. You're a Software Craftsman not a Software Developer!
  • Design is the pure principle of a Software Development. There are always tools to build the software but design is what is highly important.
  • Bring the user experience to your iterative development life cycle.
  • Domain-Driven Design
  • Domain Specific Language
  • Ruby