Showing posts with label Web Technology. Show all posts
Showing posts with label Web Technology. Show all posts

Monday, September 23, 2013

ASP Basics



What is ASP?

  • ASP stands for Active Server Pages
  • ASP is a program that runs inside IIS
  • IIS stands for Internet Information Services
  • IIS comes as a free component with Windows 2000
  • IIS is also a part of the Windows NT 4.0 Option Pack
  • The Option Pack can be downloaded from Microsoft
  • PWS is a smaller - but fully functional - version of IIS
  • PWS can be found on your Windows 95/98 CD
Advantages Using ASP.NET
  • ASP.NET drastically reduces the amount of code required to build large applications
  • ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model
  • ASP.NET pages are easy to write and maintain because the source code and HTML are together
  • The source code is executed on the server. The pages have lots of power and flexibility by this approach
  • The source code is compiled the first time the page is requested. Execution is fast as the Web Server compiles the page the first time it is requested. The server saves the compiled version of the page for use next time the page is requested
  • The HTML produced by the ASP.NET page is sent back to the browser. The application source code you write is not sent and is not easily stolen
  • ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in
  • The Web server continuously monitors the pages, components and applications running on it. If it noticies memory leaks, infinite loops, other illegal software or activities, it seamlessly kills those activities and restarts itself
  • ASP.NET validates information (validation controls) entered by the user without writing a single line of code
  • ASP.NET easily works with ADO .NET using data-binding and page formatting features
  • ASP.NET applications run fater and counters large volumes of users without performance problems
Differences between ASP.NET and Client-Side Technologies
Client-side refers to the browser and the machine running the browser. Server-side on the other hand refers to a Web server.
Client-Side Scripting
Javascript and VBScript and generally used for Client-side scripting. Client-side scripting executes in the browser after the page is loaded. Using client-side scripting you can add some cool features to your page. Both, HTML and the script are together in the same file and the script is download as part of the page which anyone can view. A client-side script runs only on a browser that supports scripting and specifically the scripting language that is used. Since the script is in the same file as the HTML and as it executes on the machine you use, the page may take longer time to download.
Server-Side Scripting
ASP.NET is purely server-side technology. ASP.NET code executes on the server before it is sent to the browser. The code that is sent back to the browser is pure HTML and not ASP.NET code. Like client-side scripting, ASP.NET code is similar in a way that it allows you to write your code alongside HTML. Unlike client-side scripting, ASP.NET code is executed on the server and not in the browser. The script that you write alongside your HTML is not sent back to the browser and that prevents others from stealing the code you developed
Features

  • Improve the reliability and usability of Web applications
  • Reduce the number of lines of code you have to write in common scenarios
  • Offer user features to personalize Web applications
  • Provide enhanced design features to generate consistent layouts and design

ASP.NET architecture

As the illustration shows, all Web clients communicate with ASP.NET applications through Microsoft Internet Information Services (IIS). IIS deciphers and optionally authenticates the request. If Allow Anonymous is set to true, no authentication occurs. IIS also finds the requested resource (such as an ASP.NET application), and, if the client is authorized, returns the appropriate resource.
In addition to the built-in ASP.NET security features, an ASP.NET application can use the low-level security features of the .NET Framework.

DHTML Basics



What is DHTML

lDHTML is the art of making HTML pages dynamic!
lDHTML is a combination of technologies used to create dynamic and interactive Web sites.
lTo most people DHTML means a combination of HTML, Style Sheets and JavaScript.

Features
lChanging the tags and properties
lReal-time positioning
lDynamic fonts (Netscape Communicator)
lData binding (Internet Explorer)

Changing the tags and properties
lThis is one of the most common uses of DHTML. It allows you to change the qualities of an HTML tag depending on an event outside of the browser (such as a mouse click, time, or date, and so on). You can use this to preload information onto a page, and not display it unless the reader clicks on a specific link.

Real-time postioning
lWhen most people think of DHTML this is what they expect. Objects, images, and text moving around the Web page. This can allow you to play interactive games with your readers or animate portions of your screen.

