User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Ammy integration (C#)

26 Jan 2017, 16:15

Hi guys,

Together with Ammy developer we bring Ammy support for NoesisGUI:

https://github.com/aienabled/NoesisGUI.AmmyIntegration

Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Ammy integration (C#)

26 Jan 2017, 17:20

We were talking about Ammy just a few days ago.
The idea is very similar to using SASS to generate CSS files, and I think it's great.

Thanks for sharing this work ;)
 
DragonSpark
Posts: 10
Joined: 19 Sep 2015, 23:54

Re: Ammy integration (C#)

26 Jan 2017, 18:45

Ammy... so hot right now.
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Ammy integration (C#)

26 Jan 2017, 18:49

Yes, it has pretty nice mixin and alias features similar to SASS, but from my opinion this is not that important and perhaps should be used only per-document to handle some simple repetitive cases when using WPF styles is overkill or simply too hard for such a small thing.

Ammy resolves several issues bothering XAML/WPF developers for all these years:

1. Having a lot of xmlns declarations (sometimes up to 15 namespaces per XAML document), some of which are simple boilerplate WPF XAML declarations. In case of our game, we expect modders to mod UI and make their own UI as well - so we will need to explain them all that stuff. Ammy simply need much less explanation and a modder could do a pretty good job right after reading the tutorial for a few minutes!

2. Declaring nested properties in XAML is nightmare when you need to repeat the type name again and again. Something like this is very common in our code:
<SomeLongControlName ...>
   <SomeLongControlName.Resources>...
   </SomeLongControlName.Resources>
   <SomeLongControlName.Template>...
   </SomeLongControlName.Template>
</SomeLongControlName>
You know where it leads. In case of Ammy we can simplify this to:
SomeLongControlName {
   Resources: [ ... ]
   Template: { ... }
}
3. Data binding is also much simpler in Ammy:
Grid {
   TextBlock { Text: bind Title } 
}
but still completely configurable (and stays pretty clean even with including converters, parameters, etc) read more http://www.ammyui.com/documentation/syntax/#binding

4. There is also a new great feature - binding converters. So when you need a converter you don't need to write a special class and reference it in the markup - you declare it directly in ammy file and Ammy will auto-generate it for you, it's very compact and efficient!
Grid 
{
    TextBlock 
    { 
        Text: bind ShouldBeVisible
              convert (bool visible) => visible ? Visibility.Visible : Visibility.Hidden
    }
}
Read more http://www.ammyui.com/2017/01/22/introd ... onverters/ I need to mention this is not supported in NoesisGUI.AmmyIntegration yet.

Also there is a great blog post from honored WPF MVP (2006-2013) Paul Stovell discussing XAML evolution... or rather, lack of it - and it's the same even today (ok, MS have introduced new Bind operator for UWP, but XAML is still ugly).

We still not switched to Ammy for our game UI markup as there are a lot of things to consider and we need to be very sure it will work fine not only for modders, but for us as well. Also we need to have a good converter as we already have a lot of ready controls, styles and templates - but the developer is very responsive and promised us to implement a proper converter (the work is already started) and also fix some tooling issues, such as lack of reformat and refactoring features, provide better IntelliSense support.
However, it seems Blend support will be never implemented. And Ammy Designer preview (similar to XAML Designer in VS) is also might take much more development time if it will be implemented at all.

Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
DragonSpark
Posts: 10
Joined: 19 Sep 2015, 23:54

Re: Ammy integration (C#)

26 Jan 2017, 19:13

UWP is terrible and an embarrassment. It's as if no one knows what they are doing there, nor do they care.

In any case, Noesis has taken the lead now. It will be interesting to see how evolves, indeed.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Ammy integration (C#)

28 Jan 2017, 00:20

Thanks @ai_enabled, this is truly amazing!

There is a new feature that is coming in 1.3 (not sure if 1.3.0 though) that you guys also helped us to push and it is very related to Ammy. We plan to support hot reloading of XAMLs, textures and fonts by providing a event in each resource provider. So, basically the provider (the class in charge or returning Streams to Noesis whenever a resource is needed) will expose an event that the client code must invoke and after that we will do the magic.

Having a full XAML editor out of Blend is something we evaluated in the past but that's such a complex task that for now we avoided it. Probably we will revisit it at NoesisGUI v2.0, meanwhile if would be really cool having completion syntax in Sublime Text or VSCode. Do you know how did the Ammy author implemented intellisense support?
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Ammy integration (C#)

30 Jan 2017, 11:32

@jsantos, thanks for your hard effort on supporting live reloading of any asset type!

Regarding the Intellisense - the Ammy developer used VS API for implementing VS 2013/2015/15 plugins, but I don't know about the details. He doesn't support VS Code or any other editor/IDE except full VS.
There is a link for VS Code language extension API (needed for auto-complete feature) https://code.visualstudio.com/docs/exte ... age-server
Perhaps you will similar manual for Sublime.

Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Ammy integration (C#)

01 Feb 2017, 19:22

Thanks! Yes, I read the manual about Sublime long time ago. There aren't enough hours in the day for making everything we have in mind. : )
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Ammy integration (C#)

07 Apr 2017, 06:29

Great news! Ammy is permanently free for everyone now.
http://www.ammyui.com/2017/04/05/ammy-i ... om-now-on/
The developer said it most likely will become open-source. The business model is moved to the premium support and "Ammy school".
Also there were a lot of improvements during past months.
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
Ziriax
Posts: 60
Joined: 10 Dec 2015, 17:59
Location: Belgium
Contact:

Re: Ammy integration (C#)

07 Apr 2017, 18:51

But obviously no Resharper support ;-) But a great initiative! XAML is indeed rather bulky.

Now in a really good designed language like Haskell, one never needs to invent another language, one just uses the main language to define DSLs. Mmm, Haskell bindings to NoesisGUI, that would be interesting ;-) Okay, mainly off topic!
Peter Verswyvelen,
Strongly Typed Solutions

Who is online

Users browsing this forum: No registered users and 1 guest