December 2003 - Posts
Roland Weigelt in a recent blog entry talks about having to spend too much time on producing relatively simple dialogs. In the past, I found myself thinking about this too, mainly because I wanted a dialog (GUI) alternative to providing arguments on the command line.
I thought of writing a simple dialog editor, but soon realized that essentially all the (script) dialogs I needed to produce looked the same - they have one or more controls and labels in a vertical format like the one below.
Having a single dynamic dialog class would enable me to use Alintex Script's automatic inheritance mechanism to consume and reuse such a dynamic dialog class across multiple scripts.
So I produced a DynamicDialog class (in C#) which allows the dialog above to be displayed with the following code (in this case in late bound VB.NET):-
dlg = new DynamicDialog(4)
Or with more useful text labels:-
dlg = new DynamicDialog("From", "Password", "To", "Message", "Confirm")
dlg.Title = "Send Message"
Or even more useful perhaps...
dlg = new DynamicDialog("From", "Password", "To", "Message", "Confirm", "Type")
dlg.Title = "Send Message"
dlg.SetControl("Password", new PasswordControl)
dlg.SetControl("Message", new MemoControl)
dlg.SetControl("Confirm", new CheckControl)
dlg.SetControl("Type", new ComboControl("Comment", "Suggestion", "Other"))
You can retrieve the entered value of any control by “name” or index. In other words, both of the following lines produce the same result.
result = dlg(“Message“)
result = dlg(4)
You can set default values for controls in a similar way.
dlg("To") = "Alex Hoffman"
dlg("Confirm") = True
All controls in the DynamicDialog implement a custom IDynamicControl interface which abstracts the “result” from different control types. This provides an extensible method of adding new controls. Tooltips are also supported.
Users of Alintex Script can view the public interface by right clicking on the “dynamicDialog.cs” file in Windows Explorer, right-clicking, and choosing “Display Public Script Interface”
An example script which uses (and includes) dynamicDialog.cs can be downloaded here.
Once unzipped, you can simply double click on the file (testDialog.psf) to execute the script, or type axwscript testdialog.psf on the command line. Information on PSF script files is available here.
Feel free to use or adapt the dynamicDialog.cs code to your needs.
For those involved in MS Business Solutions, or those just wondering about the difference between two of Microsoft's important business solution products - Axapta and Navision, the following (annotated) post by Gerrit Combrink and Rene on the Microsoft.Public.Axapta newsgroup might be helpful:-
The focus areas of both products are around Manufacturing, Distribution and Services. The main differences are with functionality and technology.
(In Axapta, all this functionality is standard. There is no standard Services functionality in Navision. Such functionality needs to be built by ISVs.)
Axapta is aimed more towards the top end Mid market to corporate customers with complex requirements, while Navision looks after the lower to middle mid market segment with less complex requirements.
(Lower meaning: about 10 concurrent users. Above 20 users: Axapta)
Technology within Axapta also allows it to be a much stronger, more stable, higher performing competitor in a 3-tier environment as this is built into the existing architecture. You can also run a lot more concurrent users on a Axapta system than on Navision.
(Axapta's AOS technology (Axapta Object Server) provides scalability. Axapta has been tested from 1 user up to 3500 concurrent users.)
Update: see also Business Solutions Roadmap 2004& MBS ERP Product Overview
The Longhorn command shell - MSH (Microsoft Shell)- was announced at the 2003 PDC.
This is a Longhorn technology currently in beta. Although the current beta is written against Whidbey assemblies, its likely (?) that the initial public release of MSH will only be as part of the commercial release of Longhorn.
MSH is a managed host application and class library that provides a new command based scripting environment and language. That language can be extended through the creation of new commands (Cmdlets), which are simply assemblies containing one or more classes decorated with a custom System.Attribute.Those assemblies placed in the MSH folder are auto-discovered through reflection on starting MSH.
Additionally, a number of Cmdlet Provider classes are provided which can be sub-classed in order to support the custom navigation or browsing of resources (e.g. file system, AD, registry etc.) in a consistent way.
The host application is merely an implementation of an interface exposed through the class library, meaning that you can create your own, or incorporate host type functionality within your application.
But by far, the most significant feature (IMHO) of MSH is the implementation of a structured object based pipeline. Currently, command line programs can receive (via std I/O) the output of another program. That mechanism uses the pipe (|) mechanism as shown in the line below:-
c:> dir | sort /r
The input received by the sort program is text and is unstructured. One can of course parse the text but that is relatively difficult and unreliable. MSH offers an object based pipline which means that a command can output (and another command can receive) rich (CLS Type based) objects.
This means that one can string together small, yet powerful, building-block-like commands such as the following:-
MSH C:\> get/process | where/object "handlecount -gt 400" | format/list
MSH C:\> get/process | where/object -Expression "processname -like *cs*"
Note here that the where/object command acts on the handlecount and processname properties of the output of the get/process command.
I'll try to write more about the structured object pipeline and how it works internally another time.
MSH is part of Microsoft's Dynamic Systems Initiative (DSI). See here for Q&A on DSI and here for some information on the System Definition Model (SDM).
A good summary of what's new in Microsoft CRM 1.2 can be found here.
Additionally, the CRM Outlook client is now written in managed code - C# (rather than JScript in 1.0) and is accordingly much faster.
S.B. Chatterjee mentions in his weblog that Crystal Reports (now v9) is included rather than SQL Server 2K Reporting Services. Probably not suprising given that the latter is still in beta. However, sources have said that the latter will be included in CRM 2.0.
Update: see this eWeek article for CRM 2.0 information
It's been a while since I last blogged, having been heads down on a number of projects - some interesting - some more mundane. All, nonetheless, offering lessons to be learnt.
The holidays provide an opportunity to catch up on (tons of) reading and a bit of blogging.
Since I last wrote:-
1. The 2003 PDC has come and gone.
Although, one could be excused for thinking that Longhorn was actually released at the PDC, knowing the future direction on a range of technologies can help strategically today. I found that information provided on general architecture, Indigo/BizTalk/WSE/InfoPath, Whidbey, DSI (Dynamic Systems Initiative), SDM (System Definition Model), and the Longhorn Command Shell (MSH - codename Monad) - impact on work I'm currently doing.
2. A new version of the software that powers this weblog - .Text has been released.
Great to see easy to consume support for category feeds, and I'm happy that there are separate feeds for MS and non-MS bloggers. While both groups are important to me, I like the non-MS blogger perspective, and rely on them to let me know about important and useful topics from the MS group.
4. Alintex Script .NET recorded its 15,000th download.
5. In Australia, rumors of Prime Minister John Howard being “recalled“ were found to be false. But not before both Kylie Minogue and the crocodile (from Crocodile Dundee VII) had reportedly agreed to contest the election.
“I think Sun doesn't really understand what a software company does.“
Steve Mills, senior VP and group executive IBM Software Group
(IBM Software Group - $13 billion in enterprise software revenues last year)