Showing posts with label ENAMEL. Show all posts
Showing posts with label ENAMEL. Show all posts

Tuesday, May 27, 2025

ENAMEL RFC Revision 1

I've just released the first update to the RFC for the ENAMEL language.

This is only the first of several expected revisions and adds a few new options and clarifications.

Changes in this revision:

  • Trailing semicolon is optional with inline C# (clarification)
  • Nested loops are supported (clarification)
  • Nested AUTOGRIDs are not supported (clarification)
  • Add the ExpandGridDefinitions setting
  • Add the SET keyword


As before, I appreciate any feedback on these changes or anything related.

Additionally, as I continue to explore these ideas and gain feedback from others, it's looking more and more likely that I will eventually release some tooling to support this language. I'd love your thoughts on this (including if you want to be an early tester) at https://forms.gle/DXVP8fjfyics74Sj6

Wednesday, May 07, 2025

ENAMEL: More than a DSL for writing XAML

A few weeks ago, I first shared my idea for an alternative to writing XAML. However, I just realised I haven't posted about it here. So, I've included the TLDR below. 

It might be tempting to think about it as simply a way to write XAML, but I think of it as more.
I think it's a way of documenting what you want from the UI in a way that encourages you to think about the markup as any other code file.

The idea came from ideas about how to address some of the common criticisms of XAML. There are ways to write XAML that address many of those issues, but the restrictions of the language mean that it's only possible to go so far. ENAMEL is an idea about what could be done without the historical baggage of XAML and without needing to change any of the tooling or existing code bases for languages that use XAML.

I'm still exploring ideas about what ENAMEL could be.

I'm also working on formalising my ideas and guidance for writing better XAML. Stay tuned for more details.

In the meantime:


ENAMEL - An RFC for possible future XAML-based development

A new, simplified markup language to define application UI. The new files automatically generate comparable XAML files for your WPF, .NET MAUI, or WinUI app, which are then compiled as normal. Fully configurable, totally optional (use it for some or all XAML files) and low risk as the XAML (and C#) files are still available.

It addresses the common complaints about having to work with XAML and adds new functionality without the need to change any of the existing tooling.

How much less verbose is it?

Well, this is the XAML for an Empty page in a .NET MAUI app.

<?xml version="1.0" encoding="utf-8" ?>

<ContentPage

    x:Class="NewMauiApp.MainPage"

    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

</ContentPage>


And this is the exact same thing in ENAMEL.

ContentPage

Yes, just a single word is needed!


There are more examples comparing XAML and ENAMEL.


ENAMEL: Simple, human-readable, and easily maintainable UI markup.


Learn more at https://github.com/mrlacey/enamel 

I also have a few amendments and extensions to the original process that are coming soon.