[erlang-questions] UBF

Hynek Vychodil <>
Thu Jan 15 14:42:15 CET 2009


It's good enough to enable to pass both metricIn() and metricOut() in some
API, but case is enable only metricIn() in one resource and metricOut() in
an other one. Not both togheter. Bigger issue comes when between metric()
and meta() are many levels of structures instead this one as in example a
worse this can happen many times in huge API definition. Solution is
separate changing parts (as timestamp()) from common ones but structures
become less fancy and consistent. One can end up with XML in UBF
description:

tag_name() = string()
attribute_name() = string()
attrribute_value() = string()
xml() = {tag, tag_name(), [{attribute_name(), attribute_value()}],
[xml()|string()]}

which nicely showes how can be made up flexible data in ugly way.

On Thu, Jan 15, 2009 at 1:35 PM, Steve Davis <
> wrote:

> Thanks both for your input :)
>
>
> On Jan 15, 5:34 am, Hynek Vychodil <> wrote:
> > UBF type system is not expressive as real project can need. Would be
> usable
> > if types can by described in functional manner:
> >      metaIn() = {meta, name(), author()};
> >      metaOut() = {meta, name(), author(), timestamp()};
> >      metric(X) = {metric, X, content()};
> >      metricIn() = metric(metaIn());
> >      metricOut() = metric(mataOut());
>
> Hynek - I'm probably wrong(?) but can't that example be expressed
> legally as:
>
> metaIn() = {meta, name(), author()};
> metaOut() = {meta, name(), author(), timestamp()};
> metric() = {metric, metaIn(), content()} | {metric, metaOut(), content
> ()}.
>
>
> Thanks again all for the feedback - I"m committing to prototyping
> using UBF at the very least :)
> /s
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



-- 
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill your
boss.  Be a data hero!
Try Good Data now for free: www.gooddata.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090115/c6ebbf89/attachment.html>


More information about the erlang-questions mailing list