SlideShare uma empresa Scribd logo
1 de 14
XPages Developer
Be more efficient and write better code
Jakob Majkilde
 Education: Data Engineer
 Lotus Notes Developer since 1992 (release 2.1)
 Certified administrator and instructor (early releases) and 8.5 Developer
 Certified Scrum Master, Certified Java Developer
 Founder of notesnet.dk
 Blogs
 XPages.dk
 Lotusscript.dk
 Majkilde.com
 Book reader, because programming is a lot more than syntax …
 Refactoring, Domain Driven Design, Clean Code, The Art of Unit Testing, Extreme Programming, Design
Patterns, Working with Legacy Code, Psychology of Computer Programming, The Pragmatic Programmer,
The Mythical Man Month, Effective Java, Mastering XPages, Portable command Guide, XPages Ext Lib,
and more …
Basic setup
 As a developer you need to be ‘in flow’. An interruption and you will have to start all over
 Use the fastest PC possible – a SSD disk is required
 Work in a silent office (no phones). Disable email and skype popups
 Max. 5 seconds from code to test = instant deployment
 Build and run
 Not: build, replicate, refresh design, sign …
 You need at least Notes 8.5.3 to run XPages (but 9.0.1 is a lot better)
 Do yourself a favor: use 2 (or 3) monitors
 No matter what the admin says: You do need access and permission to install your own tools and
software on your PC
 The Programmer’s Bill of Rights
Learn the DDE
 Tweak it: http://xpages.dk/?p=1075
 Memory settings in lotusnotesframeworkrcpdeployjvm.properties
 vmarg.Xmx=-Xmx1024m
 vmarg.Xms=-Xms512m
 Use shortcuts
 Open Type: Ctrl+Shift+T
 Open Resource: Ctrl+Shift+R
 Open Declaration: F3 (or Ctrl+Click)
 Last Edit Location: Ctrl+Q
 Rename: Shift+Alt+R
 And of course:
 Ctrl+D, Ctrl+M, Ctrl+F8, Ctrl+Shift+7, …
 Use code templates!
Use a local server
 Local server
 Build times will be too slow on a central Domino server (Notes uses a lot of network bandwidth)
 XPages only works for one developer at a time
 If you have a compiler error – then nobody else can build
 SessionAsSigner requires one signer only
 Only one debugger session at a time
 You need access to the log files
 You must be able to restart the http task at will
 You need access (java.policy, ext folder, etc)
 Don’t ever use a production server
 Disable all tasks but HTTP
 Update,Replica,Router,AMgr,AdminP,CalConn,Sched,RnRMgr,Catalog,Design,UpdAll,Statlog
 Also recommended by Paul Withers and Nathan Freeman
 The blagger’s guide to XPages Domino Administraion
Source control is a must
 If you are the only developer – then you could just replicate, but
 Source control gives you
 Full tracking and version control
 When your boss asks: when, why, who made the change? You have the answer!
 Shared code (across domains) / several developers
 Branching
 Make a hotfix to the current version and work on the new version on the same time
 Backup
 Delete or refactor code. No problem – you can always go back
 With two developers, both having there own local server
 How do you think Notes handles replication conflicts?
 Answer: newest change will win – the older is lost.
 Solution: Source Control (e.g. git)
Source control
 We use git, SourceTree and Bitbucket
 It’s all free, but other options are available too
 But, keep making manual backups of your files in the beginning – there is a learning curve!
 Tips
 Use a .gitignore file
 Handle line breaks with ‘Autocrlf = true’ – we had problems in a mixed Windows/Mac environment
 See David Leedys video, Per Henrik Laustens presentation or
my blog entry: http://xpages.dk/?p=690. Best practice here (pending)
Source Control Settings
 Preferences, General, Workspace:
 Refresh Automatically: Yes
 Build Automatically: Yes
 Auto build no longer changes the signatures
 Encoding: Default (Cp1252)
 Because that’s what others do
 Preferences, Domino Designer, Source Control
 Automatic Import/Export: No
 Auto build is required
 Use Binary DXL: Yes
 important that everybody does the same
 Notice:
 The auto refresh doesn’t work on network drives. Do a manual refresh (F9) from Package Explorer
