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.
> --
> 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.