Section 1 Internet Overview - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Section 1 Internet Overview

Description:

Conversions. Implicit any type can implicitly convert to a ... based admin Auto conversion of document formats Development environment (e.g. .Net or J2EE) ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 28
Provided by: MichelLe384
Category:

less

Transcript and Presenter's Notes

Title: Section 1 Internet Overview


1
C
2
What We Will Learn
  • Configuration and Support
  • Compiler Options
  • Globalization
  • Writing CLS Compliant Code
  • XML Documentation
  • Delegates
  • Async Processing
  • Callbacks
  • Subscribing To and Publishing Events
  • Developing Data Consumers and Services
  • Data Transformation
  • Distributed Application Programming
  • Multithreading
  • Using Structs and Arrays
  • Grammar
  • Escape Characters
  • Operators and Their Precedence
  • Preprocessing Directives
  • Program Flow

3
What We Will Learn
  • Methods
  • Operator Overloading
  • Parameters
  • Pinvoke
  • Special Methods
  • User-Defined Conversions
  • Object-Oriented Programming
  • Aggregation
  • Encapsulation and Abstraction
  • Inheritance and Polymorphism
  • Properties, Indexers, and Fields
  • Constants and Fields
  • Indexers
  • Properties
  • Variables
  • Value and Reference Types
  • Attributes
  • Conversions
  • Object Creation and Lifetime

4
Compiler Options
  • Can call C from command line csc.exe
  • VCVARS32.BAT sets up environment
  • No linking in C
  • csc File.cs produces File.exe
  • csc /targetlibrary File.cs produces File.dll
  • csc /outMy.exe File.cs produces My.exe
  • csc /defineDEBUG /optimize /outFile2.exe .cs
    defines DEBUG and sets optimizations on

Collaboration
5
Globalization
  • System.Globalization.CultureInfo
  • System.Globalization.Calendar
  • System.Globalization.DateTimeFormatInfo
  • System.Globalization.DaylightTime
  • System.Globalization.GregorianCalendar
  • System.Globalization.RegionInfo
  • System.Globalization.SortKey

6
CLS Compliance
  • Common Language Specification
  • Affects..
  • Public class definitions
  • Public members/protected members accessed
    externally
  • Params/return types of Public methods of Public
    classes
  • ClsCompliantAttribute indicates compliance
  • AttributeUsage(AttributeTargets.All)
    Serializable public sealed class
    CLSCompliantAttribute Attribute

7
XML Documentation
  • /doc compiler option creates XML documentation
  • Tags
  • ltcgt text within a description that is code
  • ltcodegt many lines of code
  • ltexamplegt
  • ltexceptiongt
  • ltparamgt
  • ltreturnsgt
  • ltseegt
  • ltseealsogt
  • ltsummarygt

8
Event Handling
  • What is an Event?
  • Event is something interesting that happens to a
    class
  • One class can let other interested classes
    (clients) know when something interesting
    happens
  • Clients pass delegates to the class they are
    interested in
  • Delegates are methods to be instantiated when the
    event happens
  • When the event occurs, the class calls the
    delegates of each of its clients to let them know

9
Event Handling
  • Delegates
  • In the client classes, an event handler must be
    declared a method that will be called when the
    interesting class raises the event
  • The event handler must conform to the delegate
    signature
  • The event handler is then added to the
    interesting classs list of event handlers
  • AlarmEventHandler is the delegate for the Alarm
    event.
  • A delegate is a class that can hold a reference
    to a method.
  • Unlike other classes, a delegate class has a
    signature
  • It can hold references only to methods that match
    its signature
  • Note   A delegate declaration is sufficient to
    define a delegate class.
  • Event delegates in the .NET Framework have two
    parameters, the source that raised the event and
    the data for the event.

10
Event Handling
  • Events
  • In the class of interest, the event is declared
    and then it is raised within the On method
  • public event AlarmEventHandler Alarm //event
    declared
  • protected virtual void OnAlarm(AlarmEventArgs
    e)... //method that will raise event
  • Alarm(this, e) //this call of the event Alarm
    will be within OnAlarm in effect it calls each
    of the event handlers one at a time

11
Data Transformation
  • Conversions
  • Implicit any type can implicitly convert to a
    type further down the list
  • byte
  • short
  • integer
  • long
  • float/double/decimal
  • char
  • Explicit
  • Convert to/from any numeric type (cast)
  • Can lose info/raise exceptions
  • Checked/unchecked

