The last week I've continued to develop my first project in Erlang. As you allready know it will be the Dynamic Content Processor (DCP) using Yaws and Mnesia. Currently I havn't reached those last two libraries, but my own first one, the Common Erlang Library (CEL), grows.
I've started with the simple markup language, SML. I allready wrote about it. It is a really nice approach how the parser reads the document and sends events in form of messages to a background builder process. And the last message returns the constructed document. In the standard library this is a structure almost like the XML DOM, but much more lightweighted. It really astonished me how easy it is to parralelize typical serial problems.
The next step has been the HTML builder. It uses the same approach like above to produce HTML. No full blown HTML, but fragments to be inserted into templates. It shall be used in the DCP. This library is part of the CEL and can be extended with a callback function. This allows the DCP - or other apps - to extend the SML-to-HTML converter easily.
Beside the processes and the asynchronous messages the pattern matching is really helping. It makes the receiving of the messages and the definition of small and neat handling and poweful callback functions simple.
I'll now continue to develop the converter together with some more unit tests. Once again they help a lot. After that I'll develop something similar to my Smalltalk Lightweight Application Server, based on the Erlang processes and asynchronous messaging. So again, stay tuned.
I've started with the simple markup language, SML. I allready wrote about it. It is a really nice approach how the parser reads the document and sends events in form of messages to a background builder process. And the last message returns the constructed document. In the standard library this is a structure almost like the XML DOM, but much more lightweighted. It really astonished me how easy it is to parralelize typical serial problems.
The next step has been the HTML builder. It uses the same approach like above to produce HTML. No full blown HTML, but fragments to be inserted into templates. It shall be used in the DCP. This library is part of the CEL and can be extended with a callback function. This allows the DCP - or other apps - to extend the SML-to-HTML converter easily.
Beside the processes and the asynchronous messages the pattern matching is really helping. It makes the receiving of the messages and the definition of small and neat handling and poweful callback functions simple.
I'll now continue to develop the converter together with some more unit tests. Once again they help a lot. After that I'll develop something similar to my Smalltalk Lightweight Application Server, based on the Erlang processes and asynchronous messaging. So again, stay tuned.
0 Comments:
Post a Comment