design pattern using erlang

Fredrik Linder fredrik.linder@REDACTED
Tue Nov 4 12:03:26 CET 2003

Another thing you could have a look at is the 'Design Principles', and
especially the behaviour concept. It is a nice tool for "coupling" modules

And yes, you'll loose inheritance, but you'd still have the powerful
(process) collaboration. So, you'd really don't loose anything (anything
important that is ;-).

Good Luck

> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Martin J. Logan
> Sent: den 3 november 2003 18:04
> To: mohammad banat
> Cc: erlang-questions@REDACTED
> Subject: Re: design pattern using erlang
> First get a really good sense of what the pattern is trying to
> accomplish. You now go ahead and write modules that are either libraries
> or spawn processes. I struggle with mapping out a clear path for you.
> You really need to understand and write a few programs in erlang. It is
> a different paradigm. You will not have objects and inheritance. What
> you will have are modules and processes. The thing that you are going to
> need to concentrate on is typically; what are the concurrent activities
> in your system. Those should be made into processes. Each process should
> have a well defined interface. This interface should hide the messaging
> format, or the "alphabet" of your process. This interface and process
> should be encapsulated by a single module. In the end you will have a
> system of processes communicating through interfaces. Kind of like a
> system of objects communicating through interfaces. You will loose
> inheritance and strong typing and gain true and beautiful concurrency:)
> Find a pattern that emphasizes concurrency and then decompose it into
> modules and processes. I must now ask why you choose the reactor. The
> reactor is a pattern that emphasizes an event based and single threaded
> implementation. I suggest that you not follow the reactor to the letter,
> if your assignment mandates that you do then choose another pattern.
> I also recommend that you use OTP. If you learn nothing else of OTP
> learn the following. Really LEARN THE FOLLOWING: Learn and use the
> supervisor and learn and use the gen_server. Use sasl for its logging
> and reporting.
> Martin
> On Mon, 2003-11-03 at 04:39, mohammad banat wrote:
> > hello
> >  i am  a student in a jordinian university and i want to make a
> > project that is a gate way but by using design pattern , this pattern
> > should be implemented in erlang
> > i got the information about erlang in your web site and in other sites
> > , but i feel that i still need more, so if you can help me and supply
> > me with some more information supported with some small examples in
> > order to get better understanding about how to write a programs using
> > erlang  and if u can help me more by give me some notes how to start
> > the implementation of patterns like(reactor)
> >
> > please help me in the nearest chance
> >
> >
> > ______________________________________________________________________
> > Do you Yahoo!?
> > Exclusive Video Premiere - Britney Spears

More information about the erlang-questions mailing list