Think ‘Auto Refresh’ is required when using ‘Auto
import/export’, otherwise strange things might
happen if the ODP is not in sync with the disk.
Yes to ‘Auto refresh’ – but not with the ‘Auto
import/export’ as this will start an indefinite
refresh/rebuild loop
Source Control Tips
 On-Disc-Project
 Prefix the project name with ODP or GIT
 Makes it easier to distinguish them from your nsf files
 Make a folder for the project
 And one (or more) sub folders for the nsf file(s)
 Use Git Flow
 http://nvie.com/posts/a-successful-git-branching-model/
 New project
 Enable Git flow
 Make a initial commit
 Then start coding
Unit testing
 In the book “Working Effectively with legacy code”, Michael Feathers wrote:
 “Legacy code is simply code without tests”
 Pros
 Better Design / better structure
 You can change your code without breaking it (refactoring)
 10 more reasons here
 Bottom line: better code with fewer bugs in less time !
 Links
 Unit testing in XPages with JUnit: http://xpages.dk/?p=1162
 The Art of Unit Testning
 Unit testning: Why bother?
Reuse
 Lots of great open source code on the internet
 OpenNTF.org
 XSnippets
 XPages Designer Import Tool: http://xpages.dk/?p=1098
 ExtLib
 Domino API
 Apache.org
 The FREE Java toolbox you didn’t know you had
 File handling, String handling, Validators, Office Integration (POI), PDF generation (FOP)
 Beware of the security settings: http://xpages.dk/?p=1373
 Code everything in Java using Design Patterns and MVC (more on frostillic and Pipalia)
Tools from OpenNTF
 Debug
 Debug Toolbar
 Log File Reader 2.0
 Log
 XPages OpenLog Logger
 Profiling
 XPages toolbox
 XPages Masterclass (video series)
Keypoints
 Local development server
 Source Control
 Unit Testning
 OpenNTF & Apache
Need help?
 Contact the ‘Gang of four’
 Jakob Majkilde: majkilde.dk
 Per Henrik Lausten: phl-consult.dk
 John Dalsgaard: dalsgaard-data.dk
 John Foldager: izone.dk

Mais conteúdo relacionado

Mais procurados

Alternatives to Proprietary Software
Alternatives to Proprietary SoftwareAlternatives to Proprietary Software
Alternatives to Proprietary Softwaretechlug
 
Chef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & ChefChef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & Chefice799
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linuxtechlug
 
How to write a Dockerfile
How to write a DockerfileHow to write a Dockerfile
How to write a DockerfileKnoldus Inc.
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Manning Publications
 
First adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram InstituteFirst adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram InstituteAndrea Telatin
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional ProgrammerDave Cross
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.Vlad Fedosov
 
Software Testing
Software TestingSoftware Testing
Software TestingAndrew Wang
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltPuppet
 
Jenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesJenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesDaniel Paulus
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 
Try harder or go home
Try harder or go homeTry harder or go home
Try harder or go homejaredhaight
 
DevOps Automation with Puppet Bolt & Puppet Enterprise
DevOps Automation with Puppet Bolt & Puppet EnterpriseDevOps Automation with Puppet Bolt & Puppet Enterprise
DevOps Automation with Puppet Bolt & Puppet EnterpriseEficode
 
Virtual Puppet Ecosystem Workshop - March 18,2020
Virtual Puppet Ecosystem Workshop - March 18,2020Virtual Puppet Ecosystem Workshop - March 18,2020
Virtual Puppet Ecosystem Workshop - March 18,2020Puppet
 

Mais procurados (20)

Is Python still production ready ? Ludovic Gasc
Is Python still production ready ? Ludovic GascIs Python still production ready ? Ludovic Gasc
Is Python still production ready ? Ludovic Gasc
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
Alternatives to Proprietary Software
Alternatives to Proprietary SoftwareAlternatives to Proprietary Software
Alternatives to Proprietary Software
 
Chef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & ChefChef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & Chef
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
 
How to write a Dockerfile
How to write a DockerfileHow to write a Dockerfile
How to write a Dockerfile
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...
 
First adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram InstituteFirst adventure within a shell - Andrea Telatin at Quadram Institute
First adventure within a shell - Andrea Telatin at Quadram Institute
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
Test driving-qml
Test driving-qmlTest driving-qml
Test driving-qml
 
From VB Script to PowerShell
From VB Script to PowerShellFrom VB Script to PowerShell
From VB Script to PowerShell
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet Bolt
 
Jenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packagesJenkins and Docker for native Linux packages
Jenkins and Docker for native Linux packages
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
Try harder or go home
Try harder or go homeTry harder or go home
Try harder or go home
 
