• No results found

How To Develop A Project In A Production Environment

N/A
N/A
Protected

Academic year: 2021

Share "How To Develop A Project In A Production Environment"

Copied!
26
0
0

Loading.... (view fulltext now)

Full text

(1)

Open Source .NET Development

ƒ Setting Up A Professional Development Environment Using Open Source Software (OSS)

(2)

Morten Mertner

ƒ Senior Consultant, Teknologisk Institut .NET Architect and Software Developer

ƒ Developer of Gentle.NET (object persistence framework / ORM)

(3)

Introduction – Open Source Software

ƒ Open Source Software Licensing

Stability Support

(4)

Introduction – The Development Environment

ƒ Setting Up A Professional Development Environment Unit Testing Documentation Source Control Automation Continuous Integration Issue Tracking

(5)

Open Source Software (OSS)

ƒ Hosting

SourceForce (www.sourceforge.net) – 100.000+ projects FreshMeat II (www.freshmeat.net) – 41.000+ projects GotDotNet (www.gotdotnet.com) – 7.200+ projects

ƒ Search Engines

Koders (www.koders.com) – 225,816,744 lines of code

ƒ Why do it?

Fame, Pride, Frustration, Love of Craft Powerful motivators

(6)

Licensing

ƒ GPL (GNU Public License)

Must publish all source changes

Affects linked files (compile-time dependencies) 67% (freshmeat.net statistics)

ƒ LGPL (Lesser GNU Public License)

Must publish changes to component only Does not affect own project

Can be used with closed-source commercial offerings 6% (freshmeat.net statistics)

(7)

Stability and Support

ƒ Activity Checks Forums Mailing lists Source repository Issue tracker Project statistics

(8)

Picking the right tool

ƒ Trials

Documentation and license reviews Hands-on testing and evaluation

(9)

Unit Testing

ƒ What

Module testing (black & white-boxed)

ƒ Purpose

Establish confidence Track progress

Never fix the same error twice

ƒ Additional Benefits

Enables Test Driven Development

(10)

Unit Testing – xUnit

ƒ Tools NUnit MbUnit ƒ Frontends Command Line Default GUI TestDriven.NET ZaneBug

(11)

Unit Testing – Demo

ƒ Sample Code

Creating your first test case Running the tests

Evaluating the results

ƒ TestDriven.NET – Visual Studio integration

(12)

Documentation – NDoc

ƒ NDoc

http://ndoc.sourceforge.net

Standard .NET documentation tags (<summary>..</summary>)

ƒ Benefits

Create professional looking documentation

Enable full Visual Studio integration (F1 help, IntelliSense)

ƒ Strategy

State purpose and document non-obvious information

Always document all public methods, their parameters and return types Provide namespace summaries

(13)

Documentation – NDoc

ƒ Output HTML

Windows Help (.chm)

Visual Studio integration (.HxS)

ƒ Support Tools

Visual Studio Help Integration Toolkit

http://download.microsoft.com/download/6/2/4/624a17d7-445f-499b-a2ed-82a06c36b370/VSHIK2003.exe H2Reg

(14)

Source Control

ƒ What

Everything a developer needs to start working - source, libraries, build files, tools

Anything NOT created by build process (documentation, binaries)

ƒ Benefits

Enables effective team work

Revision control (labels, branches) Accountability

(15)

Source Control – Subversion

ƒ Subversion WebDAV

Cross-platform

All modern SCM features (atomic commits, branching, move/rename, etc.)

ƒ Strategy

Use a dedicated development server (avoid file servers / network shares) Use included scripts to convert existing VSS repositories

Don’t spend much time on security (permit writes) Document most-used procedures and concepts

(16)

Source Control – Subversion Tools

ƒ Command Line

Subversion (svn) (http://subversion.tigris.org)

ƒ Stand-alone GUI

RapidSVN (http://rapidsvn.tigris.org)

ƒ Windows Explorer integration

TortoiseSVN (http://tortoisesvn.tigris.org)

ƒ Visual Studio integration

(17)

Automation

ƒ What

Repetetive tasks (usually also boring and error-prone)

ƒ Benefits

Reproducibility of build procedure Easy sharing of project setup

Enables isolated build machine Scheduled builds

Cross-compilation Complex scripting

(18)

Automation – NAnt

ƒ NAnt (inspired by Ant)

http://nant.sourceforge.net

XML syntax

ƒ Tasks

Compiling

Validation and reporting (unit testing, FxCop) Packaging (installers, setup projects)

Custom tasks

ƒ Tools (graphical editors) NAnt-GUI

(19)

Automation – NAnt

ƒ Sample Build File

<?xml version="1.0" ?>

<project name="nant" default="compile"

xmlns="http://nant.sf.net/schemas/nant.xsd"> <target name="compile"> <solution solutionfile=”..\Source\Calculator.sln” configuration="debug" /> </target> </project>

(20)

Continuous Integration

ƒ Continuous Integration

Developer feedback on source repository actions Remote management and reporting

Instant problem detection

(21)

Continuous Integration – CruiseControl.NET

ƒ CruiseControl.NET (ThoughtWorks - Martin Fowler, GoF)

http://ccnet.thoughtworks.com

Web Dashboard CCTray

ƒ Depends on

Web Server / IIS

Source repository (any)

Build tool (NAnt, MSBuild, VS.NET)

ƒ Integrates with NUnit / MbUnit

(22)
(23)
(24)

Issue Tracking

ƒ What

Record all tasks that require human action

ƒ Tasks

Requirements (initial feature set) Bugs, supplemental features, tasks

ƒ Benefits

Progress visibility Accountability

Reporting and statistics

(25)

Issue Tracking – Mantis

ƒ Mantis

http://www.mantisbt.org

ƒ Strategy

Define projects, categories, permissions, etc. in advance - and keep them updated

Create sub-tasks for non-actionable issues

Always be specific (”fix documentation” will not do) Enforce usage

(26)

References

Related documents

Trend Micro has developed a layered security platform that provides defense in depth and continuous monitoring of both traditional and virtual infrastructure: Deep Security. To

Most tonal and playability issues probably concern transients of one kind or another, or other departures from periodicity such as irregular differential slips as discussed in

Businesses can only be successful and receive a grant award from one of the funds announced by the Scottish Government on or since 15th December 2020 to help the tourism and

Among the issues discussed were Aegon’s corporate strategy, the company’s medium-term plan, risk and capital management, Aegon’s approach to sustainability, changes to the

Fifty six per cent of respondents do not believe or are ‘Unsure’ about Consistent with earlier response data in this survey, we see that whether their organisation provides

In contrast to the findings about affective commitment, teachers' continuance and normative commitment are negatively related to management by exceptions (passive)

This relationship means that firm performance improves as the effectiveness of activities of internal market orientation is enhanced among the commercial banks.. So there

From the Result it can be concluded that Parents’ occupations, Parents’ counseling, and Parents’ educational status, Parents’ tribe, and Parents’ socioeconomic