Oracle JDeveloper 10g (10.1.3) Developer Preview now available

acle JDeveloper 10g is a world-class development environment for Java, Web services, XML, and SQL. The Oracle JDeveloper 10g (10.1.3) release adds many new features, including a new look and feel, a greatly improved coding environment, extensive refactoring options, J2EE 1.4/J2SE 5.0 support, and visual JSF development.

This is the most substantial and ground-breaking JDeveloper release in years. Some improvements, such as the enhanced user interface and the new Refactor menu, you will note right away. Others, like the new project structure for seamless team development and the way that refactoring integrates with source control, may take more time to discover. These and other improvements will become apparent as you work with this innovative release of JDeveloper.



A Java library for reading/writing Excel


JExcelApi is a java library which provides the ability to read, write, and modify Microsoft Excel spreadsheets. This project mirrors the files on http://www.jexcelapi.org, which has been known to go down on occasion.


c3p0:JDBC DataSources/Resource Pools

c3p0 is an easy-to-use library for augmenting traditional (DriverManager-based) JDBC drivers with JNDI-bindable DataSources, including DataSources that implement Connection and Statement Pooling, as described by the jdbc3 spec and jdbc2 standard extensio


Introducing Spring Framework

Author: Rod Johnson

You may have heard the buzz this summer around the Spring Framework. In this article, I'll try to explain what Spring sets out to achieve, and how I believe it can help you to develop J2EE applications.

Introducing Spring Framework


What Management Is: How It Works and Why It's Everyone's Business

What Management Is: How It Works and Why It's Everyone's Business

Whether you're new to the field or a seasoned executive, this book will give you a firm grasp on what it takes to make an organization perform. It presents the basic principles of management simply, but not simplistically. Why did an eBay succeed where a Webvan did not? Why do you need both a business model and a strategy? Why is it impossible to manage without the right performance measures, and do yours pass the test?

What Management Is is both a beginner's guide and a bible for one of the greatest social innovations of modern times: the discipline of management. Joan Magretta, a former top editor at the Harvard Business Review, distills the wisdom of a bewildering sea of books and articles into one simple, clear volume, explaining both the logic of successful organizations and how that logic is embodied in practice.

Magretta makes rich use of examples -- contemporary and historical -- to bring to life management's High Concepts: value creation, business models, competitive strategy, and organizational design. She devotes equal attention to the often unwritten rules of execution that characterize the best-performing organizations. Throughout she shows how the principles of management that work in for-profit businesses can -- and must -- be applied to nonprofits as well.

Most management books preach a single formula or a single fad. This one roams knowledgeably over the best that has been thought and written with a practical eye for what matters in real organizations. Not since Peter Drucker's great work of the 1950s and 1960s has there been a comparable effort to present the work of management as a coherent whole, to take stock of the current state of play, and to write about it thoughtfully for readers of all backgrounds. Newcomers will find the basics demystified. More experienced readers will recognize a store of useful wisdom and a framework for improving their own performance.

This is the big-picture management book for our times. It defines a common standard of managerial literacy that will help all of us lead more productive lives, whether we aspire to be managers or not.

Confronting Reality : Doing What Matters to Get Things Right

Editorial Reviews

In their 2002 bestseller, Execution: The Discipline of Getting Things Done Larry Bossidy and Ram Charan identify why people don’t get results: they don’t execute. Bossidy and Charan are back with another stellar study on organizational behavior that shows how companies can succeed if they return to reality and examine every part of their business. Confronting Reality is based on a simple concept, but many companies approach strategy and execution in a surprisingly unreal manner and even the simplest of measurement methods, like the business model, are not applied correctly.
Cisco, 3M, KLM, Home Depot, and the Thomson Corporation are just a few of the companies that Bossidy and Charan examine. To demonstrate how to examine a business using the business model, Bossidy and Charan map out external variables, financial targets, internal activities, and an iteration stage (defined as a time to "make tradeoffs, apply and develop business savvy") to prove how a dynamically evolving business model will help improve performance.

"The version of the business model we have developed is a robust, reality-based process for thinking about the specifics of your business in a holistic way. It shows you how to tie together the financial targets you must meet, the external realities of your business and internal activities such as strategy development, operating tactics, and selection and development of people."
Larry Bossidy, retired chairman and CEO of Honeywell International and Ram Charan, author of What the CEO Wants You to Know and Profitable Growth Is Everyone's Business, have once again shed industrial-strength light on how to run a successful business. --E. Brooke Gilbert


Struts vs. JavaServer Faces

Author: Craig McClanahan


It should come as no surprise that the most frequent questions I get asked center around the issue of which of these two web tier technologies an organization or individual developer should consider using. It makes sense to ask me, because I was the original creator of the Struts Framework, and was the co-specification lead for JavaServer Faces 1.0 (JSF).

Usually, the question is framed as an or issue, based on an understanding that the two technologies are mutually exclusive. That turns out not to be the case, but it can still be difficult to determine what to do. This blog entry provides my current advice on the subject -- but, to understand it better, it's worth briefly reviewing the development and focus of the two technologies.

The story is a little long compared to typical blog entries; if you want to cut to the chase and see my advice, scroll down to the section entitled The Bottom Line, below.



display tag library

The display tag library is an open source suite of custom tags that provide high-level web presentation patterns which will work in an MVC model. The library provides a significant amount of functionality while still being easy to use.


You can directly study the displaytag.war, it must can shorten your learning curve.

Making Java Objects Comparable

by Budi Kurniawan

In real life, objects are often comparable. For example, Dad's car is more expensive than Mom's, this dictionary is thicker than those books, Granny is older than Auntie Mollie (well, yeah, living objects, too, are comparable), and so forth. In writing object-oriented programs, there are often needs to compare instances of the same class. And once instances are comparable, they can be sorted. As an example, given two Employees, you may want to know which one has stayed in the organization longer. Or, in a search method for Person instances with a first name of Larry, you may want to display search results sorted by age. This article teaches you how to design your class to make its instances comparable by using the java.lang.Comparable and java.util.Comparator interfaces and presents three examples that illustrate both interfaces.



