[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqwebmail
Subject:    [sqwebmail] Proposal to make the SqWebMail highly user configurable and extensible
From:       Sagara Wijetunga <sagaralists () yahoo ! com>
Date:       2003-10-26 15:46:23
[Download RAW message or body]

Proposal to make the SqWebMail highly user
configurable and extensible

Objective:
It’s not possible to achieve a better presentation by
enhancing the HTML templates alone. The SqWebMail also
must be upgraded to support it to be configurable and
extensible. This can be achieved by enhancing the way
the SqWebMail process and parse tags in HTML
templates.

If we can successfully separate the presentation from
the internal processing, in fact, end users then can
concentrate on the cosmetics of how the SqWebMail
should presents information. The SqWebMail developers
then can concentrate on adding new functionality to
the SqWebMail rather than concentrate on cosmetics. 

To make the SqWebMail highly user configurable and
extensible, I would like to propose the following
design:
	
Design:
1.	SqWebMail should be HTML template-based. (Already
is, included for completeness) 

2.	SqWebMail should parse the specified tags in these
HTML templates and replace them with the generated
HTML code. (Already is, included for completeness)

3.	SqWebMail should parse only available tags in a
HTML template and should not complain the
non-availability of other tags.

4.	Separate the HTML code required to generate these
tags from the C code into its own tag definitions and
place these tag definitions in an include file, so
that users can further modify appearance of these
tags. 

Ideally do not keep any HTML code inside C programs
and keep them outside may be in other include files.

5.	Read user preferences from a database or LDAP
directory (may be by extending the authdaemond).

Examples:
Note: Following examples are given in HTML and Perl.

1.	HTML Template
<HTML>
  .
  .
  ${INBOX}
  .
  .
</HTML>

2.	Tag Definition
# INBOX Tag Definition

$hashTable{'INBOX'} = <<'XXX';
<td align="left" valign="top">
 <img src="/webmail/images/folder.gif" width="21"
height="16" alt="Folder" title="Folder">
 <input type="radio" name="DELETE" value="INBOX">
 &nbsp;<a class="folderlink" href="${url}">INBOX</a>
 <font class="folderlistunread" style="color: rgb(128,
0, 0);" size="-1">
 ${unreadCount}
 </font>
</td>
XXX

Processing:

1.	Make data ready for tags (for a particular
template)

2.	Parse a Tag Definition and replace further
secondary tags in that Tag Definition.
Eg.   Replace tag ${url} with data
      Replace tag ${unreadCount} with data
of the INBOX tag definition.
 
3.	Finally, parse the HTML template and replace all
tags with HTML fragments generated.
Eg. Replace ${INBOX} with the HTML fragment generated.

I encourage others comments on this and support to
encourage the SqWebMail developers to further separate
presentation from the processing.

Best regards,
Sagara



__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic