WPFfor d

rumbu rumbu at rumbu.ro
Wed Feb 20 14:09:07 PST 2013


On Wednesday, 20 February 2013 at 21:03:31 UTC, Jacob Carlborg 
wrote:
> On 2013-02-20 21:01, Adam Wilson wrote:
>
>> More to the point, very few approach it with the idea of 
>> splitting the
>> View (style) from the Model(implementation). When you do that, 
>> you can
>> do some very cool things with a reasonable amount of work.
>
> Cocoa does that on Mac OS X. SWT does that together with JFace.

I studied these days some existing declarative alternatives to 
xaml (qml and yaml) and unfortunatelly they are far far far away 
from WPF. There is some thin support for data binding, but there 
is nothing like animations, triggers, templates, behaviours, 
typography, effects, validation and so on.

If someone will dare sometime to such endeavor to port something 
like WPF for D, I reitrate my opinion that D will need some kind 
of runtime reflection, at least for design time support. Parsing 
tens of thousands of lines of code (if available) just to query 
the properties available for an object is not such a good idea.

Another approach found in the native world is the one used by 
Delphi/FreePascal, but this will need to rethink the lib 
structure and will introduce a new language protection attribute. 
Delphi/Lazarus uses a new level of protection ("published") to 
decorate a object property available at runtime. Published 
properties are stored in the lib file (dcu file in Pascal) with 
type information. These kind of properties allow access to object 
internal structure for IDE form designers. Of course, a simple 
compiler switch will strip runtime information from the release 
version of the target executable.




More information about the Digitalmars-d mailing list