Book Recommendation: Profitable Growth Is Everyone's Business : 10 Tools You Can Use Monday Morning

Profitable Growth Is Everyone's Business : 10 Tools You Can Use Monday Morning

Book Description
The coauthor of the international bestseller Execution has created the how-to guide for solving today’s toughest business challenge: creating profitable growth that is organic, differentiated, and sustainable.

For many, growth is about “home runs”—the big bold idea, the next new thing, the product that will revolutionize the marketplace. While obviously attractive and lucrative, home runs don’t happen every day and frequently come in cycles.

Products like Kevlar, Teflon, and the Dell business model for selling personal computers may be once-in-a-decade phenomena. A surer and more consistent path to pro?table revenue growth is through “singles and doubles”—small day-to-day wins and adaptation to changes in the marketplace that build the foundation for substantially increasing revenues. The impact of singles and doubles can be huge. They are not only the basis for sustained revenue growth but, in fact, the foundation for home runs. Singles and doubles provide the discipline of execution, an absolute necessity for successfully bringing a breakthrough technology to market or implementing a new business model.

Inherent in this way of thinking is the revolutionary idea that growth is everyone’s business—not solely the concern of the sales force or top management. Just as everyone participates in cost reduction, so must everyone be engaged in the growth agenda of the business. Every contact of each employee with a customer is an opportunity for revenue growth. That includes everyone from the people working in a company’s call center handling customer inquiries and complaints to the CEO.

In this trailblazing book, Ram Charan provides the building blocks and tools that can put a business on the path to sustained, pro?table growth. For more than twenty-?ve years, Ram Charan has been working day in and day out with companies around the world. The ideas he has developed for solving the profitable revenue growth dilemma facing many businesses are based on personally seeing what works in real time. These are ideas that have been tested across industries and that deliver results, and they can be put to use starting Monday morning.

Book Recommendation: The Wal-Mart Decade: How a New Generation of Leaders Turned Sam Walton's Legacy into the World's #1 Company

The Wal-Mart Decade: How a New Generation of Leaders Turned Sam Walton's Legacy into the World's #1 Company

Book Description

Inside one of America's most remarkable success stories, from the bestselling author of Jack Welch and the G.E. Way.

Two of the toughest challenges for any company are leadership transitions and rapid growth. How do you replace an enormously popular and beloved CEO-especially one who started from scratch to create a national icon? And how do you maintain a rapid growth rate without losing the culture and focus of a small company?

Over the past ten years, since the death of the legendary Sam Walton, Wal-Mart has passed both challenges with flying colors. In 1992, it had revenues of $43.9 billion; now it's number one on the Fortune 500 list of America's largest companies, with revenues of $218 billion. Sam Walton's successors have taken the company into far-flung new markets and new directions yet without losing the down-to-earth retailing culture that made Wal-Mart thrive in its early years, when its business model was truly revolutionary.

Robert Slater, a highly respected business journalist and author, was granted unprecedented access to the company while writing The Wal-Mart Decade. He takes readers deep into the inner circle, where the big decisions are made about strategy and operations. And he weaves a fascinating, accessible story about the many challenges of the past decade and how Wal-Mart built on its founder's legacy to overcome them.


[Book Recommendation] Game Theory and Economic Modelling

Game Theory and Economic Modelling (Clarendon Lectures in Economics S.)
by David M. Kreps

Product Description:
This book examines why game theory has become such a popular tool of analysis. It investigates the deficiencies in this methodology and goes on to consider whether its popularity will fade or remain an important tool for economists. The book provides the reader with some basic concepts from noncooperative theory, and then goes on to explore the strengths, weaknesses, and future of the theory as a tool of economic modelling and analysis. All those interested in the applications of game theory to economics, from undergraduates to academics will find this study of particular value.


[Book Recommendation] Reengineering the Corporation: A Manifesto for Business Revolution

Reengineering the Corporation: A Manifesto for Business Revolution
by Michael Hammer (Author), James Champy (Author)

Book Description

No business concept was more important to America's economic revival in the 1990s than reengineering -- introduced to the world in Michael Hammer and James Champy's Reengineering the Corporation. Already a classic, this international bestseller describes how the radical redesign of a company's processes, organization, and culture can achieve a quantum leap in performance.

But if you think that reengineering once was enough, think again. More changes, more challenges are coming in the twenty-first century. Now Hammer and Champy have updated and revised their milestone work for the New Economy they helped to create -- promising to help corporations save hundreds of millions of dollars more, raise their customer satisfaction still higher, and grow ever more nimble in the years to come.


[Book Recommendation] When Economics Mean Business

When Economics Mean Business: The New Economics of the Information Age
by Sultan Kermally

Editorial Reviews

The core of traditional management thinking is based on the foundations of traditional economic thinking. As economies shift from the industrial age to the informative age, the rules of economic engagement are undergoing radical change.


An example to transfer object

Assume we have one value object which named "User".
It has two attributes, including userName and password.

