by stephen-w-thomas | Sep 20, 2010 | Stephen's BizTalk and Integration Blog
In early September 2010, I got the honor to present three sessions on AppFabric and Workflow 4.0 to the BizTalk Users Group in Sweden at the European BizTalk Conference. While my sessions were not related to BizTalk, they are designed to show how easy it is for someone with BizTalk skills to learn AppFabric and Workflow 4.
I have posted the session slide decks and sample code (including the code generated from my 100% LIVE demo).
I did three sessions:
- Server AppFabric and Workflow 4.0 Overview – This includes some slides on AppFabric strengths and weakness compared to BizTalk and shows how simple it is to set up Correlation in Workflow 4.
- Server AppFabric with Human Workflow – This uses SharePoint 2010 and Workflow 3.5 with AppFabric and .Net 4 Workflow (Chapter 10 from my book) to allow data to be corrected and resubmitted to the same workflow process.
- Platform AppFabric with Remote Message Broadcasting – This talks about using Azure Platform AppFabric to broadcast messages through the Service Bus to destinations on numerous networks (Chapter 11 from my book).
The video recording of the sessions should be available soon and I’ll post the links once I have them.
by community-syndication | Sep 20, 2010 | BizTalk Community Blogs via Syndication
The scene looks like this – while teaching a SharePoint 2010 class I
decided to build a Feature that used one of the OOTB Service Applications of SharePoint
2010.
I decided to create a PDF Converter ’Feature’ that used the Word Automation Services
hosted in SharePoint 2010. Looking into the Word Automation Services, I’d say that
if you’ve already got a PDF creation process going, then stick with it as it appears
this service is pretty simple. However if you’ve got nothing, then Word Automation
Services will be great!
(Having spent a previous life in a graphics company, there are many options that go
with creating just that perfect PDFI could find none of these here :()
(yes the pdf icon needs work)
So I created a VS.NET 2010 Solution with a Feature.
The PDFConverter.cs is where the crux of the work is – the rest of
the solution is working out just the right spot to call it.
Couple of Interesting Points about the Solution
1. ScriptLink – using this from a CustomAction within an Elements
file allows to inject Script into a site where the Feature is Activated. There is
also ScriptBody that allows you to inject script code right there.
2. RegistrationType – being declared as a FileType, currently this
will work with docx. Feel free to experiment and extend out.
Also, seeing this action is activated on a list item, we need to track what list it
came from {ListId} and the item in that list {ItemId} which
is an integer.
1 <Elements
xmlns="http://schemas.microsoft.com/sharepoint/"> 2 <CustomAction
Id="MicksPDFScript" 3 ScriptSrc="~site/_layouts/WordAutomationServices/Scripts/MoveItMoveIt.js" 4 Location="ScriptLink"> 5 </CustomAction> 6 7 <CustomAction
Id="MicksPDFConverter" 8 RegistrationType="FileType" 9 RegistrationId="docx" 10 Location="EditControlBlock" 11 Sequence="106" 12 Title="Convert
to PDF" 13 ImageUrl="~site/_layouts/WordAutomationServices/Images/pdf.gif" 14 > 15 <UrlAction
Url="javascript:MicksOpenDialog('{ListId}','{ItemId}');"/> 16 </CustomAction> 17 18 </Elements> 19
3. Code that actually does the work – is pretty simple really with Folders
and entire Document Libraries able to be passed to the Conversion Job.
One annoying thing is that below in Line15, conversionJob.Start() is
called, really a job gets created and added to the Job Timer queue. Regardless of
what goes on, the Started property always returns true.
Typically I’ve found the Timer Job to kick in every 5 mins to process the conversions
and eventually a PDF file is seen in the library.
1 public bool Convert(string srcFile,string dstFile) 2 { 3 4 //create
references to the Word Services. 5 var
wdProxy = (WordServiceApplicationProxy)SPServiceContext.Current.GetDefaultProxy(typeof(WordServiceApplicationProxy)); 6 var
conversionJob = new ConversionJob(wdProxy); 7 8 conversionJob.UserToken = SPContext.Current.Web.CurrentUser.UserToken; 9 conversionJob.Name = "Micks
PDF Conversion Job " + DateTime.Now.ToString("hhmmss"); 10 conversionJob.Settings.OutputFormat = SaveFormat.PDF; 11 conversionJob.Settings.OutputSaveBehavior = SaveBehavior.AlwaysOverwrite; 12 13 conversionJob.AddFile(srcFile,
dstFile); 14 15 conversionJob.Start(); 16 return (conversionJob.Started); 17 18 }
A couple of screen shots in action:
Of course this is not production ready, but it should give you a great start in getting
there. To start, simply install and Activate the Feature on a site collection to see
the functionality.
Go to a document library and activate the item drop down to see the Convert
to PDF option. Must be a DOCX file currently.
Grab the VSNET2010 Solution and go for it – have fun.
by community-syndication | Sep 20, 2010 | BizTalk Community Blogs via Syndication
Two weeks before submitting the final copy of my latest book, I reran all my chapter demonstrations that had been built during the year. Since many demos were written with beta versions of products, I figured I should be smart and verify that everything was fine with the most recent releases. But alas, everything was […]
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
As part of the Windows Azure AppFabric September Release we are now providing both 32- and 64-bit versions of the Windows Azure AppFabric SDK.
In addition to addressing several deployment scenarios for 64-bit computers, Windows Azure AppFabric now enables integration of WCF services that use AppFabic Service Bus endpoints in IIS 7.5, with Windows® Server AppFabric. You can leverage Windows® Server AppFabric functionality to configure and monitor method invocations for the Service Bus endpoints.
Note that the name of the installer has changed:
· Old Name:
WindowsAzureAppFabricSDK.msi
· New names:
WindowsAzureAppFabricSDK-x64.msi
WindowsAzureAppFabricSDK-x86.msi
Any automated deployment scripts you might have built that use the previous name will need to be updated to use the new naming. No other installer option has changed.
The Windows Azure AppFabric SDK September Release is available here for download.
The Windows Azure AppFabric Team
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
The other day I had a need to create many word documents in code and publish them
up to a SharePoint 2010 site.
1 static void Main(string[]
args) 2 { 3 int iMAXDocs = 200; 4 string fpath = Path.Combine(Directory.GetCurrentDirectory(), "Docs"); 5 Directory.CreateDirectory(fpath); 6 Console.WriteLine("Path
created"); 7 for (int i = 0;
i < iMAXDocs;
i++) 8 { 9 string docname = Path.Combine(fpath, "Doc" + i.ToString() + ".docx"); 10 CreateWordDoc(docname); 11 Console.WriteLine("Created
Doc {0} of {1}",
i, iMAXDocs); 12 } 13 14 }
So essentially it went something like thatwith the key really being line#10 – CreateWordDoc().
The CreateWordDoc routine also adds a couple of custom String properties to the document.
1 private static void CreateWordDoc(string docname) 2 { 3 using (WordprocessingDocument
package = 4 WordprocessingDocument.Create(docname,
WordprocessingDocumentType.Document)) 5 { 6 // Add
a new main document part. 7 package.AddMainDocumentPart(); 8 9 // Create
the Document DOM - which could be from a template XML file or so. 10 package.MainDocumentPart.Document = 11 new Document( 12 new Body( 13 new Paragraph( 14 new Run( 15 new Text("Hello
World!"))))); 16 17 //add
props. 18 CustomFilePropertiesPart
pt = package.CustomFilePropertiesPart; 19 if (pt==null) 20 pt = package.AddCustomFilePropertiesPart(); 21 22 XmlDocument
xdoc = new XmlDocument(); 23 xdoc.LoadXml("<Properties
xmlns='http://schemas.openxmlformats.org/officeDocument/2006/custom-properties' " 24 + "xmlns:vt='http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'>" 25 + "<property
fmtid='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' pid='2' name='temp'> " 26 + "<vt:lpwstr>Done
in Open XML</vt:lpwstr>" 27 + "</property>" 28 + "<property
fmtid='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' pid='3' name='micksdemo'>" 29 + "<vt:lpwstr>SharePoint
is Cool</vt:lpwstr>" 30 + "</property>" 31 + "</Properties>"); 32 33 //save
the props 34 xdoc.Save(pt.GetStream()); 35 36 // Save
changes to the main document part. 37 package.MainDocumentPart.Document.Save(); 38 39 } 40 }
>
All in all pretty straight forward using OpenXML Format SDK 2.0
Here’s the VS.NET2010 Solution of the above code –
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
I had a great (if not short) time at SharePoint Saturday LA – wish I could have spent
more time.
If you came to my session on Workflow and SharePoint – here are my
demos
(383.72 KB) and slides
(1.51 MB)
Check out my new book on REST.
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
For a developer Windows Azure is an opportunity. But it is also an obstacle. It represents a new learning curve much like the ones presented to us by the .NET framework over the last couple of years (most notably with WF, WCF and WPF/Silverlight). The nice things about it though is that it’s still .NET (if you prefer). There are new concepts – like “tables”, queues and blobs, web and worker roles, cloud databases and service buses – but, it’s also re-using those things we have been working with for numerous years like .NET, SQL, WCF and REST (if you want to).
You might hear that Azure is something that you must learn. You might hear that you are a dinosaur if you don’t embrace the Windows Azure cloud computing paradigm and learn its APIs and Architectural patterns.
Don’t take it literally. Read between the lines and be your own judge based on who you are and what role you hold or want to achieve. In the end it comes down to delivering business value – which often comes down to revenue or cost efficiency.
For the CxO cloud should be something considered. For the architect, Azure should be something grasped and explored. For the Lead Dev, Azure should be something spent time on. For the Joe Devs of the world, Azure is something that you should be prepared for, because it might very well be there in your next project and if it is – you are the one that knows it and excels.
As far as developers embracing Windows Azure I see a lot of parallels with WCF when that launched. Investments were done in marketing it as the new way of developing (in that case primarily services or interprocess communication). At one point developers were told that if they were not among the ones who understood it and did it, they were among the few left behind. Today I see some of the same movement around Azure, and in some cases the same kind of sentiment is brought forward.
I disagree. Instead my sentiment around this is: it depends. Not everyone needs to learn it today. But you will need to learn it eventually. After all today, a few years later – Who among us would choose asmx web services over WCF today? Things change. Regardless of how you feel about it. Evolution is funny that way.
Because of the development and breadth of the .NET Framework together with diverse offerings surrounding it a wide range of roles are needed. In my opinion the “One Architect” no longer exists. Much the same with the “One Developer”. Instead the roles exists for different areas, products and technologies – in and around .NET. Specialization has become the norm. I believe Azure ads to this.
I give myself the role of architect (within my field). Though I would no sooner take on the task of architecting a Silverlight application than my first pick of on boarding a new member in our integration team would be someone that has been (solely) a Silverlight developer for the last couple of years.
How is Azure still different though? Azure (cloud) will (given time) affect almost all of Microsoft’s (and others) products and technologies (personal opinion, not quoting a official statement). It’s not just a new specialization – it will affect you regardless of your specialization.
You have to learn. You have to evolve. Why not start today?
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
The Architecture SIG and the Connected Systems SIG have always had a close relationship and many of the topics have been relevant for both of the groups. In that vein we have decided at this point that because of that close relationship, we have decided to merge the two groups into a single SIG underneath the Architecture SIG name. We will continue to cover Connected Systems topics as these are integral to the .Net Architecture. In addition, we will also start to cover Azure topics at the Architecture SIG as this platform is going to become increasingly important to .Net Architects.
I will co-lead the SIG along with Zoiner Tejada. The user group Website (and calendar) is http://SanDiegoDotNet.com.
The new Architecture SIG will meet on the 2nd Tuesday of the month at the Microsoft Office in La Jolla.
Ironically, earlier today I Tweeted this: Some great quotes/thoughts/truths here (‘Traditional enterprise architecture is dead; long live SOA-inspired EA’ ): http://bit.ly/b0PtYm.
The re-alignment of the SIGs is a good reflection of that!
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
Refraction is a vital, but little understood aspect of rule engines. In a three-part article, I’ve attempted to shed some light on what it is and the various options that rule engine designers have when implementing it.
Part 1
http://geekswithblogs.net/cyoung/archive/2010/09/07/the-dimensions-of-refraction–part-1.aspx
Part 2
http://geekswithblogs.net/cyoung/archive/2010/09/07/the-dimensions-of-refraction–part-2.aspx
Part 3
http://geekswithblogs.net/cyoung/archive/2010/09/07/the-dimensions-of-refraction–part-3.aspx
by community-syndication | Sep 19, 2010 | BizTalk Community Blogs via Syndication
As I will begin doing more posts on and around cloud computing in general, and Windows Azure in particular, I’d first like to give my view on when something is cloud and not.
Why? Well, it’s not the first time a word gets status. It gets hot. It gets overused, overloaded and obfuscated. Vendors, consumers, service providers and others might not always agree what cloud is. It will get slapped on, belted down or fuzzily added to an existing product or service to make it more “today”. I might not agree. Others in turn may think I’m wrong. It will add to the overall confusion. So, to hopefully help provide clarity (but potentially adding to the confusion), when do I consider something to be “cloud”?
There are a couple of characteristics that I would look for when it comes to cloud.
Elastic
Or On-Demand. I would assume that I could scale up and down. At any time. I would assume that the procurement process for another server, piece of service (accounts, users, databases etc) is immediate (or next to). Same when scaling down. I would expect to be able to manage this elasticity myself.
Elasticity is not “I have a cold stand by server I can bring online”. Elasticity is “I need 10, 20, or 100 new instances and I need them for two days”. The dynamic capacity does not have a defined limit.
Pay-per-use
I would expect that the service uses some kind of pay-per-use charge model. How I use the service would be measured. How many hours have I been using it? How many GB of storage? How many MB transferred? How many connections opened? How many customers on boarded? How many users? – That sort of thing.
I would hope not (and this one is on the fence) to have to pay for underlying software in the form of procurement or running licensing. It would be included in the service. However this very much plays to the Software-as-a-Service or Platform-as-a-Service (PaaS) rather that say Infrastructure-as-a-Service (IaaS). In the latter I would of course have to handle licenses myself.
Hardware agnostic
I would expect that I do not need to care about underlying hardware. I wouldn’t need to know the cost of purchasing it nor how it is set-up or configured. I wouldn’t need to specify how my machine is built. Even if I do choose the size of the machine, that’s not really my machine, and I can change that at any time.
I would expect the environment, as far as the service or servers go, to be fault tolerant. If hardware fails, or some service needs to be performed, I would assume it to be transparent to me and not effect me or my service.
Summary
If someone calls their offering a cloud service, and it does not fulfill these things I would think twice before considering it a cloud offering. The service offered might be just what I want and need, but I wouldn’t consider it “cloud”. Windows Azure fulfill all these.
This is not an exhaustive list of what I would expect, nor of the capabilities or limitations of Windows Azure or any other platform, though it is what I would say raises cloud above hosting.
Addendum
The term private cloud is often mentioned by hosting providers that would like to compete (at least marketing wise) with the bigger cloud offerings like Windows Azure. In my experience, localized as it might be, they fulfill some of the tenants I hold to, but they often fail on things like rapid (and self-serviced) procurement of a new resource (like a server) or on the metered pay per use model – where often you are expected to pay for something based on your time of pre-determined need of availability to that resource – like a month, if not a year.
Also, for the something in the cloud to be usable for a business that will likely have parts of their business, but not all of it, in the cloud I would look for it to be
Secure connectivity
Since the cloud is not on-premise I would expect there to be a solution available for how do I, in a secure manner, connect what I almost certainly still have on-premise with what I have off-premise – in the cloud. I would hope this to be based on some kind of federated security model, and not by leasing a land line, using VPN, connecting to the existing Active Directory domain or setting up a trust. Though I’ll settle for tried and proven solution.
Further posts
Continuing on with additional Azure posts I’ll try and link back to these pillars, if possible. With pure how-to technology posts that might not always be applicable, but keep these base concepts in mind anyway so that you architect and build your solutions to support them.