The mysteries of software development and networking... RSS 2.0



 Sunday, December 02, 2007

With all the excitement about .NET Framework 3.5 and Visual Studio 2008 being release you might almost miss the release of .NET Framework 2.0 Service Pack 1.

It can be downloaded here (x86) and here (x64).

Microsoft .NET Framework 2.0 Service Pack 1 provides cumulative roll-up updates for customer reported issues found after the release of Microsoft .NET Framework 2.0. In addition, this release provides security improvements, and prerequisite feature support for .NET Framework 3.0 Service Pack 1, and .NET Framework 3.5.

 

Sunday, December 02, 2007 2:09:38 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

Amazon Unbox is an online video service, allowing you to download videos to your laptop. As a frequent traveller I've started using this service recently and am extremely pleased with the quality of the video, the ease of use and availability of titles. I like to watch series (currently Shark season 2) and this is a great way for me to keep up with what I like to watch, even if I'm on the road. Episodes seem to appear on Unbox within a week, often one day, of airing on TV.

Wikipedia says:

Amazon Unbox is an Internet video on demand service offered by Amazon.com which according to their website is available to "U.S. customers located in the 48 contiguous states, Alaska, Hawaii, and the District of Columbia". The service became available on September 7, 2006 and offers television shows and films for rental and purchase from eight major television and film studios.[1] Rental pricing for feature length films range from $0.99 to $3.99, while television shows can be purchased for $1.99. Additional discounts are given for full season purchases. Downloaded films includes two versions of videos requested, a full resolution video file and a lower resolution copy for portable devices.

 

 



Maybe 70-291 is comparatively easier than 70-296, still, merely studying for 156-215 or 350-001 is not just enough to go for the latter certifications. Just in the way preparation material for 642-552 differs from that of 642-176 and cannot be used to go for a 350-030, same is the scenario in the previous case.

Sunday, December 02, 2007 6:57:20 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Amazon | General

This thing is amazing. Last night I was at a party where one of the people had one of these and the clarity on the screen is great and very comfortable to read. I want one!

With the build in phone service, called WhisperNet, which I'm told runs on the Sprint network, you can download books without going to a store, needing a hotspot or network connection. Now Sprint does not have coverage throughout the States, if you're unlucky and live somewhere without service (like in Lincoln, ME) then you can download books from Amazon and copy them to your Kindle using a USB connection.

Wikipedia says:

Amazon Kindle is an electronic book (e-book) service launched in the United States by Amazon.com in November 2007. It uses an electronic paper display, reads the proprietary Kindle (AZW) format, and downloads content over Amazon Whispernet, which uses the Sprint EVDO network. This means that unlike previously existing e-book readers, the Kindle can be used without the need for a computer. Whispernet is accessible through Kindle without any fee. [1] The Kindle sold out in five and a half hours,[2] although Amazon has not stated how many units were available in the launch offering.

Sunday, December 02, 2007 6:16:53 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Friday, November 30, 2007

This month Omnext presented their solutions for controlled outsourced development at the Gartner IT Expo 2007 in Cannes.

"The dynamics of today’s world demand a quicker and better reaction from organizations to internal and external developments.
This can be taken care of with, among other things, “Agile” system development.

Furthermore, outsourcing and offshoring have now become a permanent part of IT.
All of this needs to come off in accordance with the diverse regulations in the field of governance, compliance, and control. This relates to, amongst others, Sarbanes Oxley, SAS70, and ISO20000.

These trends are, primarily, in the domain of EDP auditing."

The solutions include products like Source2VALUE to quantify your (existing) software, Source2UML to document existing software and Source2WIKI to create a WIKI based documentation environment for your application. These solutions are all cross platform and work on a multitude of languages like C#, T-SQL, VB.NET, Java, Delphi, Cobol and Powerbuilder.

Omnext teamed with Gartner to produce an excellent whitepaper on governance.

Friday, November 30, 2007 8:56:27 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Wednesday, November 28, 2007

Wednesday, November 28, 2007 1:31:17 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Friday, November 23, 2007

When building a webapplication, have you ever wanted to display an alert asking a user whether he really, really wanted to delete some data?

In ASP.NET 2.0 this is made easy by the OnClientClick property on the button control.

Just enter the following JavaScript in the property and the user will have to confirm the action. If the user cancels, then the button will not perform a postback and the serverside event never even fires.

if (!confirm('Are you sure you want to delete this customer?')) return;

[11/27/2007] Update:

The code above will work if the button you're adding the OnClientClick to has UseSubmitBehavior="false" if not, then you should use:

if (!confirm('Are you sure you want to delete this customer?')) return false;

 

 



