[erlang-questions] Data structure for domain model

Erik Søe Sørensen <>
Thu Apr 12 11:22:40 CEST 2012


Hi there -
For what it's worth, I've attempted to write up something about data
representation in Erlang - aimed at people who know programming (e.g. in an
OOP language), but are uncertain about how to do it in Erlang.

Simple data structures are treated in this text:
  https://github.com/eriksoe/AGttES/blob/master/DataStructures.asciidoc

And this is an "Erlang modelling for OOP programmers" intro:
  https://github.com/eriksoe/AGttES/blob/master/OOP.asciidoc
(This one has been less well rendered by Github, alas; you can run it
through asciidoc or ask me for a better HTML version.)

There are many ways to represent an object in Erlang, depending on its
nature.
I've tried to sum up the possibilities here, in the form of a table showing
when you can use which options:
  https://github.com/eriksoe/AGttES/blob/master/OOP-overview.asciidoc

I'm afraid it's still work-in-progress - I'd be very interested in hearing
about both anything that appears to be wrong or incomplete, and any
questions it leaves unanswered.

Hoping this might help.
/Erik


Den 12. apr. 2012 10.39 skrev Ilyushonak Barys <>:

>  Hello, community****
>
> ** **
>
> I’m looking for the best way to represent my domain model in Erlang. ****
>
> I use market information – trades, orders, etc. I would like to do the
> following:****
>
> **1.      **Create structure and fill it with the data****
>
> **2.      **Access specific fields/keys values for implementing business
> requirements ****
>
> **3.      **Translate (serialize) the data to external systems (socket,
> xml, text)****
>
> Actually, I need a good programming structures to work with. ****
>
> ** **
>
> As I see there are two kind of data structures:****
>
> **1.      **Records****
>
> **2.      **Key-Value storage – proplist, dict****
>
> ** **
>
> The question.****
>
> Is there any kind of best practice or design patterns in Erlang how may it
> be implemented?****
>
> ** **
>
> I’m from OOP world. Maybe I miss something and I should change the way I
> see it? I have googled it, and can’t find the best answer. ****
>
> Could you please share some info about this theme in Erlang? ****
>
> Also please let me know if this theme is holy war.****
>
> ** **
>
> Best Regards,****
>
> Barys Ilyushonak****
>
> Information Technology Division, Troika Dialog****
>
> ** **
>
> _______________________________________________________
>
>
>
> The information contained in this message may be privileged and conf
> idential and protected from disclosure. If you are not the original
> intended recipient, you are hereby notified that any review,
> retransmission, dissemination, or other use of, or taking of any action in
> reliance upon, this information is prohibited. If you have received this
> communication in error, please notify the sender immediately by replying to
> this message and delete it from your computer. Thank you for your
> cooperation. Troika Dialog, Russia.
>
> If you need assistance please contact our Contact Center (+7495) 258 0500or go to
> www.troika.ru/eng/Contacts/system.wbp
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120412/d593b76d/attachment.html>


More information about the erlang-questions mailing list