DevOps Automation with Puppet Bolt & Puppet Enterprise
DevOps Automation with Puppet Bolt & Puppet EnterpriseDevOps Automation with Puppet Bolt & Puppet Enterprise
DevOps Automation with Puppet Bolt & Puppet Enterprise
 
Virtual Puppet Ecosystem Workshop - March 18,2020
Virtual Puppet Ecosystem Workshop - March 18,2020Virtual Puppet Ecosystem Workshop - March 18,2020
Virtual Puppet Ecosystem Workshop - March 18,2020
 

Semelhante a X page developer

Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily usearun.arwachin
 
Bp106 Worst Practices Final
Bp106   Worst Practices FinalBp106   Worst Practices Final
Bp106 Worst Practices FinalBill Buchan
 
Novice Programmers Workshop
Novice Programmers WorkshopNovice Programmers Workshop
Novice Programmers WorkshopAlec Clews
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development EnvironmentsPhilip Johnson
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
Jenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetupJenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetupCloudBees
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Per Henrik Lausten
 
[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategiesrahulbot
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoPeter Bittner
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betadigitalzombie
 
TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensionsRoberto Segura
 
Getting Started with the OpenNTF Domino API
Getting Started with the OpenNTF Domino APIGetting Started with the OpenNTF Domino API
Getting Started with the OpenNTF Domino APITeamstudio
 
Blugsphere2011 dev
Blugsphere2011 devBlugsphere2011 dev
Blugsphere2011 devAusLUG
 
The Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingThe Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingJuan J. Merelo
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Makefile
MakefileMakefile
MakefileIonela
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligenceCarlos Toxtli
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.Richard Taylor
 

Semelhante a X page developer (20)

How do we do it
How do we do itHow do we do it
How do we do it
 
Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily use
 
Lug
LugLug
Lug
 
Bp106 Worst Practices Final
Bp106   Worst Practices FinalBp106   Worst Practices Final
Bp106 Worst Practices Final
 
Novice Programmers Workshop
Novice Programmers WorkshopNovice Programmers Workshop
Novice Programmers Workshop
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development Environments
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Jenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetupJenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetup
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
 
[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies[Mas 500] Software Development Strategies
[Mas 500] Software Development Strategies
 
Continuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon OttoContinuous Delivery for Python Developers – PyCon Otto
Continuous Delivery for Python Developers – PyCon Otto
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 beta
 
TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensions
 
Getting Started with the OpenNTF Domino API
Getting Started with the OpenNTF Domino APIGetting Started with the OpenNTF Domino API
Getting Started with the OpenNTF Domino API
 
Blugsphere2011 dev
Blugsphere2011 devBlugsphere2011 dev
Blugsphere2011 dev
 
The Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingThe Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms Programming
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Makefile
MakefileMakefile
Makefile
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
 

Último

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

X page developer

  • 1. XPages Developer Be more efficient and write better code
  • 2. Jakob Majkilde  Education: Data Engineer  Lotus Notes Developer since 1992 (release 2.1)  Certified administrator and instructor (early releases) and 8.5 Developer  Certified Scrum Master, Certified Java Developer  Founder of notesnet.dk  Blogs  XPages.dk  Lotusscript.dk  Majkilde.com  Book reader, because programming is a lot more than syntax …  Refactoring, Domain Driven Design, Clean Code, The Art of Unit Testing, Extreme Programming, Design Patterns, Working with Legacy Code, Psychology of Computer Programming, The Pragmatic Programmer, The Mythical Man Month, Effective Java, Mastering XPages, Portable command Guide, XPages Ext Lib, and more …
  • 3. Basic setup  As a developer you need to be ‘in flow’. An interruption and you will have to start all over  Use the fastest PC possible – a SSD disk is required  Work in a silent office (no phones). Disable email and skype popups  Max. 5 seconds from code to test = instant deployment  Build and run  Not: build, replicate, refresh design, sign …  You need at least Notes 8.5.3 to run XPages (but 9.0.1 is a lot better)  Do yourself a favor: use 2 (or 3) monitors  No matter what the admin says: You do need access and permission to install your own tools and software on your PC  The Programmer’s Bill of Rights
  • 4. Learn the DDE  Tweak it: http://xpages.dk/?p=1075  Memory settings in lotusnotesframeworkrcpdeployjvm.properties  vmarg.Xmx=-Xmx1024m  vmarg.Xms=-Xms512m  Use shortcuts  Open Type: Ctrl+Shift+T  Open Resource: Ctrl+Shift+R  Open Declaration: F3 (or Ctrl+Click)  Last Edit Location: Ctrl+Q  Rename: Shift+Alt+R  And of course:  Ctrl+D, Ctrl+M, Ctrl+F8, Ctrl+Shift+7, …  Use code templates!
  • 5. Use a local server  Local server  Build times will be too slow on a central Domino server (Notes uses a lot of network bandwidth)  XPages only works for one developer at a time  If you have a compiler error – then nobody else can build  SessionAsSigner requires one signer only  Only one debugger session at a time  You need access to the log files  You must be able to restart the http task at will  You need access (java.policy, ext folder, etc)  Don’t ever use a production server  Disable all tasks but HTTP  Update,Replica,Router,AMgr,AdminP,CalConn,Sched,RnRMgr,Catalog,Design,UpdAll,Statlog  Also recommended by Paul Withers and Nathan Freeman  The blagger’s guide to XPages Domino Administraion
  • 6. Source control is a must  If you are the only developer – then you could just replicate, but  Source control gives you  Full tracking and version control  When your boss asks: when, why, who made the change? You have the answer!  Shared code (across domains) / several developers  Branching  Make a hotfix to the current version and work on the new version on the same time  Backup  Delete or refactor code. No problem – you can always go back  With two developers, both having there own local server  How do you think Notes handles replication conflicts?  Answer: newest change will win – the older is lost.  Solution: Source Control (e.g. git)
  • 7. Source control  We use git, SourceTree and Bitbucket  It’s all free, but other options are available too  But, keep making manual backups of your files in the beginning – there is a learning curve!  Tips  Use a .gitignore file  Handle line breaks with ‘Autocrlf = true’ – we had problems in a mixed Windows/Mac environment  See David Leedys video, Per Henrik Laustens presentation or my blog entry: http://xpages.dk/?p=690. Best practice here (pending)
  • 8. Source Control Settings  Preferences, General, Workspace:  Refresh Automatically: Yes  Build Automatically: Yes  Auto build no longer changes the signatures  Encoding: Default (Cp1252)  Because that’s what others do  Preferences, Domino Designer, Source Control  Automatic Import/Export: No  Auto build is required  Use Binary DXL: Yes  important that everybody does the same  Notice:  The auto refresh doesn’t work on network drives. Do a manual refresh (F9) from Package Explorer Think ‘Auto Refresh’ is required when using ‘Auto import/export’, otherwise strange things might happen if the ODP is not in sync with the disk. Yes to ‘Auto refresh’ – but not with the ‘Auto import/export’ as this will start an indefinite refresh/rebuild loop
  • 9. Source Control Tips  On-Disc-Project  Prefix the project name with ODP or GIT  Makes it easier to distinguish them from your nsf files  Make a folder for the project  And one (or more) sub folders for the nsf file(s)  Use Git Flow  http://nvie.com/posts/a-successful-git-branching-model/  New project  Enable Git flow  Make a initial commit  Then start coding
  • 10. Unit testing  In the book “Working Effectively with legacy code”, Michael Feathers wrote:  “Legacy code is simply code without tests”  Pros  Better Design / better structure  You can change your code without breaking it (refactoring)  10 more reasons here  Bottom line: better code with fewer bugs in less time !  Links  Unit testing in XPages with JUnit: http://xpages.dk/?p=1162  The Art of Unit Testning  Unit testning: Why bother?
  • 11. Reuse  Lots of great open source code on the internet  OpenNTF.org  XSnippets  XPages Designer Import Tool: http://xpages.dk/?p=1098  ExtLib  Domino API  Apache.org  The FREE Java toolbox you didn’t know you had  File handling, String handling, Validators, Office Integration (POI), PDF generation (FOP)  Beware of the security settings: http://xpages.dk/?p=1373  Code everything in Java using Design Patterns and MVC (more on frostillic and Pipalia)
  • 12. Tools from OpenNTF  Debug  Debug Toolbar  Log File Reader 2.0  Log  XPages OpenLog Logger  Profiling  XPages toolbox  XPages Masterclass (video series)
  • 13. Keypoints  Local development server  Source Control  Unit Testning  OpenNTF & Apache
  • 14. Need help?  Contact the ‘Gang of four’  Jakob Majkilde: majkilde.dk  Per Henrik Lausten: phl-consult.dk  John Dalsgaard: dalsgaard-data.dk  John Foldager: izone.dk