| Mark's profileMark's .Net Code SpaceBlogListsGuestbook | Help |
|
September 15 A .Net 4.0 tidbit to whet your excitement!This is just a very tiny item to stoke the coals of your excitement about the .Net 4.0!
I know this will seem pretty simple but dealing with COM objects or DOM or other externally bound type structures can be pretty tedious if you cannot statically bind to those type libraries. For example, if you are calling a Calculator object, if you can statically bind and invoke, the code is pretty simple:
// Static Invocation Calculator calc = GetCalculator(); int sum = calc.Add(10, 20);
However, if you cannot statically bind, you have to go thru the tedious way of doing dynamic invocation. The code would looks something like this:
// v3.x .Net Dynamic Invocation object calc = GetCalculator(); Type calcType = calc.GetType(); object result = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 }); sum = Convert.ToInt32(result);
The above works, but the code is messy and will look somewhat different across the different languages. Here comes .Net 4.0 DLR!! With the new dynamic keyword the code not only becomes MUCH simpler, but is almost consistent across the languages!!! Take a look!
// v4.0 .Net Dynamic Invocation using the DLR! dynamic calc = GetCalculator(); sum = calc.Add(10, 20);
This is exciting stuff! Happy Coding!! August 21 PowerCommands for Visual Studio 2008I found a handy set of tools for VS 2008 IDE. One of my favorites is the "Collapse Projects"! Why this isn't already in the IDE, I have no idea. But here is the link and a list of commands:
http://code.msdn.microsoft.com/PowerCommands
Below is a list of the included in PowerCommands for Visual Studio 2008 version 1.1. Refer to the Readme document for additional command details and screenshots.
Great stuff! Happy Coding!
July 20 Visual Studio SP1 IDE CrashesI have not been immune to the tortuous IDE crashes in Visual Studio SP1. Thankfully, enough screams have been raised that a fix is available. Somehow I missed this back in May. Hopefully, the rest of you won't miss it even longer than I have. You can find the information about it here along with the associated hotfix. Just make sure that you are suffering from the problem indicated before installing. Happy Coding!
July 13 Quirks working with Workflow DesignerWhen working with Windows Workflow Foundation projects, it's easy to get into the routine of working with your activities in the designer. This is all great and wonderful until the complexity increases. For example, if you have activities that are sequential workflow units themselves, this can lead to some real 'Workflow Designer Heartburn'. One example, I have a large application with many workflow activities that are sequential workflow units themselves. If I create yet another activity that is a 'Code' activity (as opposed to code behind), then the current VS 2008 designer will sometimes just flat refuse to let me drop other sequential workflow code activities into it. To get around this, you can create a code behind activity. For some reason, the designer seems to have less problems with this. I'm just hoping that some of these designer issues are addressed in the forthcoming VS2010.
Happy Coding
March 05 Great things coming to Windows Workflow 4.0!!!What’s new in .NET Framework 4.0
· Next versions of Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) will provide better support for Web 2.0 technologies like REST, POX, ATOM. · Performance and Scalability of WCF and WF are expected to increase by minimum 10X. · New workflow models. · Seamless integration between WCF and WF including a new Visual Designer. · Parallel Programming framework using PLINQ, Task Parallel Library and Coordination Data Structures to better utilize power of multi-processor and multi-core machines. · Build declarative applications with WF, WCF and WPF using XAML. So, XAML is no more only for WPF and WF. · WCF enhancements : o RESTful enhancements § Simplifying the building of REST Singleton & Collection Services, ATOM Feed and Publishing Protocol Services, and HTTP Plain XML Services using WCF § WCF REST Starter Kit to be released on Codeplex to get early feedback o Messaging enhancements § Transports - UDP, MQ, Local in-process § Protocols - SOAP over UDP, WS-Discovery, WS-BusinessActivity, WS-I BP 1.2 § Duplex durable messaging o Correlation enhancements § Content and context driven, One-way support o Declarative Workflow Services § Seamless integration between WF and WCF and unified XAML model § Build entire application in XAML, from presentation to data to services to workflow · WF enhancements : o Significant improvements in performance and scalability § Ten-fold improvement in performance o New workflow flow-control models and pre-built activities § Flowcharts, rules § Expanded built-in activities – PowerShell, database, messaging, etc. o Enhancements in workflow modeling § Persistence control, transaction flow, compensation support, data binding and scoping § Rules composable and seamlessly integrated with workflow engine o Updated visual designer § Easier to use by end-users § Easier to rehost by ISVs § Ability to debug XAML
January 21 Microsoft Web Platform & Web Application Installers!Now here's something to check out! Microsoft has released v1.0 of it's Microsoft Web Platform Installer to make it easy to get set up to start doing web development. It installs IIS, VS Web Developer 2008 Express, SQL Server 2008 Express and the .Net Framework. And when they went from beta to v1.0, they added the new ASP.NET MVC, VS Tools for Silverlight and more! Way to go guys!
The Microsoft Web Application Installer is (unfortunatly) still beta but help you get up and doing web development if you need tools other than what comes with the Platform AI. You can install things like Graffiti, DotNetNuke, WordPress, Drupal, OSCommerce and more! It checks your machine for the necessary pre-requesites and will pull the apps from their source. Then it walks you through the configuration process and installs them on your computer.
All in all, these two are an incredible benefit for anyone wanting to get up and running quickly. Way to go guys!!!
Happy Coding! January 18 Office developer with VS 2010We have some exciting and dramatic improvements coming for developing Office based solutions. As we all know, developing Office based solutions has been a bit confusing not to mention problematic (can we all say COM+ and PIA???). Well, I'm very excited to say that it looks like we have some significant relief coming with VS2010. · Publishing to SharePoint - Up to now, if you wanted to put an Office based solution on to SharePoint, you had to manually upload the document and maintain locations between the document and the assemblies. VS2010 is slated to provide a 'one-click' mechanism for publishing your solution. The assemblies will be stored on the SharePoint server itself!!! (What a concept, huh?) · Customized and enhanced deployment packages - Up to now, if you created a solution that used both Excel and Word, you had to create multiple deployment packages and customization was still a challenge at times. With VS2010 you will be able to deploy multiple solutions in a single package. You will also have more deployment package customization features! · PIA-less Interoperability - OK, I saved the best for last! If you develop these types of solutions, you know how much fun (sarcasm intended) you had with PIA (making sure it was deployed, interoperability issues, etc). Now, with VS2010 and CLR v4.0, you can use a new feature that will embed the IOP interfaces directly into your application assembly!!!! We can get rid of the deployment headaches as well as the 6.3MB PIA redistributable! There are loads of new features coming in VS2010 that I'll get into later, but I just felt for all of us who develop Office based solutions should know that we have great things coming!! Happy Coding! January 04 Great presentation style on Identity 2.0This is a great presentation style not to mention great information on Identity 2.0 from Steve Clayton. It's definitely worth your time to watch:
November 12 Silverlight Toolkit November 2008 on CodePlexI've kept my trap shut about this for a while (it was posted October 28th) because I wanted to see exactly what it was about and also to see if my opinions were a bit off from everyone else's. It's been out for a couple of weeks now so I feel I can comment without going into too much detail. I was really REALLY looking forward to seeing what the SL bunch posted for this Toolkit. I was hoping for many gadgets that all developers need to build real LOB Web Apps quickly. I just have to admit that I was a bit dissappointed. Don't get me wrong, the toolkit that they published was more stable and a bit more polished that I had expected but yet, it contained only a fraction of what I was hoping for. The build contains a TreeView (nicely done with some unexpected features), a DockPanel (a little confusing if you want dynamic docking but good to have), a WrapPanel (I'm still trying to decide why effort went into this one), a ViewBox (this will be great for resizing but only if you have images, doh!), a label (WTH??? Just tell me why?) and a few others I won't even go into. Decent quality code, but several seem like a waste of time and effort. I still don't understand why there wasn't a HUGE effort to create a great GRID control!?!?!?!?!? The 'Grid' (if you even want to call it that) in SL2 is just an HTML table with no features. A grid is the one if the first things I grab out of the toolbox when I'm creating LOB apps. So, I'm at a quandry whether to recommend it or not. It's definitely worth looking at the code but as for relying on it for one of your 'at-your-fingertips-tools', I dunno. Email me what you think. Happy Coding. October 14 Silverlight 2.0 RTWSorry to be quite so long. We're releasing and it's been quite exciting around here. However, I just HAD to post this about the Silverilght 2.0 RTW release that came out today. If you've been using SL2 Beta 2 in your sites, you'll be very interested in this.
If you have any users at all that were running SL Beta 2, you've already found out the browsers running the new RTW bits are having issues with your site. You will need to update your site's type tag from type="application/x-silverlight-2-b2" to type="application/x-silverlight-2". Moroney has a more detailed explaination and it's a quick read.
Also, you will have to recompile your SL controls with VS2008 SP1.
I'm sure there is a way to support both, but hey, a Beta is a Beta. It wasn't intended to be permanent.
Now, let's see what you can do with this fantastic update!!!!
Happy Coding!
September 05 Another note about removing VS2008 BetaJust one more note about removing/recovering from VS2008 Beta. if you had installed the VSTS Explorer while you had the beta installed, you may have to uninstall everything to do with VS and rebooting before you can recover. One of the indicators that you have reached this confused state is that you will try to debug an application (this is especially relevent to 64-bit systems) and you get an error indicating that the debug components are not registered. Don't panic (and don't wipe your system), just be patient and work to get the VS beta completely off of your system. If you can't uninstall, you may have to go to MSDN and use the VS2008 SP removal tool to get the SP off first. If you still can't get an uninstall clean, you may have to do either a install or repair THEN try to uninstal before you can get to a clean starting point.
Then be sure to reboot before installing the non-Beta VS. Patience & Persistence is the key asset in this situation.
Happy Coding. September 03 Adding my space to your spaceI've gotten numerous requests to add my space to other people's spaces. If you have a valid relevent request and you get denied, please send me a message or email and I will review your request. Sorry to be a pain, but I get many requests that are, uh, shall we say, not relelvent to topic.
Happy Coding.
Hug a developer...Ok, you people know I don't normally do this, but ANYONE who's been doing development for any real length of time knows this video is spot on.
Happy Coding.
VS2008 Beta SP1 removalMany of us jumped on the VS2k8 beta just as soon as we could. And the outcome is that we have another great release of VS. The problem is that on some machines, getting that beta off can be, well, let's just say frustrating. In comes Microsoft stage left. They now have a utility to help in cleaning off the beta debries. It's located here from MSDN. Hopefully that will help (and reduce my inbox!).
Happy Coding!
August 21 Axialis IconWorkshop Lite for VS08 - FREE!!!Anyone that has done development on Windows has had their fair share of frustrations on getting nice icons for their application and their buttons. I've used Axialis IconWorkshop on and off until a couple of years ago and have missed it ever since. It's an absolutely wonderful product. And get this! Now, he's offering a FREE add in version for VS 2008!!!! I'm downloading this very minute! You should too!
Happy Coding! I'm in denial!!!I just can't believe it!
Lutz Roeder is handing .NET Reflector over to Red Gate Software!!! I know that it had to be a challenge to build and support a product for free for eight years, but this is a tool that a great many of us have come to rely on. Lutz says in his blog:
"After more than eight years of working on .NET Reflector, I have decided it is time to move on and explore some new opportunities.
I have reached an agreement to have Red Gate Software continue the development of .NET Reflector. Red Gate has a lot of experience creating tools for both .NET and SQL Server. They have the resources necessary to work on new features, and Reflector fits nicely with other .NET tools the company offers. Red Gate will continue to provide the free community version and is looking for your feedback and ideas for future versions." I've been in this business for a great many years and have seen stuff like this happen before (does anyone remember PKZIP?). I can only hope that RGS lives up to the intent of the agreement and doesn't basterdize the free version to force you to buy a usable version. I have so much great respect for the great yet humble Lutz Roeder. Even if RGS does what I suspect they will do with it, LR has created a legacy that almost every single .Net developer out there today has been positively affected by.
Thank you, Lutz, for 8 years of a great tool and great support. And thank you for helping me learn so much about the .Net Framework internals as a result.
Happy Coding
July 14 Dictionaries and Threads Back on March 27th, I posted the entry "Thread synchronization with Collections". That information came from a .Net Threading class I had taken that was taught by a very prominent .Net teacher (who's initials are JR). The topic came up in class about how to safely assign to a dictionary entry. Somehow I had come away with the notion that mydictionary["mykey"] = value was thread safe. Apparently that was something that was brought up in class and was just never refuted. When I asked the instructor about it, he simply responded with "Dictionary is NOT thread-safe for any operation." (no comment was made about the fact that it was brought up in class).
Therefore, I have removed that posting. According to the MSDN:
Thread Safety
Public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. A Dictionary can support multiple readers concurrently, as long as the collection is not modified. Even so, enumerating through a collection is intrinsically not a thread-safe procedure. In the rare case where an enumeration contends with write accesses, the collection must be locked during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. This just goes to show you that you should always test the information you come across to validate it. Especially when (1) you have some doubts about it and (2) it's too good to be true.
July 01 VS 2005 Test logsVisual Studio 2008 is an absolutely incredible product. But there are a few gotchas here and there and one just knocked me in the head. Not a big deal, but upon first glance, if you're in a hurry, you might just get ticked at VS08. If you use VS08 to open a test log (TRX) file that was created in VS05, all VS08 will show you is that the test failed. For some reason, it doesn't display the error details that are contained in the file. Opening in VS05 works just fine of course.
Just another tidbit for those watching.
Happy Coding June 27 The end of an eraThe Gates-Microsoft era is coming to an end today. Thirty-three years of incredible innovation and leadership. All of us in this industry (whether we admit it or not) owe him thanks for the great livelihood that he has generated through his time at the helm. We are all now looking towards the new chapter that is about to begin. Thanks BillG.
Bill Gates as a Microsoft Employee
September 15th, 1975 - July 27th 2008
June 26 Hyper-V RTM'd Today!!!!!!Hyper-V went RTM today!!!! Everybody get up and do the virtual boogie!!!
|
|
|