Before I start let me say this was the best of failures, I learn a-lot about OOP Java-Script and Dom Scripting and using 3rd party library's , after working on the project I know 3 things, Java-Script is an extremely expressive language is a pain to debug but Is my firm favourite dynamic language. The second is don't use a 3rd party library that doesn't have excellent documentation its just not worth the pain. Thirdly Active X objects are terrible way to integrate desktop applications into the web.
The Aim
- To develop a web based HTPC application that would list TV recordings and using MPClassic allow these files to opened and played.
- Display files based on there date in a number of lists and also a Calendar.
- Use Java-Script and Active X objects
- Use Internet Explorer as browser, and Active Desktop to host the web-page on a desktop.
- Only be available on a local level.
The Results
I was able to create a beta build using Active X file objects with the EXT Java-Script library to create menus, based around weeks. This seemed appropriate as television shows tend to be grouped into weeks, I also build a Java-Script calendar that would show the shows recorded on that date. Using query String an another Active X object I was able to get MPClassic to load a particular file.
The bugs which were the killer, The calendar never quite worked correctly and the File list where to easily corrupted, I don't think any of these bugs where unfixable but I did not wish to invest the time , when I decided the Active X approach was not worth the effort. Since Fire-Fox does not support JScript Emulators the project was IE only.
File download of current Work: HTPCSite.zip (1.13 mb)
I plan to revisit the project in the future, and replace the Acitve-X objects with a .Net Web-Service and a JSON objects to pass the file information to the browser code, I will also like to change the Java-Script library to the YUI, as I found the Documentation to be easier on the brain :-).