Welcome to the .NET Developers Blog
This is an aggregated blog of .NET developers.
If you have a blog about Microsoft, .NET, XAML, WPF, Silverlight, etc... development
add your blog here.
Email me for any suggestions and feedback.
Minh T. Nguyen
|
|
|
Spark IT 2010
Joydip Kanjilal
- Posted 3/21/2010 12:29 AM
|
Hello Friends, I just came back from the prestigious Spark IT 2010 event at Bangalore. It was a great time meeting so many reputed personalities there. I was also one of the speakers and I delivered two sessions - one on the new features in C# 4.0 and...(read more)
|
Copying A Slide From One Presentation To Another
Tim Murphy
- Posted 3/20/2010 3:33 PM
|
|
There are many ways to generate a PowerPoint presentation using Open XML. The first way is to build it by hand strictly using the SDK. Alternately you can modify a copy of a base presentation in place. The third approach to generate a presentation is to build a new presentation from the parts of an existing presentation by copying slides as needed. This post will focus on the third option. In order to make this solution a little more elegant I am going to create a VSTO add-in as I did in my previous post. This one is going to insert Tags to identify slides instead of NonVisualDrawingProperties which I used to identify charts, tables and images. The code itself is fairly short. SlideNameForm dialog = new SlideNameForm();
Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;
if(dialog.ShowDialog() == DialogResult.OK)
{
selection.SlideRange.Tags.Add(dialog.slideName,dialog.slideName);
}
Zeyad Rajabi has a good post here on combining slides from two presentations. The example he gives is great if you are doing a straight merge. But what if you want to use your source file as almost a supermarket where you pick and chose slides and may even insert them repeatedly? The following code uses the tags we created in the previous step to pick a particular slide an copy it to a destination file.
using (PresentationDocument newDocument = PresentationDocument.Open(OutputFileText.Text,true))
{
PresentationDocument templateDocument = PresentationDocument.Open(FileNameText.Text, false);
uniqueId = GetMaxIdFromChild(newDocument.PresentationPart.Presentation.SlideMasterIdList);
uint maxId = GetMaxIdFromChild(newDocument.PresentationPart.Presentation.SlideIdList);
SlidePart oldPart = GetSlidePartByTagName(templateDocument, SlideToCopyText.Text);
SlidePart newPart = newDocument.PresentationPart.AddPart<SlidePart>(oldPart, "sourceId1");
SlideMasterPart newMasterPart = newDocument.PresentationPart.AddPart(newPart.SlideLayoutPart.SlideMasterPart);
SlideIdList idList = newDocument.PresentationPart.Presentation.SlideIdList;
// create new slide ID
maxId++;
SlideId newId = new SlideId();
newId.Id = maxId;
newId.RelationshipId = "sourceId1";
idList.Append(newId);
// Create new master slide ID
uniqueId++;
SlideMasterId newMasterId = new SlideMasterId();
newMasterId.Id = uniqueId;
newMasterId.RelationshipId = newDocument.PresentationPart.GetIdOfPart(newMasterPart);
newDocument.PresentationPart.Presentation.SlideMasterIdList.Append(newMasterId);
// change slide layout ID
FixSlideLayoutIds(newDocument.PresentationPart);
//newPart.Slide.Save();
newDocument.PresentationPart.Presentation.Save();
}
The GetMaxIDFromChild and FixSlideLayoutID methods are barrowed from Zeyad’s article. The GetSlidePartByTagName method is listed below. It is really one LINQ query that finds SlideParts with child Tags that have the requested Name.
private SlidePart GetSlidePartByTagName(PresentationDocument templateDocument, string tagName)
{
return (from p in templateDocument.PresentationPart.SlideParts
where
p.UserDefinedTagsParts.First().TagList.Descendants
<DocumentFormat.OpenXml.Presentation.Tag>().First().Name ==
tagName.ToUpper()
select p).First();
}
This is what really makes the difference from what Zeyad posted. The most powerful thing you can have when generating documents from templates is a consistent way of naming items to be manipulated. I will be show more approaches like this in upcoming posts.

