Tuesday, January 26, 2010

Java and XML


XML, XML, XML, XML. You can see it on hats and t-shirts, read about it on the cover of every
technical magazine on the planet, and hear it on the radio or the occasional Gregorian chant album. .
. . Well, maybe it hasn't gone quite that far yet, but don't be surprised if it does. XML, the
Extensible Markup Language, has seemed to take over every aspect of technical life, particularly in
the JavaTM community. An application is no longer considered an enterprise-level product if XML
isn't being used somewhere. Legacy systems are being accessed at a rate never before seen, and
companies are saving millions and even billions of dollars on system integration, all because of
three little letters. Java developers wake up with fever sweats wondering how they are going to
absorb yet another technology, and the task seems even more daunting when embarked upon; the
road to XML mastery is lined with acronyms: XML, XSL, XPath, RDF, XML Schema, DTD, PI,
XSLT, XSP, JAXPTM, SAX, DOM, and more. And there isn't a development manager in the world
who doesn't want his or her team learning about XML today!.
Download Here

Getting Started With Java


Java is an object-oriented programming language. Switching to
object-oriented programming (OOP) from other programming paradigms
can be difficult. Java focuses on creating objects (data structures or
behaviors) that can be assessed and manipulated by the program.
Like other programming languages, Java provides support for reading
and writing data to and from different input and output devices. Java uses
processes that increase the efficiency of input/output, facilitate
internationalization, and provide better support for non-UNIX platforms.
Java looks over your program as it runs and automatically deallocates
memory that is no longer required. This means you don’t have to keep
track of memory pointers or manually deallocate memory. This feature
means a program is less likely to crash and that memory can’t be
intentionally misused.
This book is intended to serve programmers who use other languages as a
general introduction to the Java programming language. It introduces the
reader to the major elements of Java programming and provides links and
suggested reading for further exploration. You may order most book titles
from Fatbrain (http://fatbrain.com/). Unlinked titles may be out of print,
but are still useful and generally available. For more extensive lists of
resources, see “Learning more about Java” in the Quick Start.Download here

Dessign Pattern



The term “design patterns” sounds a bit formal to the uninitiated and
can be somewhat off-putting when you first encounter it. But, in fact, design
patterns are just convenient ways of reusing object-oriented code between
projects and between programmers. The idea behind design patterns is
simple-- write down and catalog common interactions between objects that
programmers have frequently found useful.
The field of design patterns goes back at least to the early 1980s. At
that time, Smalltalk was the most common OO language and C++ was still in
its infancy. At that time, structured programming was a commonly-used
phrased and OO programming was not yet as widely supported. The idea of
programming frameworks was popular however, and as frameworks
developed, some of what we now called design patterns began to emerge.
One of the frequently cited frameworks was the Model-View-
Controller framework for Smalltalk [Krasner and Pope, 1988], which divided
the user interface problem into three parts. The parts were referred to as a
data model which contain the computational parts of the program, the view,
which presented the user interface, and the controller, which interacted.Download here

Data Structure & algorithm in Java


This book is about data structures and algorithms as used in computer programming.
Data structures are ways in which data is arranged in your computer's memory (or stored
on disk). Algorithms are the procedures a software program uses to manipulate the data
in these structures.
Almost every computer program, even a simple one, uses data structures and algorithms.
For example, consider a program that prints address labels. The program might use an
array containing the addresses to be printed, and a simple for loop to step through the
array, printing each address.
The array in this example is a data structure, and the for loop, used for sequential
access to the array, executes a simple algorithm. For uncomplicated programs with small
amounts of data, such a simple approach might be all you need. However, for programs
that handle even moderately large amounts of data, or that solve problems that are
slightly out of the ordinary, more sophisticated techniques are necessary. Simply knowing
the syntax of a computer language such as Java or C++ isn't enough.
This book is about what you need to know after you've learned a programming language.
The material we cover here is typically taught in colleges and universities as a second-year
course in computer science, after a student has mastered the fundamentals of
programming.Download here

Hibernate Entity Manager


The EJB3 specification recognizes the interest and the success of the transparent object/relational mapping
paradigm. The EJB3 specification standardizes the basic APIs and the metadata needed for any object/relational
persistence mechanism. Hibernate EntityManager implements the programming interfaces and lifecycle rules
as defined by the EJB3 persistence specification. Together with Hibernate Annotations, this wrapper imple-
ments a complete (and standalone) EJB3 persistence solution on top of the mature Hibernate core. You may use
a combination of all three together, annotations without EJB3 programming interfaces and lifecycle, or even
pure native Hibernate, depending on the business and technical needs of your project. You can at all times fall
back to Hibernate native APIs, or if required, even to native JDBC and SQL.download here

Hibernate Annotations


Hibernate, like all other object/relational mapping tools, requires metadata that governs the transformation of
data from one representation to the other. In Hibernate 2.x mapping metadata is most of the time declared in
XML text files. Alternatively XDoclet can be used utilizing Javadoc source code annotations together with a
compile time preprocessor.
The same kind of annotation support is now available in the standard JDK, although more powerful and with
better tools support. IntelliJ IDEA and Eclipse for example, support auto-completion and syntax highlighting of
JDK 5.0 annotations which are compiled into the bytecode and read at runtime using reflection. No external
XML files are needed.
The EJB3 specification recognizes the interest and the success of the transparent object/relational mapping
paradigm. It standardizes the basic APIs and the metadata needed for any object/relational persistence mechan-
ism. Hibernate EntityManager implements the programming interfaces and lifecycle rules as defined by the
EJB3 persistence specification and together with Hibernate Annotations offers a complete (and standalone)
EJB3 persistence solution on top of the mature Hibernate core. You may use a combination of all three togeth-
er, annotations without EJB3 programming interfaces and lifecycle, or even pure native Hibernate, depending
on the business and technical needs of your project. At all times you cann fall back to Hibernate native APIs, or
if required, even to native JDBC and SQL.
This release of Hibernate Annotations is based on the final release of the EJB 3.0 / JPA specification (aka JSR-
220 [http://jcp.org/en/jsr/detail?id=220]) and supports all its features (including the optional ones). Hibernate
specific features and extensions are also available through unstandardized, Hibernate specific annotations.
While the Hibernate feature coverage is high, some can not yet be expressed via annotations. The eventual goal
is to cover all of them. See the JIRA road map section for more informations.
If you are moving from previous Hibernate Annotations versions, please have a look at Java Persistence migra- tion guide [http://www.hibernate.org/398.html].
download here

Hibernate References Documentation


If you are new to Hibernate and Object/Relational Mapping or even Java, please follow these steps:
1. Read Chapter 1, Quickstart with Tomcat for a 30 minute tutorial, using Tomcat.
2. Read Chapter 2, Architecture to understand the environments where Hibernate can be used.
3. Have a look at the eg/ directory in the Hibernate distribution, it contains a simple standalone application.
Copy your JDBC driver to the lib/ directory and edit etc/hibernate.properties, specifying correct val-
ues for your database. From a command prompt in the distribution directory, type ant eg (using Ant), or
under Windows, type build eg.
4. Use this reference documentation as your primary source of information. Consider reading Hibernate in
Action (http://www.manning.com/bauer) if you need more help with application design or if you prefer a
step-by-step tutorial. Also visit http://caveatemptor.hibernate.org and download the example application
for Hibernate in Action.
5. FAQs are answered on the Hibernate website.
6. Third party demos, examples and tutorials are linked on the Hibernate website.
7. The Community Area on the Hibernate website is a good source for design patterns and various integra-
tion solutions (Tomcat, JBoss, Spring, Struts, EJB, etc.)here.