Wednesday, November 26, 2008

JAVA History

OOPs and Its Concepts in Java
Brief Introduction to OOP
Object Oriented Programming or OOP is the technique to create programs based on the real world. Unlike procedural programming, here in the OOP programming model programs are organized around objects and data rather than actions and logic. Objects represent some concepts or things and like any other objects in the real Objects in programming language have certain behavior, properties, type, and identity. In OOP based language the principal aim is to find out the objects to manipulate and their relation between each other. OOP offers greater flexibility and compatibility and is popular in developing larger application. Another important work in OOP is to classify objects into different types according to their properties and behavior. So OOP based software application development includes the analysis of the problem, preparing a solution, coding and finally its maintenance.
Java is a object oriented programming and to understand the functionality of OOP in Java, we first need to understand several fundamentals related to objects. These include class, method, inheritance, encapsulation, abstraction, polymorphism etc.
Class - It is the central point of OOP and that contains data and codes with behavior. In Java everything happens within class and it describes a set of objects with common behavior. The class definition describes all the properties, behavior, and identity of objects present within that class. As far as types of classes are concerned, there are predefined classes in languages like C++ and Pascal. But in Java one can define his/her own types with data and code.
Object - Objects are the basic unit of object orientation with behavior, identity. As we mentioned above, these are part of a class but are not the same. An object is expressed by the variable and methods within the objects. Again these variables and methods are distinguished from each other as instant variables, instant methods and class variable and class methods.
Methods - We know that a class can define both attributes and behaviors. Again attributes are defined by variables and behaviors are represented by methods. In other words, methods define the abilities of an object.
Inheritance - This is the mechanism of organizing and structuring software program. Though objects are distinguished from each other by some additional features but there are objects that share certain things common. In object oriented programming classes can inherit some common behavior and state from others. Inheritance in OOP allows to define a general class and later to organize some other classes simply adding some details with the old class definition. This saves work as the special class inherits all the properties of the old general class and as a programmer you only require the new features. This helps in a better data analysis, accurate coding and reduces development time.
Abstraction - The process of abstraction in Java is used to hide certain details and only show the essential features of the object. In other words, it deals with the outside view of an object (interface).
Encapsulation - This is an important programming concept that assists in separating an object's state from its behavior. This helps in hiding an object's data describing its state from any further modification by external component. In Java there are four different terms used for hiding data constructs and these are public, private, protected and package. As we know an object can associated with data with predefined classes and in any application an object can know about the data it needs to know about. So any unnecessary data are not required by an object can be hidden by this process. It can also be termed as information hiding that prohibits outsiders in seeing the inside of an object in which abstraction is implemented.
Polymorphism - It describes the ability of the object in belonging to different types with specific behavior of each type. So by using this, one object can be treated like another and in this way it can create and define multiple level of interface. Here the programmers need not have to know the exact type of object in advance and this is being implemented at runtime.

Comparing XML with HTML

The Main Differences Between XML and HTML:
XML is designed to carry data.
XML describes and focuses on the data while HTML only displays and focuses on how data looks. HTML is all about displaying information but XML is all about describing information. In current scenario XML is the most common tool for data manipulation and data transmission.
XML is used to store data in files and for sharing data between diverse applications. Unlike HTML document where data and display logic are available in the same file, XML hold only data. Different presentation logics could be applied to display the xml data in the required format. XML is the best way to exchange information.
XML is Free and Extensible

XML tags are not predefined. User must "invent" his tags.
The tags used to mark up HTML documents and the structure of HTML documents are predefined. The author of HTML documents can only use tags that are defined in the HTML standard (like
,, etc.).
XML allows the user to define his own tags and document structure.

XML Tags are Case Sensitive

Unlike HTML, XML tags are case sensitive. In HTML the following will work:
(This is incorrect
)
In XML opening and closing tags must therefore be written with the same case:
(This is correct)

XML Elements Must be Properly Nested

Improper nesting of tags makes no sense to XML.

In HTML some elements can be improperly nested within each other like this:
(This text is bold and italic)

In XML all elements must be properly nested within each other like this:
(This text is bold and italic)

XML is a Complement to HTML

XML is not a replacement for HTML.
It is important to understand that XML is not a replacement for HTML. In Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data.

Introduction to XML

