-
- ai_enabled
- Posts: 232
- Joined:
- Contact:
Ammy integration (C#)
Hi guys,
Together with Ammy developer we bring Ammy support for NoesisGUI:
https://github.com/aienabled/NoesisGUI.AmmyIntegration
Regards!
Together with Ammy developer we bring Ammy support for NoesisGUI:
https://github.com/aienabled/NoesisGUI.AmmyIntegration
Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Ammy integration (C#)
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
The idea is very similar to using SASS to generate CSS files, and I think it's great.
Thanks for sharing this work
-
- ai_enabled
- Posts: 232
- Joined:
- Contact:
Re: Ammy integration (C#)
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:You know where it leads. In case of Ammy we can simplify this to:
3. Data binding is also much simpler in Ammy:
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!
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!
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:
Code: Select all
<SomeLongControlName ...>
<SomeLongControlName.Resources>...
</SomeLongControlName.Resources>
<SomeLongControlName.Template>...
</SomeLongControlName.Template>
</SomeLongControlName>Code: Select all
SomeLongControlName {
Resources: [ ... ]
Template: { ... }
}Code: Select all
Grid {
TextBlock { Text: bind Title }
}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!
Code: Select all
Grid
{
TextBlock
{
Text: bind ShouldBeVisible
convert (bool visible) => visible ? Visibility.Visible : Visibility.Hidden
}
}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:
Re: Ammy integration (C#)
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.
In any case, Noesis has taken the lead now. It will be interesting to see how evolves, indeed.
Re: Ammy integration (C#)
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?
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?
-
- ai_enabled
- Posts: 232
- Joined:
- Contact:
Re: Ammy integration (C#)
@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!
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
Re: Ammy integration (C#)
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. : )
-
- ai_enabled
- Posts: 232
- Joined:
- Contact:
Re: Ammy integration (C#)
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.
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
Re: Ammy integration (C#)
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!
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
Peter Verswyvelen,
Strongly Typed Solutions
Strongly Typed Solutions
Who is online
Users browsing this forum: No registered users and 5 guests