Other programming languages are no stranger to code re-use, so why should EGL be any different? ClearBlade's EGL Green Code modules provide expedited code, design, documentation, and testing of common application requirements. Our first GreenCode module is a reusable Messaging System
for use by JSP or TUI applications. The module provides dynamic messaging driven by a relational database table, and is shared in the EGL Exchange.
ClearBlade GreenCode Messaging System
Following is the description and usage instructions located in MessagingSystemLib.egl:
This messaging system retrieves the message text from the database corresponding to the passed in message code. The retrieved text is then expanded with the passed message inserts (up to 5) and passed back along with the message type. The message can contain up to 5 inserts delimited by ~1, ~2, ~3, ~4, ~5.
record MessageRec type basicRecord
messageRec.message_code = "MSGCODE";
messageInsert = "insert 1";
messageText = messageRec.messageText;
messageType = messageRec.messageType;
*** Copyright (c) ClearBlade LLC 2008 ***
Comments and experiences, as well as seeing a few collaborative contributions on reusable code from others, would be great to see. The module and database are located in the EGL Exchange .