WPF, uncompiled XAML and scripting?
-
I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.
-
I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.
-
I don't think I quite understand your problem correctly. If each page needs to be written in a scripting language, why use xaml in the first place? You could consider using JQuery + Html5.
it needs to be a standard desktop app (.exe that is, no browser). Unfortunately I can't change this choice of design.
-
I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.
Get another job/course whoever set the constraints does not live in the real world.
Never underestimate the power of human stupidity RAH
-
Get another job/course whoever set the constraints does not live in the real world.
Never underestimate the power of human stupidity RAH
Yup, I tried to convince the people in charge to switch to another architecture but they insist it's a winning model because they are using it since the MS-DOS age. Currently the application runs under WinForms, it has a proprietary script language, proprietary virtual machine, proprietary component library, proprietary editor with syntax highlighting and proprietary "form" editor. But due to WinForms and limited component library the app isn'tt graphically attractive, so that's why a move to WPF was planned. And while we are moving, I would like to eliminate the virtual machine and embrace full .NET languages (via CodeDom/Reflection). But I'm not sure it's the right choice.
-
I have to write a desktop business application with the required constraint that each function (page) of the app must be completely written in a scripted language. So my idea is to use uncompiled XAML for scripting the user interface in WPF, and CodeDOM+CSharpCompiler for the code behind, thus making C# a sort of scripted language. I know the WPF navigation model can't be used in uncompiled XAML so I'll have to write a Custom navigation implementation. My question is: is the above architecture a good choice (considering the constraint I am subject to)? Or it's just too crazy? Has any of you ever written something similar? Any suggestion will be greatly appreciated.
If you have a PHB insisting on this lunacy then you might check out this article, C# Script: The Missing Puzzle Piece[^] Maybe some help.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
-
If you have a PHB insisting on this lunacy then you might check out this article, C# Script: The Missing Puzzle Piece[^] Maybe some help.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
Thank you, it's more or less what I am trying to do, so it's going to be helpful. The only difference is that the result of my scripted "programs" would be web-like pages to be loaded in a navigational host application. Unfortunately it seems that the native WPF Navigation/Page model can't be used with uncompiled XAML.