TypeScript XAML framework [closed]
Asked Answered
T

4

9

As a .NET/XAML developer I am wondering if anybody has started to write a framework which will replace Silverlight and Flex using technologies like TypeScript and XAML to produce HTML5, JavaScript and CSS cross platform desktop apps or RIA's.

If not, wouldn't it be great to have a framework which understands XAML (or just XML) to define the user interface and JavaScript or better TypeScript to code the view controller?

I know, Sencha has done a great job building a JavaScript framework called EXT JS to build rich internet- or desktop applications, but from a .NET developer perspective EXT JS sucks.
A .NET developer likes to design the UI's using tools like Blend or Visual Studio with the ability to hack code in XAML and not in JSON.

There is also a good approach called Zebra which renders completely inside an html-canvas, but it isn't XAML based and there is no ability to use themes at all.

Also jQuery UI and jQuery Mobile are great frameworks from an HTML developer perspective, but I am looking for a XAML based framework, because you have to code less in XAML than in HTML. There is also the ability to use Blend to design the UI.

I have asked myself this question months ago when Adobe gave away Flex and Microsoft didn't admit to extend Silverlight 5 and I answered it with:
Microsoft or Adobe should do this for us.

But today I think now it is up to us.

Depending on your feedback I would like to start such a framework as an open source project, but I hope that there is still one on the way^^

Theda answered 31/12, 2012 at 3:8 Comment(0)
K
2

there is also rAppid:Js http://www.rappidjs.com which is XAML based, but it's not made to work with Visual Studio or Expression blend.

A XAML framework for HTML/JS is a fantastic idea, XAML files could be converted in HTML5 or perhaps in JavaScript directly by having an InitializeComponents() method where all objects are instantiated (like in WinForms).

If you decide to start a such project, consider using a C# to JavaScript compiler like Saltarelle or Script#.

Kinsella answered 3/1, 2013 at 13:16 Comment(3)
rAppid:Js looks nice to me. I will give it a try. Thanks I have evaluated Script# before. It's not that bad, but I thought that Nikhilk had stopped supporting it. Maybe somebody has build a Script# library for ExtJS meanwhile.Theda
There is Saltarelle which is meant to be a Script# replacement and is actively supported. I use it with jQuery+Knockout+Pager for all my new projetcs. What I miss is the ability to write XAML and have it translated someway in HTMLDOM and/or javascript. I am tempted to write a such tool myself, but it seems rather complicatedKinsella
My team has a custom javascript library which does exactly this - parses XAML and translates to HTML. It also supports two-way binding. It wasnt that terribly complex to write the parser.Rb
A
4

You don't really need XAML to write an HTML application as XAML is really just another kind of mark-up.

From your WPF/Silverlight experience, you will find that the following concepts were actually borrowed from HTML anyway:

  • XAML is mark-up for content, which is what HTML is
  • Resources are styles and behaviours, which is what CSS is

Some parts actually don't map directly, some of the triggers in your WPF program may be either CSS or JavaScript in a web application, for example. Also, in HTML attributes are used less than I have seen them used in WPF - normally all sizes and layouts are placed in CSS, not attributes in the mark-up.

You may not directly have a substitute for every available WPF control, but you will find that most things are possible.

Although there will be a learning curve involved in picking up HTML, CSS and JavaScript if you haven't used them extensively, they are useful tools in your tool-belt.

Alves answered 2/1, 2013 at 11:4 Comment(1)
I have experienced HTML for many years now, so I know what is possible and what is not. But in my opinion it would be much easier to code the stuff in XAMl, because you have to code less than you would have with HTML. Also the available tools for HTML are mostly web page centric. My aim is to create cross platform desktop and mobile apps. I am not willing to code an app entirely with XAML. Therefor you have got good tools like Blend or Visual Studio. So handwriting HTML isn't an option at all.Theda
T
4

Correct me if I am wrong, but I believe you are looking for http://fayde.wsick.com. I am in the midst of rebuilding the framework in Typescript. Check out my blog at http://faydeproject.blogspot.com/.

Tegantegmen answered 29/5, 2013 at 12:41 Comment(1)
URL changed to fayde.io?Slatternly
K
2

there is also rAppid:Js http://www.rappidjs.com which is XAML based, but it's not made to work with Visual Studio or Expression blend.

A XAML framework for HTML/JS is a fantastic idea, XAML files could be converted in HTML5 or perhaps in JavaScript directly by having an InitializeComponents() method where all objects are instantiated (like in WinForms).

If you decide to start a such project, consider using a C# to JavaScript compiler like Saltarelle or Script#.

Kinsella answered 3/1, 2013 at 13:16 Comment(3)
rAppid:Js looks nice to me. I will give it a try. Thanks I have evaluated Script# before. It's not that bad, but I thought that Nikhilk had stopped supporting it. Maybe somebody has build a Script# library for ExtJS meanwhile.Theda
There is Saltarelle which is meant to be a Script# replacement and is actively supported. I use it with jQuery+Knockout+Pager for all my new projetcs. What I miss is the ability to write XAML and have it translated someway in HTMLDOM and/or javascript. I am tempted to write a such tool myself, but it seems rather complicatedKinsella
My team has a custom javascript library which does exactly this - parses XAML and translates to HTML. It also supports two-way binding. It wasnt that terribly complex to write the parser.Rb
P
1

Search the Web for "M&P H5J is Silverlight in HTML5" it implements an XAML processor in TypeScript.

Polymerism answered 9/9, 2013 at 8:33 Comment(1)
See some images in hdolder.com/C30305.htmPolymerism

© 2022 - 2024 — McMap. All rights reserved.