Skip to content

Add comprehensive sample demo application and tutorial for Optimizely C# SDK #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 20, 2025

This PR adds a complete sample demo application with comprehensive documentation to help developers get started with the Optimizely C# SDK quickly and effectively.

What's Added

🎯 Sample Demo Application (SampleDemo/OptimizelySDK.SampleDemo)

A fully functional console application that demonstrates all core SDK features:

  • SDK Initialization - Shows proper setup with logging, error handling, and event dispatching
  • A/B Testing - Demonstrates user bucketing into experiment variations with a realistic e-commerce product sorting scenario
  • Feature Flags - Shows feature flag evaluation and variable retrieval
  • Event Tracking - Illustrates conversion tracking with revenue data and custom event tags
  • Best Practices - Provides production-ready patterns and error handling

📚 Comprehensive Documentation

  1. README.md - Complete overview with setup instructions, demo explanation, and customization guide
  2. TUTORIAL.md - Detailed step-by-step implementation guide covering everything from basic setup to advanced patterns
  3. QUICKSTART.md - 5-minute quick start guide for developers who want to get running immediately

Why This Helps

The existing OptimizelySDK.DemoApp is a valuable ASP.NET MVC application, but it has some limitations for learning:

  • Requires .NET Framework setup which can be challenging in modern development environments
  • Complex web application structure can obscure the core SDK concepts
  • Lacks step-by-step guidance for different skill levels

This new sample demo addresses these issues by providing:

  • Simple Console Application - Runs anywhere .NET 8+ is available, no web server needed
  • Progressive Learning - Multiple documentation levels from quick start to comprehensive tutorial
  • Real-World Scenarios - Practical examples like e-commerce A/B testing that developers can relate to
  • Production Patterns - Shows best practices for error handling, dependency injection, and performance

Demo Scenario

The demo simulates an e-commerce application testing different product sorting algorithms:

  • Control: Sort products alphabetically by name
  • Treatment: Sort products by price (low to high)

This scenario is easy to understand and demonstrates key concepts like user bucketing, variation handling, and conversion tracking.

Usage

cd SampleDemo/OptimizelySDK.SampleDemo
dotnet run

The demo includes sample users with different attributes and shows how they get bucketed into variations, plus demonstrates event tracking with realistic revenue data.

Learning Path

  1. Quick Start - Run the demo and read QUICKSTART.md for immediate results
  2. Deep Dive - Work through TUTORIAL.md for comprehensive understanding
  3. Reference - Use README.md for detailed explanations and customization options
  4. Web Demo - Graduate to the existing OptimizelySDK.DemoApp for web-specific patterns

This provides a clear progression from simple console demo to full web application, making the SDK accessible to developers at all skill levels.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Could you guide me by giving sample demo task Add comprehensive sample demo application and tutorial for Optimizely C# SDK Aug 20, 2025
@Copilot Copilot AI requested a review from muzahidul-opti August 20, 2025 11:47
Copilot finished work on behalf of muzahidul-opti August 20, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants