COMparator - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

COMparator

Description:

Used hacks due to our inexperience with the language. C# ... The phrase mind-numbing comes to mind. Simple code style is destroyed when working with APIs ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 24
Provided by: ericst8
Category:
Tags: comparator | hack | mind | the

less

Transcript and Presenter's Notes

Title: COMparator


1
COMparator
2
Introduction
  • Goal To compare and contrast multiple
    programming languages in order to provide future
    CS292/293 groups with recommendations and
    examples for COM Implementation

3
XML Parser Test Case
  • Using a Previously Defined COM Interface
  • Basic Beginner COM Programming
  • XML File
  • Use COM to Grab the Text of an XML Field

4
Quake II Bot Test Case
  • COM Wrapper written in C
  • AI interfacing with COM written in each of the
    five languages
  • Demonstration of Bots in action

5
BHO Test Case
  • Create a Browser Helper Object to kill pop-ups
  • Create a COM object in each language that
    interacts with IE
  • Kills pop-up depending on URL address, also could
    have done by presence of toolbar

6
Language Impressions
  • Each language ran the battery of test cases
  • Here we will pose the results of the tests

7
SmallTalk - Pros
  • Using COM objects very easy (wizards)
  • Language is purely object oriented
  • Everything is an object
  • High level language
  • Different flavors available
  • Dolphin, SmallTalk/X, VisualAge SmallTalk

8
SmallTalk - Cons
  • Language is different
  • OO? Yes, but definitely not Java or C
  • Hard to learn COM and new language
  • Coding environment is different
  • Dont compile and run, interact with system
  • Thorough knowledge of COM necessary to create
    objects (IDL, CLSID, GUID,)
  • Resources available, but lt other languages

9
SmallTalk - Suggested Uses
  • If you already know SmallTalk
  • You are doing high level tasks with predefined
    COM objects
  • Your design fits a purely OO paradigm

10
Delphi - Pros
  • Great for people already familiar with Pascal or
    Delphi
  • Large community of Delphi programmers are helpful
  • Easy to make GUIs
  • Although not Microsoft, Borland is good enough

11
Delphi - Cons
  • Not easy to use for newbies
  • Not a Microsoft language
  • Sometimes data structures used in COM objects
    hard to decipher in Delphi

12
Delphi Suggested Uses
  • Anyone who knows Delphi or Pascal and doesnt
    know VB or C and wants a GUI
  • Anyone who hates Microsoft

13
C Impressions - Pros
  • Mild learning curve from C/Java knowledge
  • IDE may be freely available to us (CS Students)
    - VS.NET
  • GUIs are a breeze, comparable to VB
  • Little code needed to set up using predefined COM
    objects, IDE does the work

14
C Impressions - Cons
  • Documentation currently difficult to find
  • Seems to possibly be easier ways, they just
    arent documented yet
  • COM Object creation more difficult than using
    predefined COM objects
  • Probably not such a problem as language becomes
    more widespread
  • Used hacks due to our inexperience with the
    language

15
C - Suggested Uses
  • Using previously defined COM Objects
  • GUI intense applications
  • Give it time for examples to pop up
  • Seems like it has the potential to be the missing
    link between VB and C

16
C - Pros
  • Power and Versatility of C/C
  • Great Familiarity to C/C from Previous CS
    Classes
  • Well Documented (Many Newsgroups, Websites
    dedicated to C COM)
  • Only initial learning curve/setup the most
    difficult part of C COM
  • Visual Studio Wizards

17
C - Cons
  • GUI Implementation (MFC) more difficult
  • Lots more code necessary (and similarly more
    chance for bugs)
  • New Way of working with objects
  • Need to have a more intimate understanding of
    IDL/GUID/CLSID/COM Architecture

18
C Suggested Uses
  • Groups who already know C COM
  • Groups who will be using COM extremely intensely
    and developing large, robust and non-GUI
    intensive COM objects

19
VB - Pros
  • Ease of Use easy interaction with objects
  • Ease of Use (its so nice, I typed it twice)
  • Intuitive GUI setup (drag drop)
  • Fast to code little code needed
  • Large support base of VB programmers
  • MS language built with COM in mind
  • Easy interaction with MS Office macros

20
VB - Cons
  • Not reliable in large programs
  • Difficult setup for BHOs
  • The phrase mind-numbing comes to mind
  • Simple code style is destroyed when working with
    APIs
  • Annoyingly helpful Dev Environment
  • You get laughed at by the other programmers

21
VB Suggested Uses
  • People familiar with VB
  • People looking to interact with already exiting
    COM objects.
  • People looking to write a simple tool quickly,
    rather than a huge, robust product

22
Conclusion
  • The ease of using a language depends on
  • Prior experience with the language
  • Documentation available
  • Example code available
  • The suitability for a project depends on
  • COM object use or creation?
  • Size of project
  • Projects use

23
Conclusion
  • Used Pascal before and project is working with
    COM objects?
  • Use Borlands Delphi
  • C guru and need to create rock solid COM
    objects?
  • Use Visual C
  • Working with a GUI, using COM, and support of C
    has increased?
  • Use C
  • Project is small and using COM?
  • Use VB
Write a Comment
User Comments (0)
About PowerShow.com