When setting up a new project we have some tips and tricks to help you do this in the best way possible, incl. infrastructure, database, standard attributes, logging, code alignment, and service center.
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
OutSystems Tips and Tricks
1. | OS Tips and Tricks
OutSystems
Tips and Tricks
Project DO's and DON'Ts,
and what we can learn from comics
2. | OS Tips and Tricks| OS Tips and Tricks
Erik
Brzozowski
Senior OutSystems Consultant| Valuga
@
in
erik.brzozowski@valuga.nl
/erik-brzozowski-nl
3. | OS Tips and Tricks
Main topics
● Project
● Architecture
● Coding
● Processes Timers/BPT
4. | OS Tips and Tricks| OS Tips and Tricks
Project
5. | OS Tips and Tricks
Ask why
● Know the ultimate Goal
■ Design Sprint
● Know the problem you are solving
● Try to talk to everyone
■ Product owner
■ Techlead
■ Architect
■ Developers (also from other teams)
■ Users
6. | OS Tips and Tricks
Scary questions
● But is it possible?
● Will it work?
● Which option takes the least time?
● It’s only a temporary solution, it
doesn't have to be pretty
■ Nothing so permanent as a temporary
solution
Come up with suggestions and
solutions.
7. | OS Tips and Tricks
Backlog management
● Does this user story fit in the ultimate
goal
● Accept that some user stories will not be
built
● If you can’t prioritize this is an indication
that something is wrong
● Start with the most complex user stories
■ Bring the pain forward
8. | OS Tips and Tricks
Match with existing architecture
● When you know the what
● When you know the next thing
to build
● Recheck how this would fit in
the current landscape
9. | OS Tips and Tricks| OS Tips and Tricks
Architecture
https://xkcd.com/1667/
10. | OS Tips and Tricks
How to design
● Iterative process
■ Disclose
■ Organize
■ Assemble
3: Assemble 1: Disclose
2: Organize
iteration
11. | OS Tips and Tricks
Disclose
● User stories and roles
● Information architecture
● Integration technology
● UX expectations
3: Assemble 1: Disclose
2: Organize
iteration
12. | OS Tips and Tricks
Organize
● Group or split Business
concepts
● Place on a canvas
● Possibly disclose more
concepts
3: Assemble 1: Disclose
2: Organize
iteration
13. | OS Tips and Tricks
Assemble
● Match recommended
patterns
● Abstract external
systems
● Check the validation
rules
3: Assemble 1: Disclose
2: Organize
iteration
14. | OS Tips and Tricks
No side references
among orchestration
or end-user modules
● No end-user screens
● Read only entities
Assemble: Rule #1 layer modules (and applications)
● No business logic
● No core entities
● No role based logic
Core Layer
Core business services
Library layer
Non business services
End User Layer
User processes
Orchestration Layer
Cross application orchestration
No upward
references
15. | OS Tips and Tricks
Rule #2 don’t mix owners
Common application
Module 1 Module 3Module 2
Application 1
Module 1 Module 2
Application 2
Module 3Split
Who can make the call to
go to production?
16. | OS Tips and Tricks
Rule #3 don’t mix sponsors
One big application for 3 divisions
General
core 1
General
core 2
Core 1
Front end
division 1 Core 1
Front end
division 2 Core 1
Front end
division 3
Application
division 3
Application
division 2
Application
division 1
Common application
Core 1 Core 2
Core 1
Front end
division 1 Core 1
Front end
division 2 Core 1
Front end
division 3
Split
17. | OS Tips and Tricks
Most architectures start easy
What can go wrong?
● No time to refactor
● Architecture iterations stop
● No designs or documentation
● Team(members) change
● No patterns are used
● Violations are introduced
18. | OS Tips and Tricks| OS Tips and Tricks
Coding
19. | OS Tips and Tricks
Naming conventions
● Use meaningful names
● Use PascalCase
● Create folders for actions and for
structures
● Avoid empty labels
● Suffix foreign keys with Id
● Always group screens by name
● Set the name property of
TableRecords, ShowRecords and
ListRecords
20. | OS Tips and Tricks
Coding
● Always comment complex or
unclear logic
21. | OS Tips and Tricks
Coding
● Always comment complex or
unclear logic
● Keep action flows vertical and
clean
22. | OS Tips and Tricks
Coding
● Always comment complex or
unclear logic
● Keep action flows vertical and
clean
● Use static entities instead of
hard-coded values.
SearchEngines
23. | OS Tips and Tricks
Coding
● Always comment complex or
unclear logic
● Keep action flows vertical and
clean
● Use static entities instead of hard-
coded values.
● Encapsulate data formatting
using user actions
24. | OS Tips and Tricks
Coding
● Always comment complex or
unclear logic
● Keep action flows vertical and
clean
● Use static entities instead of hard-
coded values.
● Encapsulate data formatting using
user actions
● Reuse
■ logic by creating user actions
25. | OS Tips and Tricks
Performance
● JavaScript / CSS
■ Don’t have JS inside expressions,
better to move it to the screen
26. | OS Tips and Tricks
Performance
● JavaScript / CSS
■ Don’t have JS inside expressions,
better to move it to the screen
● Abuse of scope data / Ajax
■ Use refreshQuery to rerun previous
queries
27. | OS Tips and Tricks
Performance
● JavaScript / CSS
■ Don’t have JS inside expressions,
better to move it to the screen
● Abuse of scope data / Ajax
■ Use refreshQuery to rerun previous
queries
● Too many query calls in
preparation
■ Queries called inside a “foreach” in
the preparation or in expressions
inside table records
28. | OS Tips and Tricks
Entities (Datamodel)
● Aggregates
■ No SQL background knowledge required
■ Easy to create and maintain
■ SQL-dialect agnostic
■ Automatically optimised by platform
● Isolate large data types
● Indexes
29. | OS Tips and Tricks
Entities (Datamodel)
● SQL
■ Bulk operations (INSERT/UPDATE/DELETE)
■ Access to DBMS-specific features (rank, pivot leaf etc)
30. | OS Tips and Tricks
Caching
● Webblocks, queries and actions
■ Based on input parameters
● You can create a dummy input
parameter for cache invalidation
● Always keep business logic in mind
31. | OS Tips and Tricks
Code review
● Do a periodic code review
● You can always learn
● Also a good moment to ask, does the
architecture still fit?
● Use static code analysis tools
■ Example: Architecture Dashboard
■ It will always reveal improvement
■ Many improvement can be made in limited
time
32. | OS Tips and Tricks| OS Tips and Tricks
Processes Timers/BPT
33. | OS Tips and Tricks
Timers
● Single process run
● Set schedule
● Timers can’t use input
parameters
● Large batch processing
● Synchronisation patterns
BPT
● Align several operations
● Actions can run in parallel
● Manual actions can be
implemented
● Stop/Start on database events
● Wait activity
34. | OS Tips and Tricks
Timers:
● Timers should never
timeout
● Does not repeat work
● Ensures completeness
● Ensures data integrity
35. | OS Tips and Tricks
BPT - special cases
● Manage own reporting entities
■ Queries over process entities can be
slow
BPT - special cases
● Manage own reporting entities
■ Queries over process entities can be
slow
■ Create own entity
■ Update via callbacks
36. | OS Tips and Tricks
BPT - special cases
● Separate Process Logic from
Application Logic
■ Process and the application are
changing
■ Can lead to lock and time-outs
■ Move the attributes new entity in a one-
to-one relationship.
38. | OS Tips and Tricks
BPT light
● Light Processes are intended to be used for background processing
● Flow only contains 1 automatic activity
● Light BPT start on the creation of a database entity record
● 20 threads from the Light BPT
● Light Processes don’t create entries on BPT tables
40. | OS Tips and Tricks
Thank You!
@ inerik.brzozowski@valuga.
nl
/erik-brzozowski-
nl
Hinweis der Redaktion
introduction, background story, why connected to OutSystems.
https://www.outsystems.com/-/media/A49C3F1FB3BC4280904093BB45B151DC.ashx
7 rules explained in a 20 minutes read. I will highlight one rule
Rule 1: Ask Why
Rule 2: The Small Crisis
Rule 3: Challenge the Status Quo
Rule 4: Be helpful
Rule 5: 80/20
Rule 6: Communicate to be understood
Rule 7: Excel
2:10 PM Harrald Spooren RADS - Rapid Application Design Sprint TECH II
Challenge the proposed solutions -- > Examples where it is technically possible but you are fixing problems of other systems. You are adding legacy in you own application. This will cause problems in the future
Result:
Poor service extractionsUnmanageable dependencies Inflexible solutions
Weak reference through web services, when transaction is not an issue
Keep granularity when integrating with large APIs ... Split by functional groups
Session Variables using large data types (Each web request loads session context which takes longer with large data types, causing contention in the session data model with the increase of concurrent users.
This is even more important when you use AJAX, as that technology invariably increases the number of requests.
)
Session Variables using large data types (Each web request loads session context which takes longer with large data types, causing contention in the session data model with the increase of concurrent users.
This is even more important when you use AJAX, as that technology invariably increases the number of requests.
)
Screens and Web Blocks can also be cached and it is usually better to cache at the boundaries of a “service” (on the UI, on the web service response) as databases already have excellent caching mechanisms and correct indexing is usually enough.
But caching business logic and results rendering can give you that extra degree of performance.
Just make sure the logic you’re caching is not designed to have external side effects (database changes etc).
Cache screens and weblocks. Databases already have great caching mechanisms, so we do not need to worry about that much, in particular if we have a good indexing support.
Caching business logic and results, in particular if you have kind of repetitive hits can be extremely helpful as well.
Careful with the side effects, namely when it affects the database.
https://success.outsystems.com/Documentation/Best_Practices/Performance_Best_Practices/Improving_performance_with_distributed_caching
Billing process flow requires polling an external system (for example, SAP) until a condition is satisfied; it can then be released and proceed its normal process flow.
https://www.outsystems.com/learn/lesson/922/terminate-idle-processes/?LearningPathId=0
https://www.outsystems.com/forums/discussion/41063/light-processes-under-the-hood/
2:15 PM Miguel Melo Launching a BPT Process on Entity Update E1.03