12
What Is An Assembly?
  • An assembly is very much like a COM object used
    to be
  • It contains the code that the CLR executes
  • It represents a Fundamental unit
  • It represents a Security boundary
  • It represents a Type boundary
  • It represents a Version boundary
  • It represents a Deployment unit
  • It is very much like a Com component or a Java
    Package

13
What Is An Assembly?
  • How is an Assembly created?
  • Input is MSIL (Microsoft Intermediate Language -
    like Java Bytecodes)
  • MSIL is created from your source code (can
    originally be VB.Net, C, J etc.)
  • MSIL is converted into an assembly manifest by
    Ilasm.exe
  • Can disassemble an assembly back to MSIL using
    ildasm.exe

14
What Is The Global Assembly Cache?
  • Pool of all Assemblies that are available to be
    shared by many applications on that computer
  • Only put Assemblies in Global Assembly Cache if
    they need to be shared
  • To install an Assembly in the GAC
  • Use a tool called GACUtil.exe
  • Use an installer designed to do this for you
  • Use Explorer to drag assemblies into Cache
  • Must have a strong name to be in GAC

15
Distributed Applications
  • Automatic transactions
  • TransactionAttribute
  • ServicedComponent class
  • Base class for all COM components
  • Sign Register Assembly

16
Distributed Applications
  • Sign Register Assembly
  • Sign the assembly (use Al.exe) with a strong name
    to make sure that the assembly contains a unique
    key pair.
  • Use the .NET Services Installation Tool
    (Regsvcs.exe) to manually register the assembly.
  • A strong name consists of the assembly's identity
    its simple text name, version number, and
    culture information (if provided) plus a public
    key and a digital signature. It is generated from
    an assembly file using the corresponding private
    key. (The assembly file contains the assembly
    manifest, which contains the names and hashes of
    all the files that make up the assembly.)

17
Distributed Applications
  • Sign Register Assembly
  • Create strong name for assembly using sn
  • sn -k sgKey.snk
  • Set file attribute
  • assemblyAssemblyKeyFileAttribute(_at_"..\..\sgkey.s
    nk")
  • Remember that once you give an assembly a strong
    name, all assemblies that reference that assembly
    also have to have strong names, so that the
    security of the strongly named assembly is not
    compromised.
  • Note   Once an assembly is created, you cannot
    sign it with a strong name. You can sign an
    assembly with a strong name only when you create
    it.

18
Multithreading
19
Structs
20
Arrays
21
(No Transcript)
22
How to Evaluate CMSes
  • Select Evaluation Process(es)
  • Formal Tender/RFP process
  • Makes vendors accountable
  • Use a standard RFP format http//document-manageme
    nt-software-system.net/rfp_template_db-gen.htmlec
    ms
  • Demos
  • Ensure vendors demo similar features
  • Compare different ways in which your needs can be
    met
  • Scoring System
  • Create a scoring system based upon requirements
    list (or RFP) to compare

23
Cost Justification In Theory
  • In Theory
  • Higher productivity
  • Reduced operating costs
  • Increased employee satisfaction
  • Increased customer satisfaction
  • Enhanced Developer Productivity
  • Reduced time to value
  • Improved Scalability/Reliability
  • Greater Interoperability

24
Cost Justification in Practice
25
The Reality?
  • Microsoft tool
  • for determining Cost Justification/ Cost Benefit
    Analysis
  • http//www.microsoft.com/cmserver/evaluation/roica
    lculator.xls
  • Guide to CMS evaluation
  • http//www.em3.com/object/googlerightCMsystem.html
  • Many CMSes are too complex for requirements
  • Many CMSes are too expensive to buy or implement

26
The Solution?
  • Careful requirements gathering
  • Careful evaluation
  • Ensure you are fully informed
  • http//www.cmswatch.com
  • http//document-management-software-system.net/rfp
    _template_db-gen.htmlecms
  • Employ consultants who are fully informed (Apogee
    Interactive!)

27
The Solution?
  • Apogee Interactive Inc.
  • Susan Gilbert 770 270 6502
  • Experts in Content Mgt Solutions, EBusiness and
    Website solutions
Write a Comment
User Comments (0)
About PowerShow.com