|
Code excavations, wishful invocations, perimeters and domain specific unit test frameworks
Roy Osherove
- Posted 3/19/2010 10:57 AM
|
|
One of the talks I did at QCON London was about a subject that I’ve come across fairly recently , when I was building SilverUnit – a “pure” unit test framework for silverlight objects that depend on the silverlight runtime to run. It is the concept of “cogs in the machine” – when your piece of code needs to run inside a host framework or runtime that you have little or no control over for testability related matters. Examples of such cogs and machines can be: - your custom control running inside silverlight runtime in the browser
- your plug-in running inside an IDE
- your activity running inside a windows workflow
- your code running inside a java EE bean
- your code inheriting from a COM+ (enterprise services) component
- etc..
Not all of these are necessarily testability problems. The main testability problem usually comes when your code actually inherits form something inside the system. For example. one of the biggest problems with testing objects like silverlight controls is the way they depend on the silverlight runtime – they don’t implement some silverlight interface, they don’t just call external static methods against the framework runtime that surrounds them – they actually inherit parts of the framework: they all inherit (in this case) from the silverlight DependencyObject Wrapping it up? An inheritance dependency is uniquely challenging to bring under test, because “classic” methods such as wrapping the object under test with a framework wrapper will not work, and the only way to do manually is to create parallel testable objects that get delegated with all the possible actions from the dependencies. In silverlight’s case, that would mean creating your own custom logic class that would be called directly from controls that inherit from silverlight, and would be tested independently of these controls. The pro side is that you get the benefit of understanding the “contract” and the “roles” your system plays against your logic, but unfortunately, more often than not, it can be very tedious to create, and may sometimes feel unnecessary or like code duplication. About perimeters A perimeter is that invisible line that your draw around your pieces of logic during a test, that separate the code under test from any dependencies that it uses. Most of the time, a test perimeter around an object will be the list of seams (dependencies that can be replaced such as interfaces, virtual methods etc.) that are actually replaced for that test or for all the tests. Role based perimeters In the case of creating a wrapper around an object – one really creates a “role based” perimeter around the logic that is being tested – that wrapper takes on roles that are required by the code under test, and also communicates with the host system to implement those roles and provide any inputs to the logic under test. in the image below – we have the code we want to test represented as a star. No perimeter is drawn yet (we haven’t wrapped it up in anything yet). in the image below is what happens when you wrap your logic with a role based wrapper – you get a role based perimeter anywhere your code interacts with the system: There’s another way to bring that code under test – using isolation frameworks like typemock, rhino mocks and MOQ (but if your code inherits from the system, Typemock might be the only way to isolate the code from the system interaction. Ad-Hoc Isolation perimeters the image below shows what I call ad-hoc perimeter that might be vastly different between different tests: This perimeter’s surface is much smaller, because for that specific test, that is all the “change” that is required to the host system behavior. The third way of isolating the code from the host system is the main “meat” of this post: Subterranean perimeters Subterranean perimeters are Deep rooted perimeters - “always on” seams that that can lie very deep in the heart of the host system where they are fully invisible even to the test itself, not just to the code under test. Because they lie deep inside a system you can’t control, the only way I’ve found to control them is with runtime (not compile time) interception of method calls on the system. One way to get such abilities is by using Aspect oriented frameworks – for example, in SilverUnit, I’ve used the CThru AOP framework based on Typemock hooks and CLR profilers to intercept such system level method calls and effectively turn them into seams that lie deep down at the heart of the silverlight runtime. the image below depicts an example of what such a perimeter could look like: As you can see, the actual seams can be very far away form the actual code under test, and as you’ll discover, that’s actually a very good thing. Here is only a partial list of examples of such deep rooted seams : - disabling the constructor of a base class five levels below the code under test (this.base.base.base.base)
- faking static methods of a type that’s being called several levels down the stack: method x() calls y() calls z() calls SomeType.StaticMethod()
- Replacing an async mechanism with a synchronous one (replacing all timers with your own timer behavior that always Ticks immediately upon calls to “start()” on the same caller thread for example)
- Replacing event mechanisms with your own event mechanism (to allow “firing” system events)
- Changing the way the system saves information with your own saving behavior (in silverunit, I replaced all Dependency Property set and get with calls to an in memory value store instead of using the one built into silverlight which threw exceptions without a browser)
several questions could jump in: - How do you know what to fake? (how do you discover the perimeter?)
- How do you fake it?
- Wouldn’t this be problematic - to fake something you don’t own? it might change in the future
How do you discover the perimeter to fake? To discover a perimeter all you have to do is start with a wishful invocation. a wishful invocation is the act of trying to invoke a method (or even just create an instance ) of an object using “regular” test code. You invoke the thing that you’d like to do in a real unit test, to see what happens: - Can I even create an instance of this object without getting an exception?
- Can I invoke this method on that instance without getting an exception?
- Can I verify that some call into the system happened?
You make the invocation, get an exception (because there is a dependency) and look at the stack trace. choose a location in the stack trace and disable it. Then try the invocation again. if you don’t get an exception the perimeter is good for that invocation, so you can move to trying out other methods on that object. in a future post I will show the process using CThru, and how you end up with something close to a domain specific test framework after you’re done creating the perimeter you need. 
|
How to Backup a SQL Express Database
Michael Ceranski
- Posted 3/19/2010 9:14 AM
|
|
There are a lot of programs that ship with SQL Express databases. For example, when you install development tools like Visual Studio or SharePoint it is common practice to bundle it with an express version of SQL Server. Most of the time when SQL Express is bundled with an application it is done with the intention that you are going to be using it for development purposes only. However, once a SQL instance is installed on a workstation people will start using it for other reasons. Before you know it, a critical application will be running on your SQL Express instance. The major problem with SQL Express is that it has no SQL Agent which is used to schedule jobs like a full backup. However, you need to backup your mission critical database on a regular basis! In order to address this problem, I have developed this handy batch file that you can use: @echo off
SET BACKUP_DIR=D:\Backups
SET SERVER=localhost
for /f "tokens=2" %%d in ('echo %date%') do (
for /f "tokens=1-3 delims=/" %%j in ('echo %%d') do (
set month=%%j
set day=%%k
set year=%%l
)
)
set /a day=%day%-1
if %day% lss 10 (
set day=0%day%
)
set year=%year:~2,3%
set mydate=%month%%day%%year%
for /f "tokens=1-2 delims=: " %%a in ('time /t') do set XTime=%%a%%b
sqlcmd -S %SERVER% -d master -Q "exec sp_msforeachdb 'BACKUP DATABASE [?] TO DISK=''%BACKUP_DIR%\?.Full.%mydate%.%XTIME%.bak'''
Note: Before you run this program you will probably want to change the BACKUP_DIR and the SERVER parameters. In addition, if you are using SQL Authentication instead of windows you may want to specify the -U (login) and -P (password) switches for the sqlcmd.
To make this process run on a regular basis you can schedule a job via the windows scheduler. Just make sure that if you run this job on a regular frequency job everyday that you develop a routine which can purge the expired backups. Here is a script that I found on the Hey, Scripting Guy! Blog which will take care of that problem.
Finally, if you are running this on a SQL 2000 environment then you will probably need to use the osql command instead of sqlcmd. osql was replaced with sqlcmd starting with SQL 2005.


|
JavaScript function to Redirects parent of IFrame to specified URL
Michael Freidgeim
- Posted 3/19/2010 4:37 AM
|
|
/// <summary>
/// Redirects parent of IFrame to specified URL
/// If current page doesn't have parent, redirect itself
/// </summary>
/// <param name="page"></param>
/// <param name="url"></param>
public static void NavigateParentToUrl(Page page, string url)
{
String script = @"
try
{
var sUrl='" + url + @"';
if (self.parent.frames.length != 0)
self.parent.location=sUrl;
else
self.location = sUrl;
}
catch (Exception) {}
";
page.ClientScript.RegisterStartupScript(TypeForClientScript(), MethodBase.GetCurrentMethod().Name, script, true);
}
/// <summary> 
|
Getting Started with Employee Info Starter Kit (v4.0.0)
Mohammad Ashraful Alam
- Posted 3/19/2010 3:48 AM
|
|
The new release of Employee Info Starter Kit contains lots of exciting features available in Visual Studio 2010 and .NET 4.0. To get started with the new version, you will need less than 5 minutes. Minimum System Requirements Before getting started, please make sure you have installed Visual Studio 2010 RC (or higher) and Sql Server 2005 Express edition (or higher installed on your machine. Running the Starter Kit for First Time 1. Download the starter kit 4.0.0 version form here and extract it. 2. Go to <extraction folder>\Source\Eisk.Solution and click the solution file 3. From the solution explorer, right click the “Eisk.Web” web site project node and select “Set as Startup Project” and hit Ctrl + F5 4. You will be prompted to install database, just follow the instruction. That’s it! You are ready to use this starter kit. Running the Tests Employee Info Starter Kit contains a infrastructure for Integration and Unit Testing, by utilizing cool test tools in Visual Studio 2010. Once you complete the steps, mentioned above, take a minute to run the test cases on the fly. 1. From the solution explorer, to go “Solution Items\e-i-s-k-2010.vsmdi” and click it. You will see the available Tests in the Visual Studio Test Lists. Select all, except the “Load Tests” node (since Load Tests takes a bit time) 2. Click “Run Checked Tests” control from the upper left corner. You will see the tests running and finally the status of the tests, which indicates the current health of you application from different scenarios. 
|
Proxying and parallelizing processes
Mauricio Scheffer
- Posted 3/18/2010 10:37 PM
|
|
Some code just flat out refuses to run multi-threaded. Like GeckoFX. It's a great project, and I found it to be much more reliable than WebBrowser (aka IE), but it just won't run multi-threaded (or at least me and several other people haven't figured out how) I had to write some CPU-intensive, non-interactive code involving GeckoFX, so parallelization was a must. Well, when multi-threading won't fly, multi-processing (as in launching code on a separate process instead of a separate thread) can be a viable alternative. This does complicate RPC a bit but we can tuck this under a proxy that serializes parameters and then gets the return value through a named pipe: public class ProcessInterceptor : IInterceptor {
...
public void Intercept(IInvocation invocation) {
var pipename = Guid.NewGuid().ToString();
var procArgs = new List<string> {
Quote(invocation.TargetType.AssemblyQualifiedName),
Quote(invocation.MethodInvocationTarget.Name),
pipename,
};
procArgs.AddRange(invocation.Arguments.Select(a => Serialize(a)));
var proc = new Process {
StartInfo = {
FileName = "runner.exe",
Arguments = String.Join(" ", procArgs.ToArray()),
UseShellExecute = false,
CreateNoWindow = true,
}
};
using (var pipe = new NamedPipeServerStream(pipename, PipeDirection.In)) {
proc.Start();
pipe.WaitForConnection();
var r = bf.Deserialize(pipe);
r = r.GetType().GetProperty("Value").GetValue(r, null);
proc.WaitForExit();
if (proc.ExitCode == 0) {
invocation.ReturnValue = r;
} else {
var ex = (Exception) r;
throw new Exception("Error in external process", ex);
}
}
}
}
And that "runner.exe" thing is the host, just a console app that is responsible for deserializing parameters, calling the method, managing exceptions and then send back the return value (if any):
public class Runner {
...
public static int Main(string[] args) {
var pipename = args[2];
using (var pipe = new NamedPipeClientStream(".", pipename, PipeDirection.Out)) {
pipe.Connect();
try {
var type = Type.GetType(args[0]);
var method = type.GetMethod(args[1]);
var instance = Activator.CreateInstance(type);
var parameters = args.Skip(3).Select(p => lf.Deserialize(p)).ToArray();
var returnValue = method.Invoke(instance, parameters);
bf.Serialize(pipe, new Result { Value = returnValue });
return 0;
} catch (Exception e) {
bf.Serialize(pipe, new Result { Value = e });
return 1;
}
}
}
}
And now we can parallelize. Here's a silly example (can't post the actual GeckoFX process, it's proprietary stuff):
public class TargetCode {
public virtual int Add(int a, int b) {
return a + b;
}
}
[Test]
public void Parallel() {
var generator = new ProxyGenerator();
var t = generator.CreateClassProxy<TargetCode>(new ProcessInterceptor());
var r = Enumerable.Range(0, 100).AsParallel().Sum(i => t.Add(i, i));
Assert.AreEqual(9900, r);
}
This will launch a separate process for each iteration. On a dual-core CPU, the Task Parallel Library will launch by default at most two threads to run in parallel, so you would have at most two runner.exe instances running at the same time, thus achieving multi-process parallelism.
Now this is not a general solution, it worked for my specific usecase but it has several caveats:
- Doesn't support generic or overloaded methods (it shouldn't be hard to implement)
- Target code must be interceptable (virtual, non-sealed, etc)
- Target code must have parameterless constructor (it shouldn't be hard to lift this restriction)
- Method parameters are passed through command-line so they can't be very long. (it shouldn't be hard to lift this restriction)
- Target code should be practically stand-alone since the host won't have the same app.config as it parent, nor any other previous initialization, etc.
- The target code should be sufficiently long-running to justify the overhead of proxying, reflection, serialization and process launching.
Full code is here.


|
Book review: User Stories Applied: For Agile Software Development by Mike Cohn
Hernan Garcia
- Posted 3/18/2010 9:01 PM
|
|
I pick up the book with a lot of
interesting an enthusiasm. My goals were to learn techniques and proper ways to write
down user stories, improve my estimation techniques and been able to apply some of
those techniques back at work.
The book delivers in it’s promise. Some of the things I hope to use at work are the
story writing workshops and user role modelling.
User role modelling was one of the most interesting techniques for me. I also enjoyed
the guidance for writing good user stories.
Mike Cohn takes a very pragmatic approach to some issues usually very controversial
in the agile community, like using sticky notes or software to write stories. I particulary
liked that.
I was a bit disappointed with the third part of the book but I think that depends
on the background of the reader. The catalogue of Story smells is a must read though.
The last part of the book is an example that walk us on how to come up with the user
roles, write the stories, estimate them, create a release plan and acceptance tests.
If you are working in an agile team and have some input on the writing of stories
I will recommend that read this book.


|
Parallelism in .NET – Part 15, Making Tasks Run: The TaskScheduler
Reed Copsey, Jr.
- Posted 3/18/2010 6:52 PM
|
|
In my introduction to the Task class, I specifically made mention that the Task class does not directly provide it’s own execution. In addition, I made a strong point that the Task class itself is not directly related to threads or multithreading. Rather, the Task class is used to implement our decomposition of tasks.
Once [...]
|
dotTrace 4.0 Puts on a Fine Performance
JetBrains, Inc.
- Posted 3/18/2010 3:05 PM
|
|
Front seats at the ballet: $200
Front seats at the ball game: $100
Quickly spotting bottlenecks in your .NET application: priceless
There are some performances money can buy. For everything else, there’s dotTrace 4.0 Performance.
Jokes aside, here’s what dotTrace 4.0 Performance, currently in Beta, brings to the table.
Support for:
Visual Studio 2005, 2008, and 2010
.NET Compact Framework 3.5
.NET Framework [...]
|
Personal | Going For A Long Drive
Jeff Julian
- Posted 3/18/2010 11:31 AM
|
|

This weekend, we were planning on going to Mt. Rushmore, but with the weather the way it is, we decided to head south instead. So what are we going to do? A tour of different restaurants on the show Diners, Drive-ins, and Dives. Not very original I know since there are web sites and iPhone apps dedicated to locating the establishments, but it definitely sounds like it could be some fun. We are going to leave KC tonight and go through St. Louis, Memphis, Little Rock, Dallas, Oklahoma City, and back to KC. The kiddos are excited and we have plenty of movies, coloring books, etc in the car for the trip. This will be the first time we will get to use our turn around seats in the mini-van with our pull out table. I will have my laptop and phone if anything goes wrong with the site while I am gone and John will be back in KC as well. I hope to pushing some photos and reviews of the restaurants as we travel.
Related Tags: blogging, Diners, Drive-ins, and Dives, Vacation
|
My first Windows Phone 7 App: Getting SharePoint Content
Jan Tielens
- Posted 3/17/2010 3:56 PM
|
|
Earlier this week at the Mix10 conference, Microsoft announced the developer story of the Windows Phone 7 Series. As expected, it’s all about Silverlight! For all the details I highly recommend to watch the recorded keynotes (day 1, day 2).
Tonight I could resist trying to build my very first Windows Phone 7 application; the traditional Hello World thingy. Because the developer tools (Visual Studio 2010 and the free Visual Studio 2010 Express) have pretty nice templates, that wasn’t much of a challenge. So I tried to build something real: an application that can display SharePoint 2010 content, for example items from an announcements list. I head to work my way around some limitations because both SharePoint 2010 and the developer tools are still in beta and CTP, but finally I got it working! Because of the many workarounds, the code is not yet ready for publication, but I’ve created a small screencast so you can see the result. To be continued! :-)
Windows Phone 7 POC: Getting SharePoint Data from Jan Tielens on Vimeo.
|
MIX 2010 Covert Operations Day 4
Adron Hall
- Posted 3/17/2010 3:30 PM
|
|
The Microsoft Azure Cloud is looking pretty solid compared to just a few months ago. The storage mechanisms in the cloud now are blobs, drives, tables, and queues. Also, not to forget, is SQL Azure. I won?t dive too much into that, as most will know what SQL Server is, and SQL Azure is pretty much just a hosted SQL Server instance. The blobs are generally geared toward holding binary type data, images and those types of things. The tables are huge key value type stores. The drives are VHD, which are virtual hard drives. The queues are just queues used for workflow and also to store messages back and forth in a queue. These methods are accessible via REST, which makes application development against the storage services extremely easy. This is a big plus point as REST services are a preferred way to connect and interact with data storage. It also sets up Silverlight as a prime framework to utilize services. Day 4 I pretty much dedicated to reviewing these cloud services and finishing up work related development. With that, I'm wrapping up my MIX 2010 blog coverage. Now back to your regularly scheduled programming.
|
Adrenaline Junkies and Template Zombies
Freek Leemhuis
- Posted 3/17/2010 1:50 PM
|
I’ve followed Tom DeMarco and Tim Lister ever since I read Peopleware, a great book about building great software teams. When a new book by these authors (and a few others) came out last year, I ordered it straight away. It’s called Adrenaline Junkies and Template Zombies, and it’s a great list of patterns of [...]
|
MIX10 – Windows 7 Series Phone Architecture
Ryan Rinaldi
- Posted 3/17/2010 10:21 AM
|
|
Rearchitected from the ground up - Hardware Architecture
- Capacitive touch – 4 or more contact points
- Sensors
- GPS
- Accelerometers
- Compass
- Light
- Proxmity
- Camera
- Multimedia
- Memory
- GPU
- CPU
- Only 2 resolutions
- Software Architecture
- Built on WinCE
- MS is writing almost all of the device drivers instead of OEM
- App updating, Licensing built in
- New UI model
- XBox LIVE, Bing, Location, Push notifications
- Apps all built on CLR (no unmanaged code)
- Silverlight, XNA, HTMl/JavaScript
- Frameworks built for you to access all phone features
- App Model
- What is an app?
- Uniquely identifiable and servicable product packaged as XAP
- Application deployment
- Windows phone marketplace
- Application license
- Crypto-verifable object issued to grant rights to the applications
- Phone only installs .xap pakcages signed by marketplace
- phone handles all aspects of .xap installation based on manifest
- you cannot make arbitrary changes to the phone during install
- Users control install, update and uninstall, while the marketplace controls revocation
- Phone only runs apps that have a valid marketplace license
- Apps are sandboxed into separate security accounts while installed and at runtime
- Resource allocation policy keeps the foreground app responsive
- Resource management policy ensures the user can always use Start to run an app.
- App hosting
- Each app executes inside an isolated, least-privileged host process
- all app code is transparent and CLS-verifiable
- Frameworks enable app code to interact with app model, UI model, phone functionality
- Frameworks
- CLR
- Silverlight
- Device & phone
- Cloud
- UI Model
- Concepts
- Application – UI and logic for functionality exposed through pages
- Page a single screen of user interaction elements
- Session – An ordered workflow of user interactions spanning applications
- UI metaphor – Web
- Sessions can be paged out when inactive.
- Page State – Contains data that describes an instance of a page, analogous to browser cookie
- Allows the phone to discard all UI info when app is inactive
- Rehydrates page ui based on Page State info
- Graphics composition
- Each page gets it’s own layer on top of the Direct3D surface
- Cloud Integration Services
- built-in user experiences and APIs
- Familar APIs for interactingwith existing web 2.0 services
- Rich support for incorporating custom web services
- Location Service
- support for consuming GPS, AGPS and Wi-Fi based location
- reverse geo-coding
- Push notification service
- Managed APIs for notification-driven interaction
- When battery is low the service may shut down
- This is not guaranteed message delivery.
- Based on the state of the phone, message could be delayed, batched, or dropped.
- Gamer Services APIs


|
Mercurial Conversion from Team Foundation Server
Matt Hawley
- Posted 3/17/2010 10:08 AM
|
|
One of my many (almost) daily tasks when working on the CodePlex platform since releasing Mercurial as a supported version control system, is converting projects from Team Foundation Server (TFS) to Mercurial. I'm happy to say that of all the conversions I have done since mid-January, the success rate of migrating full source history is about 95%. To get to this success point, I have had to learn and refine several techniques utilizing a few different tools… (read more) 
|
Some Notes On SQL Saturday #44
Marlon Ribunal
- Posted 3/16/2010 4:10 PM
|
Few weeks after we officially announced SQLSaturday#44, a couple of event sponsors have signed up so far. 2 or 3 have signed up as swag sponsors (books and software). There are only 5 weeks to go before the event. This means we need an aggressive campaign to attract more event sponsors. In order for us to [...]
|
Announcing Sesame Data Browser
Fabrice Marguerie
- Posted 3/16/2010 3:53 PM
|
|
At the occasion of MIX10, which is currently taking place in Las Vegas, I'd like to announce Sesame Data Browser. Sesame will be a suite of tools for dealing with data, and Sesame Data Browser will be the first tool from that suite. 
Today, during the second MIX10 keynote, Microsoft demonstrated how they are pushing hard to get OData adopted. If you don't know about OData, you can visit the just revamped dedicated website: http://odata.org. There you'll find about the OData protocol, which allows you to publish and consume data on the web, the OData SDK (with client libraries for .NET, Java, Javascript, PHP, iPhone, and more), a list of OData producers, and a list of OData consumers. This is where Sesame Data Browser comes into play. It's one of the tools you can use today to consume OData.  
I'll let you have a look, but be aware that this is just a preview and many additional features are coming soon. Sesame Data Browser is part of a bigger picture than just OData that will take shape over the coming months. Sesame is a project I've been working on for many months now, so what you see now is just a start :-) I hope you'll enjoy what you see. Let me know what you think.
|
Exciting product releases (and one disappointing thing) with Mix10
Jeff Putz
- Posted 3/16/2010 2:54 PM
|
|
Sadly, I'm not at Mix this year, for the first time in a few years. It's a little harder to go if you work for Microsoft, oddly enough. And then there's this little guy next to me, who at ten days old really needs his daddy to be around! But oh, the excitement of what Microsoft has in store!
It's great to finally see all of these major releases coming together for Microsoft developer products. There is a great deal of excitement among people internally no matter where you work, because there is so much cool stuff in the pipe. In case you live under a rock... - Visual Studio 2010 - Great to see all of the positive feedback on the Twitter and what not. I've been using it on one of my home products for awhile, and I really like it. The newer nightly builds of ReSharper also seem to be gaining speed in quality as well. I like the new debugging features, and the text readability is not imagined. Love it.
- Silverlight 4 - I've been running a couple of minor SL3 apps on my personal sites for awhile now, and I'm thrilled with the platform. With a couple of key concepts down, .NET folk like you and me can do some stellar things with this, and if you're a Mac nerd (like me), it's all kinds of awesome to be able to build stuff for it without the agony of Objective-C and X Code.
- Windows Phone 7 Series - A few weeks ago you got to see the shiny new UI that went beyond the icon grid, and now you've got the developer story as well. That I can adapt my existing Silverlight apps with minimal effort to work on the phone is pretty powerful. Millions of .NET devs just because phone developers, using the tools they already know. How great is that?
- ASP.NET MVC2 - The final bits shipped last week, and there was much rejoicing. I love this framework because of the testability and the real ability to get to the true mechanics of HTTP. The other cool thing is the speed at which the framework has evolved. v2 in less than a year is pretty "un-Microsoft" in a lot of eyes.
The video of keynotes and sessions is starting to appear on the Mix site, but for reasons I can't understand, they're WMV downloads. For real? Not that helpful for Mac folk. Why wouldn't they be using a Silverlight player?
In any case, the thing that continues to motivate me is that getting what you imagine on to the Internet gets easier every year. This is not a new revelation for me. I've only been at Microsoft for four months, but I've felt this way for years. I'm thrilled to be a part of it.
|
San Francisco DotNetNuke User's Group
Chris Hammond
- Posted 3/16/2010 12:16 PM
|
If you are anywhere in the San Francisco Bay or Silicon Valley area this post is for you. Others are welcome, but you might find the drive a little long depending on where you are. On 3/23/2010 we are going to be holding our first DotNetNuke User’s Group...(read more)
|
Amethyst Flash IDE Edges Towards Final Beta
Huw Collingbourne
- Posted 3/15/2010 6:13 AM
|
|
New features in the latest 'edge' release of Amethyst include a built-in 'project publish' (FTP) capability, 'platform' support in build configurations and an expression evaluator which lets you test out ActionScript expressions (in addition to simple variables) in the watch and immediate windows. The expression evaluator will be further enhanced in our next release. There have also been numerous bug-fixes and improvements to IntelliSense, refactoring and (...)
|
70-290 study notes: Shared Folder and NTFS Permissions
arshly
- Posted 3/14/2010 9:44 PM
|
|
Long time ago ,we post mcsa 70-290 notes on managing groups .Today ,My friends experiencing this MCSE Server 2003 exam have organized his notes on shared Folder and NTFS permissions to help the candidates to MCSA/MCSE have a better understand of the syllabus or exam notes .Although there are full of 70-290 braindumps [...]
|
NET Framework 3.5 & NET Framework 4.0
Anand Patel
- Posted 3/14/2010 9:42 PM
|
The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is hearty of development now & tomorrow for business applications.
Our dot.net consultant hides technical complexity & ensures deliver of better application. Radix has started development on net framework 4.0 to influence best technology for client projects.
Explore technical verticals of Radix consulting & development services from following sections.
|
Career Change
John Sheehan
- Posted 3/14/2010 8:53 PM
|
|
I can vividly remember the moment I read about Twilio on TechCrunch. I had the same feeling about what I could accomplish using it as I did the first time I tried wifi, or made a call from a cell phone. Suddenly all sorts of ideas/features/applications that weren’t previously possible suddenly were. I’ve followed them [...]
|
Visual Studios 2010
Donald Hughes
- Posted 3/14/2010 1:25 PM
|
|
Well here we go again another version of Visual Studios and another learning curve. I’m starting to see the release dates being posted as of the writing of this entry however there is still no downloadable final version to be had yet. Somehow Microsoft did not let the final release slip out to the pirates this time. I’ve been just skimming the surface on the new functionality with a couple of video postings on learn visual studios dot net . From what I’ve seen it appears that the new studio additions have to do with additions that where made to dot net framework 4.0 and most of this has to do with the finalized Ajax that is included in the dot net framework 4.0 release. Additionally there is the documentation/Reporting functionality of Agile or CMMI that got it’s start with team suite 2008. I’ll be looking for a good Ajax project to do a screen cast of here in the near future. The post have been a little far an few between here. I’ve been a little busy with life and little less with dinking around programming.
|
How to: Create computed/custom properties for sample data in Blend/Sketchflow
Ondrej Svacina
- Posted 3/14/2010 12:53 PM
|
|
I blogged about sample data in Microsoft Blend/SketchFlow previously. SketchFlow is a great tool for rapidly building interactive screen prototypes. Sample data feature helps you to create plausible screen mocks quickly. I want to emphasize words interactive prototypes. Yes, user can click here and there and sees the entire “application flow”. Previously we mocked screens in HTML, had them rendered and sent this to our customers as a package full of JPEGs. Almost as a rule we had small disputes with customers who were arguing that they just cannot “grasp the application” from JPEGs. Now we can just publish a Silverlight prototype to our server and customers browse it throughout. Hopefully I don’t need to note that logically connected screens should play together. Having double clicked a record in a datagrid on one screen and being redirected to another screen showing detailed information on this only record, data in fields should be the same (or related) to the record I clicked on the first screen. If you use sample data, it means that you should bind the first and second screen against the very same data source. One problem I encountered is managing data derived from other fields in sample collection. Let’s say I have a customers collection with usual data like first name, last name and birth date. The first screen shows this list but I want to have only one column for customer name showing first and last name concatenated. I need them separated in my collection because the second “customer detail” screen would show them in separate text boxes. I could create a new string field and manually type in the full name but I am lazy to do such work and frankly have personal objections to do so. I prefer the way the full name field just computes itself. That way I can modify either name and full name updates automatically. Double clicking on the Natasha row would bring me to the second screen with separate fields: Fortunately, this task is not difficult. Your sample data collections are stored as XML files inside the SampleData folder in the XXXScreens project. For each such XML file, Blend generates a corresponding C# file with two ordinary class, one representing the collection and one the collection item (named Item): public class Employees : System.ComponentModel.INotifyPropertyChanged
{
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
public Employees()
{
try
{
System.Uri resourceUri = new System.Uri("/SilverlightPrototype_Derived.Screens;component/SampleData/Employees/Employees.xaml", System.UriKind.Relative);
if (System.Windows.Application.GetResourceStream(resourceUri) != null)
{
System.Windows.Application.LoadComponent(this, resourceUri);
}
}
catch (System.Exception)
{
}
}
private ItemCollection _Collection = new ItemCollection();
public ItemCollection Collection
{
get
{
return this._Collection;
}
}
}
public class Item : System.ComponentModel.INotifyPropertyChanged
{
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
private string _LastName = string.Empty;
public string LastName
{
get
{
return this._LastName;
}
set
{
if (this._LastName != value)
{
this._LastName = value;
this.OnPropertyChanged("LastName");
}
}
}
private string _FirstName = string.Empty;
public string FirstName
{
get
{
return this._FirstName;
}
set
{
if (this._FirstName != value)
{
this._FirstName = value;
this.OnPropertyChanged("FirstName");
}
}
}
}
Pretty boring code. If only the Item class would be generated with the partial directive, we could add our own class with the FullName computed property.
Let’s start some hacking then. Close Blend, start your favorite text editor and open the file C:\Program Files\Microsoft Expression\Blend 3\Templates\en\SampleDataCode.cs. This is the template Blend uses for generating C# code from the sample data XML source file.
Change line 43 from:
public class COMPOSITE_TYPE : System.ComponentModel.INotifyPropertyChanged //CompositeTypeHeader - BEGIN
to:
public partial class COMPOSITE_TYPE : System.ComponentModel.INotifyPropertyChanged //CompositeTypeHeader - BEGIN
Now start Blend again, open your project, force Blend to regenerate the code file (by adding a new property and removing it immediately). If you open the sample data code file, you can notice that the Item class now has the partial keyword!
Add a new class, change the namespace to exactly math the one in the original code file and write your own partial class, like mine:
namespace Expression.Blend.SampleData.Employees
{
public partial class Item
{
public string FullName
{
get
{
return string.Format("{0} {1}", FirstName, LastName);
}
}
}
}
Job done! I may create a new bound column to my datagrid:
<data:DataGridTextColumn Header="Full Name" Binding="{Binding FullName}"/>
Note: Blend may not recognize your new properties, so you may need to write your bound fields in XAML yourself, not in the Blend UI.
|
|