SlideShare une entreprise Scribd logo
1  sur  51
NuGet for the Enterprise

      ORGANIZE YOUR CHICKENS


FEBRUARY 12, 2012 | SLIDE 1
WHO ARE WE?
        Maarten Balliauw
        Antwerp, Belgium
        www.realdolmen.com
        Focus on web
          ASP.NET, ASP.NET MVC, PHP, Azure, …
          MVP Windows Azure (formerly ASP.NET)
        http://blog.maartenballiauw.be
        @maartenballiauw




FEBRUARY 12, 2012 | SLIDE 2
WHO ARE WE?
        Xavier Decoster
        Antwerp, Belgium
        www.realdolmen.com
        Focus on web/ALM
          Visual Studio, TFS, Scrum, ...
          Silverlight, ASP.NET, ASP.NET MVC, …
        http://www.xavierdecoster.com
        @xavierdecoster




FEBRUARY 12, 2012 | SLIDE 3
AGENDA
        Chickens?
        NuGet
        Scenarios
          Host your own NuGet repository
          Continuous (Package) Integration
          (Ab)using NuGet
        Conclusion




FEBRUARY 12, 2012 | SLIDE 4
Dependency Hell

      WELCOME TO DLL HELL


FEBRUARY 12, 2012 | SLIDE 5
WELCOME TO DEPENDENCY HELL
 “A term for the frustration of software users who have installed
 software packages which have dependencies on specific
 versions of other software packages.”
                                                     Source: Wikipedia




FEBRUARY 12, 2012 | SLIDE 6
CAUSE AND EFFECT
        Reinventing the wheel
          We don’t need that dependency
          “If they can do it, we can do it, but better”

                  What happened to reuse of components?


        Marketing does the versioning
          People are waiting for v2 to buy
          Let’s call it v4 Platform Update SP3 November Edition
           KB2348063 RTW Refresh

                  We lost ownership of AssemblyVersion ?



FEBRUARY 12, 2012 | SLIDE 7
Using NuGet

      PACKAGE MANAGEMENT


FEBRUARY 12, 2012 | SLIDE 8
PACKAGE MANAGEMENT
        NuGet to the Rescue!
        “NuGet is a Visual Studio extension that makes it easy to install
        and update open source libraries and tools in Visual Studio.”




FEBRUARY 12, 2012 | SLIDE 9
PACKAGE WHAT?
        Package Management
        “…a collection of software tools to automate the process of
        installing, upgrading, configuring, and removing software
        packages…”
                                                          Source: Wikipedia



        Simple concept
          Find Packages
          (Re)Use Packages
          Produce Packages