What is XML?
"XML is a cross-platform, software and hardware independent tool for transmitting information"
XML is a W3C Recommendation. It stands for Extensible Markup Language. It is a markup language much like HTML used to describe data. In XML, tags are not predefined. A user defines his own tags and XML document structure like Document Type Definition (DTD), XML Schema to describe the data. Hence it is self-descriptive too. There is Nothing Special About XML It is just plain text with the addition of some XML tags enclosed in angle brackets. In a simple text editor, the XML document is easily visible.
Why Is XML So Important?
There are number of reasons that contributes to the XML’s increasing acceptance, few of them are:
Plain Text
In XML it is easy to create and edit files with anything from a standard text editor to a visual development environment. XML also provides scalability for anything from small configuration files to a company-wide data repository.
Data Identification
The markup tags in XML documents identify the information and break up the data into parts for example... a search program can look for messages sent to particular people from the rest of the message. Different parts of the information are identified and further they can be used in different ways by different applications.
Stylability
When display matters, the style sheet standard, XSL (an advance feature of XML), lets you dictate over the convectional designs (like using HTML) to portray the data. XML being style-free uses different style sheets to produce output in postscript, TEX, PDF, or some new format that hasn't even been invented yet. A user can use a simple XML document to display data in diverse formats like
a plain text file
an XHTML file
a WML (Wireless Markup Language) document suitable for display on a PDA
an Adobe PDF document suitable for hard copy
a VML (Voice Markup Language) dialog for a voicemail information system
an SVG (Scalable Vector Graphic) document that draws pictures of thermometers and water containers
Universally Processed
Apart from being valid, restrictions are imposed on an xml file to abide by a DTD or a Schema to make it well-formed .Otherwise, the XML parser won't be able to read the data. XML is a vendor-neutral standard, so a user can choose among several XML parsers to process XML data.
Hierarchical Approach
XML documents get benefited from their hierarchical structure. Hierarchical document structures are, faster to access. They are also easier to rearrange, because each piece is delimited. This makes xml files easy to modify and maintain.
Inline Reusability
XML documents can be composed of separate entities. XML entities can be included "in line" in a XML document. And this included sections look like a normal part of the document .A user can single-source a section so that an edit to it is reflected everywhere the section is used, and yet a document composed looks like a one-piece document.

How Can You Use XML?
Few Applications of XML
Although there are countless applications that use XML, here are a few examples of the applications that are making use of this technology.
Refined search results - With XML-specific tags, search engines can give users more refined search results. A search engine seeks the term in the tags, rather than the entire document, giving the user more precise results.
EDI Transactions - XML has made electronic data interchange (EDI) transactions accessible to a broader set of users. XML allows data to be exchanged, regardless of the computing systems or accounting applications being used.
Cell Phones - XML data is sent to some cell phones, which is then formatted by the specification of the cell phone software designer to display text, images and even play sounds!
File Converters - Many applications have been written to convert existing documents into the XML standard. An example is a PDF to XML converter.
Voice XML - Converts XML documents into an audio format so that a user can listen to an XML document.
and many more........


XML: An Introduction - Brief History
In the 1970’s, Charles Goldfarb, Ed Mosher and Ray Lorie invented GML at IBM. GML was used to describe a way of marking up technical documents with structural tags. The initials stood for Goldfarb, Mosher and Lorie.
Goldfarb invented the term “mark-up language” to make better use of the initials and it became the Standard Generalized Markup Language.
In 1986, SGML was adopted by the ISO.
SGML is just a specification for defining markup languages.
SGML (Standardized Generalized Markup Language) is the mother of all markup languages like HTML, XML, XHTML, WML etc...
In 1986, SGML became an international standard for defining the markup languages. It was used to create other languages, including HTML, which is very popular for its use on the web. HTML was made by Tim Berners Lee in 1991.
While on one hand SGML is very effective but complex, on the other, HTML is very easy, but limited to a fixed set of tags. This situation raised the need for a language that was as effective as SGML and at the same time as simple as HTML. This gap has now been filled by XML.
The development of XML started in 1996 at Sun Microsystems. Jon Bosak with his team began work on a project for remoulding SGML. They took the best of SGML and produced something to be powerful, but much simpler to use.
The World Wide Web Consortium also contributes to the creation and development of the standard for XML. The specifications for XML were laid down in just 26 pages, compared to the 500+ page specification that define SGML.
 
Learn Unix Hit Counters |Earn More Money