A family member wanted an easy solution for hosting lists of photos locally on their PC which others could see in their web browser if they knew the URL. Requirements were simply that no photos could be stored in any cloud service, the page should have a list of thumbnails which can be viewed all at once and individually zoomed in on, and it should be easy to use and update.
After considering the steps required to install and configure a proper web server on his machine (remotely, from another continent) including server-side scripting plugins, etc… I decided DataSnap was the right tool for the job… no need to use a sledgehammer on a tiny nail.
I got to work, and after an afternoon programming session this was the result:
The server application is a DataSnap server which handles HTTP requests from a web browser, specifically this URL: http://HOST:8141/ds/rest/TAWMethods/Albums. It also allows for TCP connections, which the client application uses for creating and updating albums. Exposed server methods allow for remote invocation of the required administrative functionalities. (Such as adding an image or deleting one.) The server also allows for setting of an administrative password (authentication manager,) so that not just anyone with your IP and a copy of the client application can modify your album website.
The client application allows for viewing existing albums (including each individual image thumbnail) and adding new albums or photos, adding descriptions to existing photos, or removing photos/albums. It connects to the server using a TCP connection and uses a generated proxy for remotely invoking the server methods.
Here is what the web page looks like in the browser… it is pretty basic. When you click a thumbnail it uses the free ‘Highslide’ JavasSript library to pop up a large version of the image:
This is a pretty basic application, but I think it shows DataSnap’s beautiful simplicity. I built this quickly and to deploy it to my family member’s PC I just gave them the ZIP file and told them to unzip it anywhere they wanted. If you are interested in the source code leave a comment. If I get enough interest, I might throw together another blog post including the source and some more detail.
Softpedia randomly found this application and featured it on their site!: http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/Album-Website.shtml