x

Tuesday, April 10, 2012

About HTML

History

The first web browsers were monolithic. Later they adopted a more modular approach and were split into a user interface and an engine.
The engine does most of the work. It essentially takes a URL and a screen rectangle as arguments. It then retrieves the document corresponding to the URL and paints a graphical representation of it on the given rectangle. It handles links, cookies, scripting, plug-ins loading and other matters.
The user interface provides the menu bar, address bar, status bar, bookmark manager, history and preferences window among other things. It embeds the engine and serves as an interface between the user and the engine. Since it provides the graphical elements surrounding the area in which the engine paints documents, the term chrome is sometimes used to refer to it.
The advantage of this modular approach is that it then becomes easy to embed web browser engines in a variety of applications. For example, the same engine used by a web browser can be used by an email client to display HTML mail. On-line help systems integrated in applications have largely moved from using custom formats to using standard HTML displayed with a web browser engine.

[edit] Examples

Gecko, the Mozilla project's open-source web browser engine, is used by a variety of products derived from the Mozilla code base, including the Firefox web browser, the Thunderbird e-mail client, and SeaMonkey internet suite.
Trident, the web browser engine from Internet Explorer, is used by many applications on the Microsoft Windows platform, such as netSmart, Outlook Express, some versions of Microsoft Outlook, and the mini-browsers in Winamp and RealPlayer.
Opera Software's proprietary Presto engine is licensed to a number of other software vendors, and is used in Opera's own web browser.
KDE's open-source KHTML engine is used in KDE's Konqueror web browser and was the basis for WebKit, the rendering engine in Apple's Safari and Google's Chrome web browsers.

About CSS

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation semantics (the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including plain XML, SVG and XUL.
CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and fonts.[1] This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices. It can also be used to allow the web page to display differently depending on the screen size or device on which it is being viewed. While the author of a document typically links that document to a CSS style sheet, readers can use a different style sheet, perhaps one on their own computer, to override the one the author has specified.
CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.
The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998).

About JavaScript

JavaScript® is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard.
Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as if statements, for and while loops, and switch and try ... catch blocks function the same as in these languages (or nearly so.)
JavaScript can function as both a procedural and an object oriented language. Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like C++ and Java. Once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.
JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for ... in), and source code recovery (JavaScript programs can decompile function bodies back into their source text)
Intrinsic objects are NumberStringBooleanDateRegExp, and Math.
For a more in depth discussion of JavaScript programming follow the JavaScript resources links below.

What JavaScript implementations are available?

mozilla.org hosts two JavaScript implementations. The first ever JavaScript was created by Brendan Eich at Netscape, and has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 5. This engine, code named SpiderMonkey, is implemented in C. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 3 compliant.
Several optimizations such as TraceMonkey (Firefox 3.5), JägerMonkey (Firefox 4) and IonMonkey were added to the SpiderMonkey JavaScript engine from time to time.

Besides the above implementations, there are other popular JavaScript engines such as:-
  • Google's V8, which is used in the Google Chrome browser.
  • The JavaScriptCore (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari.
  • Carakan in Opera.
The Chakra engine used in Internet Explorer is technically a JScript engine, rather than a JavaScript engine.
Each mozilla.org JavaScript engine exposes a public API applications can call on for JavaScript support. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create 'host objects' responsible for reflecting the DOM into JavaScript.
Another common application for JavaScript is as a (web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages.
For more information on embedding JavaScript in your own applications, follow either the SpiderMonkey or Rhino links below, or visit us on the netscape.public.mozilla.jseng newsgroup.

JavaScript resources

SpiderMonkey
Information specific to JavaScript in C engine (aka SpiderMonkey) embedding.
Rhino
Information specific to the JavaScript implementation written in Java (aka Rhino).
Language resources
Pointers to published JavaScript standards, LiveConnect documents, and work on JavaScript 2.0.
Tamarin Project
Information on the the high-performance, open-source virtual machine for JavaScript 2.0.
A re-introduction to JavaScript
Core JavaScript 1.5 Guide and Core JavaScript 1.5 Reference
Scripting resources
Pointers to JavaScript scripting resources, including recommended reading, online references and tutorials, and sample code.
Projects page
Lists other projects using the open source JavaScript engines.
Test library page
Information about the core JavaScript test suite.
mozilla.dev.tech.js-engine
The newsgroup for discussion about the JavaScript engines.
comp.lang.javascript
The newsgroup for general discussion about ECMAScript, mostly (though not necessarily) as it pertains to browsers.
JavaScript is a trademark or registered trademark of Sun Microsystems, Inc. in the U.S. and other countries.