public class User implements java.io.Serializable{
private String userName;
private String password;

public String getUserName() {
return userName;
public void setUserName(String userName) {
this.userName = userName;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;

And we have one requirement to transfr this object to the specific receiver. Here has one picture to describe.

picture source: http://www.churchillobjects.com/c/11009.html

Then here has one sample to demo how to do this.

import java.io.ObjectOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class ObjectTransferExample {

//sender's method
public void send() throws SecurityException, IOException {
//declare one User object, and set data to userName and password attribute
User user = new User();

FileOutputStream out = new FileOutputStream("User");
ObjectOutputStream s = new ObjectOutputStream(out);
//write object name ans user object to ObjectOutputStream


//receiever's method
public void receieve() throws FileNotFoundException, IOException,
ClassNotFoundException, IOException {
FileInputStream in = new FileInputStream("User");
ObjectInputStream s = new ObjectInputStream(in);
//read the object name
String objectName = (String) s.readObject();
//retrieve the User object
User user = (User) s.readObject();
//print the object name and the User object's content
System.out.println("user name=" + user.getUserName());
System.out.println("password=" + user.getPassword());

public static void main(String[] args) throws IOException, SecurityException,
ClassNotFoundException, FileNotFoundException, IOException {
ObjectTransferExample example = new ObjectTransferExample();

An example to parse a xml file

the xml file content:download

1. We need to parse the values which enclose in "username", "password", and "url" tags. And the three tags enclose in "application_server_setup"
2. We need to retireve the "name" attribute in "Form" tag
3. In each "Form" tag, it has some "Role" tags, we need to get the "name", and "sequence" atrribute in each "Role" tag

Sample code: ParseXML.java


TOEIC Exam Information

I'm preparing for this certificat, if you'are interested about this exam,you can go to here, http://www.toeic.com.tw/, to gain the further information


E-Mailing Through Java

This link has many useful example about JavaMail
--Sample Code to Send E-Mail
--Sample Code to Send Multipart E-Mail, HTML E-Mail and File Attachments
--Sample Code to Fetch E-Mail
--Useful Classes and Interfaces
--Steps to Use JavaMail
--Utility Classes
--Message Flags, and so forth

link: http://www.vipan.com/htdocs/javamail.html


JavaMail quick start


Spend some time to study this piece of information for a while, you can pick up the JavaMail API quickly.

Tony Loton

In this article, Tony Loton shows the first steps on the road to building Java-based email applications. If you fancy building your own email client to replace Microsoft Outlook, or a Web-based email system to rival Hotmail, this is the place to start. And for a different perspective on JavaMail's possibilities, Tony presents a novel talking-email client application

[Sample Code]

import javax.mail.*;
import javax.mail.internet.*;

import java.util.*;

* A simple email sender class.
public class SimpleSender {

* Main method to send a message given on the command line.
public static void main(String args[]) {
try {
String smtpServer = "so-net.net.tw";
String to = "email address1, email address2";
String from = "email address";
String subject = "test";
String body = "JavaMail Test";

send(smtpServer, to, from, subject, body);
catch (Exception ex) {
System.err.println("Usage: java com.lotontech.mail.SimpleSender"
" smtpServer toAddress fromAddress subjectText bodyText");


* "send" method to send the message.
public static void send(String smtpServer, String to, String from
, String subject, String body) {
try {

Properties props = System.getProperties();

// -- Attaching to default Session, or we could start a new one --
props.put("mail.smtp.host", smtpServer);
Session session = Session.getDefaultInstance(props, null);

//create new mail
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
//email subject
//email content
// -- Set some other header information --
msg.setHeader("X-Mailer", "LOTONtechEmail");
//send date
msg.setSentDate(new Date());

//send it

System.out.println("Message sent OK.");
catch (Exception ex) {



Write a Simple Program to Upload a File to FTP Server

download jar from here: http://www.jibble.org/simpleftp/
which named simpleftp.jar

Sample Code:

import org.jibble.simpleftp.SimpleFTP;
import java.io.IOException;
import java.io.File;
import java.io.FileNotFoundException;

public class SimpleFTPTest {
//connection information, including ip, port,
//user name and password
String ip = "";
int port = 21;
String userName = "test";
String password = "fet";

public void upload() throws FileNotFoundException, IOException {

try {
SimpleFTP ftp = new SimpleFTP();
ftp.connect(ip, port, userName, password);
ftp.stor(new File("C:/odd.dat"));

}catch (IOException ioe) {
}catch (Exception e) {

public static void main(String[] args) throws IOException {
SimpleFTPTest simpleFTP = new SimpleFTPTest();


軟體業沒希望! 台灣亟待痛定思痛

施振榮:40年來產值還非常小 一堆軟體公司賺不到錢


 施振榮19日應高科技產業資訊長協進會(CIO協進會)之邀,在台北以「深談微笑曲線」專題發表演講,施振榮表示,1992年當他提出「微笑曲線」時,製造本身附加價值不高,只能靠薄利多銷勉強維持,然而現階段對軟體而言,系統整合(SI)根本就是薄利少銷,爭取政府採購標案還被殺價,台灣有一堆軟體公司都賺不到錢,原因就在於軟體業的business model有很大的問題。



 至於台灣軟體產業未來該怎麼走?施振榮認為,做軟體或資訊服務業有兩條路可走,其一是垂直分工、水平整合,垂直分工就像IBM做的軟體元件、模組一樣,至於水平整合就如同1976年微軟(Microsoft)的水平式做法一樣;其二就是要走Utility(公用化)的IT 服務模式,像宏碁做的巨架構、微服務,就是一例。






文 /郭奕伶、鄭呈皇










‧ 堅持:被排擠也要硬幹







就像由奧利佛史東執導的經典名片「華爾街」一片中,出身貧寒的年輕股市交易員畢德(Bud Fox),看到股市大戶戈登季柯(Gordon Gekko)的上流生活,心裡所燃起熱切追求成功的動力,郭榮昌感受到自己的轉變。




‧ 野心:做大不做小,拉高門檻








‧ 人脈:爭取金主,吃飯也要用心機






‧ 學習:累積學習曲線,與大廠頻互動





市場的發展越來越證明,曜碩的選擇正確。Strategies Unlimited公司統計,也顯示相同的發展趨勢。市場上J2ME手機的數量,二○○六年將從現在的一億隻成長到五‧五三億隻,占全部手機出貨量的八三%。

三年前,前資迅人創辦人賀元在經營事業失敗後,還是激勵他的後起者:「相信你所做的事,就堅持下去,歷史會證明一切。現在看很多事也許是錯的,但三年之後可能就變成對的,就是go for it!」他最怕台灣因為資迅人倒了,就認為Internet沒前途。「我相信當Internet第二波來臨時,對社會的影響會比現在大很多,也會產生很多成功的創業家,但不一定是我。」
















◇更多內容-- http://www.businessweekly.com.tw/


How to Utilize JDeveloper to Develope JSF

Developing Faces
By Chris Schalk

Use Oracle JDeveloper 10g to develop JavaServer Faces applications.

Building enterprise J2EE Web applications has always been a bit of an art. Although J2EE provides more-than-adequate foundational technologies for building scalable enterprise Web applications, it previously lacked a high-level API to glue these technologies together and provide a single, consistent way to build J2EE Web applications. The recent introduction of JavaServer Faces (JSF) 1.0, however, brings standardization and consistency to J2EE Web application development.

Oracle JDeveloper 10g is Oracle's integrated development environment for Java, Web services, XML, PL/SQL, and more. This article describes how to work with JSF in Oracle JDeveloper 10g.


[Attention]As you run the JSF page(ex.jsp1.jsp), the file name suffix shuold be changed from .jsp to .faces, or it will throw an exception just like this "javax.servlet.jsp.JspException: Cannot find FacesContext"


IDE Tool to Deal With JSF Config File

JBuilder 11 will support JSF, but before it release, we can use one tool which called Faces Console.

Faces Console is a free and easy way to deal with the complexities of JSF configuration files.

The Faces Console fully supports the creation and modification of JSF configuration files and plugs into many widely used Java IDEs. Those of you familiar with the popular Struts Console tool will feel right at home with this one.


JSF Course Materials




e-book: Core JavaServer Faces

This web site contains a sneak preview of the upcoming Sun Microsystems Press book Core JavaServer Faces.



Put JSF to work

Build a real-world Web application with JavaServer Faces, the Spring Framework, and Hibernate
SummaryBuilding a real-world Web application using JavaServer Faces is not a trivial task. This article shows you how to integrate JSF, the Spring Framework, and Hibernate, and describes best practices and design guidelines for building a real-world Web application using these technologies. (4,800 words; July 19, 2004)




Cewolf can be used inside a Servlet/JSP based web application to embed complex graphical charts of all kinds (e.g. line, pie, bar chart, plots, etc.) into a web page. Therefore it provides a full featured tag library to define all properties of the chart (colors, strokes, legend, etc.). Thus the JSP which embedds the chart is not polluted with any java code. Everything is described with XML conform tags.
Cewolf is based on JFreeChart and uses it's rendering engine to render the final chart image into the clients response stream. No files are created on server side. Everything is based on lightweight session objects and dynamic data analysis. Cewolf consists of one servlet which handles the chart rendering and a taglibrary which translates the chart definition included in the JSP into an HTML img tag which consults the rendering servlet for retrieval of the appropriate chart.

link: http://cewolf.sourceforge.net/





Quote from Evelyn Cartagena

WS-I Basic Profile
Web Services Interoperability Organization:
Basic Profile 1.0a, Final Specification, August 8, 2003.


World Wide Web Consortium:
Extensible Markup Language (XML) 1.0 (Second Edition), W3C Recommendation, October 6, 2000.
Namespaces in XML, W3C Recommendation, 1999.
XML Schema Part 0: Primer, W3C Recommendation, May 2, 2001.
XML Schema Part 1: Structures, W3C Recommendation, May 2, 2001.
XML Schema Part 2: Datatypes, W3C Recommendation, May 2, 2001.
XPointer xpointer() Scheme, Working Draft, December 19, 2002.


World Wide Web Consortium:
Simple Object Access Protocol (SOAP) 1.1, W3C Note, May 8, 2000.
SOAP Messages with Attachments, W3C Note, December 11, 2000.
SOAP Security Extensions: Digital Signature, W3C Note, February 2001.


World Wide Web Consortium:
Web Services Description Language (WSDL) 1.1, W3C Note, March 15, 2001.


Organization for the Advancement of Structured Information Standards:
Providing a Taxonomy for Use in UDDI version 2, 2002.
UDDI Version 2.04 API Specification, 2002.
UDDI Core tModels: Taxonomy and Identifier Systems, 2001.


Java 2 Platform, Enterprise Edition, version 1.4, Final Release, November 23, 2003.
Java Servlet, version 2.4, Final Release, November 24, 2003.
Enterprise JavaBeans, version 2.1, Final Release, November 24, 2003.
Implementing Enterprise Web Services, version 1.1, Maintenance Final Release, January 23, 2004.

Java Web Services

Java API for XML-Based RPC, version 1.1, Final Release 2, Octover 28, 2003.
Java API for XML Processing, version 1.2, Final Release 2, September 10, 2002.
Java API for XML Registries, version 1.0, June 11, 2002.
SOAP with Attachments API for Java, version 1.2, Final Release 2, October 21, 2003.
Java Architecture for XML Binding, Version 1.0, March 4, 2003.


Struts 1.2.1 (Beta) Released

The Struts team announces the release of Struts 1.2.1, currently ranked at Beta quality.

This release removes many features deprecated in prior releases (Struts 1.1 and Struts 1.0.2) and also provides several new features. Fixes to known problems have been applied. More detail is available at

* http://struts.apache.org/userGuide/release-notes.html

The binary, source, and library distributions are available at

* http://cvs.apache.org/dist/struts/v1.2.1/


Exclusive JBuilder 11 Sneak Preview

底下是JBuilder 11的demo

Exclusive JBuilder 11 Sneak Preview


J2EE Development with free and open source tools


這份文件整理的非常好,幾乎把所有open source的東西都列上去了,如
Database: PostgreSQL, MySQL, SAP DB, HyperSonic / HSQL, McKoi, Xindice
Persistence Tier Framework: EJB CMP, OJB, Hibernate, Castor, Torque, JORM
Web Container: Tomcat, Jetty
AP Server: JBoss, Apache Geronimo, JOnAS, OpenEJB, OpenJMS, JORAM, JOTM
Web Frameworks: Struts, Cocoon, Turbine, Velocity, Tapestry, WebWork, Spring





Are you tired of the headaches involved with editing deployment descriptors and entity bean source code? Middlegen is a free general-purpose database-driven code generation engine based on JDBC, Velocity, Ant and XDoclet. If you already have a database, you can use Middlegen to generate...
•Persistance layer with EJB (CMP 2.0)
•Persistance layer with JDO
•Persistance layer with Hibernate
•Persistance layer with Torque
•Database GUI with JSP/Struts

Developping database-driven applications with Middlegen is easy:
1.Create the database with your preferred database modeler tool
2.Configure Middlegen to access the database and read the database schema
3.Run Middlegen from Ant, and (optional) with the GUI tool, rename tables and columns, tune relationships and type-mappings
4.Generate your source code with Middlegen
5.Run XDoclet to generate the additional files like EJB homes and interfaces, and deployment descriptors
6.Compile and deploy your application


Document: http://www.cjsdn.net/user/download/

Official Site: http://hibernate.bluemars.net/


Example for Struts+Session Bean+Entity Bean+Log4j

Environment:Win XP Pro
App Server: Oracle 9i AS
DataBase: Oracle 9i
IDE Tool: JDeveloper 10g

Struts: http://jakarta.apache.org/struts/
Session Bean, Entity Beam: http://java.sun.com/products/ejb/
Log4j: http://logging.apache.org/log4j/docs/

Sample Code: http://home.pchome.com.tw/happy/junyuo/SampleCode/PMS.zip


簡歷:為Sun Microsystems教育訓練中心特約講師, 已取得Sun在Java方面的最高級認證 - SCAJ (Sun Certified Architect for J2EE Technology)。目前他負責教授進階J2EE的相關課程(J2EE應用架構與設計, J2EE Design Patterns等)

●一直以來,資訊技術(IT)領域存在著一大隱憂,不論是所謂的企業內 (In house)或是軟體公司(Software house)的IT團隊,大多數都缺乏 架構設計師(Architect)的編制。架構規劃的工作大都由專案經理、系 統分析師與程式設計師兼任或分攤了,導致普遍輕忽軟體架構專業人 才的培養與任用。再不然就是常常將架構設計師(architect)職位作為 留住項尖開發人員所用的升級獎勵。其實架構設計師與系統分析師、 程式設計師的專業領域與角色並不相同,接下來我還會進一步點出其 中的根本差異。

上述情形在以往系統架構並不複雜的狀態下,還不至 於發生太大的問題。但在分散式架構到處可見的現在,系統本身涉及 的實體層面愈來愈複雜,再加上系統服務的範圍與重要性在e化的潮 流下與日俱增,遂使諸如安全性(Security)、可用性(Availability) 、可靠性(Reliability)、延展性(Scalability)、效能(Performance) …等系統層次的非功能性需求(Non-Functional requirement)日益重要。



-----4/16聯合報 (申請報稅資料免上網 一團亂)


-----4/23聯合報 (資料隱碼攻擊 八成網站躲不過)
急於在最後期限之前申請個人所得資料不上網造成報稅網站大塞車, 曝露網站系統在可用性、延展性、效能等等系統層次的問題。資料隱 碼(SQL Injection)模式的駭客攻擊,顯示安全性始終是資訊系統 最重要的考量。在這些一連串新聞背後都是資訊系統架構層次的問題 。因此國外有專家戲稱開發系統若不妥善規劃處理這類非功能性需求 ,就容易發生所謂的「CNN時刻」 (當資訊系統發生重大問題而造成 CNN頭條新聞的時刻)。


之前為了準備這篇短文用「Architect」上網搜尋相關資訊,無意間 看到網友談到這個英文字的中文翻譯與意涵:

「由於 Engineer 聽起來太過死板, 所以就算在電腦的世界中有人會 覺得稱他們自己為 Architect 比較有設計/創造者的意味在裡頭, 基 本上英文是非常活的語言, 如果你頭腦夠活, 你高興用 Software Director/Designer/Artist/Architect 都無所謂... 」 -----tw.bbs.lang.english
(Re: "Architect"一詞除作"建築師"之外尚有何翻譯?)

在Marc Sewell 與 Laura Sewell去年出版的「The Software Architect's
Profession: An Introduction」一書中,曾很俏皮的在該書前言中引 用牛津英文字典對「Architect」的解釋(一般字典都將其視為建築師、 或其它諸如造船工業等技術領域作解釋),並加入以下一段注釋突顯在 軟體領域上的解釋:
「c In full software architect. A designer of software based
technology, who prepares plans, and superintends construction. 」

這句話指出「Architect」主要就是準備計劃並監督建構過程的軟體技 術設計人員,這也就是我會用「架構設計師」作為其譯文的原因。其 實一個好的架構設計師不只是位受到尊敬的資深技術人員,通常也是 策略制定、組織協調高手、稱職的顧問與領導者。這是因為軟體架構 規劃與設計主要就是以巨觀(Macro View)的角度切入系統架構,一般 所謂的設計(Design)則是以微觀(Micro View)的角度切入。比如一般 設計師通常考慮的層次是一個使用者按下按鈕時所發生的狀況,而架 構設計師考慮的則是成千上萬個使用者按下按鈕時所發生的狀況。架 構設計師規劃系統的角度主要都是從Top-Down方式著手,而一般設計 師則是多半從Bottom-Up的方式著手。另外,就以大家耳熟能詳的設計 模式(Design Pattern)為例,其實它也被稱為微架構模式(Micro Architecture Pattern),而諸如Model-Control-View (MVC)等涉及架 構層次的Pattern則被稱為架構模式(Architecture Pattern)。這種 巨觀/微觀的角度分野,在其它學科也常看見,如總體經濟學與個體 經濟學,大歷史觀與微歷史觀等等。這種巨觀角度的本質,就是架構 設計師專業領域與其它軟體開發人員最根本的不同之處。 從巨觀的角度,舉凡架構規格與決策、排定架構審閱時程、解決所有 架構相關的問題、所有主要技術決策的核可、維護架構規格等等都是 架構設計的主要工作。


效能、安全性、容量規劃(capacity planning)、網路
通常在專案的一開始,需求與初始分析等工作流程會產生規劃的企業 流程與預期系統完成的功能。有了這些資訊,架構設計師就能研擬最 初的高階架構藍圖(blueprint)並列出影響架構可能因素的清單。另外 ,架構設計師也要擔負估算專案成本的職責。這通常是經由審慎評估 這些將會付諸實施的專案計劃對系統既有基礎結構(infrastructure) 與架構的衝擊,以及計算可能付出的成本與所帶來的效益而訂定。

除了上述任務以外,檢查初期架構規劃設計、影響因素與成本,維持 與企業架構決策的一致性也是架構設計師的重要職責之一。這通常要 找出制定專案的架構決策與其優先順序的判斷基準、定義問題領域 (Problem Domain)、決定可能解決方案的制約條件、確認有關可能解 決作法的假設狀況以及辨識模組重用的可能性。架構設計師也必須負 責確保需求的達成,以及硬體、軟體、基礎結構、效能、安全性、容 量、可用性和系統運作、管理與維護等等屬於系統層次相關技術之間 的協調與平衡。在某些關鍵時刻,他也要做出系統與架構在協調、妥 協與平衡上種種必須當機立斷但又很困難判斷的決策。

架構設計師必須設法降低可能的技術風險(technical risk)對系統的 衝擊。在規劃初期,技術風險對一般人來說通常都是不可知、不可驗 證也不可測的。風險大多與系統層次的需求有關,有時也會與企業需 求有關。不論任何風險的類型,有經驗的架構設計師都可在專案的先 期也就是構建架構時期,預先列出這些可能的風險,然後在後續的開 發時期配合開發人員予以適當地處理與解決。另外,架構設計師也必 須領導開發團隊,保持與其它成員的良好互動,確保開發人員是根據 架構藍圖來構建系統。

就如我之前所說,一個好的架構設計師通常也是策略制定、組織協調 高手、稱職的顧問與領導者。他主要的任務就在規劃與系統架構層次 相關的事務,評估可能的風險與成本,並有效運用有限的人力、物力 資源達成系統層次的需求。這樣的專業人員在很難預知何時湧入大量 瀏覽使用者,廣泛運用諸如多層(Multi-tier)、叢集式(clustering) 等複雜分散式架構,系統效能、安全性、可靠性動輒成為媒體報導焦 點的e化潮流下,更加突顯其無可替代的重要性。

「一個具有架構設計師的開發團隊未必就一定能妥善處理系統層次的 需求,但一個不具有架構設計師的開發團隊則肯定沒有人會專責處理 系統層次的需求。」


“Software Architect's Profession, An Introduction”
by Marc Sewell, Laura Sewell Prentice Hall 2001

"Sun Certified Enterprise Architect for J2EE Technology Study Guide"
by Mark Cade, Simon Roberts Prentice Hall 2002


Properties Editor - native2ascii replacement

Development using the properties file is performed by Java by the setting file of J2EE application, internationalization correspondence with desktop application, etc. being sufficient. However, you have to change the multi-byte character in a file into Unicode with the native2ascii tool of attachment in J2SDK on the character platform un-depending.

This editor can edit directly the property file written in the Unicode reference character, and saves the time and effort changed into Unicode by native2ascii. Moreover, in addition to the function of the usual editor, convenient functions, such as JBuilder and integration to Eclipse, are offered. In the integration to JBuilder and Eclipse, it is possible to open the properties file in a project directly and to edit it, and, of course, it is saved by Unicode. It can use by intuitive and simple operation.
For details, please look at the following page.

URL: http://propedit.sourceforge.jp/index_en.html


JSPWidget cannot run correctly on WebSphere v4

SRVE0026E: [Servlet 錯誤]-[JSP 1.1 Processor]: com.ibm.servlet.engine.webapp.WebAppErrorReport: javax/servlet/jsp/tagext/TryCatchFinally
at com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(WebAppDispatcherResponse.java:97)
at org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:453)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:552)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)


websphere 4.0 support JSP 1.1 only.
JSPWidget use some JSP 1.2 method.

I **THINK** the only method in JSP 1.2 that I use in JSPWidget is

request.setCharacterEncoding(this.requestEncoding) and TryCatchFinally interface
in doStartTag() of com.ucom.jsp.tags.gui.FormTag.java

If you do not use this method, you have to call someything like this

public static String toBig5(String in) throws java.io.UnsupportedEncodingException{
return "";
return new String(in.getBytes("ISO-8859-1"), "Big5");

whenever you call request.getParameter()..

That is : replace every call to request.getParameter(...) to toBig5(request.getParameter(...))

Then you can use in JSP 1.1 enviroment!!


分紅 2億7千萬的「海豚領導學」 越分享,越賺錢!


Web Application Framework - DbForms

official site: http://jdbforms.sourceforge.net/

2.安裝容易,只要放jar file、tld file,並設定一下web.xml即可
3.當該頁面需有較為複雜的business logic的話,可以用額外的class
來輔助,JSPWidget叫做code behind ,DbForms則叫Interceptor

1. JSPWidget比較具彈性,不像DbForms每個jsp file只對應到
一張table,而且JSPWidget比較能接受較為複雜的SQL Statement,
2. JSPWidget不需要維護額外的configuration file,DbForoms


[轉貼] 使用SQL 最常犯的十大錯誤

SQL 是設計資料庫應用系統的標準語言。設計資料庫應用系統的第一件事,就是建立一個資料庫。要想設計出良好的資料庫應用系統的首先必要條件是:正確的資料庫結構。 若在設計資料庫時,有任何問題,那縱然有多好的應用程式,都是沒有用的。



對大多數的 End User 而言,他們經常是不按牌理出牌,您可能會發覺,每次需求訪談,User 總會提許多奇奇怪怪的需求,而且每次都不一樣,因此在做系統分析時,絕對要掌握主動性,將 User 的需求引導成正確的系統設計模式,若是 User 要什麼,就給什麼,甚至不合理的需求,那將導致專案無法收拾的地步。


4)在設計資料庫時,不要忽略任何 User 的意見
大部份人認為,官大就代表什麼都大,因此在系統設計時,完全聽從職位高的 User,認為他們才是真正可以決定系統的需求與驗數,其實不然,職位較低的 User,對系統運行瞭若指掌,如果想專案順利進行,這些人的意見不容忽視。

任何一種 DBMS 或開發軟體都有其優點及弱點,對某些應用系統的特殊需求,可能有某一種 DBMS 或開發軟體特別適用,但是對大多數的系統開發者而言,一旦用上手的軟體,往往因習慣使用,只注意到它們的優點,卻忽略其不足之處,而且對其他系統開發者,您應該以很超然的角度,分析應用系統的需求,評估何種 DBMS 和開發軟體最佳,並真實地告訴 End User。

主從架構,集中式處理,或是分散式資料處理,每一種架構都有其優點及缺點,但到底那一種架構適用呢?這必須先了解 User 的電腦環境,做一個詳細的評估,再來決定選用何種架構,選擇適合的架構,有助於日後的系統效能和未來擴充性。

7)定義資料庫的 Table 時,忽略了各 Table 之間的關連性
關連式資料庫系統的【關連性】,這三個字強調了資料庫內的許多 Table 具有相關性,因此在定義 Table 時,務必要整體考量 Table 的關連性,以確保資料一致性和完整性。

8)忽略設計前的 Review,認為 Review 只是浪費時間
世上沒有任何事物是完美無缺的,同樣地,在系統分析設計告一段落時,並不代表萬事 OK,最好是再從頭到尾 Review 一次,看看是否有遺落什麼,這動作可以避免因小小的設計疏失,造成程式重寫的命運。

在漫長的程式撰寫過程,不免有些疏失,造成程式有 Bug,而系統測試的主要目的,就是要抓這些 Bug,尤其是在處理金錢的應甪程式,嚴密的測試絕不可省略,記住:User 絕對不會幫您除 Bug,他們只會找您麻煩(若有 Bug 存在時)。



Web Application Framework - Jakarta Struts slide



Logging Service - Log4j

official site: http://logging.apache.org/log4j/docs/



Web Application Framework - JSPWidget

official site: http://edu.uuu.com.tw/jspwidget/
API Reference: http://edu.uuu.com.tw/jspwidget/docs/reference.jsp
PPT: http://download.uuu.com.tw/JavaTwoFriday/


其設計的理念是Event-Driven Computing Model,實際下海撰寫以後,你會有在寫JavaScript的感覺,很直覺很好懂。其focus在UI這個層面,可以很容易讓你做validation,並且幫你handle一些exception的狀況,到了0.9.6版的時候也加上了paging的功能,感覺還蠻不賴的。

Sample Code: http://home.so-net.net.tw/albertguo/SampleCode/JSPWidget/jspwidget.war

可惜的是,IBM WebSphere v4 無法執行JSPWidget,因為JSPWidget有採用到JSP 1.2的東西,然而WebSphere v4只有支援到JSP 1.1~殘念

SQLExecutor: A Simple JDBC Framework

其是一個輕量級的framework,學習上相當的容易,code也變的相當精簡,也解決paging的問題,在exception handling上面也有不錯的表現

1. http://www.theserverside.com/articles/article.tss?l=SQLExecutor
2. http://www.developer.com/db/article.php/10920_2189471_1

download jar file

他的sample code放在com.softtech.jdbc.SampleCodeUsingFramework,寫的相當清楚明瞭,應該一下子就能夠上手了。

Sample Code: http://home.so-net.net.tw/albertguo/SampleCode/SQLExecutor/WebModule.war

SCBCD Exam Experience


此項考試的全名是:Sun Certified Business Component Developer,考試代號是310-090。考試題數共70題,時間120分鐘,通過比率64%,報名費5000元。考試的詳細資訊請參考此網址:http://suned.sun.com/US/catalog/courses/CX-310-090.html 




推薦的書籍: Head First EJB

關於這個考試,我覺得只要詳讀 oreilly 出版的這本 Head First EJB 就已經相當足夠了,這本書寫的相當生動,用許多圖表來展現許多枯燥無味的觀念,是一本蠻不錯的參考書籍。

關於模擬試題方面,書本有附上模擬試題,不過我還另外做了 SoftLearn Systems 這家公司出的 softSCBCD 的模擬試題,裡頭有提供五份模擬試題 (太多了~根本沒做完),其是用Swing做成的,模擬真實的考試的狀況,此軟體最好的地方是他有提供exam notes,根據每個考試目標列出可能會考的觀念,蠻適合當考前攻略本的,還有啊,別寄望裡頭的題目在考試能夠遇的到,我今天去考,命中率是趨近於 0。還有在題型方面,SCBCD多了不少Drag and Drop的題目,這是之前SCJP與SCWCD所沒有的題型。

1. SCBCD Study Information: http://www.valoxo.ch/jr/SCBCD_Links.html
2. Mock Exam: http://www.jdiscuss.com/Enthuse/jsp/ViewResources.jsp?category=scbcd&subcat=Mock+Exams

Oracle 1Z0-031 Exam Experience


此項考試的全名是:Oracle9i: DBA Fundamentals I,考試代號是1Z0-031,此項考試是取得OCA(Oracle Certified Associates)的第二個科目,要通過1Z0-007 (Introduction to Oracle9i: SQL)與1Z0-031 (Oracle9i Database: Fundamentals I)此二考試,Oracle才會發予OCA的證書。

or http://fjt.infoscape.com.cn/gate/big5/www.chinaitlab.com/

1Z0-031的考試時間為1.5個小時,總共60題,達對73%(44/60)才算通過。Oracle考試的相關資訊如考試時間、考試題數、通過比率等等,請參閱此網址:http://www.oracle.com/education/certification/index.html?dba9i_exam.html 或者是這個pdf檔: http://www.oracle.com/tw/education/pdf/ocp_exam.pdf




推薦的書籍:OCA/OCP: Oracle9i™ DBA Fundamentals I Study Guide



讀這本書有點像是在讀恐龍書的感覺,其將Oracle當作是OS在講,例如啟動一個Instance時,會啟動多的不同的background processes,不同的process負責不同的task,例如Database Writer (DBW) 負責將dirty buffer寫入data file, Process Monitor (PMON)負責清除失敗的user process以及釋放失敗的user process所佔用的空間等等。

有幾個地方是需要注意的,一般我們在create database, table, tablespace或是在drop/alter table, column等等,會使用Oracle Enterprise Manager(OEM)或是PL/SQL等GUI工具來create,在考試的時候就非常講求如何寫出這些sql statement的,所以一些語法都要搞清楚。

還有,哪些view可以看到什麼資料也是很重要、出了不少題目,如透過V$UNDOSTAT可以將所查詢的資料來調整undo tablespace size來進一步調整undo tablespace performance等。還有一些參數值的設定也很重要,什麼時候PCTFREE的值該高?什麼時候PCTUSED該低?如何避免row chaining的發生?還有一些troubleshooting的題目,發生snapshot too old的時候該怎麼辦?具有什麼樣的資料特色的table應該給予什麼index, 如low cardinality、大量資料的狀況的column可以給予bitmap index。有些部份則是1Z0-007的考試的範疇,如Managing Tables/Index/Cnstraints/Users/Privileges, Using Globalization Support等。

Oracle 1Z0-007 Exam Experience

此項考試的全名是:Introduction to Oracle9i: SQL,考試代號是1Z0-007,此項考試是取得OCA(Oracle Certified Associates)的第一個科目,要通過1Z0-007 (Introduction to Oracle9i: SQL)與1Z0-031 (Oracle9i Database: Fundamentals I)此二考試,Oracle才會發予OCA的證書。

or http://fjt.infoscape.com.cn/gate/big5/www.chinaitlab.com/

1Z0-007的考試時間為兩個小時,總共57題,達對70%才算通過。Oracle考試的相關資訊如考試時間、考試題數、通過比率等等,請參閱此網址:http://www.oracle.com/education/certification/index.html?dba9i_exam.html 或者是這個pdf檔: http://www.oracle.com/tw/education/pdf/ocp_exam.pdf




推薦的書籍:OCA/OCP: Introduction to Oracle9i SQL Study Guide

→Writing Basic SQL Select Statements
→Restricting and Sorting Data
→Single-Row Functions
→Displaying Data from Multiple Tables
→Aggregating Data using Group Functions
→Producing Readable Output with iSQL*Plus
→Manipulating Data
→Creating and Managing Tables
→Including Constraints
→Creating Views
→Creating Other Database Objects
→Controlling User Access

對於具有資訊相關背景的人來說,這個考試應該不會太困難,一來是唸書的時候都有上過DBMS的課程了,二來是平常就有在使用了,所以在大部分的主題如"Writing Basic SQL Select Statements", "Restricting and Sorting Data", "Aggregating Data using Group Functions", "Displaying Data from Multiple Tables ", "Subqueries"等等,都應該有某種程度的掌握度。

反倒是需注意幾個地方,如"Single-Row Functions",Oracle提供許多自己獨有的function給我們使用,如DECODE, NVL, NVL2、CASE...WHEN...THEN...END等等,都是出現率相當高的題目;在DML方面,Merge的用法;在Join方面,Outer Join的用法,Join...Using clause、Join...On clause以及natual join也出現了好幾題;還有比較少用到的部份如"Producing Readable Output with iSQL*Plus"需要多看幾遍,其他的部分如"Controlling User Access", grant privilege的地方也要多看一下。


1. Oracle9i SQL Reference Release 1 (9.0.1)[推薦]: http://www.engin.umich.edu/caen/wls/software/oracle

2.Oracle/PLSQL Topics: http://www.techonthenet.com/oracle/
3. TIPS TO HELP STUDENTS PASS ORACLE9i DBA EXAM 1: http://www.dbdomain.com/dba9i1.htm

SCWCD Exam Experience

SCWCD(Sun Certified Web Component Developer)
1. The Servlet Model
2. The Structure and Deployment of Modern Servlet Web Applications
3. The Servlet Container Model
4. Designing and Developing Servlets to Handle Server-side Exceptions
5. Designing and Developing Servlets Using Session Management
6. Designing and Developing Secure Web Applications
7. Designing and Developing Thread-safe Servlets
8. The JavaServer Pages Technology Model
9. Designing and Developing Reusable Web Components
10.Designing and Developing JSP Pages Using JavaBeans Components
11.Designing and developing JSP Pages Using Custom Tags
12.Designing and Developing a Custom Tag Library
13.Design Patterns

推薦的書籍:SCWCD Exam Study Kit: Java Web Component Developer Certification

在書籍方面,只要讀這本書就夠了,這本書寫的非常有調理,容易閱讀。然而,除了書籍之外,網路上有前人整理好的、現成的study guide供有心考試的人準備考試之用,這兩者分別為:
1. SCWCD Study Guide (由台灣人整理的)
2. Sun's Java 2 Web Component Developer Certification


至於考古題方面,其實考SCWCD不用做太多考古題,理解最重要,只要多多練習SCWCD Exam Study Kit每個章節後面的練習題,以及書本光碟所附的JWebPlus就足夠了,當然,如果你還是覺得不夠,可以參考這個link,有一大堆mock exam讓你練習,

所以,只要讀熟SCWCD Exam Study Kit這本書,充分利用SCWCD Study Guide ,做做書本後面的mock exam以及書本所附的JWebPlus的三份考古題,應該足夠來應付考試了。

整體上來說,SCWCD是比較偏重記憶的考試,例如deployment descriptor裡面的element名稱(可以看看web.xml),tld裡頭的寫法(可以看看struts.tld或是dbforms.tld等等),有些平常比較少用到的地方,都會記的比較辛苦,例如在Designing and
Developing a Custom Tag Library這個部份,因為平常根本都沒有用過,對於這邊蠻陌生的,也是我錯最多的地方,不過似乎也是比重最高的,每次都會出10題左右,是值得注意的一個地方。