98
Development Tools Integrated Development Environments, Source Control Repositories, Automated Testing Tools, Bug Tracking, Code Analysis Tools, Build Tools, Project Hosting Sites http://schoolacademy.telerik.com Svetlin Nakov Telerik Corporation www.telerik. com

Development Tools

  • Upload
    carson

  • View
    58

  • Download
    0

Embed Size (px)

DESCRIPTION

http://schoolacademy.telerik.com. Development Tools. Integrated Development Environments, Source Control Repositories, Automated Testing Tools, Bug Tracking, Code Analysis Tools, Build Tools, Project Hosting Sites. Svetlin Nakov. Telerik Corporation. www.telerik.com. Table of Contents. - PowerPoint PPT Presentation

Citation preview

High-Quality Programming Code Construction

Development ToolsIntegrated Development Environments, Source Control Repositories, Automated Testing Tools, Bug Tracking, Code Analysis Tools, Build Tools, Project Hosting Sites

http://schoolacademy.telerik.comSvetlin Nakov

Telerik Corporation

www.telerik.comTable of ContentsIntegrated Development Environments (IDEs)Source Control SystemsCode Generation ToolsLogging ToolsUnit Testing ToolsAutomated Testing ToolsBug Tracking / Issue Tracking SystemsCode Analysis ToolsCode Decompilation Tools2

Table of Contents (2)Code ObfuscatorsCode ProfilersRefactoring ToolsAutomated Build ToolsContinuous Integration ToolsDocumentation GeneratorsProject Planning and Management ToolsProject Hosting and Team Collaboration Sites3

Integrated Development Environments (IDEs)Visual Studio, Eclipse, IntelliJ IDEA, Netbeans, JDeveloper, Code::Blocks, Bloodshed Dev-C++

Visual StudioVisual Studio is official .NET development tool from MicrosoftMultiple languages: C#, VB.NET, C++, Multiple technologies and platforms: ASP.NET, WPF, Silverlight, WWF, WCF, Windows MobileVery powerful and feature richWrite, compile, model, design GUI, forms, data, build, execute, debug, test, deploy, refactor, Commercial product, has free editions5Visual Studio Screenshot6

Visual StudioLive Demo7

EclipseEclipse is the #1 Java IDESupports multiple languages and platforms: Java, Java EE, C++, PHP, Python, Ruby, mobile development, embedded development, Very powerful and feature richWrite, compile, build, execute, debug, test, deploy, refactor, Thousands of plug-insFree, open-source product, very big community8Eclipse Screenshot9

EclipseLive DemoOther IDEsOther Java IDEsNetbeansSupports latest Java technologiesNice GUI designer for Swing and JSFIntelliJ IDEA very powerful refactoringJDeveloper feature rich, supports UMLOther C++ IDEsCode::BlocksBloodshed Dev-C++11

Source Control SystemsSubversion (SVN), Team Foundation Server (TFS), CVS, Git, Mercurial, Perforce,

What is Source Control System?Source control systems (version control systems, source control repositories)Hold the source code and project assets during the development processAllow simultaneous changes in the source code and conflict resolutionKeep version history of the project assetsTwo versioning models:Lock-Modify-Unlock and Copy-Modify-Merge13Lock-Modify-Unlock ModelThe lock-modify-unlock model needs locking files before modificationOne file is modified by at most one person in any given momentNo conflicts, no need of mergeSuitable for small teamsWhen changes almost don't need concurrencyBasic commands: check out, check-inImplemented in: Visual SourceSafe, (TFS, SVN)14Copy-Modify-Merge ModelCopy-modify-merge model does not hold locks during the source code modificationThe same file could be simultaneously edited by multiple developersSometimes requires conflict resolutionSuitable for large teams and projectsHigh concurrency of source code modificationsBasic commands: update, commitImplemented in: SVN, CVS, Git, Mercurial, TFS15Subversion (SVN)Subversion (SVN)The most popular and well established systemFree, open-source, very large communityTortoiseSVN the most popular client16

