Uploading and Downloading Attachments

In this revision of the online forum we'll extend the object model to accommodate post attachments and add a facility to upload and download attachments.

Modeling Attachment

To avoid complexity and for performance, we are not going to model Attachment as a separate entity. Instead, we are going to model attachments as two attributes on Post.

We do this is in spite of the fact that modeling Attachments separately may be kosher or traditional.

NOTE

Adding a data blob attribute such as an attachment to an entity would have typically affected the performance of an application. Attachments can take up a fair amount of space on a database. Therefore, fetching posts with attachments can be slow. The way around this ...

Get WebObjects® Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.