Dynamic Fonts
lThis is a Netscape only feature. Netscape developed this to get around the problem designers had with not knowing what fonts would be on a reader's system. With dynamic fonts, the fonts are encoded and downloaded with the page, so that the page always looks how the designer intended it to.
Data binding
lThis is an IE only feature. Microsoft developed this to allow easier access to databases from Web sites. It is very similar to using a CGI to access a database, but uses an ActiveX control to function. This feature is very advanced and difficult to use for the beginning DHTML writer.
Advantages of DHTML
l1. Fast and Zippy: - dHTML loads content on fly. Your whole page does not loads but only the content part that needs to be altered, so saving the crucial time for the users and giving the snazzy look to the website.
l2. Plug-ins, we don’t need them:- dHTML uses most of the features already present in the browsers, so there is no need to download any sort of Plug-ins.
Advantages of DHTML
l3. Great Utility:- The dynamic features possessed by dHTML are helping web designers to create Web pages that posses compact looks, downloads fast, have graphic effects, provides greater functionality and can hold much more text or content all at the same time.

Disadvantages
lUses script languages which mean
All variables are variants
Error handling is limited
lDebugging can be awkward
lCostly Editing tools: - although dHTML provides great functionality but the editors’ available for that in market are pretty expensive. Examples of dHTML editors are Dreamweaver and Fusion.
lLong and Complex coding: - dHTML coding is long and complex. Only the expert Javascript and HTML programmers can write them and edit them with good degree of functionality.
lBrowser Support problems: - dHTML suffers from browser support problems for different browsers. For example, a code written for Netscape might not work in Internet Explorer and Vice-Versa. The problem arises due to the different features of browsers.


What is HTML?
4Telling the browser what to do, and what props to use.
4A serises of tags that are integrated into a text document.

Tags are ;
4 surrounded with angle brackets like this
* <B> or <I>.
4Most tags come in pairs
* exceptions: <P>, <br>, <li> tags …
4The first tag turns the action  on, and the second turns it off.
4The second tag(off switch)  starts with a forward slash. 
* For example ,<B> text </B>
4can embedded, for instance, to do this:
* <HEAD><TITLE> Your text </HEAD></TITLE> it won't work.
* The correct order is <HEAD><TITLE> Your text </TITLE></HEAD>
4not case sensitivity. 
4Many tags have attributes.
*  For example, <P ALIGN=CENTER> centers the paragraph following it.
4Some browsers don't support the some tags and some attributes.

Structure of HTML
HTML documents are structured into two parts, the
    HEAD, and the BODY
The head contains information about the document
    that is not generally displayed with the document,
    such as its TITLE.
The BODY contains the body of the text, and is
    where you place the document material to be
    displayed. Elements allowed inside the HEAD,

Basic HTML Document Format


How to Create and View an HTML document?
1.Use an text editor such as Editpad to write the document.
2.Save the file as filename.html on a PC. This is called the Document Source.
3.Open Netscape (or any browser) Off-Line
4.Switch to Netscape
5.Click on File, Open File and select the filename.html document that you just created.
6.Your HTML page should now appear just like any other Web page in Netscape.
7.You may now switch back and forth between the Source and the HTML Document
lswitch to Notepad with the Document Source
lmake changes
lsave the document again
lswitch back to Netscape
lclick on RELOAD and view the new HTML Document
lswitch to Notepad with the Document Source......

HTML Disadvantages
Page numbers corresponding to the
   print are often not present
May require multiple files
May require on-line access

HTML Advantages
Widely available
Supports navigation by heading if properly tagged
Works with a wide range of AT
Known Web surfing concepts apply

XML Basics



XML

Acronym for Extensible Markup Language. An open standard for exchanging structured documents and data over the Internet that was introduced by the World Wide Web Consortium (W3C) in November 1996.

What is XML?

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML
  • XML was designed to describe data
  • XML tags are not predefined. You must define your own tags
  • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
  • XML with a DTD or XML Schema is designed to be self-descriptive
  • XML is a W3C Recommendation

The Main Difference Between XML and HTML

XML was designed to carry data.
XML is not a replacement for HTML.
XML and HTML were designed with different goals:

XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data looks.

