Attachment viewer architecture diagram and explanation

You can check out the screen shots and this image also on OpenNTF.  If you are good at looking at the source code and project setup you can probably figure this out pretty easily.  I figured posting this diagram to the project would help out “other contributors” so they can assist with the project.  🙂

As you can see from the diagram I use a thin layer (the SWT Embedded browser) for things like consuming the Eclipse selection and then calling a JavaScript(JS) function directly in the page with a JSON representation of the object.  The URL’s passed to the JavaScript function are actually URL’s back to a proxy servlet for serving up the content of the files.  This is how I achieve a secure and common web architecture from an embedded browser perspective.  The viewer.html can also be used in an outside browser for testing – I test with FireFox and IE on Windows for example.  In FireFox I use Firebug to assist with debugging JS and in IE I have the developer tools installed.  The servlet is also the entry point to any conversion extensions I will add in the future.  Since the content is parsed and served up manually I can “transform” the content when needed.  My first implementation was the syntax highlighting for source files, shown here.

4 thoughts on “Attachment viewer architecture diagram and explanation

  1. How do you determine the location of the temporary directory? I’ve seen far too many Lotus Notes and Lotus Symphony/OpenOffice examples which dump all their temporary files on the Windows system drive (for example, the example code might use a target file such as C:tempoutfile.odt or C:mypdftempfile.pdf).

    I’ve found that this usually fails dramatically in Windows 7 (and perhaps also Vista, but I skipped over that and am not sure). Windows 7 is very fussy about who can write to the system drive.

    Do you determine where the user’s Windows temporary directory is and write your temporary directory as a sub-folder of that? Or something similar, perhaps using the LotusScript CurDir and/or CurDrive function (or the equivalent in Java, or C API, or whatever) or a call to a Windows API function to determine this?


  2. Hi Tony,

    This extension plugin doesn’t really do anything with the temporary directory – it uses what the Notes.exe saves and just references the same file path. I can check with the core Notes team to see if there are some optimizations – like where the temp folder should be configured for optimal performance. and get back to you.


  3. Pingback: A powerful function… »

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s