Skip to content

Commit 4fc094f

Browse files
Stephan Waldclaude
andcommitted
Add sample code documentation page
- Create docs/samples.md explaining how to access and use the sample BBj files included with the course - Update index.md and prerequisites.md to reference local samples instead of external repository links Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f502edc commit 4fc094f

3 files changed

Lines changed: 63 additions & 5 deletions

File tree

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ This training covers:
2727

2828
Before starting this course, please review the [Prerequisites](prerequisites) to ensure you have the necessary background knowledge and setup.
2929

30-
## Course Materials
30+
## Sample Code
3131

32-
The course repository with exercise files is available at: [GitHub Repository](https://github.com/ArtifexSoftware/training-dwc)
32+
Hands-on [sample code](samples) is included with this course. Each chapter has corresponding BBj source files you can run and experiment with.
3333

3434
## Setup Requirements
3535

docs/prerequisites.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ There are many other free and paid training courses available. As long as you ar
4747

4848
## Course Materials
4949

50-
Here is the link to the repository with the various files you'll be using throughout this course. The repository is structured in chapters, which correspond with the various chapters contained within this course.
51-
52-
**[Course Repository](https://github.com/ArtifexSoftware/training-dwc)**
50+
The [sample code](samples) for this course is included in the `samples/` directory of the repository. The samples are organized by chapter and include BBj source files, CSS stylesheets, and other supporting files you'll use throughout the course.
5351

5452
## Setup Check
5553

docs/samples.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
sidebar_position: 3
3+
title: Sample Code
4+
---
5+
6+
# Sample Code
7+
8+
This course includes hands-on sample code for each chapter. The samples are BBj source files that you can run, modify, and experiment with as you progress through the training.
9+
10+
## Getting the Samples
11+
12+
The sample files are included in the `samples/` directory of the course repository:
13+
14+
```bash
15+
git clone https://github.com/BasisHub/DWC-Course.git
16+
cd DWC-Course/samples
17+
```
18+
19+
If you've already cloned the repository, the samples are ready to use.
20+
21+
## Sample Directory Structure
22+
23+
Each directory corresponds to topics covered in the course:
24+
25+
| Directory | Chapter | Description |
26+
|-----------|---------|-------------|
27+
| `01_GUI2BUI2DWC/` | [GUI to BUI to DWC](gui-to-bui-to-dwc/) | Basic GUI samples and DWC migration examples |
28+
| `02_CSSStylesAndCustomProperties/` | [Browser Developer Tools](browser-developer-tools/) | CSS styling and custom property examples |
29+
| `03B_ArcFiles/` | [Upgrading Apps](upgrading-apps/) | ARC file configuration samples |
30+
| `03C_Grid2GridEx/` | [Upgrading Apps](upgrading-apps/) | Grid to GridEx migration examples |
31+
| `04_ExtendedAttributes/` | [DWC Controls](dwc-controls/) | Extended control attribute demos |
32+
| `05_CssLayouts/` | [Flow Layouts](flow-layouts/) | Flexbox and CSS Grid layout examples |
33+
| `06_IconPools/` | [Icon Pools](icon-pools/) | Icon pool usage and customization |
34+
| `07_ControlValiation/` | [Control Validation](control-validation/) | Input validation pattern examples |
35+
| `08_BrowserConstraints/` | [Browser Constraints](browser-constraints/) | Browser constraint handling |
36+
| `09_EmbeddingOtherComponents/` | [Embedding Components](embedding-components/) | Web component integration examples |
37+
38+
## Running the Samples
39+
40+
1. **Open in Eclipse/BDT**: Import the sample files into your BBj project in Eclipse with the BDT plugin installed.
41+
42+
2. **Configure for DWC**: Ensure your BBj Services are configured to run applications in DWC mode. See [Registering and Launching](gui-to-bui-to-dwc/registering-launching) for setup instructions.
43+
44+
3. **Run and Experiment**: Execute the `.bbj` files and observe the results in your browser. Each sample is designed to demonstrate specific DWC concepts.
45+
46+
## Sample File Types
47+
48+
The samples include various file types:
49+
50+
- **`.bbj`** - BBj source code files (the main samples)
51+
- **`.css`** - Custom CSS stylesheets
52+
- **`.arc`** - Application resource configuration files
53+
- **`.js`** - JavaScript files for embedded components
54+
55+
## Tips for Learning
56+
57+
- **Read the code comments**: Many samples include inline comments explaining key concepts
58+
- **Modify and re-run**: Change values, add controls, and see what happens
59+
- **Compare before/after**: Some directories include exercise files and their completed versions (e.g., `Exercise-*.bbj` and `*Complete.bbj`)
60+
- **Use browser DevTools**: Inspect the generated HTML and CSS to understand how DWC renders your BBj code

0 commit comments

Comments
 (0)