Lecture #17 - Automation using IDispatch

Scriptable Components

Web Resources:

Linux Tutorials eclipse Code Project SysInternals Best SysInternals Tools Dr. Dobb's Journal Windows Forms COM at MSDN IDL Language base MIDL types OLE data types IDL attributes MIDL data types MIDL Language Reference

Content:

In this lecture we discuss COM Automation.

  1. Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects:

    Project #1, Project1HelpS16
    Final Projects, Final Project Presentation Schedule, xlsx
  3. Thread Locking Performance

    Testing C++11 synchronization performance
    How does C++11 synchronization performance compare to Win32 synchronization?
  4. Ajax Demo - This demo was created using VS2010 and no longer builds

    Ajax Demo
    This demo illustrates how to make Ajax calls using the jQuery JavaScript library. You may find this useful for the Tiny Web Server based projects.

  5. Automation - Road to ActiveX Controls:

    Automation Presentation
    This presentation discusses the standard COM IDispatch interface.

    Raw C++ Automation Project using IDispatch, Automation class diagram
    Here, an automation server is build with ATL and its client is build in C++ without using MFC or ATL. This too is somewhat complicated, although not as bad as the Connection Point example below.

    Connectable Objects
    Introduction to Connection Points.
    Connection Points Demo - Simple ATL Object with callbacks to C# client
    Step-by-Step Connection Points

  6. ActiveX Controls:

    ActiveX Controls Presentation
    ActiveX controls have many duties to their containers and the user. A full control supports an enormous number of interfaces.
    ActiveX Control Demo with properties and connection points
    Step-by-Step ActiveX Controls
  7. Distributed COM - DCOM:

  8. JavaScript

    This is here as an experiment, to see if both the class and I think it's useful. Since several of our final projects will use JavaScript in one form or another it seemed like a good idea to bring the rest of the class up to speed with the language.

    Nice JavaScript Summary

    JavaScript is an interesting, quirky, aggravating language:
    • It is a prototype-based language with objects that are associative arrays.
    • Properties and methods can be added to an object at any time.
    • It is a weakly typed language that has very context dependent conversions, ususally to objects.
    • It has value types, reference types, and garbage collection.
    • Everything is either a literal (value type) or object (reference type).
    • Even functions and arrays are objects.
    • It is single-threaded, using a function context stack and event queue to order processing.
    • It's execution environment is usually a browser, but that is not always the case these days.
    • When JavaScript code fails it often does so silently, making it difficult to debug.
    • It is so malleable that it is easy to break working code.
    Code Folder
    jQuery Presentation, pptx, jQuery code demos
  9. HTML5

    HTML5 is the latest version of the web page markup language HyperText Markup Language. It was invented by Tim Berners Lee at CERN, the European nuclear particle research facility in Switzerland, as a means for scientists to easily communicate with each other, as part of a publishing facility built on top of the Internet, which became the web.

    HTML5 introduces semantic markup, enhancements to the Document Object Model (DOM) interface, standardizes some forms of media support. It also expands the capabilites of browsers to locally store information, particularly useful for Restful web applications.

    HTML5 Demo Code Folder

    HTML5 Demo1 - Introduction
    HTML5 Demo2 - Semantic Markup
    Box Model - Sizing blocks
    Flow Model - Flowing text
    Float Model - Taking elements out of the flow
    HTML Controls - Native controls
    HTML5 Demo5 - Absolute Positioning and it's quirks
    HTML5 Demo6 - a failed experiment

  10. Go Programming Language:

CST strip