<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Platformability &#187; Microsoft</title>
	<atom:link href="http://blog.caplin.com/tag/microsoft/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.caplin.com</link>
	<description>Single Dealer Platforms, Industry Expertise</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:38:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Symbian S60 gets Microsoft&#8217;s Silverlight rival to Flash</title>
		<link>http://blog.caplin.com/2010/07/12/symbian-s60-gets-microsofts-silverlight-rival-to-flash/</link>
		<comments>http://blog.caplin.com/2010/07/12/symbian-s60-gets-microsofts-silverlight-rival-to-flash/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 13:55:52 +0000</pubDate>
		<dc:creator>Michael Poston</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Trading Technology]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Single Dealer Platform]]></category>
		<category><![CDATA[Symbian]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=3063</guid>
		<description><![CDATA[David Meyer from ZDNet UK has posted &#8220;Symbian S60 gets Microsoft&#8217;s Silverlight rival to Flash&#8220;. Silverlight is now supported on mobile devices before even the release of Windows Phone Series 7. As Single Dealer Platforms grow to focus more on mobile devices (we&#8217;ve worked on trading, pricing and alerting projects...]]></description>
			<content:encoded><![CDATA[<p>David Meyer from ZDNet UK has posted &#8220;<a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy56ZG5ldC5jby51ay9uZXdzL21vYmlsZS1hcHBzLzIwMTAvMDcvMDcvc3ltYmlhbi1zNjAtZ2V0cy1taWNyb3NvZnRzLXNpbHZlcmxpZ2h0LXJpdmFsLXRvLWZsYXNoLTQwMDg5NDU5Lw==">Symbian S60 gets Microsoft&#8217;s Silverlight rival to Flash</a>&#8220;.</p>
<p>Silverlight is now supported on mobile devices before even the release of Windows Phone Series 7. As Single Dealer Platforms grow to focus more on mobile devices (we&#8217;ve worked on trading, pricing and alerting projects on more conventional mobile platforms like the Blackberry &amp; iPhone), it&#8217;s interesting to see new opportunities with Windows Phone 7 and Silverlight on Symbian. Any standard Silverlight XAP file will run on your Nokia 5800 and N97 handset without changes, meaning Silverlight can now be used as a framework for building high powered trading workstations on mobile devices.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3063" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/07/12/symbian-s60-gets-microsofts-silverlight-rival-to-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 4 &#8211; Is it what banks want?</title>
		<link>http://blog.caplin.com/2010/04/19/silverlight-4-is-it-what-banks-want/</link>
		<comments>http://blog.caplin.com/2010/04/19/silverlight-4-is-it-what-banks-want/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 08:23:44 +0000</pubDate>
		<dc:creator>Michael Poston</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Trading Technology]]></category>
		<category><![CDATA[Financial Ajax]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=2028</guid>
		<description><![CDATA[Where is Microsoft going with Silverlight? There is no ambiguity in Microsoft’s intentions to contend with AJAX and Adobe Flash in the RIA space; Friday&#8217;s Silverlight 4 release includes me-too features such as enhanced video streaming capabilities aimed at internet broadcasters, better device handling including web-cam, microphone, mouse wheel and...]]></description>
			<content:encoded><![CDATA[<p><strong>Where is Microsoft going with Silverlight?</strong> There is no ambiguity in Microsoft’s intentions to contend with AJAX and Adobe Flash in the RIA space; Friday&#8217;s Silverlight 4 release includes me-too features such as enhanced video streaming capabilities aimed at internet broadcasters, better device handling including web-cam, microphone, mouse wheel and right-click support, together with enhanced animation capabilities such as hardware accelerated transforms and rotations.</p>
<p>Yet the capital markets want more than a Microsoft version of Flash, and fulfilling their additional business requirements is where Silverlight 4 looks to shine.</p>
<p>When banks build single-dealer portals they need an application framework that leverages existing skills so that client offerings can be created quickly, deployed easily, and rolled out to clients en masse. The integration and functional requirements on application frameworks across pre-trade, deal-capture and post-trade are varied and not usually completely solved by any single vendor implementation or framework.</p>
<p><span id="more-2028"></span></p>
<p>The ability though to empower enterprise application developers with a familiar language, good IDE and tools for rapid collaborative implementation is paramount for success. Non-functional requirements on the underlying application platform such as stability, maturity, security and performance are essential, yet often difficult to measure.</p>
<p>Where does Silverlight 4 fit in? The release notes may not immediately instil delight into e-commerce managers around the world as the business benefits aren’t entirely obvious. The presence of features such as right-click support for context menus may be welcomed, but it also gives the impression that other important pieces of functionality might be missing and won’t be around until Silverlight 5 or 6.  Luckily that doesn’t seem to be the case and the business credentials of the Silverlight 4 beta have generally been well received. There’s a plethora of features in the new release and not enough blog space here to cover them all, so here’s a brief description of the key business benefits for financial markets.</p>
<h2>Pre-trade</h2>
<h4>Data aggregation</h4>
<p>There are several Silverlight 4 enhancements for pre-trade and analytics, the first being the ability to add external HTML content into your Silverlight application. Silverlight 4’s WebBrowser control allows client-side aggregation of external web content such as market data, calendars, news and technical analysis. AJAX and Adobe Flex content such as charting applications can be easily lifted into a Silverlight app.  Interestingly, duplex interoperability between guest web pages and Silverlight is feasible, as Silverlight can invoke JavaScript methods and receive notification back from the page. A potential (yet unproven) benefit of this feature is to aid the transition period from your legacy RIA application into Silverlight, as an intermediate/hybrid approach is facilitated.</p>
<p>Unfortunately restrictions almost cripple this approach; the browser stack security model prevents cross-domain calls, so the WebBrowser control is limited to Out-Of-the-Browser (OOB) Silverlight deployments. If you attempt to place the control in a browser-based Silverlight instance you get a not-very-useful big blank white box. Just to navigate to a web site, the Silverlight package (XAP) must be signed by a certificate authority (XAPs with elevated trust is a new feature) otherwise the client is subject to the cross-domain policy files of the respective sites.</p>
<h4>Persistence</h4>
<p>Local disk access within Silverlight 4 opens up a few possibilities for providing client access to saved documents or for saving data generated within Silverlight to your client’s local hard disk.  Disk access may be employed for any persistence of application settings or for your clients to save/load business logic such as client generated structures or derivatives. Similar restrictions also apply here, only IsolatedStorage (sandboxed space) is accessible in browser-based apps. Microsoft also felt the need to restrict signed OOB apps by writing only to the “My Documents”, “My Pictures”, and “My Music” directories. In general, this feature will probably not infringe on the traditional app-server / hibernate/ database deployments for persistence, but there is potential in this new feature for client log storage or large file manipulation.</p>
<h4>Low latency rendering</h4>
<p>Finally, pre-trade often involves streaming indicative prices from the banks pricing engine to the client’s browser instance. Although we are never likely to see real-time topic based pub/sub messaging capabilities within Silverlight’s default controls, GUI performance plays a critical role in ensuring low latency price consummation and rendering. Exploratory testing of streaming prices across the web to the client and rendering them within the DataGrid control indicates similar performance between Silverlight 3 and 4, however judgement should be postponed until the release version. I suspect Microsoft’s claim of ‘a 200% performance improvement’ is probably centred on Storyboard animations, procedural animations and perspective 3D transforms. Nevertheless, performance has been satisfactory for foreign exchange one click trading since Silverlight 2.</p>
<h2>Deal-Capture</h2>
<h4>Trade ticket stability</h4>
<p>To correctly capture RFQ trades, Silverlight must efficiently render quotes and validate form-based data submitted by clients. It is critical for ticket-based workflows that trade tickets operate in a deterministic, stable fashion. One of the most interesting additions to Silverlight 4 is the ‘commanding support’ enhancement, which makes it much easier to unit test applications with complex GUI interactions, resulting in a more stable application.</p>
<p>Without getting too bogged down with the technical details, ‘commanding support’ helps promote implementations using the Model-View-ViewModel (M-V-VM) pattern. M-V-VM extends the standard Model-View-Presenter pattern by featuring a ViewModel, an abstraction of the View which contains the View’s state and behaviour. The idea is that a View is just a rendering of a ViewModel, and Microsoft makes it very easy to keep a View in sync with a ViewModel via ‘Data Bindings’.</p>
<p>So what’s so good about adding this extra layer of abstraction? ViewModel classes are easy to unit test. First hook up your unit-testing framework to the ViewModel in place of the View, then change the Model. Your ViewModel consumer can test the outcome. There’s no need to add any extra binding as ViewModels update all ViewModel consumers, and no XAML needs to be parsed or initialised for your tests. The new ‘commanding support’ comes in for the other direction; your unit-testing framework issues a command emulating something like a button click, and your framework then tests that the input is fed correctly back into the Model.</p>
<p>Although the M-V-VM pattern probably suits WPF better than any other language &#8211; and having some code between the XAML View and the Model seems like a good idea &#8211; it’s good to see Microsoft promoting test friendly features for enterprise apps, especially when you consider the difficulties in MVC testing in alternative RIAs.</p>
<h4>Batch trading</h4>
<p>Often deal capture involves assigning pre-trading allocations and importing baskets and lists from external applications such as Excel. Often clients or sales traders open a spreadsheet, tweak the sizes, allocations or portfolio constituents, and then paste the batch directly into the deal capture UI. Silverlight 4 now includes true multi-platform clipboard support, replacing Silverlight 3’s IE-only approach that didn’t work OOB. Developers can customise how Silverlight parses and copies to the clipboard content using the <code>GetText()</code> and <code>SetText()</code> methods. If running Silverlight within a browser, a new prompt warns the user the first time the clipboard is read or set. In Silverlight 4 beta it is not possible for the user to disable these prompts for more than a single session.</p>
<h4>Field formatting</h4>
<p>Formatting RFQ trade ticket fields such as prices, sizes and settlement dates in real-time is an everyday requirement. Silverlight 4 adds the ability to specify standard or custom string formatting via XAML. Consider a trade ticket displaying the settlement date:</p>
<p><code>&lt;TextBox Text=”{Binding Path=SettlementDate, Mode=TwoWay, StringFormat=’MM-dd-yyyy’}”/&gt;<br />
</code></p>
<p>Defining the formatting rule within the XAML view removes Silverlight 3’s dependency on boilerplate <code>IValueConverter</code> interface implementations.</p>
<h4>Input validation</h4>
<p>Validation of user submitted data is another key requirement, and this too is facilitated using the M-V-VM pattern without writing anything into the code-behind. Two interfaces, ‘<code>INotifyDataErrorInfo</code>’ and ‘<code>IDataErrorInfo</code>’ expose validation results into the user interface for both server-side [asynchronous] and custom client-side validation logic.</p>
<p><code>&lt;TextBox Text="{Binding SettlementDate, Mode=TwoWay, NotifyOnValidationError=True}" ... /&gt;<br />
</code></p>
<p>Here the View Model receives client settlement date instructions and can validate them against an internal or external calendar model. On validation failure, the UI is updated with a list of errors.</p>
<h2>Post-Trade</h2>
<h4>Straight Through Processing (STP)</h4>
<p>In order to achieve Straight Through Processing, end-to-end automation is required from all processes in the trading cycle between the buy- and sell-side institutions. Automated deal capture, order entry in the buy-side Order Management System (OMS), and settlement and reporting integration systems eliminates human error and speeds up the clearing and settling process. A very important but little emphasised change in Silverlight 4, is the addition of the WCF net.tcp protocol. The addition markedly boosts the client-side integration potential within the buy-side, allowing the client to establish duplex asynchronous TCP/IP communication with a local server.</p>
<p>Across RIA technologies, HTTP communication with the buy-side OMS is hampered by cross-domain policy issues and the necessity for a web facing application server stack. TCP communication offers superior throughput and no web infrastructure is required.</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RvbWFzei5qYW5jenVrLm9yZy8yMDA5LzExL3djZi1uZXR0Y3AtcHJvdG9jb2wtaW4tc2lsdmVybGlnaHQtNC5odG1s"><img class="alignnone size-full wp-image-2039" src="http://blog.caplin.com/wp-content/uploads/NetTcpAndHttpPollingDuplexThroughput13.png" alt="" width="559" height="318" /></a></p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RvbWFzei5qYW5jenVrLm9yZy8yMDA5LzExL3djZi1uZXR0Y3AtcHJvdG9jb2wtaW4tc2lsdmVybGlnaHQtNC5odG1s">Source:<em>“WCF net.tcp protocol in Silverlight 4&#8243; &#8211; Tomek on Software.</em></a></p>
<p>The potential for TCP communication of settlement and clearing information with buy-side internal systems is promising, yet again subject to rather crippling restrictions. Most ports such as (443 or 80) are blocked unless the application is signed, so clients may need to open firewall ports for the 4502-4534 range. It’s also not possible to write a FIX implementation (e.g. OpenFix .Net) directly into your Silverlight app, as Microsoft (being Microsoft) has bound all traffic to the WCF protocol and the Microsoft WCF server-stack (e.g. IIS). Another obvious omission is the lack of transport security (e.g. SSL), which is a big deal even just for internal traffic.</p>
<p>Further pre- and post-trade integration capabilities are provided by Silverlight 4’s newfound access to native Component Object Model (COM) components through COM Automation classes. This means Silverlight 4 OOB applications can interoperate with local Microsoft Office application instances in the same way as Visual Basic for Applications. Examples of use include integration of Spreadsheet pricing structures with the deal capture system, feeding spreadsheet pricing models with real-time data, illustrating payment schedules using Excel graphs and spreadsheets, exporting historical trade blotters into Excel, or auto-generating emails in Outlook. Automation also provides speech support to business applications should it be required for accessibility.</p>
<h4>Trade Confirmation Printing</h4>
<p>For single-dealer platforms where STP is employed, buy-side clients often require hard copies of trade confirmation. Silverlight hasn’t previously included printing support, and Silverlight 4 duly adds printing capabilities for XAML trees (either the full UI view or specific controls). The Silverlight implementation is rather rudimentary, sending the printer a single paged-sized bitmap. This approach incurs rather high memory usage and slow printing. Flex is still ahead of the game here with better quality vector printing, together with the ability to override the default printing behaviour of individual UI components.</p>
<h2>Building Applications with Silverlight 4</h2>
<p>Brushing all functional requirements to one side, banks need to build Single Dealer Platforms cheaply and fast. The ability of a development team to consistently deliver good quality business logic is the game played out across platforms like Barx and REDIPlus, and competition is stiff.</p>
<h4>Skills</h4>
<p>Leveraging existing skills to deliver Single Dealer Platforms means less training, hiring of RIA experts, ramp up periods and better quality releases at project inception. But Silverlight can’t tick this box just by sharing C# with the rest of .Net; alignment between WPF and Silverlight is paramount for Silverlight to be accessible to accessible to an average .Net / WPF developer. In the past it seems Microsoft has tried to deliberately diverge WPF (or ‘XBAP’ which is WPF running in a browser) and Silverlight. Some Silverlight 3 features, such as Deep Zoom, are not in WPF, and the XAML syntax differs between the two platforms.</p>
<p>Silverlight 4 begins to makes some small but important changes in the right direction. Enhancements such as DependencyObject binding and WPF XAML syntax convergence helps bridge the gap:</p>
<p><code>&lt;Button Content="Launch RFQ"/&gt;</code><br />
<em>Silverlight (all versions)</em></p>
<p><code>&lt;Button&gt;Launch RFQ&lt;/Button&gt;.</code><br />
<em>WPF &amp; Silverlight 4</em></p>
<p>As a distinct subset of WPF, Silverlight will never offer the capabilities of its parent, but it always leaves you wanting more. For example, imagine a client visualisation component representing an orderbook; a WPF solution might employ the SortedDictionary Class to sort depth rows by price. Silverlight however omits this class, forcing you to writing your own efficient implementation which is time intensive and bloats the XAP.</p>
<p>Such analysis is perhaps fastidious; given the availability of skills in ActionScript, Silverlight offers a distinct advantage over other RIA technologies.</p>
<h4>Development environment</h4>
<p>A good IDE assists UI implementation, runs pre-compile checks, links to documentation and examples, profiles, debugs, and helps test the client application. In the past Single Dealer Platform development has had mixed results with WYSIWYG HTML editors or tools like Adobe FlexBuilder – most machine generated code suffers from poor readability, performance or flexibility. Silverlight 4 is paired with Visual Studio 2010, older versions of which are generally received as the best IDE for RIA development.</p>
<p>Visual Studio 2010 includes a major reworking for Silverlight – the design surface is fully interactive, allowing controls to be dragged and dropped into place. The properties window configures controls without you touching the XAML or writing code. Importantly, XAML generated by the design surface is readable and flexible &#8211; controls are easily manipulated by editing the composite controls, and control templates are easily created out of other controls. The generated XAML lends itself to the M-V-VM architecture, and Data Binding between a XAML View and your ViewModel can be completed automatically using the Data Source Configuration wizard or drag-and-drop data binding.</p>
<p>The upgrade sees a good deal of enhancements to the XAML parser – XAML mistakes are more often detected pre-compile rather than run-time, and complete Intellisense is now provided making it faster to lookup UI control properties and classes (although this was a little slow in VS2010 beta).</p>
<p>The debugging capabilities of Visual Studio have long been class leading, but they have improved with the upgrade – debugging of Silverlight applications’ worker threads is simpler and easier, and Microsoft have added a historical debugger called ‘Intellitrace’. Profiling support is enhanced but was not assessed at the time of writing.</p>
<h4>Developing large Enterprise Applications</h4>
<p>Considerable effort is expended in designing Single Dealer Platforms in a modular manner. Modular development allows better collaboration of multiple development groups and helps reduce the scope of end-to-end testing.  If the client application is designed with a ‘plug-in’ architecture, modules can be downloaded on demand. Typical business use cases involve functionality packs such as ‘Fixed Income trading’ or ‘Foreign Exchange Options’ built on top of the underlying client framework.</p>
<p>A major addition in Silverlight 4 is the Managed Extensibility Framework (MEF). Instead of building your own dynamic classloader, and framework for building and testing modules separately, Silverlight 4 solves the problem out-of-the-box. Your Silverlight application does not need any plumbing code; to design a pluggable widget you simply declare what attributes each class imports or exports. Using MEF, you can split a monolithic XAP into multiple XAPs that reduce the general startup time of the application, allowing on demand loading only when a MEF package is required. An added benefit is that third-parties can take your MEF packages and extend them themselves.</p>
<h4>Deployment</h4>
<p>Most Single Dealer Portals now need to target IE6, IE7 and Firefox, and some less regulated end-users are using IE8, Safari or Chrome. Having to target multiple platforms reduces the ability to roll out new features to your client base and platform-specific testing adds a test burden.</p>
<p>Silverlight 4 provides support for IE, Firefox, Safari, Chrome and out-of-browser instances. At present there are few identified platform-specific issues with Silverlight 4. The most significant differences occur with Mac drag-and-drop file handling (e.g. when dragging a Mac desktop icon onto the Silverlight window).</p>
<p>Client onboarding of out-of-browser applications is aided by the Silverlight 4 silent installation tool, and installation of the Silverlight plugin can be invoked by group policy administration or by Windows update. The process of deploying or running a signed Silverlight application running with elevated trust is similar to running a standard application, with no client-side certificate required. Note that AJAX will always offer a distinct advantage with its zero-footprint deployment model; proliferation of the Silverlight plug-in is often cited as an impediment to client onboarding, and the recent succession of Silverlight runtime releases will not help.</p>
<p>Internationalisation is a key requirement for single-dealer platforms owned by the tier 1 banks and Silverlight 4 adds support for right-to-left languages such as Arabic and Hebrew. Other languages such as Bengali, Tamil and Devanagari are now officially supported.</p>
<p>Finally, deployment of Single Dealer Portals onto Smartphones such as the iPhone, Android and Blackberry often arise as business requirements.  Silverlight is now the application development platform for the Windows Phone 7 series, which means no code changes need to be made to get your Silverlight application working on a Windows Phone. Silverlight will power built-in and custom applications, and Visual Studio 2010 now includes an excellent phone development environment, complete with a Windows Phone emulator. Again the new design surface allows you to drag-and-drop controls onto the phone, resizing them and rapidly design compelling UIs.</p>
<p><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL2V4cHJlc3Mvcy9pbWcvVlNQX0hlbGxvV29ybGQucG5n"><img class="alignnone size-full wp-image-2045" src="http://blog.caplin.com/wp-content/uploads/VSP_HelloWorld.png" alt="" width="500" height="400" /></a><br />
<a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL2V4cHJlc3MvcGhvbmUv"><em>Windows Phone running Silverlight within Visual Studio 2010</em></a></p>
<h4>The Crunch</h4>
<p>Microsoft has delivered a surprisingly complete release, adding some new out-of-browser functionality and filling the gaps in Silverlight 3. Enhancements seem focused at the business application developer, and features like the Managed Extensibility Framework are rather nice for the capital markets. Visual Studio 2010 makes it easier than ever to design a compelling client offering; it even builds things for phones that haven’t been invented yet.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2028" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/04/19/silverlight-4-is-it-what-banks-want/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Interesting stuff coming out of MIX10</title>
		<link>http://blog.caplin.com/2010/03/17/interesting-stuff-coming-out-of-mix10/</link>
		<comments>http://blog.caplin.com/2010/03/17/interesting-stuff-coming-out-of-mix10/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 11:55:34 +0000</pubDate>
		<dc:creator>Patrick Myles</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=1780</guid>
		<description><![CDATA[Microsoft&#8217;s MIX10 Developers and Designers conference is currently running in Las Vegas. Sadly I&#8217;m not attending as it sounds like lots of fun&#8230; There has been lots of buzz and some really interesting bits coming out so far including Silverlight 4 RC, Internet Explorer 9 preview (with HTML5 and CSS3...]]></description>
			<content:encoded><![CDATA[<p>Microsoft&#8217;s <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xpdmUudmlzaXRtaXguY29tLw==" 0="target="_blank"">MIX10</a> Developers and Designers conference is currently running in Las Vegas. Sadly I&#8217;m not attending as it sounds like lots of fun&#8230;</p>
<p>There has been lots of buzz and some really interesting bits coming out so far including Silverlight 4 RC, Internet Explorer 9 preview (with HTML5 and CSS3 etc.), Windows phone information, etc.</p>
<p>Scott Hanselman has posted a <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5oYW5zZWxtYW4uY29tL2Jsb2cvTWl4MTBSb2xsdXBQb3N0LmFzcHg=" 0="target="_blank"">great roundup</a> of the announcements and keynotes.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1780" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/03/17/interesting-stuff-coming-out-of-mix10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The banking exodus from IE6 begins?</title>
		<link>http://blog.caplin.com/2010/03/02/the-banking-exodus-from-ie6-begins/</link>
		<comments>http://blog.caplin.com/2010/03/02/the-banking-exodus-from-ie6-begins/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:22:12 +0000</pubDate>
		<dc:creator>Patrick Myles</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Trading Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=1543</guid>
		<description><![CDATA[We&#8217;ve all seen the retail and consumer space push to ditch IE6 gathering pace over the last 6 months, including a petition to the UK government and Google&#8217;s announcement that their online productivity suite stopped supporting IE6 yesterday. But the corporates (and specifically banking)  have been a lot more reluctant...]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve all seen the retail and consumer space push to ditch IE6 gathering pace over the last 6 months, including a <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL25ld3MuYmJjLmNvLnVrLzEvaGkvdGVjaG5vbG9neS84NDkyODYyLnN0bQ==" 0="target="_blank"">petition to the UK government</a> and Google&#8217;s announcement that their online productivity suite <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL25ld3MuY25ldC5jb20vODMwMS0zMDY4NF8zLTEwNDQ0NTc0LTI2NS5odG1s" 0="target="_blank"">stopped supporting IE6 yesterday</a>. But the corporates (and specifically banking)  have been a lot more reluctant to follow suit. But is this about to change?</p>
<p>Rumour on the street has it that, finally, the investment banks are going to start abandoning IE6. Barclays are allegedly going to do an enterprise-wide rollout of IE8 in Q2 of this year (put back from Q3 last year). Even more surprising (and impressive) is a rumour that Standard Bank of South Africa are going to ditch Microsoft browsers completely and move to Chrome for their corporate standard!</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1543" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2010/03/02/the-banking-exodus-from-ie6-begins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Would anybody want StreamLink for Windows Mobile?</title>
		<link>http://blog.caplin.com/2009/12/30/would-anybody-want-streamlink-for-windows-mobile/</link>
		<comments>http://blog.caplin.com/2009/12/30/would-anybody-want-streamlink-for-windows-mobile/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 12:04:07 +0000</pubDate>
		<dc:creator>Phil Leggetter</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[StreamLink]]></category>
		<category><![CDATA[StreamLink.NET]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=929</guid>
		<description><![CDATA[After years of promise it really does look like mobile is the next big thing? But what mobile platform will prove to be the most popular? It seems to be a two horse race between iPhone and Android, with Windows Mobile lagging somewhere in the distance &#8211; or is it...]]></description>
			<content:encoded><![CDATA[<p>After years of promise it really does look like mobile is the next big thing? But what mobile platform will prove to be the most popular? It seems to be a two horse race between iPhone and Android, with Windows Mobile lagging somewhere in the distance &#8211; or is it already a non-runner? In any case it&#8217;s been <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aXJlZC5jb20vZ2FkZ2V0bGFiLzIwMDkvMTIvd2luZG93cy1tb2JpbGUtNy1kZWxheWVkLXVudGlsLWxhdGUtMjAxMC8=">delayed until late 2010</a>.</p>
<p><span id="more-929"></span></p>
<div id="attachment_931" class="wp-caption alignnone" style="width: 330px"><a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS93cC1jb250ZW50L3VwbG9hZHMvd2luZG93cy1tb2JpbGUtNy10aGVtZS1zbWFydHBob25lLmpwZw=="><img class="size-full wp-image-931" title="Windows Mobile 7" src="http://blog.caplin.com/wp-content/uploads/windows-mobile-7-theme-smartphone.jpg" alt="" width="320" height="240" /></a><p class="wp-caption-text">Windows Mobile 7</p></div>
<p>At work the concensus amongst the developers at Caplin seems to be that they like Android as a platform and there&#8217;s quite a bit of excitement about the <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aXJlZC5jb20vZ2FkZ2V0bGFiLzIwMDkvMTIvbmV3LWdvb2dsZS1uZXh1cy1vbmUtcGhvbmUtbGlrZWx5LXRvLWxhdW5jaC1qYW4tNS8=">Google Nexus One which will contain the Android 2.1 operating system</a>.</p>
<div class="wp-caption alignnone" style="width: 324px"><img class=" " title="Nexus Google One Phone" src="http://images.trustedreviews.com/images/article/inline/12461-12399image.jpg" alt="" width="314" height="263" /><p class="wp-caption-text">Nexus Google One Phone</p></div>
<p>Since I&#8217;ve been involved in most of the Microsoft product development here I&#8217;m interested to see if there is any chance of Windows Mobile doing anything. I&#8217;m excited about the inclusion of <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53bWV4cGVydHMuY29tL3NpbHZlcmxpZ2h0LW1vYmlsZS1ydW1vcmVkLXdpbmRvd3MtbW9iaWxlLTY1">Silverlight in Windows Mobile 7</a>, as I <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuY2FwbGluLmNvbS8yMDA5LzA4LzA0L3N0cmVhbWxpbmstZm9yLXNpbHZlcmxpZ2h0LWZvci1tb2JpbGUv">blogged about</a> some time back, and have just read a small piece that indicates Microsoft are keen to take gaming mobile with <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5ldGlvbGUuY29tLzIwMDkvMTIvd2luZG93cy1tb2JpbGUteGJveC1saXZlLWdhbWluZy1wbGF0Zm9ybS1mb3Itd2luZG93cy1tb2JpbGUv">XBox 360 integration</a>.</p>
<p><!--more--></p>
<p>A while back, just after we&#8217;d ported StreamLink.NET to the Silverlight runtime, I took an R&amp;D day to try to port StreamLink.NET to Windows Mobile. I made good progress but left things in a non-compiling state. More recently I had another opportunity to take a day to try and finish the work off. The codebase had moved slightly so I had to do a little more work that I&#8217;d planned and now I&#8217;m left with a single compilation error based around the .NET Compact Framework not having the <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L3N5c3RlbS50aHJlYWRpbmcud2FpdGhhbmRsZS53YWl0YW55LmFzcHg=">WaitHandle.WaitAny</a> method. To resolve this I&#8217;m going to have to <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2N1cmlvdXNtaW5kcy53b3JkcHJlc3MuY29tLzIwMDYvMTEvMjAvd2FpdGluZy1mb3Itd2FpdGFueS8=">go native</a> or we may have to consider purchasing the fantastic <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5vcGVubmV0Y2YuY29tL1Byb2R1Y3RzL1NtYXJ0RGV2aWNlRnJhbWV3b3JrL3RhYmlkLzY1L0RlZmF1bHQuYXNweA==">Smart Device Framework</a>.</p>
<p>If Windows Mobile 7 supports Silverlight then maybe you could argue that my time spent porting StreamLink.NET to Windows Mobile has been wasted? Or, maybe you would argue that any time spent developing for the Windows Mobile platform is a waste of time? Personally, I like Windows Mobile as a platform, I have a Windows Mobile phone and I think the Windows Mobile development experience in Visual Studio is second to none. For these reasons, and because competition can lead to improved products, I hope Windows Mobile 7 makes a challenge in the final furlongs of the mobile platform race.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=929" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2009/12/30/would-anybody-want-streamlink-for-windows-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting realtime data into Excel</title>
		<link>http://blog.caplin.com/2009/06/30/getting-realtime-data-into-excel/</link>
		<comments>http://blog.caplin.com/2009/06/30/getting-realtime-data-into-excel/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 17:00:54 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Real-time web]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[RTD]]></category>
		<category><![CDATA[StreamLink]]></category>
		<category><![CDATA[StreamLink.NET]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://blog.caplin.com/?p=261</guid>
		<description><![CDATA[Starting with Excel 2002, Microsoft have included the RTD interface which allows Excel to poll for data. Polling seems to be a much more efficient way of getting data into Excel than the classic approach which is pushing &#8211; it&#8217;s not uncommon to find yourself pushing when Excel isn&#8217;t ready...]]></description>
			<content:encoded><![CDATA[<p>Starting with Excel 2002, Microsoft have included the <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L21pY3Jvc29mdC5vZmZpY2UuaW50ZXJvcC5leGNlbC5ydGQob2ZmaWNlLjExKS5hc3B4">RTD interface</a> which allows Excel to poll for data. Polling seems to be a much more efficient way of getting data into Excel than the classic approach which is pushing &#8211; it&#8217;s not uncommon to find yourself pushing when Excel isn&#8217;t ready which results in lockups, inconstitencies and other undesirable effects.</p>
<p>The RTD interface is small (6 methods) and Kenny Kerr has a great series of articles about RTD on his <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2h0dHA6Ly93ZWJsb2dzLmFzcC5uZXQva2VubnlrZXJyL2FyY2hpdmUvMjAwOC8xMS8xMy9SdGQzLmFzcHg=">blog</a> so I won&#8217;t repeat that information here and instead concentrate on integration to StreamLink.NET and pulling in real time data from a Caplin platform deployment.</p>
<p>The following walkthrough is a short example of how to do this, there&#8217;s no error checking, logging and certainly the example is nowhere near production quality, however it does demonstrate that linking up Excel and data from the Liberator is straightforward.</p>
<p><span id="more-261"></span></p>
<p><strong>ServerStart</strong> is the entry point and in here we can instantiate StreamLink.NET and setup a map between the RTD topic ids and the Subject/Field information.</p>
<pre name="code" class="c#">    public int ServerStart(IRTDUpdateEvent callback)
    {
        sl = new StreamLinkInterop();
        m_callback = callback;
        m_timer = new Timer();
        m_timer.Tick += new EventHandler(TimerEventHandler);
        m_timer.Interval = 1000;
        m_topics = new Dictionary&lt;int, KeyValuePair&lt;string,string&gt;&gt;();
        return 1;
    }</pre>
<p>The <strong>ConnectData</strong> method validates the arguments passed through and then attempts to subscribe to the data:</p>
<pre name="code" class="c#">public object ConnectData(int topicId,
                              ref Array strings,
                              ref bool newValues)
    {
        if (2 != strings.Length)
        {
            return "Subject and field is required";
        }

        string subject = strings.GetValue(0).ToString();
        string field = strings.GetValue(1).ToString();

        m_topics[topicId] = new KeyValuePair(subject, field);
        m_timer.Start();
        sl.Subscribe(subject, field);
        return "NO_DATA_YET";
    }</pre>
<p>And <strong>DisconnectData</strong> will unsubscribe:</p>
<pre  name="code" class="c#" >    public void DisconnectData(int topicId)
    {
        KeyValuePair pair = m_topics[topicId];

        sl.Unsubscribe(pair.Key, pair.Value);
        m_topics.Remove(topicId);
    }</pre>
<p><strong>RefreshData</strong> will retrieve the current image for the subscribed data:</p>
<pre name="code" class="c#">    public Array RefreshData(ref int topicCount)
    {
        object[,] data = new object[2, m_topics.Count];

        int index = 0;

        foreach (int topicId in m_topics.Keys)
        {
            data[0, index] = topicId;
            KeyValuePair pair = m_topics[topicId];
            data[1, index] = sl.GetData(pair.Key, pair.Value);

            ++index;
        }

        topicCount = m_topics.Count;

        m_timer.Start();
        return data;
    }</pre>
<p>Because Excel polls for the data we&#8217;ve got to have a cache within our RTD server so that data is available when Excel calls in, for the purposes of this exercise we&#8217;re only considering Record data without market depth or history so our cache can be really simple:</p>
<pre name="code"  class="c#">    public class RecordType1Cache
    {
        Dictionary fieldMap = new Dictionary();

        public RecordType1Cache()
        {
        }

        public void Update(IRecordEvent evt)
        {
            foreach ( IField field in evt.Fields.Values )
            {
                fieldMap[field.Name] = field.Value;
            }
        }

        public string GetFieldValue(string fieldName)
        {
            if (fieldMap.ContainsKey(fieldName))
            {
                return fieldMap[fieldName];
            }
            return "NO_FIELD_AVAILABLE";
        }
    }</pre>
<p>The only missing part is the <strong>StreamLinkInterop</strong> class which integrates with StreamLink, this needs to implement the public methods we saw earlier: <strong>Subscribe</strong>, <strong>Unsubscribe</strong> and <strong>GetData</strong> as well as the <strong>IRecordSubscriptionListener</strong> interface from StreamLink.NET since we want to receive record updates. When an update is received we put it into our cache and return immediately.</p>
<p>There&#8217;s a couple of maps which allows finding the <strong>RecordType1Cache</strong> object from both the StreamLink side (using the <strong>IRecordSubscription</strong> as the key) and from the RTD side (using a subscription name as the key).</p>
<p>The connection to the server is setup in the constructor for code simplification purposes. The servername is hard coded so you&#8217;ll probably need to change it or find a way to configure it if you use this code as a base for your own project.</p>
<pre name="code" class="c#">    public class StreamLinkInterop : IRecordSubscriptionListener
   {
        StreamLink myStreamLink;
        Dictionary cache = new Dictionary();
        Dictionary subscriptionLookup = new Dictionary();

        public StreamLinkInterop()
        {
            IStreamLinkConfiguration config = SimpleConfiguration.CreateType2Connection("liberator", 8080);
            myStreamLink = new StreamLink(config);
            myStreamLink.CredentialsProvider = new PasswordCredentialsProvider("admin", "admin");
            myStreamLink.StreamLinkProvider.Connect();
        }

        public void Terminate()
        {
            myStreamLink.StreamLinkProvider.Disconnect();
        }

        public void Subscribe(string subject, string field)
        {
            string name = subject + ";" + field;

            IRecordSubscriptionParameters rparams = myStreamLink.StreamLinkProvider.ParametersFactory.CreateRecordSubscriptionParameters(new string[] { field } );
            ISubscription sub = myStreamLink.StreamLinkProvider.CreateRecordSubscription(this, subject , rparams);

            cache[sub] = new RecordType1Cache();
            subscriptionLookup[name] = sub;
            sub.Subscribe();
        }

        public void Unsubscribe(string subject, string field)
        {
            string name = subject + ";" + field;

            if (subscriptionLookup.ContainsKey(name))
            {
                ISubscription sub = subscriptionLookup[name];
                sub.Unsubscribe();
                cache.Remove(sub);
                subscriptionLookup.Remove(name);
            }
        }
       public string GetData(string subject, string field)
        {
            string name = subject + ";" + field;
            if (subscriptionLookup.ContainsKey(name))
            {
                ISubscription sub = subscriptionLookup[name];
                return cache[sub].GetFieldValue(field);
            }
            return "UNKNOWN+SUBJECT";
        }

        #region IRecordSubscriptionListener Members

        public void RecordType2Updated(Caplin.StreamLink.Subscription.ISubscription subscription, IRecordType2Event ev)
        {
        }

        public void RecordType3Updated(Caplin.StreamLink.Subscription.ISubscription subscription, IRecordType3Event ev)
        {
        }

        public void RecordUpdated(Caplin.StreamLink.Subscription.ISubscription subscription, IRecordEvent ev)
        {
            if (cache.ContainsKey(subscription))
            {
                cache[subscription].Update(ev);
            }
        }

        #endregion

        #region ISubscriptionListener Members

        public void SubscriptionErrorReceived(Caplin.StreamLink.Subscription.ISubscription subscription, Caplin.StreamLink.Subscription.ISubscriptionErrorEvent ev)
        {
        }

        public void SubscriptionStatusUpdated(Caplin.StreamLink.Subscription.ISubscription subscription, Caplin.StreamLink.Subscription.ISubscriptionStatusEvent ev)
        {
        }

        #endregion
    }</pre>
<p>To pull data into excel into excel use a formula along the following lines: <code>=RTD("com.caplin.excel",,"/I/MSFT.O", "BID")</code>. The data in the cell will update periodically (by default every 2000ms). This period can be changed using either a registry setting or using VBA, details can be found at <a  href="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L2FhMTQwMDYwKG9mZmljZS4xMCkuYXNweCNvZGNfeGxydGRmYXFfaG93Y29uZmlncnRkdGhyb3R0bGU=">MSDN</a>.</p>
 <img src="http://blog.caplin.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=261" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.caplin.com/2009/06/30/getting-realtime-data-into-excel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

