SmartNSF is one piece of the IBM Domino application modernization puzzle. Learn how you can turn a simple Domino database (NSF) into a smart microservice within minutes. Don't worry if you are new to the world of REST APIs, microservices, OpenAPI specification, and YAML. Christian and Martin will provide you with an introduction to the modern paradigm of the microservice world. We will explore how your "old" skills on @Formulas, Agents, and LotusScript fit into the new world of SmartNSF. SmartNSF also brings great value to XPages, Java, and SSJS gurus. And, last but not least, learn how all of this fits into IBM's REST API strategy and get inspired by what can be done with SmartNSF in your business. Will there be a demo? For sure!
5. TLCC Courses
• The Leader in Notes and Domino Training since
1997
• Self Paced Distance Learning Courses for
Notes/Domino
– XPages, Development, and Administration (user too!)
• OnSite Private Classes
• Mentoring/Consulting Services
• Free demo courses
– Intro. To XPages Development
– Application Development 1
1
6. XPages Courses!
FREE !! Introduction to XPages Development
JavaScript for XPages Development
XPages Development 1
XPages Development 2
Rapid XPages Development using Application
Layout and Dojo UI Controls
Java 1 for XPages Developers
Java 2 for XPages Developers
7. Don’t Miss MWLUG!!!
August 8-10, 2017
Optional Trip to the Air and Space Museum on Friday
Alexandria, VA (just outside D.C.)
40 sessions and workshops!!!
application development, system administration, best practices in
social collaboration, customer business cases, and innovation.
ALL FOR $75!!!
http://www.mwlug.com
9. Asking Questions – Q and A at the end
Use the Orange Arrow button to
expand the GoToWebinar panel
Then ask your questions in the
Questions pane!
We will answer your questions
verbally at the end of the
webinar
10. SmartNSF - 100% Smart - and in color!
Christian Guedeman Martin Jinoch
@guedeWebGate
@mjinoch
12. Agenda and Co
• You ask Why..?
• Lets Start!
• Strategies for Views and Docs
• It‘s Groovy Baby! – 7 Events to go
• Documentation? What a question... Lets Swagger
13. You ask Why???
• It all began with the Domino, Detail and Devil Problem aka:
BUSINESS LOGIC is EVERYWHERE
14. The difference between …
• Business Logic
• Your rules and dependency about your business like:
• If you want to register a new customer, please provide the VAT Number
• No Company without Contact
• Business Logic is independent from the client
• Application behaviour
• Covers questions about “How can I register a new customer”
• Type-a-head for numbers and values
• Is client agnostic (Web Client acts different then Mobile Client)
15. The Inspiration
How can I convert a simple NSF into a micro-service within minutes?
(To protect the business logic)
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.post('/', function (req, res) {
res.send('Got a POST request')
})
app.put('/user', function (req, res) { res.send('Got a PUT request at /
user')
})
app.delete('/user', function (req, res) { res.send('Got a DELETE request
at /user') })
router.GET('topics') {
strategy(DOCUMENTS_BY_VIEW) {
viewName('($All)')
}
mapJson 'id', json:'id', type:'STRING', isformula:true,
formula:'@DocumentUniqueID'
mapJson "date", json:’date',type:'DATETIME', isformula:true,
formula:'@Created'
mapJson "Subject", json:'topic', type:'STRING'
mapJson "author", json:'author', type:’STRING’, isformula:true,
formula:'@Name([CN]; From)'
}
17. Some words about REST
• The power of the „methods”:
• GET -> Give me (one or more objects)
• POST -> Create a new object
• PUT -> Replace the object
• UPDATE -> Update the properties that we submit
• DELETE -> Delete the object
• We do only simple GET, POST and DELETE (for today only)
18. Show me the view (not the money) but fast!
router.GET(‘topics’) {
strategy(VIEWENTRIES_PAGED) {
viewName('(ByDate)')
}
mapJson '$120', json:'topic', type:’STRING'
mapJson 'author', json:'author', type:’STRING'
mapJson 'date', json:’date', type:'DATETIME'
}
20. Strategies
• DOCUMENT_BY_UNID
• DOCUMENT_FROM_VIEW_BY_KEY
• DOCUMENTS_BY_SEARCH_FT_PAGED
• DOCUMENTS_BY_FORMULA_PAGED
• DOCUMENTS_BY_VIEW_PAGED
• DOCUMENTS_FROM_VIEW_BY_KEY_PAGED
• VIEWENTRIES_PAGED
• VIEWENTRIES_BY_CATEGORY_PAGED (available since Beta 4)
• ATTACHMENT
Note: All DOCUMENTS* and VIEWENTRIES* strategies also have non paged versions. Use with
caution, these return the complete dataset at once.
21. Strategies
• All _PAGED Strategies
• Using start and count as URL Parameters
• Are designed to deliver a fast user experience
• All VIEWENTRIES Strategies
• Are using a view as model
• Do not have a direct access to the document
• Are quite fast
• All DOCUMENT Strategies
• Are slower then the VIEWENTRIES strategies but….
• Let you evaluate complex @Formulas for mapJson mapping
22. Power of events
• Every Route supports these events
• VALIDATE
• PRE_LOAD_DOCUMENT
• POST_LOAD_DOCUMENT
• POST_NEW_DOCUMENT
• PRE_SAVE_DOCUMENT
• POST_SAVE_DOCUMENT
• PRE_SUBMIT
23. Groovy in event’s context and Model
• Every Event has a closure
• In each closure the context and the document model are submitted
• Btw. the closure gives you access to the full Java Stack!
24. Open API Specification, Swagger….
• You wont believe, but your Code is documented! - Built in!
25. Call to action
• Download the project
• Enter OpenNTF’s Slack space and
become part of #smartnsf
• Documentation:
https://wiki.openntf.org/display/XRAPI
• Start participating!
26. Questions????
Use the Orange Arrow button to
expand the GoToWebinar panel
Then ask your questions in the
Questions panel!
Remember, we will answer your
questions verbally
27. @guedeWebGate
@mjinoch
@TLCCLtd
@Teamstudio
Upcoming Events:
MWLUG in Alexandria, VA on August 8-10, 2017
Question and Answer Time!
Teamstudio Questions?
contactus@teamstudio.com
978-712-0924
TLCC Questions?
howardg@tlcc.com
888-241-8522 or 561-953-0095
Howard Greenberg Courtney CarterChristian Guedeman Martin Jinoch