How to learn Erlang framework? [closed]
I had two question about Erlang.
- Is design pattern of concept to be suitable for use in Erlang? Want to understand the architecture quickly.
- Could you recommend any great framework and how to learn? what view-point to explain this erlang framework.
Thanks for you.
One at a time, where I try to answer questions not answered in "Primer thread":
Design patterns: All languages have their own set of common idioms for solving specific problems. These are often called "Design Patterns". It turns out however, that these cannot be hoisted across languages. A DP for, i.e., Java or C# might not be applicable at all in Erlang. It also holds true vice versa: A specific idiom in Erlang might have no use in C#. When learning Erlang you should keep an open eye out for the patterns, but don't expect to be able to use existing patterns you know from other systems.
On learning Erlang: Keep an open mind. And do not under any circumstances try to understand it by relating your known OO concepts to the language. Don't try to find the concept of class, interface and object in Erlang. They are not there. I've seen this mistake when learning Erlang and when learning Haskell (where the misunderstanding is usually around Type Classes). A new language requires a new approach and new problem solving skills. It is like learning a new instrument: Rhythm and Harmonics carry over, but there are things which do not.
Erlang does not really have any "framework". The closest you can come to it is the set of standard generic behaviors which are part of the OTP built into the standard library. A behavior defines a generic construct, a server say, which you then can specialize to your needs. The advantage is that a lot of the robustness stuff is "baked in" into the behavior so when you base your code on it, you get these things for free.
精彩评论