Waves Application Framework - I need feedback

52 views
Skip to first unread message

Ken Utting

unread,
Sep 28, 2017, 4:52:10 PM9/28/17
to amber-lang
A few weeks ago I loaded Amber up, started playing with it, and decided, you know what, I need an application framework! So I created one, well - a little one, called Waves. I've published a pre-release and would like to get your feedback on it.


Waves allows you to create your pages from html stored in text files, or from code that generates html strings or Silk objects. Waves allows for these and other forms of page content to be seamlessly mixed and matched to create the pages of your site.

Waves Views allows you to create html for standard page sections, like your header, menu bar and footer, just once, and re-use them on all your pages.

Waves also provides a router, so that your site URLs change as you move between the "pages" of your site, and so the URLs don't have to match up with actual physical files.

Waves Controllers provide data binding for your forms, simplifying the process of getting model data to and from the view. Data Binding is pluggable, so that arbitrarily complex scenarios are handled straightforwardly.

Waves is still in pre-release state, so its not ready to have sites built on it, but I'm looking to get some feedback from the community as early as possible. So far, the best demo of Waves is its own site, which contains some demo pages, and a To Do List tutorial.

The site is currently at https://waves-nelvbmhucw.now.sh, because it is free.


Herby Vojčík

unread,
Sep 30, 2017, 6:31:16 AM9/30/17
to amber...@googlegroups.com
Ken Utting wrote:
> A few weeks ago I loaded Amber up, started playing with it, and decided,
> you know what, I need an application framework! So I created one, well -
> a little one, called Waves. I've published a pre-release
> <https://waves-nelvbmhucw.now.sh> and would like to get your feedback on it.
>
>
> Waves allows you to create your pages from html stored in text files, or
> from code that generates html strings or Silk objects. Waves allows for
> these and other forms of page content to be seamlessly mixed and matched
> to create the pages of your site.

The original Silk article is in
http://blog.herby.sk/post/silk-is-just-too-flexible (Richard has a copy
from times where I was moving between platforms).

To reuse pieces of html, I created "snippets" once, for the legacy (Silk
wasn't created then) Web library, but no one used them, so I removed
them from the default loading, they are still available, though, if you
import amber/web/Web-Snippets. They allow you to create "virtual tags"
which include the whole template and let you insert at the specified
cursor point. Maybe I could make something similar for Silk (OTOH, it is
very easy to just add extension method there, so...).

> Waves Views allows you to create html for standard page sections, like
> your header, menu bar and footer, just once, and re-use them on all your
> pages.
>
> Waves also provides a router, so that your site URLs change as you move
> between the "pages" of your site, and so the URLs don't have to match up
> with actual physical files.

My stance is, as Amber easily reuses JS libs, you should just pick your
favourite router and use it, though I never really tried (there are
mini-routers out there, like IIRC leviroutes).

OTOH, having framework that has "batteries included" is also a plus,
especially for newcomers.

> Waves Controllers provide data binding for your forms, simplifying the
> process of getting model data to and from the view. Data Binding is
> pluggable, so that arbitrarily complex scenarios are handled
> straightforwardly.

See lolg.it/herby/trapped.git. Not updated to run with new Amber,
though. I had the impression two-way binding lost, and world embraced
unidirectional approach, as in React.

> Waves is still in pre-release state, so its not ready to have sites
> built on it, but I'm looking to get some feedback from the community as
> early as possible. So far, the best demo of Waves is its own site, which
> contains some demo pages, and a To Do List tutorial.

Frankly, I do not like the "string-based programming" very much, and the
examples do just that IIRC, ",'<tr><td>',something,'</td></tr>'". I find
this approach leads to frustration as it is buggy and, ..., well, ugly.
I favour not playing with HTML, but instead build and fill objects, IOW,
instead of putting open tags and close tags and content between them,
you should just have tags as a whole and fill them with content. The
original amber/web/Web does that, in Seaside-like manner. Silk is doing
that in mocha-like manner. Encouraging people to concatenate HTML
instead of working with objects is ... prone to frustration, IMO, even
when I am repeating myself already (there can be a way to inject full
HTML as a last-resort solution, but it should not be presented as the
default).

If you can, do not take this as discouragement, I am in fact happy
someone starts to use Amber at all; OTOH, if I am ask the question, I
answer with all the points I see worth it (as we do it here in Central
Europe), not the British "that is most lovely" way.

> The site is currently at https://waves-nelvbmhucw.now.sh, because it is
> free.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to amber-lang+...@googlegroups.com
> <mailto:amber-lang+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Herby Vojčík

unread,
Sep 30, 2017, 7:23:02 AM9/30/17
to amber...@googlegroups.com
Ken Utting wrote:
> A few weeks ago I loaded Amber up, started playing with it, and decided,
> you know what, I need an application framework! So I created one, well -
> a little one, called Waves. I've published a pre-release
> <https://waves-nelvbmhucw.now.sh> and would like to get your feedback on it.
>
>
> Waves allows you to create your pages from html stored in text files, or
> from code that generates html strings or Silk objects. Waves allows for
> these and other forms of page content to be seamlessly mixed and matched
> to create the pages of your site.
>
> Waves Views allows you to create html for standard page sections, like
> your header, menu bar and footer, just once, and re-use them on all your
> pages.
>
> Waves also provides a router, so that your site URLs change as you move
> between the "pages" of your site, and so the URLs don't have to match up
> with actual physical files.
>
> Waves Controllers provide data binding for your forms, simplifying the
> process of getting model data to and from the view. Data Binding is
> pluggable, so that arbitrarily complex scenarios are handled
> straightforwardly.
>
> Waves is still in pre-release state, so its not ready to have sites
> built on it, but I'm looking to get some feedback from the community as
> early as possible. So far, the best demo of Waves is its own site, which
> contains some demo pages, and a To Do List tutorial.

As for

Package
named: 'Todolist'
imports: {'amber-wavesdemo/Waves'. 'amber/jquery/Wrappers-JQuery'.
'amber/web/Web'. 'silk/Silk'}
transport: (AmdPackageTransport namespace: 'amber-todolist')

it maybe contains too much. The initial project is loaded with two
web-related libraries - the older 'amber/web/Web', based on Seaside
metaphor, as well as 'silk/Silk' based on mocha metaphor. There is also
'amber/jquery/Wrappers-JQuery' which is not strictly needed, unless you
want to use jQuery (amber/web/Web uses it, and has it as dependency,
silk/Silk does not, as it tries to be as lightweight as possible).

They were included both so that you can try which approach you favour
more and they remove the other (it should be shown in one of the initial
project pages, called parts.html or similarly). Maybe Waves should do
this decision as well (and if it uses Silk as the DOM-accessing
framework, it can remove amber/web/Web as well as amber/jquery/Wrappers').

> The site is currently at https://waves-nelvbmhucw.now.sh, because it is
> free.
>
>
Reply all
Reply to author
Forward
0 new messages