Tech all over the world
Saturday, June 02, 2007
  Java Technology Fundamentals (May '07)

You are receiving this email at kiri.tech@gmail.com because you have subscribed to the Java Technology Fundamentals newsletter. To update your communications preferences, please see the links at the bottom of this message. We respect your privacy and post our privacy policy prominently on our Web site: http://www.sun.com/privacy

Please do not reply to the mailed version of the newsletter; this alias is not monitored. Feedback options are listed in the footer.


May 2007

Welcome to the Java Technology Fundamentals Newsletter

This monthly newsletter provides a way for you to learn the basics of the Java programming language, discover new resources, and keep up-to-date on the latest additions to Sun Developer Network's New to Java Center.

News -- Get this newsletter in blog format!

We are happy to announce that the Java Technology Fundamentals Newsletter is now available in a blog format that you can use with your favorite reader. In addition, content will appear throughout the month and include extras.

Start reading the Java Technology Fundamentals Blog today!

Note: For the code in this issue of Fundamentals to compile, use the JDK 6 software.

In This Issue

» Basic Java Technology Programming
» Making Sense of the Java Platform Classes and Tools Annotations
» Desktop Java Platform Development
» Server-Side Java Platform Development
» Java Technology Training
» News
» For More Information

 

  Basic Java Technology Programming

The Importance of Unified Modeling Language (UML)

Last month, you learned about creating a set of use cases to help you in the development of a Todo List Manager application. There is more to use cases than identifying them with names like "Create Task" and "Generate Report". They are meant to specify a sequence of actions for the system to perform as observed by an actor (user).

Once you have the high level tasks defined in use cases, you can document the use case further by describing specific paths through the system. For instance, the "Edit Task" use case can have a sequence of actions through the use case as follows:

  1. System presents list of tasks to user
  2. User identifies which task to edit
  3. User makes changes to task
  4. System updates record for task

Going to this level of detail might seem overkill for such a small task, but as you understand the process, it makes larger projects that much easier to develop. It also allows someone to hand off the sub-parts of the use case to different team members, allowing work to be done in parallel. In addition, this breaking the use cases down allows you to attach quantifiable measures if the tasks have requirements for things like response time. Had this Todo List manager application been required to run on a telephone with Java FX Mobile, how does the Edit Task action react when a phone call comes in?

Additionally, when defining use cases, it is best to identify test cases, too. For a single user Todo List application, the Edit Task use case is relatively easy. But, when you have a multi-user environment, the use case can have a test case for handling multiple users. By defining the appropriate response up front, before development has started, coding becomes that much easier because you already know how the system should respond for dual updates.

Part of the documenting of use cases and of a whole system's design is the creation of different diagrams. Last month you saw the aptly named use-case diagram. This is a rather crude looking diagram where the actor is literally a stick figure. As you start to learn about the different diagrams, it is helpful to have a tool to help. Two popularly available open source options are the NetBeans 5.5 UML Modeling pack plugin and ArgoUML available through CollabNet.

These tools use something called UML, short for Unified Modeling Language, to document a system's model. The OMG standard offers a common way for system modeling so that everyone doesn't have their own way of doing things. The process began a little over ten years ago when "the Three Amigos" Grady Booch, Ivar Jacobson, and James Rumbaugh came together to adopt a common syntax that wasn't proprietary to help speed up the adoption of object-oriented technologies. While Linux was about 5 years old at the time, the open source movement and all its associated sharing was not that popular at the time.

While the latest UML release, 2.0, defines 13 types of diagrams, most tools don't support them all. The NetBeans UML Modeling tool allows you to create a Use Case diagram and seven others: Activity diagram, Class diagram, Collaboration diagram, Component diagram, Deployment diagram, Sequence diagram, and State diagram. ArgoUML doesn't provide support for the Component diagram, but does support the other seven. One nice feature that both tools offer is a reverse engineering feature, allowing you to generate the UML model and diagrams straight from the source code. This feature can be useful in many different ways.

If you're new to an existing project (and you understand the UML diagrams), it allows you to learn the system design quite easily. If you're lazy and didn't document your project, you can generate quite a bit of documentation for your boss when she asks for all that documentation you promised.

A third option helps you understand how to create UML diagrams themselves. If you're constantly using the same pattern in your development and not sure how to document it in UML, code it and then see how the tool does it. In fact, the NetBeans UML tool includes a whole set of predefined patterns, including those from the Gang of Four and many EJB related tasks.

As you learn more about system design and development, be sure to pick up one of these tools to help you along the way. You won't be disappointed.

Once you've picked one, try to create a sequence diagram for the Edit Task operation previously described. You will soon see why it is best to use a tool for just such a task.

  Making Sense of the Java Platform Classes and Tools

Trail: 2D Graphics

This trail introduces you to the Java 2D API and shows you how to display and print 2D graphics in your Java programs. The trail is intended for developers who want to enrich their knowledge of the Java 2D API, as well as for beginners in computer graphics. Almost every section contains relevant examples to illustrate specific capabilities. The Java 2D API enables you to easily perform the following tasks:

  • Draw lines, rectangles and any other geometric shape.
  • Fill those shapes with solid colors or gradients and textures.
  • Draw text with options for fine control over the font and rendering process.
  • Draw images, optionally applying filtering operations.
  • Apply operations such as compositing and transforming during any of the above rendering operations.

This chapter also explains less familiar concepts such as compositing.

Read the tutorial

  Desktop Java Platform Development

Trail: Sound

The Java Sound API is a low-level API for effecting and controlling the input and output of sound media, including both audio and Musical Instrument Digital Interface (MIDI) data. The Java Sound API provides explicit control over the capabilities normally required for sound input and output, in a framework that promotes extensibility and flexibility.

The Java Sound API fulfills the needs of a wide range of application developers. Potential application areas include:

  • Communication frameworks, such as conferencing and telephony
  • End-user content delivery systems, such as media players and music using streamed content
  • Interactive application programs, such as games and Web sites that use dynamic content
  • Content creation and editing
  • Tools, toolkits, and utilities

The Java Sound API provides the lowest level of sound support on the Java platform. It provides application programs with a great amount of control over sound operations, and it is extensible. For example, the Java Sound API supplies mechanisms for installing, accessing, and manipulating system resources such as audio mixers, MIDI synthesizers, other audio or MIDI devices, file readers and writers, and sound format converters. The Java Sound API does not include sophisticated sound editors or graphical tools, but it provides capabilities upon which such programs can be built. It emphasizes low-level control beyond that commonly expected by the end user.

Read this tutorial
  Server-Side Java Development

What Is a JavaServer Page (JSP)?

A JSP page is a text document that contains two types of text: static data, which can be expressed in any text-based format (such as HTML, SVG, WML, and XML), and JSP elements, which construct dynamic content.

The recommended file extension for the source file of a JSP page is .jsp. The page can be composed of a top file that includes other files that contain either a complete JSP page or a fragment of a JSP page. The recommended extension for the source file of a fragment of a JSP page is .jspf.

The JSP elements in a JSP page can be expressed in two syntaxes--standard and XML--though any given file can use only one syntax. A JSP page in XML syntax is an XML document and can be manipulated by tools and APIs for XML documents.

Read the tutorial

  Java Technology Training

Instructor-Led, Self-Paced Web, CD, and Virtual Courses

  • Object-Oriented Analysis and Design Using UML (OO-226):
    This course progresses through a primer on OO technology and software development methodologies, requirements gathering and analysis (including interviewing stakeholders), system architecture and design, implementation, testing, and deployment.

  • Introduction to Developing Rich-Client Applications (WJO-1107):
    This course defines the concept of a Java technology rich-client application (also known as a Swing application) and describes how to use the Swing API. Students learn how to use the features of the NetBeans IDE for rapid application development. The course demonstrates how to extend the NetBeans platform to build a simple Swing application.

  • Developing Applications for the J2EE Platform (CDJ-310A):
    This course provides students with the knowledge to build and deploy enterprise applications that comply with Java 2 Platform, Enterprise Edition (J2EE) standards. Students are taught how to assemble an application from reusable components and how to deploy an application in the J2EE platform runtime environment.

See the course catalog

  News

Get this newsletter in blog format!

We are happy to announce that the Java Technology Fundamentals Newsletter is now available in a blog format that you can use with your favorite reader. In addition, content will appear throughout the month and include extras.

Start reading the Java Technology Fundamentals Blog today!

  For More Information


To comment about the content of this newsletter, send an email to fundamentals_newsletter@sun.com.

© 2007 Sun Microsystems, Inc. All rights reserved. For information on Sun's trademarks see: http://www.sun.com/suntrademarks

To unsubscribe from this list, reply to this message with "Unsubscribe" in the subject line or use this link:
http://communications1.sun.com/r/c/r?2.1.3J1.2Vd.12SMlS.C3JWVk..H.EUn0.1hn0.aT1raXJpLnRlY2hAZ21haWwuY29tDdTQHEX0

To manage your Sun subscriptions, visit the Subscription Center.

Sun Microsystems, Inc., 10 Network Circle, MPK10-209 Menlo Park, CA 94025 U.S.A.





 
Comments: Post a Comment



<< Home
News, Articles, events from all over the world

My Photo
Name:
Location: India

Born on shraavana shudha chauthi of dundubhi naama samvaswara, Im kiran alias kini alias kiri bought up by loving parents. Being from agricultural family I have learnt plowing, carting but never learnt climbing trees. Now away from home I have lost touch with the agricultural skills.

ARCHIVES
January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 /


Powered by Blogger