Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 28716

“Write once, use everywhere” paradigms

$
0
0

“Write once, use everywhere” (WOUE) is a derivative of the "Write once, run anywhere" (WORA)  slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language [http://en.wikipedia.org/wiki/Write_once,_run_anywhere]. Even though the use of java is on the decline, it’s still a useful paradigm to adhere to when developing software in Windows Presentation Foundation (WPF) and in this article I hope to expand more on how it could be used to create efficient, cost effective and reusable solutions for Dynamics AX.

 

After a couple of decades of dealing with ever changing client requirements, you get a little tired of maintaining disparate solutions each running on platforms and devices that change with subtle nuances between each release. You want an easy life and you want to develop and maintain something in one place and for it to work everywhere!

 

This is where WPF can help in achieving our “Utopian” goal. If your solution is “written-and-designed” well and “operates agnostic to its environment”… then there’s no reason why your WPF UserControl can’t be implemented in all of the clients within the Microsoft Dynamics ERP™ solution suite...

 

·         Within the Dynamics windows-rich-client (using the new managed host control).

·         Within Microsoft Office applications (Excel spreadsheets, Word documents or Outlook).

·         Within a Xaml Browser Application (XBAP solution) published to a Sharepoint server and served as a configurable webpart within Enterprise Portal.

·         Within a Silverlight application running on a Mac or Windows phone. 

 

Note: Silverlight won’t allow a WPF UserControl to be “seamlessly” imported and rehosted from anything outside Silverlight (you’ll need to manually copy and paste the Xaml and C# code).

 

 

It’s worth making a small mention about Silverlight at this point. Silverlight only runs a cut down version of the .Net framework. Unfortunately, this excludes it from the full feature set available in .Net but there are good reasons for this because the intended use for Silverlight is different to the client application areas mentioned above. Silverlight is designed for feature rich internet (or hand-held device) deployment and any function that would compromise security on those platforms is locked down (e.g. operating system access).

 

·         There are also individual security considerations for the all of the client application areas mentioned above. These will be discussed in further detail in forthcoming articles.

 

If we look at the simple “note-taking” application that I’ve been presenting thus far, there’s no reason why it couldn’t be rehosted in all of the client-applications listed above. Some work needs to be done to contextualise it and make it operate agnostic to its parent, but once that’s done then we have the same “unit-of-business-functionality” operating in multiple clients.

 

·         Enforcing consistent look and feel across the solution suite and centralising business logic is the corner-stone of development in Dynamics.

 

If the business logic for our application changed and we needed to add additional functionality (e.g. an “author” field) then there is no getting round the fact that redevelopment and redeployment is required, however, the change only needs to take place in one source code set and requires only one skillset and not several (as is the current case).

 

·         To (visually) illustrate this principle, in the next article I will present a technical screencast on how to deploy the same WPF UserControl to 2 disparate clients (the Dynamics windows-Rich-Client& Microsoft Excel Client). I will then make a single UI change to the UserControl and you will see the new business functionality propagate to all the platforms.

 

WPF is by no means straightforward to learn and many have described it as a bit of a “timesink”. There is a steep learning curve for anyone transitioning from X++ development, but the advantages are huge for ISV’s that are hoping to create generic modularised solutions that span across multiple applications, platforms and devices.

 

The following website is a good resource to get yourself started: [http://www.wpftutorial.net/Home.html]

 

REGARDS

 


Viewing all articles
Browse latest Browse all 28716

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>