C#(pronounced / si rp/ see sharp) is a multi-paradigm programming language encompassing imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .!" initiative and later approved as a standard by !cma (!#M$-%%&) and I'( (I'(/I!# )%)*+). #, is one of the programming languages designed for the #ommon -anguage Infrastructure. #, is intended to be a simple, modern, general-purpose, object-oriented programming language. Its development team is led by $nders .ejlsberg. "he most recent version is #, &.+, which was released on $pril /), )+/+. Design goals "he !#M$ standard lists these design goals for #,0 #, language is intended to be a simple, modern, general-purpose, object-oriented programming language. "he language, and implementations thereof, should provide support for software engineering principles such as strong type chec1ing, array bounds chec1ing, detection of attempts to use uninitiali2ed variables, and automatic garbage collection. 'oftware robustness, durability, and programmer productivity are important. "he language is intended for use in developing software components suitable for deployment in distributed environments. 'ource code portability is very important, as is programmer portability, especially for those programmers already familiar with # and #33. 'upport for internationali2ation is very important. #, is intended to be suitable for writing applications for both hosted and embedded systems, ranging from the very large that use sophisticated operating systems, down to the very small having dedicated functions. $lthough #, applications are intended to be economical with regard to memory and processing power re4uirements, the language was not intended to compete directly on performance and si2e with # or assembly language. Name "he name 5# sharp5 was inspired by musical notation where a sharp indicates that the written note should be made a semitone higher in pitch. "his is similar to the language name of #33, where 5335 indicates that a variable should be incremented by /. 6ue to technical limitations of display (standard fonts, browsers, etc.) and the fact that the sharp symbol (73)889 M7'I# '.$:; 'I< (."M-0 =,>?%>@)) is not present on the standard 1eyboard, the number sign (73++)% , 7MA!: 'I< (."M-0 =,%B@)) was chosen to represent the sharp symbol in the written name of the programming language. "his convention is reflected in the !#M$-%%& #, -anguage 'pecification. .owever, when it is practical to do so (for eCample, in advertising or in boC art)@ Microsoft uses the intended musical symbol. "he 5sharp5 suffiC has been used by a number of other .!" languages that are variants of eCisting languages, including D, (a .!" language also designed by Microsoft which is derived from Dava /./), $, (from $da), and the functional 9,. "he original implementation of !iffel for .!" was called !iffel,, a name since retired since the full !iffel language is now supported. "he suffiC has also been used for libraries, such as <t1, (a .!" wrapper for <"E3 and other <(M! libraries), #ocoa, (a wrapper for #ocoa) and Ft, (a .!" language binding for the Ft tool1it). History 6uring the development of the .!" 9ramewor1, the class libraries were originally written using a managed code compiler system called Simple Managed C ('M#).In Danuary />>>, $nders .ejlsberg formed a team to build a new language at the time called #ool, which stood for 5#-li1e (bject (riented -anguageG. Microsoft had considered 1eeping the name 5#ool5 as the final name of the language, but chose not to do so for trademar1 reasons. Ay the time the .!" project was publicly announced at the Duly )+++ ;rofessional 6evelopers #onference, the language had been renamed #,, and the class libraries and $';.!" runtime had been ported to #,. #,Hs principal designer and lead architect at Microsoft is $nders .ejlsberg, who was previously involved with the design of "urbo ;ascal, !mbarcadero 6elphi (formerly #ode<ear 6elphi and Aorland 6elphi), and Iisual D33. In interviews and technical papers he has stated that flaws in most major programming languages (e.g. #33, Dava, 6elphi, and 'malltal1) drove the fundamentals of the #ommon -anguage :untime (#-:), which, in turn, drove the design of the #, language itself. Dames <osling, who created the Dava programming language in />>&, and Aill Doy, a co- founder of 'un Microsystems, the originator of Dava, called #, an 5imitation5 of Dava@ <osling further claimed that 5J#, isK sort of Dava with reliability, productivity and security deleted. LElaus Ereft and $ngeli1a -anger (authors of a #33 streams boo1) stated in a blog post that 5Dava and #, are almost identical programming languages. Aoring repetition that lac1s innovation,5 5.ardly anybody will claim that Dava or #, are revolutionary programming languages that changed the way we write programs,5 and 5#, borrowed a lot from Dava - and vice versa. ow that #, supports boCing and unboCing, weHll have a very similar feature in Dava.5 $nders .ejlsberg has argued that #, is 5not a Dava clone5 and is 5much closer to #335 in its design. 'ince the release of #, ).+ in ovember of )++B, the #, and Dava languages have evolved on increasingly divergent trajectories, becoming somewhat less similar. (ne of the first major departures came with the addition of generics to both languages, with vastly different implementations. #, ma1es use of reification to provide 5first-class5 generic objects that can be used li1e any other class, with code generation performed at class-load time. Ay contrast, DavaHs generics are essentially a language syntaC feature, and they do not affect the generated byte code because the compiler performs type erasure on the generic type information after it has verified its correctness. 9urthermore, #, has added several major features to accommodate functional-style programming, culminating in their -IF eCtensions released with #, %.+ and its supporting framewor1 of -ambda !Cpressions, !Ctension Methods, and anonymous classes. "hese features enable #, programmers to use functional programming techni4ues, such as closures, when it is advantageous to their application. "he -IF eCtensions and the functional imports help developers reduce the amount of 5boilerplate5 code that is included in common tas1s li1e 4uerying a database, parsing an Cml file, or searching through a data structure, shifting the emphasis onto the actual program logic to help improve readability and maintainability. #, used to have a mascot called $ndy (named after $nders .ejlsberg). It was retired on )> Dan )++&. Features Ay design, #, is the programming language that most directly reflects the underlying #ommon -anguage Infrastructure (#-I). Most of its intrinsic types correspond to value- types implemented by the #-I framewor1. .owever, the language specification does not state the code generation re4uirements of the compiler0 that is, it does not state that a #, compiler must target a #ommon -anguage :untime, or generate #ommon Intermediate -anguage (#I-), or generate any other specific format. "heoretically, a #, compiler could generate machine code li1e traditional compilers of #33 or 9ortran. 'ome notable distinguishing features of #, are0 "here are no global variables or functions. $ll methods and members must be declared within classes. 'tatic members of public classes can substitute for global variables and functions. -ocal variables cannot shadow variables of the enclosing bloc1, unli1e # and #3 3. Iariable shadowing is often considered confusing by #33 teCts. #, supports a strict Aoolean datatype, bool. 'tatements that ta1e conditions, such as while and if, re4uire an eCpression of a type that implements the true operator, such as the boolean type. Mhile #33 also has a boolean type, it can be freely converted to and from integers, and eCpressions such as if(a) re4uire only that a is convertible to bool, allowing a to be an int, or a pointer. #, disallows this 5integer meaning true or false5 approach on the grounds that forcing programmers to use eCpressions that return eCactly bool can prevent certain types of common programming mista1es in # or #33 such as if (a = b) (use of assignment = instead of e4uality ==). In #,, memory address pointers can only be used within bloc1s specifically mar1ed as unsafe, and programs with unsafe code need appropriate permissions to run. Most object access is done through safe object references, which always either point to a 5live5 object or have the well-defined null value@ it is impossible to obtain a reference to a 5dead5 object (one which has been garbage collected), or to a random bloc1 of memory. $n unsafe pointer can point to an instance of a value-type, array, string, or a bloc1 of memory allocated on a stac1. #ode that is not mar1ed as unsafe can still store and manipulate pointers through the System.IntPtr type, but it cannot dereference them. Managed memory cannot be eCplicitly freed@ instead, it is automatically garbage collected. <arbage collection addresses the problem of memory lea1s by freeing the programmer of responsibility for releasing memory which is no longer needed. In addition to the try...catch construct to handle eCceptions, #, has a try...finally construct to guarantee eCecution of the code in the finally bloc1. Multiple inheritance is not supported, although a class can implement any number of interfaces. "his was a design decision by the languageHs lead architect to avoid complication and simplify architectural re4uirements throughout #-I. #, is more type safe than #33. "he only implicit conversions by default are those which are considered safe, such as widening of integers. "his is enforced at compile-time, during DI", and, in some cases, at runtime. "here are no implicit conversions between booleans and integers, nor between enumeration members and integers (eCcept for literal +, which can be implicitly converted to any enumerated type). $ny user-defined conversion must be eCplicitly mar1ed as eCplicit or implicit, unli1e #33 copy constructors and conversion operators, which are both implicit by default. 'tarting with version &.+, #, supports a 5dynamic5 data type that enforces type chec1ing at runtime only. !numeration members are placed in their own scope. #, provides properties as syntactic sugar for a common pattern in which a pair of methods, accessor (getter) and mutator (setter) encapsulate operations on a single attribute of a class. 9ull type reflection and discovery is available. #, currently (as of version &.+) has ** reserved words. #hec1ed eCceptions are not present in #, (in contrast to Dava). "his has been a conscious decision based on the issues of scalability and versionability. Common Type System (CTS) #, has a unified type system. "his unified type system is called #ommon "ype 'ystem (#"'). $ unified type system implies that all types, including primitives such as integers, are subclasses of the System.Object class. 9or eCample, every type inherits a ToString() method. 9or performance reasons, primitive types (and value types in general) are internally allocated on the stac1. Categories of datatypes #"' separates datatypes into two categories0 /. Ialue types ). :eference types Ialue types are plain aggregations of data. Instances of value types do not have referential identity nor a referential comparison semantics - e4uality and ine4uality comparisons for value types compare the actual data values within the instances, unless the corresponding operators are overloaded. Ialue types are derived from System.ValueType, always have a default value, and can always be created and copied. 'ome other limitations on value types are that they cannot derive from each other (but can implement interfaces) and cannot have an eCplicit default (parameterless) constructor. !Camples of value types are all primitive types, such as int (a signed %)-bit integer), float (a %)-bit I!!! floating-point number), char (a /8-bit 7nicode code unit), and System.ateTime (identifies a specific point in time with nanosecond precision). (ther eCamples are enum (enumerations) and struct (user defined structures). In contrast, reference types have the notion of referential identity - each instance of a reference type is inherently distinct from every other instance, even if the data within both instances is the same. "his is reflected in default e4uality and ine4uality comparisons for reference types, which test for referential rather than structural e4uality, unless the corresponding operators are overloaded (such as the case for System.String). In general, it is not always possible to create an instance of a reference type, nor to copy an eCisting instance, or perform a value comparison on two eCisting instances, though specific reference types can provide such services by eCposing a public constructor or implementing a corresponding interface (such as I!loneable or I!omparable). !Camples of reference types are object (the ultimate base class for all other #, classes), System.String (a string of 7nicode characters), and System."rray (a base class for all #, arrays). ADONET ADONET is a set of computer software components that programmers can use to access data and data services. It is a part of the base class library that is included with the Microsoft .!" 9ramewor1. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational sources. $6(.!" is sometimes considered an evolution of $ctiveN 6ata (bjects ($6() technology, but was changed so eCtensively that it can be considered an entirely new product. Architecture $6(.!" is conceptually divided into consumers and data providers. "he consumers are the applications that need access to the data, and the providers are the software components that implement the interface and thereby provides the data to the consumer. ADO.NET and isual Studio 9unctionality eCists in the Iisual 'tudio I6! to create speciali2ed subclasses of the 6ata'et classes for a particular database schema, allowing convenient access to each field through strongly typed properties. "his helps catch more programming errors at compile- time and ma1es the I6!Hs Intellisense feature more beneficial. Entity Framework "he ADONET En!i!" Frame#or$ is a set of data-access $;Is for the Microsoft .!" 9ramewor1, similar to the Dava ;ersistence $;I, targeting the version of $6(.!" that ships with .!" 9ramewor1 &.+. $6(.!" !ntity 9ramewor1 is included with .!" 9ramewor1 &.+ and Iisual 'tudio )+/+, released in $pril )+/+. $n !ntity 9ramewor1 Entity is an object which has a 1ey representing the primary 1ey of a logical datastore entity. $ conceptual Entity Data Model (!ntity-relationship model) is mapped to a datastore schema model. 7sing the !ntity 6ata Model, the !ntity 9ramewor1 allows data to be treated as entities independently of their underlying datastore representations. Entity SQL, a 'F--li1e language, serves for 4uerying the !ntity 6ata Model (instead of the underlying datastore). 'imilarly, -IF eCtension LINQ to Entities provides typed 4uerying on the !ntity 6ata Model. !ntity 'F- and -IF to !ntities 4ueries are converted internally into a Canonical Query Tree which is then converted into a 4uery understandable to the underlying datastore (e.g. into 'F- in the case of a relational database). "he entities can use their relationships, with their changes committed bac1 to the datastore. AS%NET AS%NET is a web application framewor1 developed and mar1eted by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in Danuary )++) with version /.+ of the .!" 9ramewor1, and is the successor to MicrosoftHs $ctive 'erver ;ages ($';) technology. $';.!" is built on the #ommon -anguage :untime (#-:), allowing programmers to write $';.!" code using any supported .!" language. "he $';.!" '($; eCtension framewor1 allows $';.!" components to process '($; messages. History $fter the release of Internet Information 'ervices &.+ in />>*, Microsoft began researching possibilities for a new web application model that would solve common complaints about $';, especially with regard to separation of presentation and content and being able to write 5clean5 code.Mar1 $nders, a manager on the II' team, and 'cott <uthrie, who had joined Microsoft in />>* after graduating from 6u1e 7niversity, were tas1ed with determining what that model would loo1 li1e. "he initial design was developed over the course of two months by $nders and <uthrie, and <uthrie coded the initial prototypes during the #hristmas holidays in />>*. "he initial prototype was called 5N';5@ <uthrie eCplained in a )++* interview that, 5;eople would always as1 what the N stood for. $t the time it really didnHt stand for anything. NM- started with that@ N'-" started with that. !verything cool seemed to start with an N, so thatHs what we originally named it.5 "he initial prototype of N'; was done using Dava, but it was soon decided to build the new platform on top of the #ommon -anguage :untime (#-:), as it offered an object-oriented programming environment, garbage collection and other features that were seen as desirable features that MicrosoftHs #omponent (bject Model platform did not support. <uthrie described this decision as a 5huge ris15, as the success of their new web development platform would be tied to the success of the #-:, which, li1e N';, was still in the early stages of development, so much so that the N'; team was the first team at Microsoft to target the #-:. Mith the move to the #ommon -anguage :untime, N'; was re-implemented in #, (1nown internally as 5;roject #ool5 but 1ept secret from the public), and the name changed to $';3, as by this point the new platform was seen as being the successor to $ctive 'erver ;ages, and the intention was to provide an easy migration path for $'; developers. Mar1 $nders first demonstrated $';3 at the $'; #onnections conference in ;hoeniC, $ri2ona on May ), )+++. 6emonstrations to the wide public and initial beta release of $';3 (and the rest of the .!" 9ramewor1) came at the )+++ ;rofessional 6evelopers #onference on Duly //, )+++ in (rlando, 9lorida. 6uring Aill <atesH 1eynote presentation, 9ujitsu demonstrated $';3 being used in conjunction with #(A(-, JBK and support for a variety of other languages was announced, including MicrosoftHs new Iisual Aasic .!" and #, languages, as well as ;ython and ;erl support by way of interoperability tools created by $ctive'tate. (nce the 5.!"5 branding was decided on in the second half of )+++, it was decided to rename $';3 to $';.!". Mar1 $nders eCplained on an appearance on The MSDN Show that year that, 5"he .!" initiative is really about a number of factors, itHs about delivering software as a service, itHs about NM- and web services and really enhancing the Internet in terms of what it can do ... we really wanted to bring its name more in line with the rest of the platform pieces that ma1e up the .!" framewor1.5 $fter four years of development, and a series of beta releases in )+++ and )++/, $';.!" /.+ was released on Danuary B, )++) as part of version /.+ of the .!" 9ramewor1. !ven prior to the release, do2ens of boo1s had been written about $';.!", and Microsoft promoted it heavily as part of their platform for web services. <uthrie became the product unit manager for $';.!", and development continued apace, with version /./ being released on $pril )&, )++% as a part of Mindows 'erver )++%. "his release focused on improving $';.!"Hs support for mobile devices. Characteristics Pages $';.!" web pages or webpage, 1nown officially as 5web forms5, are the main building bloc1 for application development. Meb forms are contained in files with an 5.aspC5 eCtension@ these files typically contain static (N)."M- mar1up, as well as mar1up defining server-side Meb #ontrols and 7ser #ontrols where the developers place all the re4uired static and dynamic content for the web page. $dditionally, dynamic code which runs on the server can be placed in a page within a bloc1 #$ %% &ynamic co&e %% $', which is similar to other web development technologies such as ;.;, D';, and $';. Mith $';.!" 9ramewor1 ).+, Microsoft introduced a new code-behind model which allows static teCt to remain on the .aspC page, while dynamic code remains in an .aspC.vb or .aspC.cs file (depending on the programming language used). Code-behind model Microsoft recommends dealing with dynamic program code by using the code-behind model, which places this code in a separate file or in a specially designated script tag. #ode-behind files typically have names li1e Myage!asp"!cs or Myage!asp"!v# while the page file is Myage!asp" (same filename as the page file ($';N), but with the final eCtension denoting the page language). "his practice is automatic in Microsoft Iisual 'tudio and other I6!s. Mhen using this style of programming, the developer writes code to respond to different events, li1e the page being loaded, or a control being clic1ed, rather than a procedural wal1 through of the document. $S!NET%s code-behind model mar1s a departure from #lassic $'; in that it encourages developers to build applications with separation of presentation and content in mind. In theory, this would allow a web designer, for eCample, to focus on the design mar1up with less potential for disturbing the programming code that drives it. "his is similar to the separation of the controller from the view in ModelOIiewO#ontroller (MI#) framewor1s. Directives $ directive is special instructions on how $';.!" should process the page. "he most common directive is PQR ;age QS which can specify many things, such as which programming language is used for the server-side code. User controls &ser controls are encapsulations of sections of pages which are registered and used as controls in $';.!". 7ser controls are created as $'#N mar1up files. "hese files usually contain static (N)."M- mar1up, as well as mar1up defining server-side web controls. "hese are the locations where the developer can place the re4uired static and dynamic content. $ user control is compiled when its containing page is re4uested and is stored in memory for subse4uent re4uests. 7ser controls have their own events which are handled during the life of $';.!" re4uests. $n event bubbling mechanism provides the ability to pass an event fired by a user control up to its containing page. 7nli1e an $';.!" page, a user control cannot be re4uested independently@ one of its containing pages is re4uested instead. Custom controls ;rogrammers can also build custom controls for $';.!" applications. 7nli1e user controls, these controls do not have an $'#N mar1up file, having all their code compiled into a dynamic lin1 library (6--) file. 'uch custom controls can be used across multiple web applications and Iisual 'tudio projects Rendering techniue $';.!" uses a visited composites rendering techni4ue. 6uring compilation, the template (.aspC) file is compiled into initiali2ation code which builds a control tree (the composite) representing the original template. -iteral teCt goes into instances of the -iteral control class, and server controls are represented by instances of a specific control class. "he initiali2ation code is combined with user-written code (usually by the assembly of multiple partial classes) and results in a class specific for the page. "he page doubles as the root of the control tree. $ctual re4uests for the page are processed through a number of steps. 9irst, during the initiali2ation steps, an instance of the page class is created and the initiali2ation code is eCecuted. "his produces the initial control tree which is now typically manipulated by the methods of the page in the following steps. $s each node in the tree is a control represented as an instance of a class, the code may change the tree structure as well as manipulate the properties/methods of the individual nodes. 9inally, during the rendering step a visitor is used to visit every node in the tree, as1ing each node to render itself using the methods of the visitor. "he resulting ."M- output is sent to the client. $fter the re4uest has been processed, the instance of the page class is discarded and with it the entire control tree. "his is a source of confusion among novice $';.!" programmers who rely on class instance members that are lost with every page re4uest/response cycle. !tate management $';.!" applications are hosted by a web server and are accessed using the stateless .""; protocol. $s such, if an application uses stateful interaction, it has to implement state management on its own. $';.!" provides various functions for state management. #onceptually, Microsoft treats 5state5 as <7I state. ;roblems may arise if an application needs to 1eep trac1 of 5data state5@ for eCample, a finite state machine which may be in a transient state between re4uests (la2y evaluation) or which ta1es a long time to initiali2e. 'tate management in $';.!" pages with authentication can ma1e Meb scraping difficult or impossible. Appli&a!ion S!a!e $pplication state is held by a collection of shared user-defined variables. "hese are set and initiali2ed when the "pplication(OnStart event fires on the loading of the first instance of the application and are available until the last instance eCits. $pplication state variables are accessed using the "pplications collection, which provides a wrapper for the application state variables. $pplication state variables are identified by name. Se''ion '!a!e 'erver-side session state is held by a collection of user-defined session variables that are persistent during a user session. "hese variables, accessed using the Session collection, are uni4ue to each session instance. "he variables can be set to be automatically destroyed after a defined time of inactivity even if the session does not end. #lient-side user session is maintained by either a coo1ie or by encoding the session I6 in the 7:- itself. $';.!" supports three modes of persistence for server-side session variables0 In-;rocess Mode "he session variables are maintained within the $';.!" process. "his is the fastest way@ however, in this mode the variables are destroyed when the $';.!" process is recycled or shut down. $';'tate Mode $';.!" runs a separate Mindows service that maintains the state variables. Aecause state management happens outside the $';.!" process, and because the $';.!" engine accesses data using .!" :emoting, $';'tate is slower than In-;rocess. "his mode allows an $';.!" application to be load-balanced and scaled across multiple servers. Aecause the state management service runs independently of $';.!", the session variables can persist across $';.!" process shutdowns. .owever, since session state server runs as one instance, it is still one point of failure for session state. "he session-state service cannot be load- balanced, and there are restrictions on types that can be stored in a session variable. '4l'erver Mode 'tate variables are stored in a database, allowing session variables to be persisted across $';.!" process shutdowns. "he main advantage of this mode is that it allows the application to balance load on a server cluster, sharing sessions between servers. "his is the slowest method of session state management in $';.!". Vie# '!a!e Iiew state refers to the page-level state management mechanism, utili2ed by the ."M- pages emitted by $';.!" applications to maintain the state of the web form controls and widgets. "he state of the controls is encoded and sent to the server at every form submission in a hidden field 1nown as ((VI)*ST"T). "he server sends bac1 the variable so that when the page is re-rendered, the controls render at their last state. $t the server side, the application may change the viewstate, if the processing re4uires a change of state of any control. "he states of individual controls are decoded at the server, and are available for use in $';.!" pages using the ViewState collection. "he main use for this is to preserve form information across postbac1s. Iiew state is turned on by default and normally seriali2es the data in every control on the page regardless of whether it is actually used during a postbac1. "his behavior can (and should) be modified, however, as Iiew state can be disabled on a per-control, per-page, or server-wide basis. 6evelopers need to be wary of storing sensitive or private information in the Iiew state of a page or control, as the base8& string containing the view state data can easily be de- seriali2ed. Ay default, Iiew state does not encrypt the ((VI)*ST"T) value. !ncryption can be enabled on a server-wide (and server-specific) basis, allowing for a certain level of security to be maintained. Ser(er)'i*e &a&hing $';.!" offers a 5#ache5 object that is shared across the application and can also be used to store various objects. "he 5#ache5 object holds the data only for a specified amount of time and is automatically cleaned after the session time-limit elapses. O!her (ther means of state management that are supported by AS%NET are coo'ies( caching, and using the 4uery string. "emplate engine Mhen first released, $';.!" lac1ed a template engine. Aecause the .!" 9ramewor1 is object-oriented and allows for inheritance, many developers would define a new base class that inherits from 5'ystem.Meb.7I.;age5, write methods there that render ."M-, and then ma1e the pages in their application inherit from this new class. Mhile this allows for common elements to be reused across a site, it adds compleCity and miCes source code with mar1up. 9urthermore, this method can only be visually tested by running the application - not while designing it. (ther developers have used include files and other tric1s to avoid having to implement the same navigation and other elements in every page. $';.!" ).+ introduced the concept of 5master pages5, which allow for template-based page development. $ web application can have one or more master pages, which, beginning with $';.!" ).+, can be nested. Master templates have place-holder controls, called Contentlace)olders to denote where the dynamic content goes, as well as ."M- and Dava'cript shared across child pages. #hild pages use those #ontent;lace.older controls, which must be mapped to the place- holder of the master page that the content page is populating. "he rest of the page is defined by the shared parts of the master page, much li1e a mail merge in a word processor. $ll mar1up and server controls in the content page must be placed within the #ontent;lace.older control. Mhen a re4uest is made for a content page, $';.!" merges the output of the content page with the output of the master page, and sends the output to the user. "he master page remains fully accessible to the content page. "his means that the content page may still manipulate headers, change title, configure caching etc. If the master page eCposes public properties or methods (e.g. for setting copyright notices) the content page can use these as well. SCREENS+OTS, -) .ogin Form,
E/plana!ion, 9rom "his form the :egistered user enters his 7ser ame and ;assword and clic1s on the 'ign in button from where he will reach to the InboC page where all the received mails can be viewed by him/her. .owever for the on-:egistered 7sers they will have to fill up the :egistration 9orm Ay clic1ing on the T#reate an accountU -in1 and complete their registration.(nly after "his they will be able to 'ign in from the -ogin ;age. If any :egistered 7ser forgets his/her password then they can clic1 on the TcanUt access Vour accountU -in1 from where they can 1now their respective passwords and then can 'ign in. T$bout #ipherMailU -in1 gives you the general description of the #ipher Mailing 'ystem in detail. 0) In1o/ Form, E/plana!ion, 9rom this page the signin user can view all the received mails from which he can add them in the T'pamU option from the T:eport 'pamU Autton or delete them from the T6eleteU Autton and add them in the T"rashU option .if the user clic1s on any mail subject the completed message will be visible to him/her according to how the sender .as forwarded the mail in normal or encrypted form in the TIiew MessageU 9orm. $ -in1 of T#hange ;asswordU is available on this form from where the user can change his eCisting password to a new one according to his/her wish. 2) Vie#Me''age Form,
E/plana!ion, If the message was send in normal form then normal teCt message will be visible to the recipient of the mail. (n the other hand if the message was send in encrypted form then it will also be visible to the recipient of the mail in encrypted form. "o view it in normal form the user will firstly have to enter the Eey re4uired for 6ecryption and finally clic1 on the T6ecrypt thisU -in1. $s soon as the user clic1s on this -in1 the teCt message would be visible to him/her in normal form.
3) Compo'e Mail Form0 E/plana!ion, 9rom this page the sign in user can send the mails to all the other users either in normal form from the T'endU Autton or in !ncrypted 9orm from the T"( '!6 !#:V;"!6 M!''$<!U -in1. If the user does not want to send the mail right now he/she will clic1 (n the T'ave owU Autton rather than T'endU by which his/her to be sent mail will <et saved in the 6rafts option to be used in the nearby future. If the user wants to send the mail in encrypted form then he/she will clic1 on the T"('!6 !#:V;"!6 M!''$<!U lin1 which will forward the user to the neCt page. 4) En&r"p!Me''age Form E/plana!ion, 9rom this page the user will enter the teCt message which he/she wants to encrypt and the specified 1ey for encrypting the message and then clic1 on the T!ncryptU Autton from where a new form gets opened. 5) Vie#6Sen*En&r"p!Me''age Form,
E/plana!ion, (n this page the user can view the message to be send in encrypted form. "hen if he/she wants view that message in normal or decrypted form clic1 on the T6ecrypt thisU -in1. $fter that a new 9orm Iiew6ecryptedMessage gets opened. 7) Vie#De&r"p!e*Me''age Form,
(r else if the user wants to send the encrypted message to another then he/she will have to clic1 on the T'endU -in1 from the Iiew='end!ncryptMessage 9orm from where a new 9orm as 'end!ncryptedMessage gets opened. 8) Sen*En&r"p!e*Me''age Form, E/plana!ion, 9rom this page the user will enter the name of the recipient of the encrypted mail along with the subject and clic1 on the T'endU Autton. 9) Me''ageSen! Form,
E/plana!ion, "his form shows the user that his sent mails whether in normal or encrypted form has been sent successfully to the other user which he/she can view in the 'ent Mail (ption. -:) Sen!Mail Form, E/plana!ion, "his page gives the complete information to the user about all the sent mails by him/her from which he can add them in the T'pamU option from the T:eport 'pamU Autton or delete them from the T6eleteU Autton and add them in the T"rashU option. --) Dra;!' Form, E/plana!ion, .ere all the mails will be visible to the user which he/she has saved from the T'ave owU Autton in #ompose Mail form to which he/she can remove permanently by selecting the mail and clic1ing on the T6iscard 6raftsU Autton if it is no longer necessary to be sent. -0) Spam Form, E/plana!ion, .ere all the mails will be visible to the user which he/she has sent from the T:eport 'pamU Autton in InboC and 'entMail form to which he/she can remove permanently by selecting the mail and clic1ing on the T6elete 9oreverU Autton if it is no longer re4uired. -2) Tra'h Form,
E/plana!ion, .ere all the mails will be visible to the user which he/she has sent from the T6eleteU Autton in InboC and 'entMail form to which he/she can remove permanently by selecting the mail and clic1ing on the T6elete 9oreverU Autton if it is no longer re4uired. -3) Regi'!ra!ion Form, E/plana!ion, "his form gets opened when any user clic1s on the T#reate an $ccountU -in1 from the -ogin page ..ere the user will have to mention all the details after that he/she will clic1 (n the 'ubmit Autton and a conformation message of 'uccessful :egistration will be visible once the registration process is completed. -4) Forgo!%a''#or* Form, E/plana!ion, "his form gets opened when any user clic1s on the TcanUt access your accountU -in1 from the -ogin page ..ere the user will have to mention details such as his user id $fter that he/she will clic1 on the T'how 'ecurity FuestionU which will show their :espective security 4uestion entered at the time of their registration and enter the $nswer corresponding to that particular 4uestion. 9inally he/she will clic1 on the 'ubmit Autton and their password will be generated to them. -5) A1ou!u' Form, E/plana!ion, "his form tells about the features been implemented in the #ipher Mail Mailing 'ystem to any user who is viewing the site for their general information. -7) Change%a''#or* Form, E/plana!ion, "his form gets opened when the signed in user clic1s on the T#hange ;asswordU -in1 from the InboC page ..ere the user will have to mention details such as his old ;assword, new password and then retype or confirm new password. 9inally he/she will clic1 on the 'ubmit Autton and a conformation message as TVour ;assword #hanged successfullyU will be shown on the screen. ow the user has been assigned a new password for -ogin in the Mailing Mebsite. S!ore* %ro&e*ure', -) a**'pammail'
0) &he&$pa''#or*
2) *ele!e'ele&!e*mail'
3) 'ho#*ra;!mail'
4) 'ho#re&ei(e*mail' 5) 'ho#'en!mail'
T"pe' o; <oin' ='e*, inner >oin, inner join is used to combine the data from different tables having common values in a single result set. Da!a1a'e u'e*, mailing'"'!em Ta1le', -) Sign in 0) 'ignup 2) MailDe!ail'
3) Dra;!Mail'
4) SpamMail'
5) Tra'hMail'
TESTIN? "esting presents an interesting anomaly for the software engineer. "he engineer creates of test cases that are intended to LdemolishG the software that has been built. 6uring earlier software engineering activities, the engineer attempts to build software from an abstract concept to a tangible product. In fact, testing is the one step in the software process that could be viewed (psychologically at least) as destructive rather than constructive. 'oftware engineers are by their nature constructive people. "esting re4uires that the developer discard preconceived notions of the LcorrectnessG of software just developed and overcome a conflict of interest that occurs when errors are uncovered. "he design of tests for software and other engineered products can be as challenging as the initial design of the product itself. $ system should always be tested thoroughly before implementing it, as regards its individual programs, the system as a whole, user acceptance, etc., this is because implementing a new system is a major job, which re4uires lot of man-hours and lot of other resources. 'o an error not detected before implementation may cost a lot. !ffective testing early in process translates directly into long term cost savings from a reduced numbers of errors. "esting is the process f eCecuting the programs with the intention of finding errors. 6uring testing the problem is eCecuted with a set of test cases and output of the program for the test cases is evaluated to determine the efficacy of the program to see that it fulfills the eCpected re4uirements, which will lead to an error free system. TESTIN? O@<ECTIVES "he following rules that can serve well as testing objectives- "esting is a process of eCecuting a program with the intent of finding an error. $ good test case is one that has a high probability of finding an as O yet O undiscovered error. $ successful test is one that uncovers an as O yet O undiscovered error. "hese objectives imply a dramatic change in viewpoint. "hey move counter to the commonly held view get a successful test is one in which no errors are found. (ur objective is to design tests that systematically uncover different classes of errors and to do so with a minimum amount to time and effort. If testing is conducted successfully, it will uncover errors in the software. $s a secondary benefit, testing demonstrates that software functions appear to be performance re4uirements appear to have been met. TESTA@I.ITA "he following are the attributes of a good test O $ good test has a high probability of finding an error. $ good test is non redundant. $ good test should be Lbest of breedG. $ good test should be neither too simple nor too compleC. TEST CASE DESI?N "he design of tests for software and other engineered products can be as challenging as the initial design of the product itself yet, for reasons that we have already discussed, software engineers often treat testing as an afterthought, developing test cases that may Lfeel rightG but have little assurance of being complete. $ rich variety of test case design methods have evolved for software. "hese methods provide the developer with a systematic approach to testing. More important, methods provide a mechanism that can help to ensure the completeness of tests and provide the highest li1elihood for uncovering errors in software. $ny engineered product can be tested in one of two ways0- /. Enowing the specified function that a product has been designed to perform, tests can be conducted that demonstrate each function is fully operational while at the same time searching for errors in each functions. ). Enowing the internal wor1ings of a product, tests can be conducted to ensure that Lall gears mesh, Lthat is, internal operations are performed according to specifications and all internal components have been ade4uately eCercised. "he first test approach is called 1la&$ B 1o/ B !e'!ing and the second, #hi!e B 1o/ !e'!ing W+ITE B @OC TESTIN? Mhite O boC testing, sometimes called gla'' B 1o/ !e'!ing is a test case design method that uses the control structure of the procedural design to derive test cases. 7sing white O boC testing methods, the software engineer can derive test cases that O /. <uarantee that al independent paths within a module have been eCercised at least ones. ). !Cercise all logical decisions on their true and false sides. %. !Cecute all loops at their boundaries and within their operational bound, and &. !Cercise internal data structures to ensure their validity. $ reasonable 4uestion might be posed at this juncture0 LMhy spend time and energy worrying about (and testing) logical minutiae when we might better eCpend effort ensuring that program re4uirements have been metW L'tated another way, why donUt we spend all of our energy blac1 O boC testingW "he answer lies in the nature of software defects0 Logical errors and incorrect assumptions are inversely proportional to the pro#a#ility that a program path will #e e"ecuted! !rrors tend to creep in to your wor1 when we design and implement function, conditions of controls that are out of the mainstream. !veryday processing tends to be well understood, while Lspecial caseG processing tends to fail in to the crac1s. *e often #elieve that a logical path is not li'ely to #e e"ecuted when( in fact( it may #e e"ecuted on a regular #asis! "he logical flow of program is sometimes counterintuitive, meaning that our conscious assumptions about flow of control and data may lead us to ma1e design errors that are uncovered only once path testing commences. Typographical errors are random! Mhen a program is translated into programming language source code, it is li1ely that some typing errors will occur. Many will be uncovered by syntaC chec1ing mechanisms, but others will go undetected until testing begins. It is li1ely that a typo will eCist on an obscure logical path as on a mainstream path. !ach of these reasons provides an argument for conducting white O boC test.
@.ACK B @OC TESTIN? Alac1 O boC testing, also called 1eha(ioral !e'!ing, focuses on the functional re4uirements of the software. "hat is, blac1 O boC testing enables the software engineer to derive sets of input conditions that will fully eCercise all functional re4uirements for a program. Alac1 O boC techni4ues. :ather, it is a complementary approach that is li1ely to uncover a different class of errors than white O boC methods. Alac1 O boC testing attempts to find errors in the following categories0 Incorrect of missing functions. Interface errors. !rrors in data structures of eCternal database access. Aehavior or performance errors, and Initiali2ation and termination errors. 7nli1e white O boC testing, which is performed early in the testing process, blac1 O boC testing tends to be applied during latter stages of testing. Aecause blac1 O boC testing purposely disregards control structure, attention is focused on the information domain. TESTIN? %ROCESSES Mainly there are three types of testing processes O =ni! !e'!ing B the testing of individual modules (unit module) was completed during the development itself. #reating some test data at time of coding tested each module and necessary change was made thereon to ma1e sure that a module is wor1ing satisfactorily. 9or the unit testing we had tested each and every line of our main program individually for the errors. 'o each unit of the whole project has been debugged. In!egra!ion !e'!ing B on completely developing and testing individual module (unit module), we start adding unit modules, each time on adding those unit module we chec1 system for errors and recover them if any error found. $bove steps successfully runs for throughout process. "he object is to ta1e unit tested components and build a program structure that has been dictated by design or as specified in system re4uirement specification. S"'!em !e'!ing Bafter a successful testing of individual programs the system runs through a series of test to ensure the wor1ing of the system as a whole. "he objective of testing the entire system is to verify that the programs meet the original programming specification. 'ystem testing is done with the original data of national (natural) resources information system. @I@.IO?RA%+A 6uring the development of the project we have consulted the following boo1s0 /) Aeginning $';.et /./, MroC publication. )) ;rofessional $';. et /./, MroC publication. %) Aeginning 'F- 'erver )+++, MroC publication. &) ;rofessional 'F- 'erver )+++, MroC publication. Meb 'ites consulted0 /) www.p)p.wroC.com )) www.dotnetuncle.com