Your SlideShare is downloading. ×
scriptcs.net@scriptcsnetwww.scriptcs.net
scriptcs.net@filip_wojgithub.com/filipwwww.strathweb.comwww.arcmedia.ch
scriptcs.netWho is scriptcs? Community (!) Coordinators Glenn Block (@glennblock) Justin Rusbatch (@jrusbatch) Filip ...
scriptcs.netMetrics 525 watchers 110 forks 142 pull requests 29 unique contributors 14 community contributed script p...
scriptcs.netKhalid AbuhakmehIan Battersby Nick Berardi Glenn Block Scott Blomquist Danielle Boldt Tim EricksonJonas Folles...
scriptcs.netWhat is scriptcs? OSS project enabling rich C# scripting experience Script and execute -or- use REPL Robust...
scriptcs.net
scriptcs.netScriptcs overviewscriptcsScript EnginePackageManagementScript Packs
scriptcs.netKey scriptcs features Relaxed C# syntax & code semantics As defined in “Interactive C#/VB REPL and Script - ...
scriptcs.netScriptcs modelRoslyn / Mono.Csharp*NugetOSS libraries MEF
scriptcs.netOSS libraries used by scriptcs Autofac (dependency injection) Common Logging, log4net (logging) LiteGuard (...
scriptcs.netGetting started with scriptGetpackages*• Scriptcs -installWritecode• Any editorExecute • CLI or hosted
scriptcs.netDemo: Getting started with script
scriptcs.netDemo: #load & #r
scriptcs.netGetting started with REPLGetpackages*• Scriptcs -installRunscriptcsWritecodeEvaluate
scriptcs.netDemo: Getting started - REPL
scriptcs.net
scriptcs.netScript code semantics No top level class No arbitrary namespaces No Main method Global functions allowed ...
scriptcs.net
scriptcs.netTypical C# experience Start Visual Studio (...wait...) Choose VS project template Create new solution Add ...
scriptcs.net
scriptcs.netTypical scriptcs experience Install Nuget packages with “scriptcs –install” Write code in any text editor R...
scriptcs.netSelf hosted server – traditional C#
scriptcs.netSelf hosted server – scriptcs / node.js
scriptcs.netDemo: Nancy
scriptcs.netRole of script packsImport referencesImport namespacesExpose functionality
scriptcs.netScript pack example: NUnit References nunit.core.dll, nunit.core.interfaces.dll, nunit.framework.dll Namesp...
scriptcs.netscriptcs Nuget integration Developed to work around nuget.exe limitations scriptcs –install Gets all packag...
scriptcs.netDemo: RavenDB
scriptcs.netDemo: P/Invoke
scriptcs.netDemo: WPF
scriptcs.netGet scriptcs CLI distributed via Chocolatey cinst scriptcs Libs available on Nuget Nightly builds on MyGet...
scriptcs.netWhat’s next? Pluggable CLI commands Pluggable REPL commands Export to Visual Studio solution Mono support...
scriptcs.net
Introduction to Scriptcs
Upcoming SlideShare
Loading in...5
×

Introduction to Scriptcs

684

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
684
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Introduction to Scriptcs "

  1. 1. scriptcs.net@scriptcsnetwww.scriptcs.net
  2. 2. scriptcs.net@filip_wojgithub.com/filipwwww.strathweb.comwww.arcmedia.ch
  3. 3. scriptcs.netWho is scriptcs? Community (!) Coordinators Glenn Block (@glennblock) Justin Rusbatch (@jrusbatch) Filip Wojcieszyn (@filip_woj) Core Commiters Damian Schenkelman (@dschenkelman) Kristian Hellang (@khellang)
  4. 4. scriptcs.netMetrics 525 watchers 110 forks 142 pull requests 29 unique contributors 14 community contributed script packs (extensions) Currently at v0.5
  5. 5. scriptcs.netKhalid AbuhakmehIan Battersby Nick Berardi Glenn Block Scott Blomquist Danielle Boldt Tim EricksonJonas Follesø Victor Grigoriu Andreas Håkansson Kristian Hellang lbargaoanu Denis Mentey JohnNelson Alexander Nyquist David Pendray Aaron Powell Adam Ralph Justin Rusbatch DamianSchenkleman Paul Shmakov Lodewijk Sioen Brandon Stirnaman Paul Stovell Patrik Svensson KevinTrethewey Michael Wade Filip Wojcieszyn Matt WrockContributors
  6. 6. scriptcs.netWhat is scriptcs? OSS project enabling rich C# scripting experience Script and execute -or- use REPL Robust extensibility model Low ceremony, lightweight Use your favorite text editor No compilation/projects/solutions Built on top of Nuget & Roslyn (no hard dependencies)
  7. 7. scriptcs.net
  8. 8. scriptcs.netScriptcs overviewscriptcsScript EnginePackageManagementScript Packs
  9. 9. scriptcs.netKey scriptcs features Relaxed C# syntax & code semantics As defined in “Interactive C#/VB REPL and Script - CodeSemantics Spec“ white paper REPL Node.js-like extensibility model (script packs) Debug & step through in Visual Studio Sublime text plugin Scriptcs.Core available as a hostable service Nuget integration
  10. 10. scriptcs.netScriptcs modelRoslyn / Mono.Csharp*NugetOSS libraries MEF
  11. 11. scriptcs.netOSS libraries used by scriptcs Autofac (dependency injection) Common Logging, log4net (logging) LiteGuard (argument checks) Nuget Core (package installation as a service) PowerArgs (command line parsing) ServiceStack.Text (serialization) Moq, xunit, Should (testing)
  12. 12. scriptcs.netGetting started with scriptGetpackages*• Scriptcs -installWritecode• Any editorExecute • CLI or hosted
  13. 13. scriptcs.netDemo: Getting started with script
  14. 14. scriptcs.netDemo: #load & #r
  15. 15. scriptcs.netGetting started with REPLGetpackages*• Scriptcs -installRunscriptcsWritecodeEvaluate
  16. 16. scriptcs.netDemo: Getting started - REPL
  17. 17. scriptcs.net
  18. 18. scriptcs.netScript code semantics No top level class No arbitrary namespaces No Main method Global functions allowed Script packs accessible through Require<T> #load directive to load script from script #r directive to reference an assembly from script
  19. 19. scriptcs.net
  20. 20. scriptcs.netTypical C# experience Start Visual Studio (...wait...) Choose VS project template Create new solution Add references, install Nuget packages, importnamespaces Compile Run (repeat: compile+run) Difficult to distribute source code (bloated)
  21. 21. scriptcs.net
  22. 22. scriptcs.netTypical scriptcs experience Install Nuget packages with “scriptcs –install” Write code in any text editor Run (repeat: edit & run) Easy to distribute code (just CSX + packages.config)
  23. 23. scriptcs.netSelf hosted server – traditional C#
  24. 24. scriptcs.netSelf hosted server – scriptcs / node.js
  25. 25. scriptcs.netDemo: Nancy
  26. 26. scriptcs.netRole of script packsImport referencesImport namespacesExpose functionality
  27. 27. scriptcs.netScript pack example: NUnit References nunit.core.dll, nunit.core.interfaces.dll, nunit.framework.dll Namespaces Nunit.Framework, System.Reflection Functionality public TestResult RunAllUnitTests(Assembly testAssembly =null) public TestResult RunAllUnitTests(Action<string> callback,Assembly testAssembly = null)
  28. 28. scriptcs.netscriptcs Nuget integration Developed to work around nuget.exe limitations scriptcs –install Gets all packages from packages.config with dependencies scriptcs –install <package name> Gets specific package with dependencies scriptcs –save Creates packages.config based on packages folder scriptcs –clean Gets rid of packages folder and unnecessary binaries
  29. 29. scriptcs.netDemo: RavenDB
  30. 30. scriptcs.netDemo: P/Invoke
  31. 31. scriptcs.netDemo: WPF
  32. 32. scriptcs.netGet scriptcs CLI distributed via Chocolatey cinst scriptcs Libs available on Nuget Nightly builds on MyGet Build from source github.com/scriptcs
  33. 33. scriptcs.netWhat’s next? Pluggable CLI commands Pluggable REPL commands Export to Visual Studio solution Mono support Script packs as scripts ScriptCatalog – extend applications (MEF) with scriptcs Improved ScriptCs.Core API
  34. 34. scriptcs.net

×