Quiz 1
Quiz 1
Quiz 1
Complete
Architecture Tutorial
What is Microsoft .Net Framework?
The .Net framework is a software development platform developed by
Microsoft. The framework was meant to create applications, which would run
on the Windows Platform. The first version of the .Net framework was
released in the year 2002.
The version was called .Net framework 1.0. The .Net framework has come a
long way since then, and the current version is 4.7.1.
The .Net framework can be used to create both - Form-based and Web-
based applications. Web services can also be developed using the .Net
framework.
.NET Components
The architecture of the .Net framework is based on the following key
components;
1. Language - The first level is the programming language itself, the most
common ones are VB.Net and C#.
2. Compiler – There is a compiler which will be separate for each
programming language. So underlying the VB.Net language, there will
be a separate VB.Net compiler. Similarly, for C#, you will have another
compiler.
3. Common Language Interpreter – This is the final layer in .Net which
would be used to run a .net program developed in any programming
language. So the subsequent compiler will send the program to the CLI
layer to run the .Net application.
2. Class Library
The .NET Framework includes a set of standard class libraries. A class library
is a collection of methods and functions that can be used for the core purpose.
For example, there is a class library with methods to handle all file-level
operations. So there is a method which can be used to read the text from a
file. Similarly, there is a method to write text to a file.
Most of the methods are split into either the System.* or Microsoft.*
namespaces. (The asterisk * just means a reference to all of the methods that
fall under the System or Microsoft namespace)
3. Languages
The types of applications that can be built in the .Net framework is classified
broadly into the following categories.
Microsoft always ensures that .Net frameworks are in compliance with all the
supported Windows operating systems.
5. Simplified deployment - The .Net framework also have tools, which can
be used to package applications built on the .Net framework. These
packages can then be distributed to client machines. The packages
would then automatically install the application.
Summary
It is used to build applications for web, Windows, phone and provides broad range of
functionalities and support for industry standards.
This framework contains large number of class libraries known as Framework Class Library
(FCL).
The software programs written in .NET are execute in execution environment that is called
CLR (Common Language Runtime).
These both are core and essential parts of the .NET Framework.
This Framework provides various services like: memory management, networking, security
and memory safety. It also supports numerous programing languages like: C#, F#, VB etc.
Following is the .NET framework Stack that shows the modules and components of the
Framework.
CLR (Common Language Runtime)
It is a program execution engine that loads and execute program. It acts as a interface
between framework and operating system.
WinForms
Windows Forms is a smart client technology for the .NET Framework, a set of managed
libraries that simplify common application tasks such as reading and writing to the file
system.
ASP .NET
ASP .NET is a web framework designed and developed by Microsoft. It is used to develop
websites, web applications and web services. It provides fantastic integration of HTML, CSS
and JavaScript. It was first released in January 2002.
ADO .NET
ADO .NET is a module of .Net Framework which is used to establish connection between
application and data sources. Data sources can be such as SQL Server and XML. ADO .NET
consists of classes that can be used to connect, retrieve, insert and delete data.
WF (WorkFlow Foundation)
Windows Workflow Foundation (WF) is a Microsoft technology that provides an API, an in-
process workflow engine, and a rehostable designer to implement long-running processes as
workflows within .NET applications.
Entity Framework
It is an ORM based open source framework that is used to work with a database using .NET
objects. It eliminates lots of developer effort to handle the database. It is Microsoft's
recommended technology to deal with database.
Parallel LINQ
Parallel LINQ or PLINQ is a parallel implementation of LINQ to objects. It combines the
simplicity and readability of LINQ and provide power of parallel programing.
It can improve and provide fast speed to execute the LINQ query by using all available
computer capabilities.
Apart from above features and libraries .NET include other APIs and Model to improve and
enhance the .NET framework.
In 2015, Task parallel and Task parallel libraries are added and in .NET 4.5, task based
asynchronous model was added.
SGML is used for marking up documents and has the advantage of not being
dependent on a specific application. It is derived from GML (generalized markup
language), which allowed users to work on standardized formatting styles for electronic
documents.
FREE WEBINAR - March 12, 2019 11:00am EST | Managing Multiple Database Roles: How Many
Hats Do You Wear? REGISTER TODAY
Descriptive Markup
Document Types
Descriptive markup involves the use of markup code that identify how various portions
of a document should be interpreted. For example, the code may identify one portion as
a paragraph, another as a footnote and still another as a list or an item in a list.
Any software capable of processing the marked-up document will then do so using its
own kind of rendering. For example, one application might gather portions identified as
footnotes and print them out at the end of each page. Another might print footnotes at
the end of each chapter. Still another might not print out the footnotes at all.
XML tags identify the data and are used to store and organize the data,
rather than specifying how to display it like HTML tags, which are used to
display the data. XML is not going to replace HTML in the near future, but it
introduces new possibilities by adopting many successful features of HTML.
XML carries the data, does not present it − XML allows you to store the data
irrespective of how it will be presented.
XML Usage
A short list of XML usage says it all −
XML can work behind the scene to simplify the creation of HTML documents for
large web sites.
XML can be used to store and arrange the data, which can customize your data
handling needs.
XML can easily be merged with style sheets to create almost any desired output.
What is Markup?
XML is a markup language that defines set of rules for encoding documents
in a format that is both human-readable and machine-readable. So what
exactly is a markup language? Markup is information added to a document
that enhances its meaning in certain ways, in that it identifies the parts and
how they relate to each other. More specifically, a markup language is a set
of symbols that can be placed in the text of a document to demarcate and
label the parts of that document.
<message>
<text>Hello, world!</text>
</message>
What is XML?
XML stands for eXtensible Markup Language
XML is a markup language much like HTML
XML was designed to store and transport data
XML was designed to be self-descriptive
XML is a W3C Recommendation
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
But still, the XML above does not DO anything. XML is just information wrapped
in tags.
Someone must write a piece of software to send, receive, store, or display it:
Note
To: Tove
From: Jani
Reminder
Don't forget me this weekend!
The tags in the example above (like <to> and <from>) are not defined in any
XML standard. These tags are "invented" by the author of the XML document.
HTML works with predefined tags like <p>, <h1>, <table>, etc.
With XML, the author must define both the tags and the document structure.
XML is Extensible
Most XML applications will work as expected even if new data is added (or
removed).
Then imagine a newer version of note.xml with added <date> and <hour>
elements, and a removed <heading>.
The way XML is constructed, older version of the application can still work:
<note>
<date>2015-09-01</date>
<hour>08:30</hour>
<to>Tove</to>
<from>Jani</from>
<body>Don't forget me this weekend!</body>
</note>
Old Version
Note
To: Tove
From: Jani
Reminder
Don't forget me this weekend!
New Version
Note
To: Tove
From: Jani
XML stores data in plain text format. This provides a software- and hardware-
independent way of storing, transporting, and sharing data.
XML also makes it easier to expand or upgrade to new operating systems, new
applications, or new browsers, without losing data.
With XML, data can be available to all kinds of "reading machines" like people,
computers, voice machines, news feeds, etc.
Previous Page
Next Page
In this chapter, we will discuss XML CDATA section. The term CDATA
means, Character Data. CDATA is defined as blocks of text that are not
parsed by the parser, but are otherwise recognized as markup.
The predefined entities such as <, >, and & require typing and
are generally difficult to read in the markup. In such cases, CDATA section
can be used. By using CDATA section, you are commanding the parser that
the particular section of the document contains no markup and should be
treated as regular text.
Syntax
Following is the syntax for CDATA section −
<![CDATA[
]]>
Example
The following markup code shows an example of CDATA. Here, each
character written inside the CDATA section is ignored by the parser.
<script>
<![CDATA[
]] >
</script >
In the above syntax, everything between <message> and </message> is
treated as character data and not as markup.
CDATA Rules
The given rules are required to be followed for XML CDATA −
CDATA cannot contain the string "]]>" anywhere in the XML document.
CDATA vs PCDATA
CDATA
CDATA: (Unparsed Character data): CDATA contains the text which is not parsed further in
an XML document. Tags inside the CDATA text are not treated as markup and entities will
not be expanded.
1. <?xml version="1.0"?>
2. <!DOCTYPE employee SYSTEM "employee.dtd">
3. <employee>
4. <![CDATA[
5. <firstname>vimal</firstname>
6. <lastname>jaiswal</lastname>
7. <email>[email protected]</email>
8. ]]>
9. </employee>
Test it Now
In the above CDATA example, CDATA is used just after the element employee to make the
data/text unparsed, so it will give the value of employee:
<firstname>vimal</firstname><lastname>jaiswal</lastname><email>vimal@javatpoi
nt.com</email>
PCDATA
PCDATA: (Parsed Character Data): XML parsers are used to parse all the text in an XML
document. PCDATA stands for Parsed Character data. PCDATA is the text that will be parsed
by a parser. Tags inside the PCDATA will be treated as markup and entities will be
expanded.
In other words you can say that a parsed character data means the XML parser examine the
data and ensure that it doesn't content entity if it contains that will be replaced.
1. <?xml version="1.0"?>
2. <!DOCTYPE employee SYSTEM "employee.dtd">
3. <employee>
4. <firstname>vimal</firstname>
5. <lastname>jaiswal</lastname>
6. <email>[email protected]</email>
7. </employee>
Test it Now
In the above example, the employee element contains 3 more elements 'firstname',
'lastname', and 'email', so it parses further to get the data/text of firstname, lastname and
email to give the value of employee as:
XML - Validation
Advertisements
Previous Page
Next Page
Non DTD XML files must use the predefined character entities
for amp(&), apos(single quote), gt(>), lt(<), quot(double quote).
It must follow the ordering of the tag. i.e., the inner tag must be closed before
closing the outer tag.
Each of its opening tags must have a closing tag or it must be a self ending
tag.(<title>....</title> or <title/>).
It must have only one attribute in a start tag, which needs to be quoted.
Example
Following is an example of a well-formed XML document −
<!DOCTYPE address
]>
<address>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</address>
Each of the child elements among name, company and phone is enclosed in its
self explanatory tag.
XML - DTDs
Advertisements
Previous Page
Next Page
An XML DTD can be either specified inside the document, or it can be kept
in a separate document and then liked separately.
Syntax
Basic syntax of a DTD is as follows −
declaration1
declaration2
........
]>
An element tells the parser to parse the document from the specified root
element.
DTD identifier is an identifier for the document type definition, which may be
the path to a file on the system or URL to a file on the internet. If the DTD is
pointing to external path, it is called External Subset.
Internal DTD
A DTD is referred to as an internal DTD if elements are declared within the
XML files. To refer it as internal DTD, standalone attribute in XML
declaration must be set to yes. This means, the declaration works
independent of an external source.
Syntax
Following is the syntax of internal DTD −
<!DOCTYPE root-element [element-declarations]>
Example
Following is a simple example of internal DTD −
<!DOCTYPE address [
<!ELEMENT address (name,company,phone)>
]>
<address>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</address>
The DOCTYPE declaration has an exclamation mark (!) at the start of the
element name. The DOCTYPE informs the parser that a DTD is associated
with this XML document.
Rules
The document type declaration must appear at the start of the document
(preceded only by the XML header) − it is not permitted anywhere else within
the document.
Similar to the DOCTYPE declaration, the element declarations must start with an
exclamation mark.
The Name in the document type declaration must match the element type of the
root element.
External DTD
In external DTD elements are declared outside the XML file. They are
accessed by specifying the system attributes which may be either the
legal .dtd file or a valid URL. To refer it as external
DTD, standalone attribute in the XML declaration must be set as no. This
means, declaration includes information from the external source.
Syntax
Following is the syntax for external DTD −
<!DOCTYPE root-element SYSTEM "file-name">
Example
The following example shows external DTD usage −
<address>
<name>Tanmay Patil</name>
<company>TutorialsPoint</company>
<phone>(011) 123-4567</phone>
</address>
Types
You can refer to an external DTD by using either system
identifiers or public identifiers.
System Identifiers
A system identifier enables you to specify the location of an external file
containing DTD declarations. Syntax is as follows −
<!DOCTYPE name SYSTEM "address.dtd" [...]>
As you can see, it contains keyword SYSTEM and a URI reference pointing
to the location of the document.
Public Identifiers
Public identifiers provide a mechanism to locate DTD resources and is
written as follows −
<!DOCTYPE name PUBLIC "-//Beginning XML//DTD Address Example//EN">
Previous Page
Next Page
Namespace Declaration
A Namespace is declared using reserved attributes. Such an attribute name
must either be xmlns or begin with xmlns: shown as below −
<element xmlns:name = "URL">
Syntax
The Namespace starts with the keyword xmlns.
Example
Namespace affects only a limited area in the document. An element
containing the declaration and all of its descendants are in the scope of the
Namespace. Following is a simple example of XML Namespace −
<cont:name>Tanmay Patil</cont:name>
<cont:company>TutorialsPoint</cont:company>
<cont:phone>(011) 123-4567</cont:phone>
</cont:contact>
Here, the Namespace prefix is cont, and the Namespace identifier (URI)
as www.tutorialspoint.com/profile. This means, the element names and
attribute names with the cont prefix (including the contact element), all
belong to the www.tutorialspoint.com/profile namespace.