Hardcore Office Development Don Kiely Software Technologist Third Sector Technologies Fairbanks,...
-
Upload
riley-salisbury -
Category
Documents
-
view
214 -
download
0
Transcript of Hardcore Office Development Don Kiely Software Technologist Third Sector Technologies Fairbanks,...
Hardcore Office Hardcore Office DevelopmentDevelopment
Don KielyDon KielySoftware TechnologistSoftware TechnologistThird Sector TechnologiesThird Sector TechnologiesFairbanks, AlaskaFairbanks, Alaska
4-3064-306
Me.AboutMe.About
Software Technologist for Third Sector Software Technologist for Third Sector Technologies in Fairbanks, AlaskaTechnologies in Fairbanks, Alaska
Develop software and Web applicationsDevelop software and Web applications www.infoinsights.comwww.infoinsights.com www.thethirdsector.comwww.thethirdsector.com
Business and technology consultingBusiness and technology consulting
My Other JobsMy Other Jobs
AuthorAuthor Several books, including Several books, including VB Programmer’s VB Programmer’s
Guide to the Windows RegistryGuide to the Windows Registry Regular contributor to several Regular contributor to several
publications, including Informant’s publications, including Informant’s Microsoft Office & VBA Developer, VBPJ, Microsoft Office & VBA Developer, VBPJ, and Information Weekand Information Week
TrainingTraining VB, VBA, VI, and SQL Server instructor for VB, VBA, VI, and SQL Server instructor for
Application Developers Training CompanyApplication Developers Training Company
Who is. . . Who is. . .
Actively developing applications with Actively developing applications with Office as a primary component?Office as a primary component? Using Microsoft Office 2000 Developer Using Microsoft Office 2000 Developer
edition?edition? Primarily a VB developer?Primarily a VB developer?
Primarily developing with other tools?Primarily developing with other tools? Using the Workflow design tool in Using the Workflow design tool in
MOD?MOD?
AgendaAgenda
Office as part of a distributed applicationOffice as part of a distributed application Windows DNAWindows DNA
Data-based applicationsData-based applications Logical architecture and physical deploymentLogical architecture and physical deployment Motherlode of objectsMotherlode of objects
Component-based developmentComponent-based development Data, data, everywhereData, data, everywhere Code location optionsCode location options Office on the WebOffice on the Web
Models Of Distributed AppsModels Of Distributed Apps
SneakerNetSneakerNet™™
Purest form of distributed computingPurest form of distributed computing Minimal infrastructure requirementsMinimal infrastructure requirements
SETI@HomeSETI@Home Distributed computingDistributed computing Download data and upload resultsDownload data and upload results
Classic client/serverClassic client/server Active connection required, can be stateless like the InternetActive connection required, can be stateless like the Internet
Three-tier, n-tierThree-tier, n-tier Internet/WebInternet/Web
As many others as you can think ofAs many others as you can think of
Windows DNA ArchitectureWindows DNA Architecture
No rigid boundaries between tiers and servicesNo rigid boundaries between tiers and services
Don’t limit your Don’t limit your thinking to using thinking to using Office here only!Office here only!
Windows DNA And OfficeWindows DNA And Office
Office’s place in n-tierOffice’s place in n-tier Presentation tierPresentation tier Business Logic tierBusiness Logic tier Data Services tierData Services tier Tools and system servicesTools and system services
Presentation Tier RolesPresentation Tier Roles
Gather information from the userGather information from the user Send information to the business Send information to the business
services for processingservices for processing Receive results of business Receive results of business
services processingservices processing Present results to the userPresent results to the user
Same, ol’ boring stuff.
Be creative!!
Business Logic Tier RolesBusiness Logic Tier Roles
Receive information from the Receive information from the presentation servicespresentation services
Interact with the data services to Interact with the data services to perform the business operations perform the business operations that the application was designed that the application was designed to automateto automate
e.g. Medical billing, Sales Force e.g. Medical billing, Sales Force Automation (SFA), order processing, Automation (SFA), order processing, income tax preparation, etc.income tax preparation, etc.
Send the processed results to the Send the processed results to the presentation servicespresentation services
Here’s where Office
Shines!!
Data Services Tier RolesData Services Tier Roles
Responsible for the storage, retrieval, Responsible for the storage, retrieval, maintenance, and integrity of datamaintenance, and integrity of data E.g., RDBMS, Mail Server, File SystemE.g., RDBMS, Mail Server, File System
Get used to ADOGet used to ADO Learn something about RDSLearn something about RDS Every app is a database appEvery app is a database app
Use Access? Maybe,
maybe not. But how integrate
data throughout
app?
Multiple Users, Multiple Multiple Users, Multiple Servers, And Multiple UlcersServers, And Multiple Ulcers Logical versus physicalLogical versus physical Where does Office fit in?Where does Office fit in? Several models. . . .Several models. . . .
Logical Versus PhysicalLogical Versus PhysicalSingle machineSingle machine
Data Services Tier
Business Logic Tier
Presentation TierPresentation Tier
ClientClient
Logical Versus PhysicalLogical Versus PhysicalClient-server machinesClient-server machines
Data Services Tier
Business Logic Tier
Presentation TierPresentation TierClientClient
ServerServer
Logical Versus PhysicalLogical Versus PhysicalClient-server alternativeClient-server alternative
Data Services Tier
Business Logic Tier
Presentation TierPresentation Tier
ClientClient
ServerServer
Logical Versus PhysicalLogical Versus PhysicalThree-tierThree-tier
Data Services Tier
Business Logic Tier
Presentation TierPresentation TierClientClient
Server BServer B
Server AServer A
Intra-Application Intra-Application Service CallsService Calls ArraysArrays Disconnected recordsetsDisconnected recordsets
Read/write recordsetsRead/write recordsets Read-only recordsets with action queriesRead-only recordsets with action queries
eXtensible Markup Language, XMLeXtensible Markup Language, XML Method parameters by referenceMethod parameters by reference Plenty of other options!Plenty of other options!
What makes sense for the application?What makes sense for the application? Different methods between different Different methods between different
tierstiers Different methods in each directionDifferent methods in each direction
Figuring Out Object ModelsFiguring Out Object Models
Hundreds of objects, thousands of featuresHundreds of objects, thousands of features Visual Basic for Applications object basicsVisual Basic for Applications object basics
ObjectsObjects Finding library and class namesFinding library and class names Objects in the registryObjects in the registry Object model diagramsObject model diagrams
The Object BrowserThe Object Browser Expose all the details of the object libraries Expose all the details of the object libraries
currently accessible to currently accessible to your applicationyour application
Right-click to expose useful featuresRight-click to expose useful features Group membersGroup members Show hidden membersShow hidden members ReferencesReferences
Discovering the proper syntaxDiscovering the proper syntax Relating the model to the host applicationRelating the model to the host application
objXLWorksheet.Worksheets(1).Cells(1, 1).ValueobjXLWorksheet.Worksheets(1).Cells(1, 1).Value
Finding The Right ObjectFinding The Right Object Who has used Office Code Generator?Who has used Office Code Generator? Fixing up Macro Recorder codeFixing up Macro Recorder code
Use object variablesUse object variables Set a reference to object librarySet a reference to object library Remove hard-coded file namesRemove hard-coded file names Remove unnecessary parametersRemove unnecessary parameters Determine if host application is runningDetermine if host application is running
Other leads on objectsOther leads on objects Intellisense’s Auto List NameIntellisense’s Auto List Name Auto Quick InfoAuto Quick Info
Quirks of the Office object modelsQuirks of the Office object models
Code Location OptionsCode Location Options Issue of code reusabilityIssue of code reusability Locating code inside office applicationsLocating code inside office applications
Office documentsOffice documents Shared code across multiple Shared code across multiple
office applicationsoffice applications COM Add-insCOM Add-ins
Single Visual Basic for Applications Single Visual Basic for Applications project office applicationsproject office applications
Automating Office with external clientsAutomating Office with external clients Automating external applications Automating external applications
with Officewith Office In general: put the code as close to the In general: put the code as close to the
objects as you canobjects as you can
Where Store Data?Where Store Data? Internal to Office: documentsInternal to Office: documents
Access databasesAccess databases Excel spreadsheetsExcel spreadsheets OutlookOutlook®® for PIM data for PIM data Word for random textWord for random text
Internal to custom applicationInternal to custom application External data storesExternal data stores
DatabaseDatabase Windows registryWindows registry
Deciding on the right place to store dataDeciding on the right place to store data Format, normalization, multiple users, integrityFormat, normalization, multiple users, integrity
Import or link?Import or link?
COM Add-InsCOM Add-Ins
Standard way of extending Office 2000Standard way of extending Office 2000 Across all host applicationsAcross all host applications Available both in user interface and Available both in user interface and
Visual Basic for Applications environmentVisual Basic for Applications environment Need to deal with various object modelsNeed to deal with various object models
Different models across Office 97Different models across Office 97 Create with any COM development toolCreate with any COM development tool
Building Add-In ObjectsBuilding Add-In Objects
Build with MOD or Visual BasicBuild with MOD or Visual Basic More flexibility with Visual BasicMore flexibility with Visual Basic
ActiveXActiveX®® designer designer Optional, but convenientOptional, but convenient Manages registry settings for youManages registry settings for you Include one for each hostInclude one for each host
Connect object used to load add-inConnect object used to load add-in
Putting Office On The WebPutting Office On The Web
FrontPageFrontPage®®, of course, of course Office Web componentsOffice Web components
Licensing issues!Licensing issues! Data access pagesData access pages Save as Web pageSave as Web page
Heavy use of XMLHeavy use of XML Office on the Web serverOffice on the Web server
Careful of licensing!Careful of licensing! Mostly the middle tier?Mostly the middle tier?
Questions?Questions?
See Appendix A for security issues in OfficeSee Appendix A for security issues in Office
Thanks for attending!Thanks for attending!
Please remember to fill out the Please remember to fill out the evaluation forms! How can I make this evaluation forms! How can I make this
a better presentation?a better presentation?
Don KielyDon [email protected]@computer.org
Third Sector TechnologiesThird Sector Technologies
Appendix A: Office SecurityAppendix A: Office SecurityThe Power & the ProblemThe Power & the Problem
Embedded VBA opens up a world of Embedded VBA opens up a world of application possibilitiesapplication possibilities While opening up a world of potential pain While opening up a world of potential pain
from macro virusesfrom macro viruses Anything that you can do from VBA you Anything that you can do from VBA you
can do from a VBA viruscan do from a VBA virus Delete filesDelete files Execute rogue ActiveX componentsExecute rogue ActiveX components Much, much moreMuch, much more
No such thing as a benign virusNo such thing as a benign virus
Security IssuesSecurity Issues
Protect intellectual propertyProtect intellectual property Block access to code you developBlock access to code you develop The embarrassing stuff, tooThe embarrassing stuff, too
Protect confidential informationProtect confidential information Block access to valuable information Block access to valuable information
contained within an Office documentcontained within an Office document Protect against malicious hackersProtect against malicious hackers
Block viruses from adding rogue codeBlock viruses from adding rogue code Uniquely identify origin of the code Uniquely identify origin of the code
(you)(you)
Office Protection RacketOffice Protection Racket
Document and template passwordsDocument and template passwords Excel and Word passwords, user login to VBA Excel and Word passwords, user login to VBA
applicationsapplications
Network securityNetwork security Built on Windows NT/2000 security for authentication Built on Windows NT/2000 security for authentication
and access to resourcesand access to resources
Third-party anti-virus softwareThird-party anti-virus software API link to Office documentsAPI link to Office documents
COM Add-inCOM Add-in Protects code from user manglingProtects code from user mangling
Lock VBA project to prevent editingLock VBA project to prevent editing Digital certificatesDigital certificates