CBSE components are pre-built, reusable Lambda functions designed to increase productivity and reduce errors. They must be self-contained, accessible through interfaces, fully documented and tested. Recent developments like GitHub Gist for distribution and Excel's Advanced Formula Environment for importing components have enabled the CBSE approach in Excel. CBSE promises quicker modeling through assembly of pre-existing components and improved reliability from pre-tested, reusable components that can be easily incorporated into models.
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
CBSE and Excel Lite for LAMBDA Authors
1. What are 5G LAMBDAs?
5G is a branding of component-based modeling in
Excel. 5G components are:
• Easy to use
• Reusable
• Fully tested
• Documented
• CBSE-Compliant
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 1
2. What is CBSE?
CBSE (Component-based software engineering)
• Developed in the late ’90s.
• Relies on pre-built, pre-tested components
• Components:
• Encapsulate specific functionality
• Have well-defined interfaces (arguments)
• And are 100% self-contained
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 2
3. CBSE’s Value
Proposition
Assembling models from CBSE components:
• Increases productivity
• Reduces errors
• Requires no special technical skills
Quick, Correct, Easy
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 3
4. What are CBSE-Compliant LAMBDAs?
LAMBDAs that are constructed to be:
• Reusable
• Accessible through interfaces
• 100% Self-contained
• Provide user feedback
• Documented and Tested
• Easily distributed and incorporated
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 4
6. Writing CBSE Compliant LAMBDAs
What follows are those things that we must do to make
our LAMBDAs CBSE-compliant.
WARNING: The next section starts at the beginner level
and then quickly progresses to intermediate-level
LAMBDA authors.
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 6
7. LAMBDA Sections
• Internal Argument Names – How calculations refer to function arguments.
• Calculations – The collection of Excel functions used by the LAMBDA
• Function Arguments – Values passed to the LAMBDA (not in the
LAMBDA)
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 7
=LAMBDA([ArgName1, ArgName2, …], Calculation)([ArgValue1, ArgValue2,…])
Internal Argument Names Calculations Function Arguments
8. Reusable
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 8
• Created to satisfy a recurring need.
• Designed for reuse in any workbook.
• May be used multiple times within the same workbook.
• From reuse and continuous improvement, components
become ‘battle-tested’
9. Accessible Through
Interfaces
Interfaces are the component’s arguments, also known as
parameters.
Row 3 is non-compliant because inputs are passed as
references, not arguments
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 9
Arguments
No
Arguments
10. Self-Contained
Everything needed for the component’s functionality is
inside the component or provided through interfaces.
Row 3 is non-compliant because calculations are
dependent on values in $B$1:$E$1
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 10
11. Provide User Feedback
When errors are encountered, the component must alert
the user to the error and should suggest corrective
measures.
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 11
The component at right
fails because of an
invalid date and, as a
result, displays its in-
line help.
12. CODE
EXAMPLE
2023 12
Reducing Errors in Excel Models with Component-Based Software Engineering
User Feedback
Inline help shows when no
parameters are entered, or
the LAMBDA fails. See help
output below source.
Revision log
Component Name
Figure 4 Example CBSE compliant documentation for LAMBDAs
Description of services
Allowable inputs
Example usage
Interface (Arguments)
Help Output
Functional code
13. Documented and Tested
Components are expected to be error-free
• Documentation describes functionality.
• Common scenarios test functionality conforms to
documentation.
• Edge tests confirm special scenarios conform to
documentation.
• Negative tests confirm inputs that should error, do.
• Revisions incorporate latest improvements
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 13
14. Easily Distributed and Incorporated
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 14
Store components in GitHub
Gist
15. Why now?
CBSE requires 3 recent developments:
• Turing complete programming languages - LAMBDA
makes Excel Turing complete
• Integration Facility – Microsoft’s Advanced Formula
Environment (AFE) eases importing LAMBDA
modules.
• Distribution - GitHub Gists provide free LAMBDA
module repositories that AFE can import from readily.
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 15
16. Summary
2023 Reducing Errors in Excel Models with Component-Based Software Engineering 16
Components are pre-built, pre-tested, LAMBDA functions designed for reuse in any workbook.
CBSE components require:
• Facilities for distribution and access satisfied by GitHub Gist
• Facilities for easily acquiring and incorporating components satisfied by AFE
The CBSE promises are:
• Quicker model development through assembly of pre-existing, non-trivial components
• Improved reliability from pre-tested and, over time, battle-tested components.
• Ease of implementation because components look and feel like familiar Excel functions.
My hope is:
• Component creators will emerge to create quality components addressing recurring needs.
• Excel modelers will embrace component-based modeling because it is quick, correct, and easy.