Being techno-savvy is good. For once, keeping up with innovations like wireless camera and making use of facilities like wireless routers is good and does pay off. However, that should not result in missing out on important practical issues like having a proper computer backup solution. While looking for a web hosting service, the feature that matters the most is the facility of online backup. People usually concentrate on other things like ip phones etc. However, unless the domain name registration is done with, this ignorance can be made up for.

Friday, November 23, 2007 12:55:31 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
ASP.NET
 Monday, November 19, 2007

Jeff Beehler has compiled an excellent list of new features in Visual Studio 2008.

Monday, November 19, 2007 12:42:50 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Team System

The last couple of weeks I've been working on migrating an ASP.NET application from using a Visual FoxPro database to using SQL Server 2005. My application has it's logic in library DLL and with some layering uses Typed DataSets to connect to the database.

Typical code within the data access layer looks like this:

internal ViewDataSet.RequestViewDataTable GetViewByPrimaryUser( string user )
{
    using ( ViewDataSetTableAdapters.RequestViewTableAdapter _adapter 
            
= new ViewDataSetTableAdapters.RequestViewTableAdapter() )
    {
        ViewDataSet.RequestViewDataTable table;
        table = _adapter.GetByPrimaryUser( user.Trim() );
        return table;
    }
}

The method 'GetByPrimaryUser' is defined on the TableAdapter and using the GUI designer in Visual Studio I manage my typed datasets. All SQL is stored within the Typed DataSets. There is very limited use of stored procedures.

Migrating the .NET code from using a Visual FoxPro database to using SQL Server 2005 has involved the following:

  • Change the connection string property on every datatable to use the SQL Server connection string instead of the FoxPro connection string.
  • Opening every single query and changing the SQL parameters from question marks '?' to named parameters like '@user'.
  • Rechecking the mapping of the columns in the datatable, sometimes these would get messed up. Especially in cases where non-database columns where added to the datatable.
  • Rechecking column expressions.
  • Some areas of the code accessed the OleDbDataAdapter and OleDbConnection within the typed dataset, this had to be replaced with SqlDataAdapter and SqlConnection.
  • FoxPro does not support the .NET light weight transactions, so code to custom manage the transaction could be deleted and a simple 'using( TransactionScope tx = new TransactionScope() )' could be implemented.
  • There where several areas where 'adapter.Update(row)' did not work with FoxPro, so the Insert/Update/Delete had to be called manually in the data access layer. With SQL Server there are no problems and this 'fix-it' code could be removed.

After following these steps some of the datatables would generate unexplicable validation errors. Not wanting to waste too much time I just re-created those typed tables and re-added the queries on those tables.

 



Since the advent of cheap web hosting, we have had more development in the field of SEM. Thanks to features like internet phone, managing internet network marketing is a lot more feasible now. Marketing strategies like cpc, ppi and pay per click can be managed with much more comfort now. Usually regular advertising agencies miss out on this since they concentrate more on building links through email marketing.

Monday, November 19, 2007 7:23:49 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.NET | C#

Visual Studio 2008 Team Suite has just become available on MSDN Subscriber Downloads.

Monday, November 19, 2007 6:41:32 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.NET | C# | General | Team System
 Thursday, November 15, 2007

Tudor posted a couple of pictures from my visit to Cluj, Romania on his website.

Update: Sorin Dolha also posted some photos from the presentations:


Windows Live Spaces

Thursday, November 15, 2007 9:33:44 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
General
 Tuesday, November 13, 2007

If you're looking at using Team Foudation Server, but your organization uses more than just Visual Studio, then perhaps Teamprise is a useful tool for you.

"Teamprise is a suite of client applications for accessing Microsoft Visual Studio 2005 Team Foundation Server from outside of the Visual Studio Integrated Development Environment (IDE). Teamprise enables software development teams to use the source control, work item tracking, documents, and reporting features of Team Foundation Server from within the Eclipse IDE, and from other operating systems, including Linux and Mac OS X."

 

Tuesday, November 13, 2007 3:06:41 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Team System
 Monday, November 12, 2007

Another gem in .NET 2.0. Parsing a string to get a datetime used to be pretty complex. But now with the DateTime.ParseExact(...) method you can specify the exact format of your string.

string s = "20071231T214559";
DateTime d = DateTime.ParseExact( s, "yyyyMMddTHHmmss", null );
this.textBox2.Text = d.ToString();  // this will print: 31-12-2007 21:45:59

Steve Tibbet has a post describing all the options for specifying the format.

Monday, November 12, 2007 8:54:54 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.NET | C#

The .NET Framework is huge and I still frequently find new things in .NET 2.0 which I had not seen before. Last week I stumbled across the update in Math.Round(...).
In .NET 1.x the .NET Framework would only support the American way of rounding numbers. This means that:

decimal y = 2.5M;
decimal x = Math.Round(y, 0);     // x = 2