HTML is about displaying information, while XML is about describing information.
Features or Goals of XML
1. XML shall be straightforwardly usable over the Internet.
When you write XML it should be readily available over the Internet. XML is not intended as a programming language for stand-alone systems, but rather to be used across the Internet for a wide variety of sources.
2. XML shall support a wide variety of applications.
The beauty of XML is that it was intended to be used for as many things as possible. This flexibility can sometimes make it more difficult to understand, but ultimately, XML can be used to describe a Web page about flowers or a database of car parts or nearly anything you can imagine.
3. XML shall be compatible with SGML.
SGML or Standard Generalized Markup Language, is the ISO standard on which all XML and thus XHTML documents are based upon. If a document isn't compatible with SGML, then it cannot be called XML.
4. It shall be easy to write programs which process XML documents.
XML was always intended to be easy to use and process. Because XML is based on human-readable text, this makes it a lot easier for programmers to figure out what is meant by the XML tags. This in turn makes it easier to write a program that processes those tags.
5. The number of optional features in XML is to be kept to the minimum.
Ideally, there would be zero optional features. Optional features cause problems because they are not guaranteed to be in any given situation. The more optional features there are in a system the more combinations there are for the system and so the more difficult the programming becomes.
6. XML documents should be human-legible and reasonably clear.
Rather than having elements that are named a3209zd you would have an element named <first_name>. Someone reading your XML should be able to make an educated guess about what the data is that's being tagged.
7. The XML design should be prepared quickly.
It is better to spend time building the data than it is on building an XML design.
8. The design of XML shall be formal and concise.
Only include as many elements as you need to be clear, not more and not less.
9. XML documents shall be easy to create.
XML is intended to not require a special editor or tool to create. And in fact, most XML documents can be edited in a text editor like Notepad or TextEdit.
10. Terseness in XML markup is of minimal importance.
When you're creating XML element names, first_name is better than fname because it's clearer and more human readable. While you do want to keep elements names short, the shortness should not be at the sacrifice of human-readability.


Advantages of XML

·     XML uses human, not computer, language. XML is readable and understandable, even by novices, and no more difficult to code than HTML.
·     XML is completely compatible with JavaTM and 100% portable. Any application that can process XML can use your information, regardless of platform.
·     XML is extendable. Create your own tags, or use tags created by others, that use the natural language of your domain, that have the attributes you need, and that makes sense to you and your users.

Disadvantages of XML

·         More difficult, demanding, and precise than HTML

·         Lack of browser support/end user applications

·         Still experimental/not solidified

Advantages of XML over HTML

·         By defining own markup language, can code documents more precisely

·         Reflects structure and semantics of documents --> better searching and navigation

·         Tagging/content separate from display

·         Allows single document to be used many ways

XML Structure

This page provides a description of XML structure including the document parts, the prologue, and provides a simple XML example document.

Document Parts

  • Prolog
  • Document Element (root element)

The Prologue

The prologue, equivalent to the header in HTML, may include the following:
  • An XML declaration (optional) such as:
<?xml version="1.0"?>
  • A DTD or reference to one (optional). An example reference to an external DTD file:
<!DOCTYPE LANGLIST SYSTEM "langlist.dtd">
  • Processing instructions - An example processing instruction that causes style to be determined by a style sheet:
<?xml-stylesheet type="text/css" href="xmlstyle.css"?>

An XML Document

Therefore a complete well formed XML document may look like:
<?xml version="1.0"?>
<LAND>
   <FOREST>
      <TREE>Oak</TREE>
      <TREE>Pine</TREE>
      <TREE>Maple</TREE>
   </FOREST>
   <MEADOW>
      <GRASS>Bluegrass</GRASS>
      <GRASS>Fescue</GRASS>
      <GRASS>Rye</GRASS>
   </MEADOW>
</LAND>
The below document is not an XML document since it does not qualify by the rules of a well formed document. There is more than one top level element which disqualifies the document from being well formed.
<?xml version="1.0"?>
<FOREST>
   <TREE>Oak</TREE>
   <TREE>Pine</TREE>
   <TREE>Maple</TREE>
</FOREST>
<MEADOW>
   <GRASS>Bluegrass</GRASS>
   <GRASS>Fescue</GRASS>
   <GRASS>Rye</GRASS>
</MEADOW>