Source Code Inspection and Software Reuse

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Unit 1: Overview of the Microsoft.NET Platform
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
.NET IL Obfuscation Presented by: Sarath Chandra Dorbala.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Visual Studio: Custom debugger visualizers. Creating Debugger Visualizers with Visual Studio : Introduction Code debugging is one of the most important.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Struts 2.0 an Overview ( )
Chapter 1 Introduction Outstanding Features About This Book 1. A novel writing style is adopted to try to attract students’ or beginning programmers’ interesting.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Module 1: Introduction to C# Module 2: Variables and Data Types
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
Microsoft Visual Basic 2005: Reloaded Second Edition
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Understanding Code Compilation and Deployment Lesson 4.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
CSC 494/594 C# and ASP.NET Programming. C# 2012 C# Object-oriented language with syntax that is similar to Java.
.NET Code Auditing Keith Rull Software Engineer First Allied Securities Inc.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Scalable Game Development William Roberts Senior Game Engineer
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE687 – Object Oriented Design Spring 2001
Progress Apama Fundamentals
Introduction ITEC 420.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
What is .NET.
Introduction to .NET framework
.NET Omid Darroudi.
INF230 Basics in C# Programming
Project Center Use Cases Revision 2
Introduction to Visual Basic 2008 Programming
Outline SOAP and Web Services in relation to Distributed Objects
CS101 Introduction to Computing Lecture 19 Programming Languages
The Visual Studio .NET IDE Customization and Enhancements
Introduction to .NET Framework Ch2 – Deitel’s Book
CE-105 Spring 2007 Engr. Faisal ur Rehman
Project Center Use Cases Revision 3
Outline SOAP and Web Services in relation to Distributed Objects
Project Center Use Cases Revision 3
CS360 Windows Programming
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Social Media And Global Computing Introduction to Visual Studio
Hands-on Introduction to Visual Basic .NET
Understanding the Visual IDE
Using Visual Studio and VS Code for Embedded C/C++ Development
CIS16 Application Development – Programming with Visual Basic
Introduction to .NET By : Mr. V. D. Panchal Content :
What's New in Visual Studio 2005
Obfuscation in .NET Atchyutuni Shilpa CS-795.
Introducing the .NET Framework
and Program Development
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
ClickOnce Deployment (One-click Deployment)
Blazor A new framework for browser-based .NET apps Ryan Nowak
C# and ASP.NET Programming
Presentation transcript:

Source Code Inspection and Software Reuse Chapter 7 – Digging into source code Coder To Developer - Mike Gunderloy Respected Professor: Dr. James Fawcett Presented By: Ghanashyam N

Digging Into Source Code Looking more deeply at available code can clarify several details that are not immediately evident regarding this code’s functioning Code inspection helps us use existing code efficiently Seeing how someone else solved a particular problem can be very helpful in producing more elegant and efficient code

.NET Fundamentals All .NET code is executed by the CLR Each of the .NET language compilers (C#, VB .NET, Managed C++ etc.) convert source code into MSIL (and Metadata) CLR understands only MSIL code and knows nothing about the .NET language that was used to generate this MSIL code

.NET Code Is Open There are several utilities (Ildasm, .NET Reflector etc.) that allow you to work on MSIL code directly Thus it is possible to find out quite a bit about .NET code for a library or an application even if its source code is not available

.NET Code Is Open All the code for .NET FCL is present in the form of MSIL (and Metadata) on any machine that has .NET installed Thus it is possible to look more closely at the implementation of the .NET FCL Looking at code for the .NET FCL can prove extremely useful especially when the documentation for a certain FCL class or method is obscure

Using Ildasm The .NET Framework SDK comes with a tool named Ildasm that allows you to work directly with MSIL code It displays MSIL code in a somewhat human readable format Ildasm’s output cannot be easily deciphered even though it is much more readable than MSIL itself

Using Ildasm Ildasm Start Menu ► Programs ► Microsoft Visual Studio .NET 2003 ► Visual Studio .NET Tools ► Visual Studio .NET 2003 Command Prompt Type ‘ildasm’ on command prompt and press enter

Using .NET Reflector .NET Reflector is available at http://www.aisto.com/roeder/dotnet It is much easier to use than Ildasm since it displays the source code that was used to generate a supplied .NET assembly It also has many useful features like decompilation to either C# or VB .NET and display of call trees for any selected method

Reflection | Obfuscation MSIL, Metadata and Reflection make it possible to do a deep analysis of any .NET application or library, even without source code Obfuscation aims at protecting intellectual property by taking source code and automatically changing it to make it difficult to understand Obfuscators typically change class names, member names etc. in the source code to make it very difficult to decipher the assembly generated using this code

Some Obfuscators Demanor for .NET Salamander Dotfuscator Species .NET http://www.wiseowl.com/products/Products.aspx Salamander http://www.remotesoft.com/salamander/obfuscator.html Dotfuscator http://www.preemptive.com/dotfuscator/index.html Species .NET http://www.9rays.net/cgi-bin/components.cgi

Experimenting With Code There are times when you need to actually run the code to gain a complete understanding of its functioning But writing a complete VS .NET solution to test the behavior of a simple component is a lot of work

Experimenting With Code Snippet Compiler http://www.sliver.com/dotnet/SnippetCompiler/ An IDE that allows you to write code to exercise some small piece of code with minimal overhead Supports C# and VB .NET Supports Winforms and ASP .NET Modest set of features Gets code up and running quickly

Software Reuse Try to avoid “reinventing the wheel” Try and find code that you don’t have to write There is an astonishing amount of free, high-quality, reusable code out there

Software Reuse Make full use of the .NET FCL Code for most of the common programming tasks already exists in the FCL Hashtables, queues etc. – System.Collections Event log, performance counters – System.Diagnostics WMI – System.Management XML – System.XML Sending SMTP mail – System.Web.Mail Reqular Expressions – System.Text.RegularExpressions

Software Reuse Some Libraries SQLXML Library http://www.msdn.microsoft.com/sqlxml/ Add-on XML functionality for Microsoft SQL Server 2003 WSE (Web Services Enhancements) http://www.msdn.microsoft.com/webservices/building/wse/default.aspx Set of implementations of web services specifications such as WS-Security, WS-Routing, WS-Referral etc.

Software Reuse Some Libraries Logidex .NET Library http://www.msdn.microsoft.com/sqlxml/ Add-in to VS .NET that lets you locate and download .NET patterns and sample code from within Visual Studio .NET

Software Reuse More sources of free code The Code Project http://www.codeproject.com GotDotNet User Samples http://www.gotdotnet.com/Community/UserSamples

Evaluating Code Using FxCop http://www.gotdotnet.com/team/fxcop A code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines Can check conformance for third party libraries as well as own classes

Thank You