Upload
bill-buchan
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
Development for Administrators
Bill Buchan - HADSL
1Monday, 8 October 2007
Bill BuchanDirector, HADSL. We develop administration tools.Dual PCLP in v3, v4, v5, v6, and now v7
(Exam Junkie)Experience in large corporate environments
100,000 + usersExperience in migrating applications
36,000 separate apps in the last five years!
Introduction:1
2
2Monday, 8 October 2007
This session leads you through best practices for dealing with applications in your environmentAvoid common pitfallsMake your environment more securePrevent developers destroying your environmentBasic coding techniques in
@formulaLotusScript
Introduction:2
3
3Monday, 8 October 2007
Administrators are from Mars – Developers are from Venus.....
A good developer has some administration skills, and a good administrator has some development skillsThis is why PCLP requires you to take one exam “from the other side”...
This should give you a good kick start on that journey
Introduction: 3
4
4Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
5
5Monday, 8 October 2007
You should have:A developers “sandbox”A User Testing DomainA Production System
Why ?Proper change controlAllows developers to simulate system changes
Without destroying your production system!Allows you to test version upgrades
Development, Test & Production: 1
6
6Monday, 8 October 2007
VMWare is your friend:Workstation < $200Server: Free
Can create multiple partitions, and set breakpointsCan move partitions around between machinesEasy to back up and roll backhttp://www.vmware.com
Development, Test & Production: 2
7
7Monday, 8 October 2007
Who has access?
Who deploys Templates ?Administration Team
How do I enforce this?Special Admin-only “Signing ID”
Development, Test & Production: 3
8
8Monday, 8 October 2007
Isnt this a lot of work?Yes – its more work than normalEncourages less changes and more testing from DevelopersGives you a proper change control mechanism
Prevents:Unauthorised changeDevelopers having Manager access to environment
Development, Test & Production: 4
9
9Monday, 8 October 2007
Use different certifiers for these domainsAnd have different user ID'sUse multiple notes directories to run multiple clients
DONT use location documents!DONT allow these environments to connect to each other
Its a security weakness
Development, Test & Production: 5
10
10Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
11
11Monday, 8 October 2007
Process:Developers create/change applications
Create release notesSends template from Dev environment to Administrator
Administrator deploys to Test, asks users to test applicationIF passed testing, deploys application to production
Else start again
Deploying Applications: 1
12
12Monday, 8 October 2007
Change/Release NotesCreated by DevelopersLists changesOutlines deployment requirements
Dependencies on other databases, PlatformClient version issuesAny “restricted” agentsAny logging and monitoring requirements
Deploying Applications: 2
13
13Monday, 8 October 2007
What to watch for:Hardcoded server name, application name or replica ID
Use “profile” documents and document how Administration team sets up application
Scheduled agents What level of access is required
“Trusted Servers” requirementDoes this application access other servers?
Deploying Applications: 3
14
14Monday, 8 October 2007
Keep all versions and release notes in a databaseA simple discussion database is a good startEnsures that templates are backed up
Better:Create a version control database
Best:Use a version control and deployment system
such as Ciao! & BuildManager from Teamstudio
Deploying Applications: 4
15
15Monday, 8 October 2007
When deployingAlways use “Design, Replace”Always use the “Signing ID”Remember to set any scheduled agentsAccess Control:
Should never contain namesShould always contain groupsGroup name and/or description should point to application
Deploying Applications: 5
16
16Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
17
17Monday, 8 October 2007
All scheduled agents should be signed during deployment. Remember: Developers only have “User” rights in production. Their ID may not have access to required databases
This means that you should use a special “Signing” IDSuch as “Template Development/CompanyName”
Signing Agents: 1
18
18Monday, 8 October 2007
Tighten up securityOnly special ID allowedto run “restricted” agents
Migrating to R6 ?Remember that agents now have a security field which needs to be set
Signing Agents: 2
19
19Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
20
20Monday, 8 October 2007
What to use @Formula language for:Changes to a number of documents
What NOT to use @Formula language for:User InputComplex validationMulti-document “relational” updatesIf your @formula is more than 15 lines, consider LotusScript
Quick @Formula Agents: 1
21Monday, 8 October 2007
Example: Set the CompanyName field to “Acme, Inc.”
Quick @Formula Agents: 2
22
22Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
23
23Monday, 8 October 2007
LotusScript is better for:Complex transactions, complex business rulesCreating Administration Requests
EG @Formula doesnt “sign” fieldsSome form of UIIts harder to get intoIts easier to Debug
Essential LotusScript: 1
24
24Monday, 8 October 2007
LotusScript is just like Visual BasicAccessing Notes objects is via the Notes.. Objects
Backend code – document manipulationFrontend code – modifying User Interface documents
Most of your work will beWriting backend agents to modify documentsCall the Notes Administration tools
Essential LotusScript: 2
25
25Monday, 8 October 2007
Agents can beTriggered by the user from the action barScheduled and ran on workstations and servers
Agents can be passed “selected documents”Agents run as
The user who signed the code on the serverThe current user on the workstation
Essential LotusScript: 3
26
26Monday, 8 October 2007
Lots of online helpLots of examples in the helpIf you dont understand it – dont do itTest in your development environment!Be careful when changing documents in scheduled
agentsReplication storm!
Essential LotusScript: 4
27
27Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
28
28Monday, 8 October 2007
A simple agent:Process all selected
documents, and set the company name to “Acme, Inc.”
Quick LotusScript Agents: 1
29
29Monday, 8 October 2007
Quick LotusScript Agents: 2
30
Its not as scary as it looks:Everything is an ObjectYou drill down through logical structuresYou can loop
Remember:On-line helpLots and lots of online exampleshttp://www.notes.net
30Monday, 8 October 2007
Lets ask for some user details, and then register that user.
This is EXAMPLE CODEDont use this in production!
Quick LotusScript Agents: 3
31
31Monday, 8 October 2007
Quick LotusScript Agents: 4
Lets use AdminP to add a user to a group
Prompt for the new username using the address dialog
Prompt for the group
32
32Monday, 8 October 2007
Development, Test & Production EnvironmentsDeploying ApplicationsSigning AgentsQuick @Formula Language AgentsEssential LotusScriptQuick LotusScript AgentsSummary
Agenda
33
33Monday, 8 October 2007
Trust no-one!Proper change control saves your careerProgramming isnt hard
(After all, developers do it..)Be cautious
The debugger is your friend
Summary
34
34Monday, 8 October 2007
Thank you
Worst Practices needs you!Confess your stories….www.TheWorstPractices.com
Bill Buchan http://www.billbuchan.comhadsl http://www.hadsl.com
35
35Monday, 8 October 2007