For Dutch people this wrong. We would expect x to be '3'.
In .NET 2.0 there is a new overload, allowing you to specify how the Round method should work.

decimal y = 2.5M;
decimal x = Math.Round(y, 0, MidpointRounding.AwayFromZero);     // x = 3!

Monday, November 12, 2007 8:24:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.NET | C#

A Dutch buddy of mine has been running a (fun) website called 'Het Late Nieuws' (the late news). Check it out.

Monday, November 12, 2007 8:02:15 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Sunday, November 11, 2007

Earlier this year the C# team implemented a change in the design of anonymous types. It used to be possibly to create an anonymous type and then change a property on the anonymous type. The code would look like this:

var x = new { Name = "Mark", Age = 0 };
x.Age = 35;

In Visual Studio 2008 beta 2 this is however no longer possible since anonymous types are now immutable. There are apparently good reasons for doing this and Sree explains it in this post and there is an issue on MSConnect where Mads from the C# team explains the reasoning. Must say I don't completely get the reasoning, especially since VB.NET does not have this restriction.

Sunday, November 11, 2007 11:23:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | LINQ

The website www.hookedonlinq.com has an excellent article explaining the basics of LINQ to SQL. It's called LINQ to SQL - 5 minute overview.

Sunday, November 11, 2007 10:47:56 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
LINQ

If you want to join data which is in a list with data that is in the database, then you need to use the 'Contains' operation.

The code below shows that we have a list containing two values, next we want to join this list with some data in the database. This data has an Id and an Description.
You might be tempted to use the join operator, but that will fail, instead, call the Contains() method.

static void Main(string[] args)
{
    List<int> l = new List<int>();
    l.Add(1);
    l.Add(2);

    CustomerInfoDBDataContext db = new CustomerInfoDBDataContext();
    var result = from pi in db.PersonalInfos
                 where l.Contains(pi.Id)
                 select pi.Id + " - " + pi.Description;

    foreach (var info in result)
    {
        Console.WriteLine(info);
    }
    Console.ReadLine();
}

Sunday, November 11, 2007 10:39:03 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
LINQ

Niels confirmed it for me. Yes, it is possible to run a LINQ to SQL query in SQL Server 2008 using a .NET managed stored procedure.

As he puts it: "yes you can - but as soon there are any transactions invloved things will go pear-shaped".

Note that there will also be an optimized LINQ to SQL provider as part of SQL Server 2008:

"Language Integrated Query (LINQ) enables developers to issue queries against data by using a managed programming language such as C# or Visual Basic.NET, instead of SQL statements. LINQ enables seamless, strongly typed, set-oriented queries written in .NET Framework languages to run against ADO.NET (LINQ to SQL), ADO.NET DataSets (LINQ to DataSets), the ADO.NET Entity Framework (LINQ to Entities), and to the Entity Data Service Mapping Provider. SQL Server 2008 features a new LINQ to SQL Provider that enables developers to use LINQ directly on SQL Server 2008 tables and columns."

Sunday, November 11, 2007 8:01:04 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
LINQ | SQL

Yesterday I spoke at the iSDC and Ronua Community Workshop. We had a great day and it was a pleasure meeting the people at iSDC, meeting the developers in Cluj and surroundings (some drove over 200km to make it to the meeting) and Petru Jucovschi (the DPE for Microsoft Romania).

Here are the two presentations that I did:

11-09-2007 - Developing Windows Vista gadgets.pptx (431.43 KB)

11-10-2007 - 2008.NET.pptx (252.91 KB)

In the Visual Studio 2008 presentation I also talked about the work I've done for AOL. The AOL developer site can be found at http://dev.aol.com and for more reference material on Vista gadgets you can visit my AOL blog.

Sunday, November 11, 2007 3:32:20 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -
C# | General | LINQ | Vista | WCF

During my session yesterday at the iSDC and RONUA Community Workshop I received a question on how to do a group by together with calculating the sum of the group.

I couldn't remember the right syntax and had to go and look it up. There is actually a sample included on the 101 Linq Samples page (thanks Dragos!).

The query looks like this:

public void Linq80() {
   List products =
GetProductList();

   var categories =
      from p in products
      group p by p.Category into g
      select new {Category = g.Key, TotalUnitsInStock = g.Group.Sum(p => p.UnitsInStock)};

   ObjectDumper.Write(categories);
}

Sunday, November 11, 2007 3:14:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
LINQ
About
This blog is run by Mark Blomsma.
© Copyright 2008
Develop-One
Sign In
Statistics
Total Posts: 309
This Year: 53
This Month: 6
This Week: 0
Comments: 36
All Content © 2008, Develop-One
DasBlog theme 'Business' created by Christoph De Baene (delarou)