| Mark's profileMark's .Net Code SpaceBlogListsGuestbook | Help |
Mark's .Net Code SpaceGetting the most from .Net |
|||||||||
Just quick tidbits
|
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
|
||||||||
|
|