Subversion (SVN) (2)Subversion (SVN)Official web site:http://subversion.tigris.org/Runs on UNIX, Linux, WindowsConsole clientsvnGUI clientTortoiseSVN http://tortoisesvn.tigris.org/Subversion FeaturesVersioning of the directory structureComplete change logDeletion of files and directoriesRenaming of files and directoriesSaving of files or directoriesCan work on its own or integrated with Apache as a moduleWorks effectively with tags and branchingTortoiseSVN

TortoiseSVNOpen source GUI client for SubversionIntegrated in Windows Explorerhttp://tortoisesvn.tigris.org/SubversionLive Demo

Team Foundation ServerMicrosoft Team Foundation Server (TFS)Works best with Visual StudioMany problems outside of itCommercial license21

Other Source Control SystemsCVSWas extremely popular in the pastNow it is obsoleteOpen source, mostly used in UNIX / LinuxGit and MercurialFast, distributed, open sourcePerforceVery powerful and scalable (pentabytes of code)Commercial product (used by SAP)22SCM and ALM SystemsSoftware Configuration Management (SCM systems (e.g. Rational ClearCase, StarTeam)Change management for requirements, documents, source code, etc.Tools, policies, workflow, etc.Application Lifecycle Management (ALM) systems (e.g. VSTS + TFS, StarTeam, Polarion)Covers the entire development processRequirements, planning, project management, architecture, build, QA, test, integration, etc.23Application Lifecycle Management24

Code Generation ToolsVisual Studio T4 Engine, CodeSmith, AndroMDA

Code Generators ConceptsSource code generationTemplate basedBuild data access layer by given database schemaE.g. Visual Studio Data Designer for LINQ-to-SQLBuild Web application by database schemaE.g. Django (Python based Web application platform)Model basedBuild entire application by high-level model26Code Generation ToolsMicrosoft T4 Engine, CodeSmithTemplate based code generatorsCan generate classes, Web pages and other project assets by set of templatesE.g. data access layer based on database schemaAndroMDAApplication generator frameworkTransforms UML models to Java EE applications based on Spring, Hibernate and JSF27Microsoft T4 Template EngineVisual Studio T4 EngineT4 == Text Template Transformation ToolkitIntegral part of Visual StudioASP.NET-like syntaxT4 templates consist of:Processing directives (e.g. include template)Text blocks (static text)Code blocks (in C#, VB.NET)Compiled to C# and then to .NET assemblies28T4 Template Engine Architecture29

Visual Studio T4 Template EngineLive Demo

Logging ToolsLog4J, Log4Net

LoggingLogging is chronological and systematic record of data processing events in a programE.g. the Windows Event LogLogs can be saved to a persistent medium to be studied at a later timeUse logging in the development phase:Logging can help you debug the codeUse logging in the production environment:Helps you troubleshoot problems32Log4J / Log4NetLog4J / Log4Net are a popular logging frameworks for Java / .NETDesigned to be reliable, fast and extensibleSimple to understand and to use APIAllows the developer to control which log statements are output with arbitrary granularityFully configurable at runtime using external configuration files33Log4j / Log4Net ArchitectureLog4j has three main components: loggers, appenders and layoutsLoggersChannels for printing logging informationAppendersOutput destinations (e.g. XML file, database, )LayoutsFormats that appenders use to write their output34Hello Log4Net ExampleOutput from HelloLog4j35class Log4NetExample{ private static readonly ILog log = LogManager.GetLogger(typeof(Log4NetExample)); static void Main() { log.Debug("Debug msg"); log.Error("Error msg"); }}2010-12-16 23:25:08 DEBUG Log4NetExample Debug msg2010-12-16 23:25:08 ERROR Log4NetExample Error msgLog4NetLive Demo

Unit Testing ToolsJUnit, NUnit, CppUnit, TestNG, JsUnit,

Unit TestingUnit test is a program that tests pieces of codeTest a single method, class or componentImplement a common use case scenarioConfirm that the code works as expectedOr signal that the code is brokenUnit tests should have high code coverage, e.g. 70-80%Executed in the continuous integration processUnit tests dramatically decrease the number of defects in the code38Unit Test Example39int sum(int[] array) { int sum = 0; for (int i=0; i