FEBRUARY 12, 2012 | SLIDE 10
GETTING STARTED
        Tooling:
            NuGet Package Manager (http://nuget.org)
            NuGet Package Explorer (http://npe.codeplex.com)
            Install-Package NuGetPowerTools
            Install-Package NuGet.CommandLine


        Guidance and documentation
          http://docs.nuget.org




FEBRUARY 12, 2012 | SLIDE 11
CONSUMING PACKAGES
        Simple as adding a reference




FEBRUARY 12, 2012 | SLIDE 12
ONE DIALOG TO RULE THEM ALL…
        Install-Package
        Update-Package
        Uninstall-Package

        Settings
          Package Sources
          Local (offline) Cache location


        Also: Manage packages on solution level!
          Right-click solution > Manage NuGet Packages…




FEBRUARY 12, 2012 | SLIDE 13
NUGET PACKAGE MANAGER CONSOLE
        PowerShell enabled!

        Extensible!
          Scaffolding, NuGetPowerTools, …
          %UserProfile%DocumentsWindowsPowerShellNuGet_profile.ps1




FEBRUARY 12, 2012 | SLIDE 14
CONFIGURABLE PACKAGE SOURCES
        Configurable through…
          NuGet Library Package Manager (VS add-in)




          NuGet.config (in %APPDATA%RoamingNuGetNuGet.config)
          NuGet.settings.targets (MSBUILD file part of NuGetPowerTools)




FEBRUARY 12, 2012 | SLIDE 15
CREATING PACKAGES
        What’s a package?
            Just a zip-file containing:
            … content and source code (to be injected into target project)
            … PowerShell scripts and executables
            … configuration file and source code transformations
                 http://docs.nuget.org/docs/creating-packages/Configuration-File-
                  and-Source-Code-Transformations




FEBRUARY 12, 2012 | SLIDE 16
PACKAGE CONVENTIONS
        Conventions
          http://docs.nuget.org/docs/creating-packages/Package-
           Conventions

          Folder structure
                   Tools (init.ps1, install.ps1, uninstall.ps1)
                   Content
                   Manifest (.nuspec file)
                   Lib




FEBRUARY 12, 2012 | SLIDE 17
NUGET MANIFEST SPECIFICATION
        NuSpec manifest
          XML file (with XSD available)
          Package metadata




FEBRUARY 12, 2012 | SLIDE 18
SEMANTIC VERSIONING
        Think about your versioning! (semver.org)

            Major                  Breaking changes
            Minor                  Backwards compatible API
                                   additions/changes
            Patch                  Bugfixes not affecting the
                                   API

          Always specify lowerbound
          Use a version range (lowerbound + upperbound) when
           versioning of package you depend on is messed up




FEBRUARY 12, 2012 | SLIDE 19
ADVANCED USAGE SCENARIOS
        Host your own NuGet repository
        Continuous (Package) Integration
        (Ab)using NuGet




FEBRUARY 12, 2012 | SLIDE 20
Those chickens are mine!

      HOSTING YOUR OWN
      REPOSITORY

FEBRUARY 12, 2012 | SLIDE 21
HOSTING YOUR OWN REPOSITORY
        NuGet = public feed
          Privacy
          Intellectual property


        NuGet maintained by package authors
          Author removes v1.0.45 and you depend on it




FEBRUARY 12, 2012 | SLIDE 22
SOLUTIONS
        Folder / File share
        Orchard Gallery (or NuGet Gallery)
        NuGet.Server package
        MyGet




FEBRUARY 12, 2012 | SLIDE 23
Install-Package NuGet.Server

      NUGET.SERVER DEMO


FEBRUARY 12, 2012 | SLIDE 24
NUGET.SERVER LIMITATIONS
        Only 1 feed per installation
        No UI: up to you to build it
        No granular security: only 1 API-key for entire feed
        Conclusion: requires you to develop if you want
         something more useful




FEBRUARY 12, 2012 | SLIDE 25
MEET MYGET
        www.myget.org
        NaaS
          Register and off you go! (no dev)
        Supports Enterprise scenarios
          Granular security
          Package mirroring




FEBRUARY 12, 2012 | SLIDE 26
Log in to www.myget.org and get started

      MYGET DEMO


FEBRUARY 12, 2012 | SLIDE 27
Fetch the chickens when you need them

      CONTINUOUS (PACKAGE)
      INTEGRATION

FEBRUARY 12, 2012 | SLIDE 28
TYPICAL SOURCE CONTROL...
        Contains /References (if you are lucky)
          ...and also Project/_bin_deployable_assemblies
          ...and also /References/old
          ...and also /..././../.././References


        Usually references GAC-ed assemblies




FEBRUARY 12, 2012 | SLIDE 29
DEPENDENCIES
        Software has dependencies. Deal with it.

        But are those YOUR intellectual property?
          YOUR reason to build software?
          YOUR product?


        No. They are dependencies. And they don’t belong in
         source control.




FEBRUARY 12, 2012 | SLIDE 30
CONTINUOUS (PACKAGE) INTEGRATION
  Can I get rid of all these referenced assemblies
   duplicated all-over my source control system?
   Yes!


  Do I need to install and maintain NuGet on all
   my build agents?
   No!




FEBRUARY 12, 2012 | SLIDE 31
Organize your build chickens!

      NUGETPOWERTOOLS DEMO


FEBRUARY 12, 2012 | SLIDE 32
3RD PARTIES DON’T BELONG IN YOUR SCM
        Source control bloated with third-party binaries?
          Replace them with NuGet packages


        Commit packages.config/repositories.config files
          Preferably not the packages


        Use NuGetPowerTools
          Enable-PackageRestore




FEBRUARY 12, 2012 | SLIDE 33
PROBLEM!
        NuGet feed is subject to change...
          PackageSource MSBuild property to the rescue
          NuGet.settings.targets in $(SolutionDir).nuget folder


        Now what...
          Host your own feed and mirror third-party packages
                 Internal NuGet.Server
                 Network Share
          Or use MyGet for that 




FEBRUARY 12, 2012 | SLIDE 34
ORGANIZE YOUR CHICKENS
        Feed structuring
          Scoped by quality: Build, QA, Production, …
          Scoped by audience: public, restricted access
          Other:
                 Scoped by product version, milestone…
                 Scoped by target platform




FEBRUARY 12, 2012 | SLIDE 35
(AB)USING NUGET


FEBRUARY 12, 2012 | SLIDE 36
GUIDANCE
        Publishing a package brings great responsibility
          Breaking changes in your packages should be versioned
           accordingly!
          Consumers might choose to no longer consume any packages
           you published




FEBRUARY 12, 2012 | SLIDE 37
GUIDANCE
        Package Integration ≠ Integration Testing
          CI builds reflect output of source control input
          Same input always produces same output

                 Do not auto-update packages during
                 automated builds!




FEBRUARY 12, 2012 | SLIDE 38
FEBRUARY 12, 2012 | SLIDE 39
(AB)USING NUGET?
        Change of perspective


                               NuGet as a package
                               manager




                               NuGet as a protocol for
                               distributing packages

FEBRUARY 12, 2012 | SLIDE 40
Scaffolding, CmdLets, Plug-ins, …

      EXTENDING NUGET


FEBRUARY 12, 2012 | SLIDE 41
SCAFFOLDING
        T4, Mvc, …
        Create your own PowerShell cmdlets
        Automate Visual Studio (access to DTE)




FEBRUARY 12, 2012 | SLIDE 42
AUTOMATE DEPLOYMENTS
        Build results in .nupkg
        Octopus deploys to its tentacles
          Test tentacles
          Staging tentacles
          Production tentacles
        www.octopusdeploy.com




FEBRUARY 12, 2012 | SLIDE 43
FEBRUARY 12, 2012 | SLIDE 44
NUGET COMMAND LINE PLUG-INS
        Extend NuGet.exe
        Custom Commands

        How?
            Build class library
            Reference NuGet.exe
            Inherit Command
            Deploy your dll to %LocalAppData%NuGetCommands




FEBRUARY 12, 2012 | SLIDE 45
CHOCOLATEY
        NuGet
          developer library packages
        Chocolatey
          applications and tools packager
          “yum” or “apt-get” for Windows
        www.chocolatey.org




FEBRUARY 12, 2012 | SLIDE 46
NuGet desert

      CHOCOLATEY DEMO


FEBRUARY 12, 2012 | SLIDE 47
ORCHARD / WEBMATRIX / …
        NuGet not bound to VS
        Orchard CMS: modules & themes
        WebMatrix: install page helpers on the fly
        Your app: offer plugins through a repo




FEBRUARY 12, 2012 | SLIDE 48
CONCLUSION


FEBRUARY 12, 2012 | SLIDE 49
Conclusion
• Dependencies & people are chickens
  Deal with them! NuGet can help

• Set up your own NuGet repository for various
  reasons

• Continuous package integration

• NuGet is a package manager
  NuGet is a protocol

                     www.visug.be
http://blog.maartenballiauw.be
                                            @maartenballiauw




                               http://www.xavierdecoster.com
                                            @xavierdecoster




      Any questions?

      THANK YOU!


FEBRUARY 12, 2012 | SLIDE 51

Contenu connexe

En vedette

Organize your Chickens - NuGet for the Enterprise (UGIALTNET)
Organize your Chickens - NuGet for the Enterprise (UGIALTNET)Organize your Chickens - NuGet for the Enterprise (UGIALTNET)
Organize your Chickens - NuGet for the Enterprise (UGIALTNET)Xavier Decoster
 
Visug - organize your chickens - nuget for the enterprise
Visug - organize your chickens - nuget for the enterpriseVisug - organize your chickens - nuget for the enterprise
Visug - organize your chickens - nuget for the enterpriseXavier Decoster
 
NuGet (anti-)patterns - Tales from the Trenches
NuGet (anti-)patterns - Tales from the TrenchesNuGet (anti-)patterns - Tales from the Trenches
NuGet (anti-)patterns - Tales from the TrenchesXavier Decoster
 
MSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGetMSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGetXavier Decoster
 
Organize your chickens - NuGet for the Enterprise
Organize your chickens - NuGet for the EnterpriseOrganize your chickens - NuGet for the Enterprise
Organize your chickens - NuGet for the EnterpriseXavier Decoster
 
NuGet (Anti-)Patterns - Tales from the Trenches
NuGet (Anti-)Patterns - Tales from the TrenchesNuGet (Anti-)Patterns - Tales from the Trenches
NuGet (Anti-)Patterns - Tales from the TrenchesXavier Decoster
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repositoryYu GUAN
 
NuGet Package Management Done Right
NuGet Package Management Done RightNuGet Package Management Done Right
NuGet Package Management Done RightSeniorStoryteller
 

En vedette (8)

Organize your Chickens - NuGet for the Enterprise (UGIALTNET)
Organize your Chickens - NuGet for the Enterprise (UGIALTNET)Organize your Chickens - NuGet for the Enterprise (UGIALTNET)
Organize your Chickens - NuGet for the Enterprise (UGIALTNET)
 
Visug - organize your chickens - nuget for the enterprise
Visug - organize your chickens - nuget for the enterpriseVisug - organize your chickens - nuget for the enterprise
Visug - organize your chickens - nuget for the enterprise
 
NuGet (anti-)patterns - Tales from the Trenches
NuGet (anti-)patterns - Tales from the TrenchesNuGet (anti-)patterns - Tales from the Trenches
NuGet (anti-)patterns - Tales from the Trenches
 
MSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGetMSDN Live - CI using TFS11 & NuGet
MSDN Live - CI using TFS11 & NuGet
 
Organize your chickens - NuGet for the Enterprise
Organize your chickens - NuGet for the EnterpriseOrganize your chickens - NuGet for the Enterprise
Organize your chickens - NuGet for the Enterprise
 
NuGet (Anti-)Patterns - Tales from the Trenches
NuGet (Anti-)Patterns - Tales from the TrenchesNuGet (Anti-)Patterns - Tales from the Trenches
NuGet (Anti-)Patterns - Tales from the Trenches
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repository
 
NuGet Package Management Done Right
NuGet Package Management Done RightNuGet Package Management Done Right
NuGet Package Management Done Right
 

Similaire à 20111010 agile minds - organize your chickens - nuget for the enterprise

SDC Sweden - Organize your chickens - NuGet for the Enterprise
SDC Sweden - Organize your chickens - NuGet for the EnterpriseSDC Sweden - Organize your chickens - NuGet for the Enterprise
SDC Sweden - Organize your chickens - NuGet for the EnterpriseMaarten Balliauw
 
Fun with ASP.NET MVC3, MEF and NuGet
Fun with ASP.NET MVC3, MEF and NuGetFun with ASP.NET MVC3, MEF and NuGet
Fun with ASP.NET MVC3, MEF and NuGetMaarten Balliauw
 
Architectural Patterns for the Cloud
Architectural Patterns for the CloudArchitectural Patterns for the Cloud
Architectural Patterns for the CloudMaarten Balliauw
 
Aris 9 See the Future Today
Aris 9 See the Future TodayAris 9 See the Future Today
Aris 9 See the Future TodaySoftware AG
 
OAE Developer Bootcamp
OAE Developer BootcampOAE Developer Bootcamp
OAE Developer BootcampBert Pareyn
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Justin James
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseMaarten Balliauw
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studiotobiaspreuss
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadinnetomi
 
Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manageryashobantabai
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)jsievers
 
MySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialMySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialFrazer Clement
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.comMathieu Buffenoir
 
[Webinar] Introduction to the Nuxeo Platform
[Webinar] Introduction to the Nuxeo Platform[Webinar] Introduction to the Nuxeo Platform
[Webinar] Introduction to the Nuxeo PlatformNuxeo
 

Similaire à 20111010 agile minds - organize your chickens - nuget for the enterprise (20)

SDC Sweden - Organize your chickens - NuGet for the Enterprise
SDC Sweden - Organize your chickens - NuGet for the EnterpriseSDC Sweden - Organize your chickens - NuGet for the Enterprise
SDC Sweden - Organize your chickens - NuGet for the Enterprise
 
Fun with ASP.NET MVC3, MEF and NuGet
Fun with ASP.NET MVC3, MEF and NuGetFun with ASP.NET MVC3, MEF and NuGet
Fun with ASP.NET MVC3, MEF and NuGet
 
Architectural Patterns for the Cloud
Architectural Patterns for the CloudArchitectural Patterns for the Cloud
Architectural Patterns for the Cloud
 
Aris 9 See the Future Today
Aris 9 See the Future TodayAris 9 See the Future Today
Aris 9 See the Future Today
 
OAE Developer Bootcamp
OAE Developer BootcampOAE Developer Bootcamp
OAE Developer Bootcamp
 
Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...Nuget is easier than you think and you should be using it as both a consumer ...
Nuget is easier than you think and you should be using it as both a consumer ...
 
Hello cloud 6
Hello  cloud 6Hello  cloud 6
Hello cloud 6
 
Technology Radar Talks - NuGet
Technology Radar Talks - NuGetTechnology Radar Talks - NuGet
Technology Radar Talks - NuGet
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
 
How to setup unit testing in Android Studio
How to setup unit testing in Android StudioHow to setup unit testing in Android Studio
How to setup unit testing in Android Studio
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
 
Introduction to package manager
Introduction to package managerIntroduction to package manager
Introduction to package manager
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
 
MySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorialMySQL Cluster 8.0 tutorial
MySQL Cluster 8.0 tutorial
 
SAP NetWeaver Cloud
SAP NetWeaver CloudSAP NetWeaver Cloud
SAP NetWeaver Cloud
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com
 
Intellij idea features
Intellij idea featuresIntellij idea features
Intellij idea features
 
Intro to PDK
Intro to PDKIntro to PDK
Intro to PDK
 
[Webinar] Introduction to the Nuxeo Platform
[Webinar] Introduction to the Nuxeo Platform[Webinar] Introduction to the Nuxeo Platform
[Webinar] Introduction to the Nuxeo Platform
 

Dernier

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Dernier (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

20111010 agile minds - organize your chickens - nuget for the enterprise

  • 1. NuGet for the Enterprise ORGANIZE YOUR CHICKENS FEBRUARY 12, 2012 | SLIDE 1
  • 2. WHO ARE WE?  Maarten Balliauw  Antwerp, Belgium  www.realdolmen.com  Focus on web  ASP.NET, ASP.NET MVC, PHP, Azure, …  MVP Windows Azure (formerly ASP.NET)  http://blog.maartenballiauw.be  @maartenballiauw FEBRUARY 12, 2012 | SLIDE 2
  • 3. WHO ARE WE?  Xavier Decoster  Antwerp, Belgium  www.realdolmen.com  Focus on web/ALM  Visual Studio, TFS, Scrum, ...  Silverlight, ASP.NET, ASP.NET MVC, …  http://www.xavierdecoster.com  @xavierdecoster FEBRUARY 12, 2012 | SLIDE 3
  • 4. AGENDA  Chickens?  NuGet  Scenarios  Host your own NuGet repository  Continuous (Package) Integration  (Ab)using NuGet  Conclusion FEBRUARY 12, 2012 | SLIDE 4
  • 5. Dependency Hell WELCOME TO DLL HELL FEBRUARY 12, 2012 | SLIDE 5
  • 6. WELCOME TO DEPENDENCY HELL “A term for the frustration of software users who have installed software packages which have dependencies on specific versions of other software packages.” Source: Wikipedia FEBRUARY 12, 2012 | SLIDE 6
  • 7. CAUSE AND EFFECT  Reinventing the wheel  We don’t need that dependency  “If they can do it, we can do it, but better”  What happened to reuse of components?  Marketing does the versioning  People are waiting for v2 to buy  Let’s call it v4 Platform Update SP3 November Edition KB2348063 RTW Refresh  We lost ownership of AssemblyVersion ? FEBRUARY 12, 2012 | SLIDE 7
  • 8. Using NuGet PACKAGE MANAGEMENT FEBRUARY 12, 2012 | SLIDE 8
  • 9. PACKAGE MANAGEMENT  NuGet to the Rescue! “NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.” FEBRUARY 12, 2012 | SLIDE 9
  • 10. PACKAGE WHAT?  Package Management “…a collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages…” Source: Wikipedia  Simple concept  Find Packages  (Re)Use Packages  Produce Packages FEBRUARY 12, 2012 | SLIDE 10
  • 11. GETTING STARTED  Tooling:  NuGet Package Manager (http://nuget.org)  NuGet Package Explorer (http://npe.codeplex.com)  Install-Package NuGetPowerTools  Install-Package NuGet.CommandLine  Guidance and documentation  http://docs.nuget.org FEBRUARY 12, 2012 | SLIDE 11
  • 12. CONSUMING PACKAGES  Simple as adding a reference FEBRUARY 12, 2012 | SLIDE 12
  • 13. ONE DIALOG TO RULE THEM ALL…  Install-Package  Update-Package  Uninstall-Package  Settings  Package Sources  Local (offline) Cache location  Also: Manage packages on solution level!  Right-click solution > Manage NuGet Packages… FEBRUARY 12, 2012 | SLIDE 13
  • 14. NUGET PACKAGE MANAGER CONSOLE  PowerShell enabled!  Extensible!  Scaffolding, NuGetPowerTools, …  %UserProfile%DocumentsWindowsPowerShellNuGet_profile.ps1 FEBRUARY 12, 2012 | SLIDE 14
  • 15. CONFIGURABLE PACKAGE SOURCES  Configurable through…  NuGet Library Package Manager (VS add-in)  NuGet.config (in %APPDATA%RoamingNuGetNuGet.config)  NuGet.settings.targets (MSBUILD file part of NuGetPowerTools) FEBRUARY 12, 2012 | SLIDE 15
  • 16. CREATING PACKAGES  What’s a package?  Just a zip-file containing:  … content and source code (to be injected into target project)  … PowerShell scripts and executables  … configuration file and source code transformations  http://docs.nuget.org/docs/creating-packages/Configuration-File- and-Source-Code-Transformations FEBRUARY 12, 2012 | SLIDE 16
  • 17. PACKAGE CONVENTIONS  Conventions  http://docs.nuget.org/docs/creating-packages/Package- Conventions  Folder structure  Tools (init.ps1, install.ps1, uninstall.ps1)  Content  Manifest (.nuspec file)  Lib FEBRUARY 12, 2012 | SLIDE 17
  • 18. NUGET MANIFEST SPECIFICATION  NuSpec manifest  XML file (with XSD available)  Package metadata FEBRUARY 12, 2012 | SLIDE 18
  • 19. SEMANTIC VERSIONING  Think about your versioning! (semver.org) Major Breaking changes Minor Backwards compatible API additions/changes Patch Bugfixes not affecting the API  Always specify lowerbound  Use a version range (lowerbound + upperbound) when versioning of package you depend on is messed up FEBRUARY 12, 2012 | SLIDE 19
  • 20. ADVANCED USAGE SCENARIOS  Host your own NuGet repository  Continuous (Package) Integration  (Ab)using NuGet FEBRUARY 12, 2012 | SLIDE 20
  • 21. Those chickens are mine! HOSTING YOUR OWN REPOSITORY FEBRUARY 12, 2012 | SLIDE 21
  • 22. HOSTING YOUR OWN REPOSITORY  NuGet = public feed  Privacy  Intellectual property  NuGet maintained by package authors  Author removes v1.0.45 and you depend on it FEBRUARY 12, 2012 | SLIDE 22
  • 23. SOLUTIONS  Folder / File share  Orchard Gallery (or NuGet Gallery)  NuGet.Server package  MyGet FEBRUARY 12, 2012 | SLIDE 23
  • 24. Install-Package NuGet.Server NUGET.SERVER DEMO FEBRUARY 12, 2012 | SLIDE 24
  • 25. NUGET.SERVER LIMITATIONS  Only 1 feed per installation  No UI: up to you to build it  No granular security: only 1 API-key for entire feed  Conclusion: requires you to develop if you want something more useful FEBRUARY 12, 2012 | SLIDE 25
  • 26. MEET MYGET  www.myget.org  NaaS  Register and off you go! (no dev)  Supports Enterprise scenarios  Granular security  Package mirroring FEBRUARY 12, 2012 | SLIDE 26
  • 27. Log in to www.myget.org and get started MYGET DEMO FEBRUARY 12, 2012 | SLIDE 27
  • 28. Fetch the chickens when you need them CONTINUOUS (PACKAGE) INTEGRATION FEBRUARY 12, 2012 | SLIDE 28
  • 29. TYPICAL SOURCE CONTROL...  Contains /References (if you are lucky)  ...and also Project/_bin_deployable_assemblies  ...and also /References/old  ...and also /..././../.././References  Usually references GAC-ed assemblies FEBRUARY 12, 2012 | SLIDE 29
  • 30. DEPENDENCIES  Software has dependencies. Deal with it.  But are those YOUR intellectual property?  YOUR reason to build software?  YOUR product?  No. They are dependencies. And they don’t belong in source control. FEBRUARY 12, 2012 | SLIDE 30
  • 31. CONTINUOUS (PACKAGE) INTEGRATION  Can I get rid of all these referenced assemblies duplicated all-over my source control system? Yes!  Do I need to install and maintain NuGet on all my build agents? No! FEBRUARY 12, 2012 | SLIDE 31
  • 32. Organize your build chickens! NUGETPOWERTOOLS DEMO FEBRUARY 12, 2012 | SLIDE 32
  • 33. 3RD PARTIES DON’T BELONG IN YOUR SCM  Source control bloated with third-party binaries?  Replace them with NuGet packages  Commit packages.config/repositories.config files  Preferably not the packages  Use NuGetPowerTools  Enable-PackageRestore FEBRUARY 12, 2012 | SLIDE 33
  • 34. PROBLEM!  NuGet feed is subject to change...  PackageSource MSBuild property to the rescue  NuGet.settings.targets in $(SolutionDir).nuget folder  Now what...  Host your own feed and mirror third-party packages  Internal NuGet.Server  Network Share  Or use MyGet for that  FEBRUARY 12, 2012 | SLIDE 34
  • 35. ORGANIZE YOUR CHICKENS  Feed structuring  Scoped by quality: Build, QA, Production, …  Scoped by audience: public, restricted access  Other:  Scoped by product version, milestone…  Scoped by target platform FEBRUARY 12, 2012 | SLIDE 35
  • 36. (AB)USING NUGET FEBRUARY 12, 2012 | SLIDE 36
  • 37. GUIDANCE  Publishing a package brings great responsibility  Breaking changes in your packages should be versioned accordingly!  Consumers might choose to no longer consume any packages you published FEBRUARY 12, 2012 | SLIDE 37
  • 38. GUIDANCE  Package Integration ≠ Integration Testing  CI builds reflect output of source control input  Same input always produces same output Do not auto-update packages during automated builds! FEBRUARY 12, 2012 | SLIDE 38
  • 39. FEBRUARY 12, 2012 | SLIDE 39
  • 40. (AB)USING NUGET?  Change of perspective NuGet as a package manager NuGet as a protocol for distributing packages FEBRUARY 12, 2012 | SLIDE 40
  • 41. Scaffolding, CmdLets, Plug-ins, … EXTENDING NUGET FEBRUARY 12, 2012 | SLIDE 41
  • 42. SCAFFOLDING  T4, Mvc, …  Create your own PowerShell cmdlets  Automate Visual Studio (access to DTE) FEBRUARY 12, 2012 | SLIDE 42
  • 43. AUTOMATE DEPLOYMENTS  Build results in .nupkg  Octopus deploys to its tentacles  Test tentacles  Staging tentacles  Production tentacles  www.octopusdeploy.com FEBRUARY 12, 2012 | SLIDE 43
  • 44. FEBRUARY 12, 2012 | SLIDE 44
  • 45. NUGET COMMAND LINE PLUG-INS  Extend NuGet.exe  Custom Commands  How?  Build class library  Reference NuGet.exe  Inherit Command  Deploy your dll to %LocalAppData%NuGetCommands FEBRUARY 12, 2012 | SLIDE 45
  • 46. CHOCOLATEY  NuGet  developer library packages  Chocolatey  applications and tools packager  “yum” or “apt-get” for Windows  www.chocolatey.org FEBRUARY 12, 2012 | SLIDE 46
  • 47. NuGet desert CHOCOLATEY DEMO FEBRUARY 12, 2012 | SLIDE 47
  • 48. ORCHARD / WEBMATRIX / …  NuGet not bound to VS  Orchard CMS: modules & themes  WebMatrix: install page helpers on the fly  Your app: offer plugins through a repo FEBRUARY 12, 2012 | SLIDE 48
  • 50. Conclusion • Dependencies & people are chickens Deal with them! NuGet can help • Set up your own NuGet repository for various reasons • Continuous package integration • NuGet is a package manager NuGet is a protocol www.visug.be
  • 51. http://blog.maartenballiauw.be @maartenballiauw http://www.xavierdecoster.com @xavierdecoster Any questions? THANK YOU! FEBRUARY 12, 2012 | SLIDE 51

Notes de l'éditeur

  1. Maarten
  2. Maarten
  3. Xavier
  4. Xavier
  5. Xavier
  6. XavierMaarten
  7. Maarten
  8. NuGet Install-PackageWhen you use NuGet to install a package, it copies the library files to your solution and automatically updates your project (add references, change config files, etc). NuGet Uninstall-PackageIf you remove a package, NuGet reverses whatever changes it made so that no clutter is left.
  9. Xavier: Terugverwijzen naar “Marketing versioning”
  10. Xavier
  11. Maarten
  12. Maarten
  13. Maarten
  14. XavierStart with empty MVC template + addNuGet.ServerpkgRun siteDrop pkgs in packages folderRefresh browserFeed toevoegen in VS & show pkgs
  15. Xavier
  16. Maarten
  17. MaartenInloggen en feed aanmakenPackage pushen vanuit NPEFeed toevoegen aan VSOp MyGet feed security instellenPackage installen in VS en tonen dat er basic auth bijkomtPackage vanNuGet toevoegen op MyGet en tonen dat je alle dependencies kan meepakken, mirroring, … en dat je ook gewoon van uw packages.config kan toevoegen
  18. Xavier
  19. Xavier
  20. Xavier
  21. Maarten
  22. Maarten
  23. Xavier- Het feit dat NuGet.org geen garanties biedt op content- Wat als mensen packages verwijderen? BUILD breaks, DEVS unhappy again
  24. Maarten -> Xavier
  25. Xavier
  26. Xavier
  27. Xavier
  28. Maarten
  29. Maarten
  30. TODO Scaffolding? Toevoegen van functies?Eventueel de NuGet.exe plugins ook nog tonen?
  31. Maarten
  32. Maarten
  33. Xavier
  34. Xavier
  35. Maarten
  36. XavierMaartenXavierMaarten