tag:blogger.com,1999:blog-61902560108582539372024-03-14T07:56:26.903-07:00Welcome to Francois' WebspaceFrancois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-6190256010858253937.post-3934825148256835812013-11-29T12:58:00.001-08:002013-11-29T12:58:25.544-08:00<div class="p1">
<b>iOS Privacy Policy</b></div>
<div class="p2">
<br /></div>
<div class="p3">
<span class="s1"><b>PRIVACY POLICY</b></span></div>
<div class="p4">
We are committed to your privacy. We will not sell or give your information to any advertiser or other marketing agency. The long story is below.</div>
<div class="p5">
<span class="s1">Personal Information</span></div>
<div class="p4">
We are disclosing that we may collect, store or use the following kinds of data:</div>
<ul class="ul1">
<li class="li6">information about your computer and about your visits to and use of our website and app</li>
<li class="li6">information relating to any purchases via the website, in an app, via the Apple App Store or otherwise</li>
<li class="li6">any other personal information that you provide to us in comments, emails, web forms, etc.</li>
</ul>
<div class="p4">
We are disclosing that we may use your personal information to or share with:</div>
<ul class="ul1">
<li class="li6">administer the website or any applications</li>
<li class="li6">enable your use of the website and/or app</li>
<li class="li6">send invoices to you, and collect payments from you</li>
<li class="li6">send general (non-marketing) commercial communications</li>
<li class="li6">send email notifications about subscriptions and services</li>
<li class="li6">provide various third parties anonymized statistical information about our users</li>
<li class="li6">our payment services provider(s) only to the extent necessary for the purposes of processing payments.</li>
</ul>
<div class="p4">
We may disclose your personal information if we believe in good faith that we are required to do so in order to comply with applicable law, a subpoena, or other legal process. We may disclose information when we have reason to believe that disclosing this information is necessary to identify, contact or bring legal action against someone who may be violating our Terms of Use, or to protect the safety of our users or the public. We may transfer your personally identifiable information in connection with the sale or merger, in whole or in part, of the company, its assets or the division responsible for the services being provided to you.</div>
<div class="p5">
<span class="s1">Policy Amendments</span></div>
<div class="p4">
We may update this privacy policy at any time. Check back often.</div>
<div class="p5">
<span class="s1">TERMS OF SERVICE</span></div>
<div class="p7">
<span class="s1">1. INTRODUCTION:</span></div>
<div class="p4">
Welcome to our iOS application (the 'App'). By downloading or otherwise accessing the App you agree to be bound by the following terms and conditions ('Terms') and our privacy policy. If you have any queries about the App or these Terms, you can contact Us by the means set out in paragraph 1a of these Terms. If you do not agree with these Terms, you should stop using the App immediately.</div>
<div class="p4">
(a) For queries regarding these terms contact us directly at </div>
<div class="p7">
<span class="s1">2. GENERAL RULES RELATING TO CONDUCT:</span></div>
<div class="p4">
The App is made available for your own, personal use. The App must not be used for any commercial purpose whatsoever or for any illegal or unauthorized purpose. When you use the App you must comply with all applicable US, UK, Australian laws and with any applicable international laws, including the local laws in your country of residence (together referred to as 'Applicable Laws').</div>
<div class="p4">
You agree that when using the App you will comply with all Applicable Laws and these Terms. In particular, but without limitation, you agree not to:</div>
<div class="p4">
(a) Attempt to gain unauthorized access to the App or any networks, servers or computer systems connected to the App; or</div>
<div class="p4">
(b) Use the App in any unlawful manner or in a manner which promotes or encourages illegal activity including (without limitation) copyright infringement; or</div>
<div class="p4">
(c) Modify, adapt, translate or reverse engineer any part of the App or re-format or frame any portion of the pages comprising the App, save to the extent expressly permitted by these Terms or by law.</div>
<div class="p4">
You agree to indemnify our company in full and on demand from and against any loss, damage, costs or expenses which they suffer or incur directly or indirectly as a result of your use of the App otherwise than in accordance with these Terms or Applicable Laws.</div>
<div class="p7">
<span class="s1">3. CONTENT:</span></div>
<div class="p4">
The copyright in all material contained on, in, or available through the App including all information, data, text, music, sound, photographs, graphics and video messages, the selection and arrangement thereof, and all source code, software compilations and other material ('Material') is owned by or licensed to our company. All rights are reserved. You can view, print or download extracts of the Material for your own personal use but you cannot otherwise copy, edit, vary, reproduce, publish, display, distribute, store, transmit, commercially exploit, disseminate in any form whatsoever or use the Material without our express permission.</div>
<div class="p4">
The trademarks, service marks, and logos ('Trade Marks') contained on or in the App are owned by our company or third party partners of our company. You cannot use, copy, edit, vary, reproduce, publish, display, distribute, store, transmit, commercially exploit or disseminate the Trade Marks without the prior written consent of our company or the relevant group company or the relevant third party partner of our company.</div>
<div class="p7">
<span class="s1">4. OUR PRIVACY POLICY:</span></div>
<div class="p4">
We take your privacy very seriously. We will only use your personal information in accordance with the terms of our privacy policy. By using the App you acknowledge and agree that you have read and accept the terms of our privacy policy and these Terms.</div>
<div class="p7">
<span class="s1">5. LINK TO THIRD PARTIES:</span></div>
<div class="p4">
The App may contain links to websites operated by third parties ('Third Party Websites'). We may monetize some of these links through the use of third party affiliate programs. Notwithstanding such affiliate programs, We do not have any influence or control over any such Third Party Websites and, unless otherwise stated, is not responsible for and does not endorse any Third Party Websites or their availability or contents.</div>
<div class="p7">
<span class="s1">6. DISCLAIMER / LIABILITY:</span></div>
<div class="p4">
USE OF THE APP IS AT YOUR OWN RISK. THE APP IS PROVIDED ON AN 'AS IS' BASIS. TO THE MAXIMUM EXTENT PERMITTED BY LAW: (A) OUR COMPANY DISCLAIMS ALL LIABILITY WHATSOEVER, WHETHER ARISING IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE IN RELATION TO THE APP; AND (B) ALL IMPLIED WARRANTIES, TERMS AND CONDITIONS RELATING TO THE APP (WHETHER IMPLIED BY STATUE, COMMON LAW OR OTHERWISE), INCLUDING (WITHOUT LIMITATION) ANY WARRANTY, TERM OR CONDITION AS TO ACCURACY, COMPLETENESS, SATISFACTORY QUALITY, PERFORMANCE, FITNESS FOR PURPOSE OR ANY SPECIAL PURPOSE, AVAILABILITY, NON INFRINGEMENT, INFORMATION ACCURACY, INTEROPERABILITY, QUIET ENJOYMENT AND TITLE ARE, AS BETWEEN OUR COMPANY AND YOU, HEREBY EXCLUDED. IN PARTICULAR, BUT WITHOUT PREJUDICE TO THE FOREGOING, WE ACCEPT NO RESPONSIBILITY FOR ANY TECHNICAL FAILURE OF THE INTERNET AND/OR THE APP; OR ANY DAMAGE OR INJURY TO USERS OR THEIR EQUIPMENT AS A RESULT OF OR RELATING TO THEIR USE OF THE APP. YOUR STATUTORY RIGHTS ARE NOT AFFECTED.</div>
<div class="p4">
We will not be liable, in contract, tort (including, without limitation, negligence), under statute or otherwise, as a result of or in connection with the App, for any: (i) economic loss (including, without limitation, loss of revenues, profits, contracts, business or anticipated savings); or (ii) loss of goodwill or reputation; or (iii) special or indirect or consequential loss.</div>
<div class="p4">
IF WE ARE LIABLE TO YOU DIRECTLY OR INDIRECTLY IN RELATION TO THE APP, THAT LIABILITY (HOWSOEVER ARISING) SHALL BE LIMITED TO: (A) FIFTY DOLLARS ($50.00); OR (B) THE SUMS PAID BY YOU UPON PURCHASING THE APP, OR ANY IN-APP SPEND, INCLUDING SUBSCRIPTIONS, WHICHEVER IS GREATER.</div>
<div class="p4">
Nothing in these Terms shall be construed as excluding or limiting the liability of our company for death or personal injury caused by its negligence or for any other liability which cannot be excluded by U.S. law.</div>
<div class="p7">
<span class="s1">7. SERVICE SUSPENSION:</span></div>
<div class="p4">
We reserve the right to suspend or cease providing any services relating to the apps published by it, with or without notice, and shall have no liability or responsibility to you in any manner whatsoever if it chooses to do so.</div>
<div class="p7">
<span class="s1">8. ADVERTISERS IN THE APP:</span></div>
<div class="p4">
We accept no responsibility for adverts contained within the App. If you agree to purchase goods and/or services from any third party who advertises in the App, you do so at your own risk. The advertiser, not our company, is responsible for such goods and/or services and if you have any queries or complaints in relation to them, your only recourse is against the advertiser.</div>
<div class="p7">
<span class="s1">9. COMPETITIONS:</span></div>
<div class="p4">
If you take part in any competition which is run in or through the App ('Competition'), you agree to be bound by the rules of that competition and any other rules specified by us from time to time ('Competition Rules') and by the decisions of our company, which are final in all matters relating to the Competition. We reserve the right to disqualify any entrant and/or winner in its absolute discretion without notice in accordance with the Competition Rules.</div>
<div class="p7">
<span class="s1">10. GENERAL:</span></div>
<div class="p4">
These Terms (as amended from time to time) constitute the entire agreement between you and our company concerning your use of the App.</div>
<div class="p4">
We reserve the right to update these Terms from time to time. If it does so, the updated version will be effective immediately, and the current Terms are available through a link in the app to this page. You are responsible for regularly reviewing these Terms so that you are aware of any changes to them and you will be bound by the new policy upon your continued use of the App. No other variation to these Terms shall be effective unless in writing and signed by an authorised representative on behalf of our company.</div>
<div class="p4">
These Terms shall be governed by and construed in accordance with U.S. law and you agree to submit to the exclusive jurisdiction of the U.S. Courts.</div>
<div class="p4">
If any provision(s) of these Terms is held by a court of competent jurisdiction to be invalid or unenforceable, then such provision(s) shall be construed, as nearly as possible, to reflect the intentions of the parties (as reflected in the provision(s)) and all other provisions shall remain in full force and effect.</div>
<div class="p4">
Our failure to exercise or enforce any right or provision of these Terms shall not constitute a waiver of such right or provision unless acknowledged and agreed to by us in writing.</div>
<br />
<div class="p4">
Unless otherwise expressly stated, nothing in the Terms shall create any rights or any other benefits whether pursuant to the Contracts (Rights of Third Parties) Act 1999 or otherwise in favor of any person other than you.</div>
Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-46264035033082822362010-05-24T21:54:00.000-07:002010-09-13T05:14:50.113-07:00Adding 64bit support to your C++ program under LinuxBy default, Unix's stat struct uses a 4Byte long int for the file size. This will give you a maximum file size of about 4GB (by unsinging the int). In order to support files above that size you need to add the following flags to your MakeFile.<br /><br /><blockquote></blockquote>-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64<br /><blockquote></blockquote><br />Since I am using automake, I did this by using the following flags to my configure call:<br /><br />./configure CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-89509913483663663752010-04-13T18:42:00.000-07:002010-04-13T18:46:10.984-07:00Linking to libsmbclient shared library to a project which uses automakeWell, I wasted two hours of my life today to figure this out, so I am posting it to make sure that does not happen again.<br /><br />Linking to libsmbclient shared library to a project which uses automake.<br /><br /><ol><li>Add the following line to the configure.in</li><blockquote><span style="color: rgb(153, 0, 0);">AC_CHECK_LIB(smbclient, smbc_init_context)</span></blockquote><br /><br /><li>Call configure and remake the whole thing.</li></ol><br /><br />You should then be able to use libsmbclient.h in your code.Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-45110108036914944022007-06-19T20:07:00.001-07:002007-06-19T20:08:42.828-07:00Open Source<h1>Open Source Projects</h1>The following are some of the open source projects which I have worked on in the past.<P><a href="http://sourceforge.net/projects/kingdomfounder/"><b>Kingdom Founder</b></a> is a multiple player on-line fantasy game. The main purpose of the game is to emerge it's players into a competitive setting, where the main goal of all players is to own the most powerful fiefdom.<P><a href="http://sourceforge.net/projects/sccori-agent"><b>SCCORI-Agent</b></a> is a web-controlled intelligent agents which interact with the <a href="http://www.sccori.com/sim/">Supply Chain Collaboration On-line Research Institute supply chain simulation</a>.Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-91969423147368660122007-06-19T19:57:00.001-07:002007-06-19T19:57:57.044-07:00Tutorials<table width="100%"> <tr><td><a href="http://nadeaufrancois.blogspot.com/2007/02/network-physical-topologies.html">Network Physical Topologies</a></td><td align="right">March 2006</td></tr><tr BGCOLOR="#ece7e3"><td><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-model.html">OSI Model</a></td><td align="right">January 2006</td></tr><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/02/hibernate-tutorial.html">Hibernate Tutorial</a><td align="right">December 2005</td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-85297870114519616352007-06-19T19:41:00.001-07:002007-06-19T19:49:05.981-07:00Writing<h1>English</h1><table><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/01/software-project-cost-management.html">Software Project Cost Management</a></td><td align="right">October 2006</td></tr><tr bgcolor="#ece7e3"><td><a href="http://nadeaufrancois.blogspot.com/2007/01/open-agent-architecture.html">The Open Agent Architecture</a></td><td align="right">June 2006</td></tr><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/01/towards-service-oriented-software.html">Towards a Service Oriented Software Industry</a></td><td align="right">November 2005</td></tr><tr bgcolor="#ece7e3"><td><a href="http://nadeaufrancois.blogspot.com/2007/02/introduction-to-kanban-system.html">An introduction to the Kanban system</a></td><td align="right">October 2005</td></tr><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/01/tsunami-warning-system-and-their.html">Tsunami Warning System and their Information Systems</a></td><td align="right">October 2005</td></tr><tr bgcolor="#ece7e3"><td><a href="http://nadeaufrancois.blogspot.com/2007/01/role-of-outsourcing-in-information.html">The Role of Outsourcing in Information System Integration</a></td><td align="right">September 2005</td></tr></table><h1>Japanese</h1><table width="100%"><tbody><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/01/blog-post.html">私の日本語スピーチ</a></td><td align="right">February 2005</td></tr></tbody></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com2tag:blogger.com,1999:blog-6190256010858253937.post-66293415147220367512007-02-12T21:10:00.000-08:002007-02-13T23:51:37.155-08:00Network Physical Topologies<table style="width: 100%; border-style: dotted; border-width: 1px; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><a href="#chapter1">Network Physical Topologies</a></td></tr><tr><td><a href="#chapter2">Simple Physical Topologies</a></td></tr><tr><td><ul><LI><a href="#chapter2A">Bus Topology</a><li><a href="#chapter2B">Ring Topology</a><li><a href="#chapter2C">Star Topology</a></ul></td></tr><tr><td><a href="#chapter3">Hybrid Physical Topologies</a><ul><li><a href="#chapter3A">Star-wired Ring Topology</a> <li><a href="#chapter3B">Star-wired Bus Topology</a></ul></td></tr></tbody></table><h1><a name="chapter1"></a>Network Physical Topologies</h1>After completing this section, students should be able to describe various network topologies, and their attributes.<p style="margin-bottom: 0in"><br /> </p><div class="iDevice emphasis0"><div id="10_1" style="display:block">A topology is the physical layout of the nodes on a network. All networks have a topology, however there exist many different types of topologies. Topologies can be separated into two categories: simple topologies, and hybrid topologies. All of the hybrid topologies are created by mering different simple topologies together.<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } --> </div></div><!-- image with text iDevice --><div class="iDevice emphasis0"><div class="image_text" style="width:525px; float:none;"><div class="image"><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGtA3P7IY1K9Uqr_hAcVCtpJbmUh2-m0mS_yN-bu8BP5lt29x20C0wMhexTZBm2E7KFH9ZQZj6viMyATMF6Ek8pUQUSeP7TbTd3NBMtpI55wM1tx4mKudpTC3Pbhh2t__uAhv7iB49giM2/s320/3D_Network_Design_Model_2.gif" /><br/>A network topoloy</div></div><div id="7_3" style="display:block">Image taken from <a href="http://www.smartdraw.com/examples/networkdesign/3D_Network_Design_Model_2.htm">SmartDraw</a></div><div style="clear:both;"></div></div><h1><a name="chapter2"></a>Simple Physical Topologies</h1>Simple topologies are the simplest building blocks of any networks. These topologies can be used to create hybrid topologies.<h2><a name="chapter2A"></a>Bus Topology</h2><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGVWTKXa33jIqOtaqOzOpiz3guHYka0YNWs0929qT374Gb49zsq_A5Mw1q6um6maMJZd-KNqTlTTZtAJR6aY1fF2HMN1QxOA8tDbjckRauYoRzw0ELEatdSGkGnNH45Bph-FEmBPIzl2L4/s320/topologies-bus.gif">Bus Topology (Taken from <a href="http://www.firewall.cx/topologies.php">Firewall.cx</a>)<P>The bus topology is created by connecting all of the network nodes to a single network cable. All nodes on the cable passively listen to the communication on the cable. In this manner, a node on the network broadcast the information that he wants to transfer to an other node. Each of the nodes verify if this information is destined to them.<P>Since all nodes have access to the information being transferred, this topology is not very secure. An further disadvantage of this topology is its need to share share the available bandwidth between all of its nodes, making this topology ill suited for networks with a large amount of nodes. The biggest advantage of using this topology however is its cheap cost to install.<h2><a name="chapter2B"></a>Ring Topology</h2><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz6SY2fBNZNPJ2k7d6so6KYORwBUDz6UwMVytMaE3RMa2k-gWap6Hlthn5kb1bJYPZZoAyVJauw5D_5rDr7FEcUtlLkrWiTwHDMhQuLRvkR8d9-OgmliqvWORddnOGz3K5DFEj8_3BUzir/s320/topologies-ring.gif">Ring Topology (Taken from <a href="http://www.firewall.cx/topologies.php">Firewall.cx</a>)<p>Ring topology connects all of the nodes with two of their neighbours, forming a closed loop. In this topology each of the nodes listen for data from one of their neighbour, and either keep the data or retransmit the information to the next node. In this manner a token is pasted from one node to the next until it is kept by the destination node, which submits an acknowledgement token to its neighbour for the originator's benefit.<p>For example, from the diagram, if node 1 wants to send send data node 3 it would perform the following steps:<ol><li>Wait to receive an available token.<li>Add the destination ID (node 3) and the data to the token.</li><li>Send the token to the next node on the network.</li><li>The next node (node 2) would verify if the destination node for the token is it self. Since it is destined for node 3, node 2 would replicate the token to the next node.</li><li>The next node (node 3) would verify if the destination node for the token is it self. Since this is the destination, node 3 would read the information, and send an acknowledgement token for node 1 to the next node (node 4).</li><li>The next node (node 4) would verify if the destination node for the token is it self. Since it is destined for node 1, node 4 would replicate the token to the next node.</li><LI>The next node (node 1) would verify if the destination node for the token is it self. Since this is the destination, node 1 would know that the data had been properly delivered.</li><li>Node 1 would then release an empty token to the next node, this would allow an other node on the network to send data by repeating step 1.</li></ol><h2><a name="chapter2C"></a>Star Topology</h2><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibYsBBs5FycOSjZvHKYZeeo-4TlkWTgEyD0BaGpF65grG2akh8x6kbv7wdpgeBo_aKeNTA4iGdVja69XSOWLTg9uT__vsGdlcWnbjnz16xPyIgBTT0brCcIeAmMd4OLhVg0fzRWqfPKOIA/s320/topologies-star.gif">Star Topology (Taken from <a href="http://www.firewall.cx/topologies.php">Firewall.cx</a>)<P>All nodes in a star topology are connected to a central device. The central device is most often a hub or a switch, which<P>By isolating each of the nodes, star topology are more fault-tolerant than bus and ring topologies. However, this topology does require more cabling then the other topologies, and they are typically harder to configure. This topology is also the most scalable of the topologies presented here.<h1><a name="chapter3"></a>Hybrid Physical Topologies</h1><P>Hybrid topologies are the networks which are created by connecting more then one simple topology network together. That is, hybrid topologies are always made up of two or more physical topologies.<h2><a name="chapter3A"></a>Star-wired Ring Topology</h2><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5hKIeBeHVZO5UJ_ItLdv6SL35khwzecu-669JBfxt_hhjF5_xzLZBVPyMtpwMYMuMldXx2nK-eFoW59TCXNkVPAC4mI60xTEfLIY52Nx_dwzPBpvcJCNt-he5zBTqXrdk72HrkIm2MHHf/s320/topologies-hybrid-star-ring.gif">Hybrid-Star Topology (Taken from <a href="http://www.firewall.cx/topologies.php">Firewall.cx</a>)<P>The star ring topology consist of two or more star topology network which are interconnected with each other with a token ring topology network. In these network, the central device in each of the star networks acts as a node in the ring system.<h2><a name="chapter3B"></a>Star-wired Bus Topology</h2><img width="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZAqEjhYUTQkHzU847LfwGwYxlwgIErKor6mGU5bOmyozMn8DLyLtc9RQCQeTubO8zzWWmTmPwPeqamVGMUOyL8ahcuH6zGY65Wjg4weo2ZJm5vYy-BwtzP0lS_VszRQICvMQdzoXydAct/s320/topologies-hybrid-star-bus.gif">Hybrid-Star Topology (Taken from <a href="http://www.firewall.cx/topologies.php">Firewall.cx</a>)<P>The star bus topology consist of two or more star topology network which are interconnected with each other with a bus topology network. In these network, the central device in each of the star networks acts as a node in the bus system.Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-82425023722954940152007-02-12T21:00:00.000-08:002007-02-12T21:01:11.497-08:00OSI - Application Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Application Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Application Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Application Layer, and what it is used for.</div><hr></td></tr></table><div> <P>The Application Layer is a collection of protocols for applications. For example, both the File Transfer Protocol (FTP), and HyperText Transfer Protocol (HTTP) are Application Layer level protocols.</p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Application Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-3516789348771537952007-02-12T20:59:00.001-08:002007-02-12T20:59:55.240-08:00OSI - Presentation Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Presentation Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Presentation Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Presentation Layer, and what it is used for.</div><hr></td></tr></table><div> <P>This layer is used to support differences in data representation such as cryptography. The data sender notifies the receiver of the data format, and the receiver uses this information to prepare the data for the Application Layer. This layer is the best layer for implementing encryption strategies. </p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Presentation Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-5066716148784982072007-02-12T20:58:00.001-08:002007-02-12T20:58:51.921-08:00OSI - Session Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Session Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Session Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Session Layer, and what it is used for.</div><hr></td></tr></table><div> <P>The Session Layer manages connection between the hosts applications. This layer is responsible for establishing, coordinating, and terminating data exchanges. Very few applications use this layer since it is an enhanced version of the Transport Layer. For instance, the Internet suite does not support this layer. </p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Session Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-52691893827548737732007-02-12T20:56:00.000-08:002007-02-12T20:57:32.821-08:00OSI - Transport Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Transport Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Transport Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Transport Layer, and what it is used for.</div><hr></td></tr></table><div> <P>The Transport Layer is responsible for transferring data between two hosts, error recovery, and flow control. Its purpose is to ensure proper data transfer. </p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Transport Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-59116946689800754182007-02-12T20:54:00.000-08:002007-02-12T20:55:38.250-08:00OSI - Network Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Network Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Network Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Network Layer, and what it is used for.</div><hr></td></tr></table><div> <P>The Network Layer is responsible for the switching and routing of data packets. To accomplish this task this layer is also responsible for sequencing the data packages in order to have the data properly transferred. </p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Network Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-16965927447307358742007-02-12T20:52:00.000-08:002007-02-12T20:53:47.345-08:00OSI - Data Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Data Link Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Data Link Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Data Link Layer, and what it is used for.</div><hr></td></tr></table><div> <P>This layer groups bits into frames which are send by the Physical Layer. This layer also adds some errors checking by adding checksums to the data sent by the Physical Layer. The checksums are used by the receiving Data Link Layer to verify that the data was correctly sent by the Physical Layer. Incorrect data frames are retransmitted by the Physical Layer. </p></div><table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Data Link Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-70931587176104109282007-02-12T20:48:00.000-08:002007-02-12T20:51:10.253-08:00OSI - Physical Layer<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model : Phycial Layer</h3></center></td></tr></table><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Physical Layer. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe the OSI Physical Layer, and what it is used for.</div><hr></td></tr></table><div> <P>The Physical Layer converts bit streams of data into electrical, light or radio signals. Hardware such as NICs, network cables are all included in this layer.</p></div> <table width="100%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model : Physical Layer<br></center></td></tr></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-32124524439297154102007-02-12T20:39:00.000-08:002007-02-12T21:07:08.169-08:00OSI Model<table width="85%" border="0"><tr><td colspan="2" bgcolor="#F0F8FF"><center><h3>OSI Model Tutorial</h3><h3><i>OSI Model</i></H3></center></td></tr></table><table width="85%" border="0"><tr><td><h2>Commentary</h2><div><div> <b>Section Goal:</b> Provide an overview of the OSI Model. </div></div><h2>Learning Objectives</h2><hr><table width="100%" border="0"><tr><td><h3>Learning Objective 1</h3><div> After completing this section, students should be able to describe what the OSI Model is, the functionality of each its layers.</div><hr></td></tr></table><p></p><div> The Open System Interconnection (OSI) Model was created by the International Organization for Standardization (ISO) in the earlier 1980s. The reason this model was created was to allow software and computers to be able to communicate from around the world. By creating OSI compliant networking hardware, companies can be assured that their products will be able to communicate with hardware from other companies. <P>The OSI Model is made-up of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application layer. </div><div><img width=100% src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR75iVfT6yLHr4eQQZ6rlQSP9CwR4ba_r4MZeE04sjrtpQqhNx9U80zc4Xn8VYEideMZQ5PrAvrU6w8K3uMgDCi96SjcsRKupUMIcPA8pEjdEkJReKt0BIjoPIoBHIkfn6cXA3ndm5hggl/s320/OSI_Model.jpg"/><P>This graphic is taken from <a href="http://www.ictp.trieste.it/~radionet/1998_school/networking_presentation/index.html">The Abdus Salam International Centre for Theoretical Physics</a>.</div><div><hr><ul><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-physical-layer.html">Section 1 - Physical Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-data-layer.html">Section 2 - Data Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-network-layer.html">Section 3 - Network Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-transport-layer.html">Section 4 - Transport Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-session-layer.html">Section 5 - Session Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-presentation-layer.html">Section 6 - Presentation Layer</a><hr><li><a href="http://nadeaufrancois.blogspot.com/2007/02/osi-application-layer.html">Section 7 - Application Layer</a><hr></ul></div></td></tr></table><p></p><center><table width="85%" border="0"><tr><td bgcolor="#F0F8FF"><center>OSI Model<br></center></td></tr></table></center>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-73393293511553040562007-02-08T03:39:00.000-08:002007-02-08T03:43:09.890-08:00An introduction to the Kanban system<span style="font-weight: bold;">Description<br /></span>The Kanban system is a powerful manufacturing process which adds flexibility to a manufacturing company. This system has been pioneered by Toyota. Kanban is a Japanese word which means "signboard", or "sign"[1].<br /><br />The most common method used to explain the Kanban system is to make an analogy with a supermarket. Imagine that you have a supermarket where all of the items for sale have a tag attached to them with detailed descriptions of the item. After the customer has finished shopping and is at the checkout-counter, all of the tags are removed, and forwarded to the purchasing department. The purchasing department purchases replacements for the items and places them on the shelf as quickly as possible.<br /><br />Within a manufacturing system, the customer is a staff member on the assembly line, the purchasing department is the manufacturing department in charge of providing parts to the assembly staff, the tag is located on the part, and the checkout box is the area where the parts are placed before being taken by assembly staff (each part is stored in a specific location).<br /><br />In the case of Toyota, the following describes how this process works:<br /><ol><li>An order is placed for a car (e.g. Camry LE).</li><li>A car frame for the ordered car is placed on the conveyor belt.</li><li>The belt stops in front of the first assembly worker. This person looks at the order sheet and retrieves the parts required to create the subassembly he is responsible for (i.e. engine parts). The worker assembles the parts and adds the subassembly to the car (e.g. the engine). The Kanban tags for each of the parts used are added to the car and the car moves on to the next stage.</li><li>The worker for the next stage proceeds with his own subassembly in the same manner as the one before him did (fetch the components with their tags, assemble the components, add subassembly to car).</li><li>The car continues in this manner until all assemblies have been added to it, and the car rolls of the assembly belt.<br /></li></ol><br />During this process, the manufacturing department replaces any parts that are used by the assembly staff. In this manner, the manufacturing department only creates parts that have been used.<br /><br /><span style="font-weight: bold;">Relevance to the study of information systems</span><br />One of the advantage of the Kanban system is that the IS no longer requires an external Enterprise Resource Planning (ERP) system for inventory management. In the Kanban system, the tags are the ERP system. No other system is needed to monitor the production cycle, since the parts needed to create a car will be requested when needed.<br /><br />Toyota does use an IS for its manufacturing activities, but it is carefully integrated into its processes[2]. For example, although the IS has enough data to tell an assembly staff member which car model will soon require his attention, this information is not shown to him since it is not required[2]. In other words, Toyota believes that information should be accessed only when it is needed, not "at the earliest possible time"[3] as claimed by the authors of our textbook.<br /><br /><span style="font-weight: bold;">Resources</span><br />[1] The GRAND CENTURY Japanese-English Dictionary, pp.337, 1982<br />[2] T.Ohno, Toyota Production System, Productivity, Inc, 1988, pp.27-29.<br />[3 ] R. Stair and G. Reynolds, Principles of Information Systems, 6th ed., Boston: Thomson Course Technology, 2003, pp. 395.Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-42645052135359553042007-02-08T03:03:00.000-08:002007-02-08T03:26:46.642-08:00Hibernate tutorial 2 (Intermediate)<H2>Table of Content</H2><OL><LI><A HREF="#Introduction" >Introduction</A><OL><LI type="a"><A HREF="#EmployeeClass" >Employee class</A><LI type="a"><A HREF="#TaskClass" >Task class</A><LI type="a"><A HREF="#HibernateHelperClass" >HibernateHelper class</A><LI type="a"><A HREF="#CreateEmployeeClass" >CreateEmployee class</A><LI type="a"><A HREF="#hibernate.properties" >hibernate.properties file</A></OL><LI><A HREF="#RunningTheExample" >Running the example</A><OL><LI type="a"><A HREF="#DownloadExample">Download the example</A><LI type="a"><A HREF="#InstallJava">Install Java 1.5 and Ant</A><LI type="a"><A HREF="#DatabaseConfiguration" >Database configuration</A><LI type="a"><A HREF="#RunBuildScript">Run the Ant build script</A></OL></OL><hr/><H2><A NAME="Introduction">Introduction</a></H2><P>This Hibernate example maps two Java Objects (Employee.java and Task) to tables in a relational database. This example also creates some instances of these Objects and saves them into a database.<P>The following diagram list the four classes which make up this example.<center><img width=100% src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3CjIfuOBFcKyW-sUqhCpQWiN9lgalJzniuHfLEL-I6Ce_R1YNDyIBCfLfXTiddAP-XfCOdozTUke0Rcu1ZA_kTuNf0XWwjMxwpKTwUH33A0Wl_CUa0YBLjB0g9WNHoVn0W9p8QRjPtRcN/s1600/overview.jpg"/></center><hr/><!--=======================================================================--><H3><A NAME="EmployeeClass">Employee class</a></H3><P>The Employee class is a simple POJO which has been setup to be able to be used as an Hibernate Object. <table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>package com.francoisnadeau.test;<BR>import java.util.*;<BR>import javax.persistence.*;<BR>/**<BR> * A single Employee. <BR> * <BR> * @author Francois Nadeau<BR> * @link http://www.FrancoisNadeau.com<BR> */<BR><B>@Entity <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 1</B><BR>public class Employee {<BR> /** The Employee's unique Id. */<BR> private Long theId;<BR> /** The Employee's name. */<BR> private String theName;<BR> /** The date that the Employee was hired. */<BR> private Date theHireDate;<BR> /** The employee's address */<BR> private String theAddress;<BR> /** List of task owned by Employee */<BR> List<Task>allTasks;<BR><BR> <B>@Id(generate = GeneratorType.AUTO) <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 2</B><BR> public Long getId() { return theId; }<BR> public void setId(Long aId) { theId = aId; }<BR><BR> public String getName() { return theName; }<BR> public void setName(String aName) { theName = aName; }<BR> <BR> public Date getHireDate() { return theHireDate; }<BR> public void setHireDate(Date aHireDate) { theHireDate = aHireDate; }<BR><BR> public String getAddress() { return theAddress; }<BR> public void setAddress(String aAddress) { theAddress = aAddress; }<BR> <BR> <B>@OneToMany (mappedBy = "employee") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 3</B><BR> <B>@OrderBy ("name") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 4</B><BR> public List<Task> getAllTasks() { return allTasks; }<BR> public void setAllTasks(List<Task> someTasks) { allTasks = someTasks; }<BR><BR> <B>@Transient <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 5</B><BR> public List<Task> getCompletedTasks() { <BR> List<Task> allCompletedTasks = new LinkedList<Task>();<BR> for(Task aTask : getAllTasks()) {<BR> if(aTask.getCompletionDate() != null) {<BR> allCompletedTasks.add(aTask);<BR> }<BR> }<BR> return allCompletedTasks;<BR> }<BR><BR> @Transient<BR> public List<Task> getToDoList() {<BR> List<Task> theToDoList = new LinkedList<Task>();<BR> for(Task aTask : getAllTasks()) {<BR> if(aTask.getCompletionDate() == null) {<BR> theToDoList.add(aTask);<BR> }<BR> }<BR> return theToDoList;<BR> }<BR>}<BR></code></table><OL><LI><b>@Entity</b><br>Hibernate uses Sun's EJB3 Annotation standard to map persistent Objects. Because of this, all Hibernate Objects are treated as Entity Beans. <BR><b>Note</b>: Although Hibernate uses the EJB3 standard in this manner, the Objects do not need to be deployed in an EJB container to be used. An interesting benefit of this is that no modifications would be required for this class to be used inside a J2EE compliant server as an Entity Bean . <LI><b>@Id(generate = GeneratorType.AUTO)</b><br>This annotation defines the primary key for this Object. The following key generators can be used for generating IDs: AUTO, TABLE, IDENTITY, SEQUENCE, or NONE.<LI><b>@OneToMany (mappedBy = "employee")</b><br>This annotation is used to define a one-to-many relationship with an other Object. The "mappedBy" field is the foreign key of the Object. <LI><b>@OrderBy ("name")</b><br>This annotation is used in combination with @OneToMany to define that the collection is to be ordered. In this example the collection will be ordered by the "name" field in the Task table.<LI><b>@Transient</b><br>By default all functions inside an EJB are persistent, and therefore are mapped to a field in the database. However, in this case both the getCompletedTasks() and getToDoList() are not persistent fields.</OL><hr/><!--=======================================================================--><H3><A NAME="TaskClass">Task class</a></H3><P>The Task class is a simple POJO which has been setup to be able to be used as an Hibernate Object. <table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>package com.francoisnadeau.test;<BR><BR>import java.util.Date;<BR>import javax.persistence.*;<BR>/**<BR> * A single Task wich can be performed by an employee.<BR> * <BR> * @author Francois Nadeau<BR> * @link http://www.FrancoisNadeau.com<BR> */<BR>@Entity<BR>public class Task {<BR> /** The Task's unique Id. */<BR> private Long theId;<BR> /** The Task name. */<BR> private String theName;<BR> /** The date that the Taks was created. */<BR> private Date theEntryDate;<BR> /** The date that the Taks was assigned to the Employee. */<BR> private Date theAssignedDate;<BR> /** The date that the Taks was completed by the Employee. */<BR> private Date theCompletionDate;<BR> /** The Employee assigned to this task */<BR> private Employee theEmployee;<BR><BR> @Id(generate = GeneratorType.AUTO)<BR> public Long getId() { return theId; }<BR> public void setId(Long aId) { theId = aId; }<BR><BR> public String getName() { return theName; }<BR> public void setName(String aName) { theName = aName; }<BR><BR> public Date getEntryDate() { return theEntryDate; }<BR> public void setEntryDate(Date aEntryDate) { theEntryDate = aEntryDate; }<BR><BR> public Date getAssignedDate() { return theAssignedDate; }<BR> public void setAssignedDate(Date aAssignedDate) { theAssignedDate = aAssignedDate; }<BR><BR> public Date getCompletionDate() { return theCompletionDate; }<BR> public void setCompletionDate(Date aCompletionDate) { <BR> theCompletionDate = aCompletionDate; <BR> }<BR><BR> <B>@ManyToOne <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 1</B><BR> public Employee getEmployee() { return theEmployee; }<BR> public void setEmployee(Employee aEmployee) { theEmployee= aEmployee; }<BR>}<BR></code></table><OL><LI><b>@ManyToOne</b><br>This annotation is used to define a many-to-one relationship with an other Object.</OL><hr/><!--=======================================================================--><H3><A NAME="HibernateHelperClass">HibernateHelper class</a></H3><P>The HibernateHelper class is used to access the Hibernate Sessions. This class is copied from and often referred to in the Hibernate documentation.<table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>package com.francoisnadeau.test;<BR><BR>import org.hibernate.*;<BR>import org.hibernate.cfg.AnnotationConfiguration;<BR>/**<BR> * This class is ued to access the Hibernate session. <BR> * <BR> * @author Francois Nadeau<BR> * @link http://www.FrancoisNadeau.com<BR> */<BR>public class HibernateHelper {<BR> private static SessionFactory theSessionFactory;<BR> <BR> static {<BR> try {<BR> // Create the SessionFactory<BR> theSessionFactory = new AnnotationConfiguration()<BR> .addPackage("com.francoisnadeau.test")<BR> .addAnnotatedClass(Employee.class)<BR> .addAnnotatedClass(Task.class)<BR> <b>.setProperty("hibernate.hbm2ddl.auto", "create") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> 1</B><BR> .buildSessionFactory();<BR> } catch (Throwable ex) {<BR> theSessionFactory = null;<BR> System.out.print("Error Initializing Hibenrate:\n");<BR> ex.printStackTrace();<BR> }<BR> }<BR><BR> public static Session getSession() throws HibernateException<BR> { <BR> return theSessionFactory.openSession();<BR> }<BR>}<BR></code></table><OL><LI><b>.setProperty("hibernate.hbm2ddl.auto", "create")</b><BR>The "hibernate.hbm2ddl.auto" will reload the database tables every time the session factory is built. This is an useful method to test the data element structure. Programmers should remove this before deploying the program. </OL><hr/><!--=======================================================================--><H3><A NAME="CreateEmployeeClass">CreateEmployee class</A></H3><P>The CreateEmployee class is a simple program which creates and saves 5 new Employees, 15 completed tasks, 10 uncompleted yet assigned tasks, and two unassigned tasks. The program then outputs the information that is located in the database. This is included in the package to demonstrate how the Employee and Task classes are stored and retrieved from the database using Hibernate. <table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>package com.francoisnadeau.test;<BR><BR>import java.util.*;<BR>import org.hibernate.*;<BR>import org.hibernate.criterion.Expression;<BR>/**<BR> * Test class to show how to access the Hibernate Objects. <BR> * <BR> * @author Francois Nadeau<BR> * @link http://www.FrancoisNadeau.com<BR> */<BR>public class CreateEmployee {<BR> /**<BR> * Create a numnber of tasks which <BR> * are not assigned to any Employees.<BR> * <BR> * @param aNumberOfTasks number of tasks to be created.<BR> */<BR> private static void createUnassignedTasks(int aNumberOfTasks) {<BR> for(int i = 0 ; i < aNumberOfTasks ; i++) {<BR> Session theSession = HibernateHelper.getSession();<BR> Task theTask = new Task();<BR> theTask.setName("Unassigned Task, number " + i);<BR> theTask.setEntryDate(new Date());<BR><BR> theSession.save(theTask);<BR> theSession.flush();<BR> theSession.close();<BR> }<BR> }<BR><BR> /**<BR> * Create some Uncompleted Tasks which <BR> * have been assigned to an Employee.<BR> * <BR> * @param anEmployee the employee assigned to the task<BR> * @param aNumberOfTasks number of tasks to be created<BR> */<BR> private static void createUncompletedTaskFor(Employee anEmployee, int aNumberOfTasks) {<BR> for(int i = 0 ; i < aNumberOfTasks ; i++) {<BR> Session theSession = HibernateHelper.getSession();<BR> Task theTask = new Task();<BR> theTask.setName("Assigned, Uncompleted Task " + i + ", for Employee " <BR> + anEmployee.getName() );<BR> theTask.setEntryDate(new Date());<BR> theTask.setAssignedDate(new Date());<BR> theTask.setEmployee(anEmployee);<BR><BR> theSession.save(theTask);<BR> theSession.flush();<BR> theSession.close();<BR> }<BR> }<BR><BR> /**<BR> * Create some completed tasks to an <BR> * Employee.<BR> * <BR> * @param anEmployee the employee with the assigned tasks<BR> * @param aNumberOfTasks the number of tasks to be created<BR> */<BR> private static void createCompletedTaskFor(Employee anEmployee, int aNumberOfTasks) {<BR> for(int i = 0 ; i < aNumberOfTasks ; i++) {<BR> Session theSession = HibernateHelper.getSession();<BR> Task theTask = new Task();<BR> theTask.setName("Assigned, Completed Task " + i + ", for Employee " <BR> + anEmployee.getName() );<BR> theTask.setEntryDate(new Date());<BR> theTask.setAssignedDate(new Date());<BR> theTask.setCompletionDate(new Date());<BR> theTask.setEmployee(anEmployee);<BR> <BR> theSession.save(theTask);<BR> theSession.flush();<BR> theSession.close();<BR> }<BR> }<BR> <BR> /**<BR> * Create and save some Employees and tasks.<BR> * <BR> * @param args<BR> */<BR> public static void main(String[] args) {<BR> createUnassignedTasks(2);<BR><BR> for (int i = 1; i < 6; i++) {<BR> Employee theEmployee = new Employee();<BR> Session theSession = HibernateHelper.getSession();<BR><BR> theEmployee.setName("Employee " + i);<BR><BR> theSession.save(theEmployee);<BR> theSession.flush();<BR> theSession.close();<BR><BR> createCompletedTaskFor(theEmployee, 6 - i );<BR> createUncompletedTaskFor(theEmployee, i - 1);<BR> }<BR> <BR> //<BR> // Display the information which has been added in the database.<BR> //<BR> Session theSession = HibernateHelper.getSession();<BR> Criteria theCriteria = theSession.createCriteria(Employee.class);<BR> List<Employee> allEmployees = theCriteria.list();<BR> <BR> System.out.println("-------------------------------------------------------------");<BR> System.out.println("| Employee Name\t| CompletedTask\t| Uncompleted Tasks\t|");<BR> System.out.println("-------------------------------------------------------------");<BR> for(Employee anEmployee : allEmployees) {<BR> System.out.println("| " + anEmployee.getName() + "\t| " <BR> + anEmployee.getCompletedTasks().size() + "\t\t| "<BR> + anEmployee.getToDoList().size() + "\t\t\t| ");<BR> }<BR> System.out.println("-------------------------------------------------------------\n");<BR> <BR> System.out.println("-------------------------------------------------------------");<BR> System.out.println("| Un-assigned tasks \t\t\t\t\t|");<BR> System.out.println("-------------------------------------------------------------");<BR><BR> theCriteria = theSession.createCriteria(Task.class);<BR> theCriteria.add(Expression.isNull("employee"));<BR> List<Task> theUnassignedTasks = theCriteria.list();<BR> <BR> for(Task aTask : theUnassignedTasks) {<BR> System.out.println("| " + aTask.getName() + "\t\t\t\t\t|");<BR> }<BR> System.out.println("-------------------------------------------------------------");<BR> }<BR>}<BR></code></table><hr/><!--=======================================================================--><h3><A NAME="hibernate.properties">hibernate.properties file</A></h3><P>The last component for this example is the Hibernate configuration file, which is required for the communicate with the database. Information such as the database location, user-name, and password are entered in this file. <table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>######################<BR>### Query Language ###<BR>######################<BR>## define query language constants / function names<BR>hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'<BR>## package imports<BR>#hibernate.query.imports com.kingdomfounder.data<BR><BR>#################<BR>### Platforms ###<BR>#################<BR>## MySQL<BR>hibernate.dialect org.hibernate.dialect.MySQLDialect<BR>hibernate.connection.driver_class com.mysql.jdbc.Driver<BR>hibernate.connection.url jdbc:mysql://localhost/TESTHIBERNATE<BR>hibernate.connection.username aUserName<BR>hibernate.connection.password aPassword<BR><BR>#################################<BR>### Hibernate Connection Pool ###<BR>#################################<BR><BR>hibernate.connection.pool_size 2<BR>hibernate.statement_cache.size 100<BR></code></table><hr/><!--=======================================================================--><h2><A NAME="RunningTheExample">Running the example</a></h2>To run this example follow the following steps:<BR><h2><A NAME="DownloadExample">Download the example</A></h2>Download and un-pack the example code and binary libraries:<UL><LI><A href="http://webprod7.megashares.com/index.php?d01=8d3e39e&sq=&d01go=1&fln=/example.zip">example.zip</A></UL><h2><A NAME="InstallJava">Install Java 1.5 and Ant</A></h2>Download and install Java 1.5 and apache Ant:<UL><LI><a href="http://java.sun.com/j2se/1.5.0/download.jsp">Download</a> and install Sun's JDK 1.5 if it is not already installed<LI><a href="http://ant.apache.org/bindownload.cgi">Download</a> and install the Apache's Ant build tool if it is not already installed</UL><h2><A NAME="DatabaseConfiguration">Database Configuration</A></h2>This example uses MySQL databse since it is Open Source, and freely available. <P>Once the server is install complete the following commands to load the database schema into the database.<table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>franck@linux:~/code> <b>cd scripts/</b><BR>franck@linux:~/code/scripts> <b>mysql -u root -p</b><BR><b>Enter password: <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> The password is empty by default</B><BR>Welcome to the MySQL monitor. Commands end with ; or \g.<BR>Your MySQL connection id is 368 to server version: 4.0.21<BR><BR>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<BR><BR>mysql> <b>source dbCreate.sql <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height=12/> Execute the sql commands in file</B><BR>Query OK, 0 rows affected (0.00 sec)<BR><BR>Query OK, 1 row affected (0.00 sec)<BR><BR>Query OK, 0 rows affected (0.00 sec)<BR><BR>mysql><BR></code></table><h2><A NAME="RunBuildScript">Run the Ant build script</A></h2>Open a command prompt and run the following command in the directory which was created when the source code was unpacked. <UL><P><b>ant run.CreateEmployee</b></UL>The following is the output that will be generated by this command. <table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>franck@linux:~/code> ant run.CreateEmployee<br>Buildfile: build.xml<br><br>init:<br> [mkdir] Created dir: /home/franck/work/95_university/comp601/Project/code/build<br> [mkdir] Created dir: /home/franck/work/95_university/comp601/Project/code/build/classes<br><br>resources:<br> [copy] Copying 6 files to /home/franck/work/95_university/comp601/Project/code/build/classes<br><br>compile:<br> [javac] Compiling 4 source files to /home/franck/work/95_university/comp601/Project/code/build/classes<br> [javac] Note:<br> /home/franck/work/95_university/comp601/Project/code/src/com/francoisnadeau/test/CreateEmployee.java uses unchecked or unsafe operations.<br> [javac] Note: Recompile with -Xlint:unchecked for details.<br><br>jar:<br> [jar] Building jar:<br> /home/franck/work/95_university/comp601/Project/code/build/hibernateTest-1.0.jar<br><br>run.CreateEmployee:<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Environment <clinit><br> [java] INFO: Hibernate 3.1 rc1<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Environment <clinit><br> [java] INFO: loaded properties from resource hibernate.properties:<br> {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true,<br> hibernate.dialect=org.hibernate.dialect.MySQLDialect, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N',<br> hibernate.connection.username=aUserName, hibernate.connection.url=jdbc:mysql://localhost/TESTHIBERNATE, hibernate.connection.password=****, hibernate.statement_cache.size=100, hibernate.connection.pool_size=2}<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Environment <clinit><br> [java] INFO: using CGLIB reflection optimizer<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Environment <clinit><br> [java] INFO: using JDK 1.4 java.sql.Timestamp handling<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.AnnotationConfiguration addPackage<br> [java] INFO: Mapping package com.francoisnadeau.test<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.AnnotationBinder bindPackage<br> [java] WARNING: Package not found or wo package-info.java: com.francoisnadeau.test<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing extends queue<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing collection mappings<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.annotations.CollectionBinder<br> bindOneToManySecondPass<br> [java] INFO: Mapping collection: com.francoisnadeau.test.Employee.allTasks -> Task<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing association property references<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing foreign key constraints<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br> [java] INFO: Using Hibernate built-in connection pool (not for production use!)<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br> [java] INFO: Hibernate connection pool size: 2<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br> [java] INFO: autocommit mode: false<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br> [java] INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/TESTHIBERNATE<br> [java] Nov 25, 2005 3:34:37 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br> [java] INFO: connection properties: {user=aUserName, password=****}<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: RDBMS: MySQL, version: 4.0.21<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.8 ( $Date: 2005/04/14 20:36:13<br> $, $Revision: 1.27.4.64 $ ) [java] Nov 25, 2005 3:34:38 PM org.hibernate.dialect.Dialect <init><br> [java] INFO: Using dialect: org.hibernate.dialect.MySQLDialect<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory<br> [java] INFO: Using default transaction strategy (direct JDBC transactions)<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.transaction.TransactionManagerLookupFactory<br> getTransactionManagerLookup<br> [java] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Automatic flush during beforeCompletion(): disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Automatic session close at end of transaction: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: JDBC batch size: 15<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: JDBC batch updates for versioned data: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Scrollable result sets: enabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: JDBC3 getGeneratedKeys(): enabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Connection release mode: null<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Maximum outer join fetch depth: 2<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Default batch fetch size: 1<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Generate SQL with comments: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Order SQL updates by primary key: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory<br> [java] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init><br> [java] INFO: Using ASTQueryTranslatorFactory<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Query language substitutions: {no='N', true=1, yes='Y', false=0}<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Second-level cache: enabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Query cache: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory createCacheProvider<br> [java] INFO: Cache provider: org.hibernate.cache.EhCacheProvider<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Optimize cache for minimal puts: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Structured second-level cache entries: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Statistics: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Deleted entity synthetic identifier rollback: disabled<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br> [java] INFO: Default entity-mode: POJO<br> [java] Nov 25, 2005 3:34:38 PM org.hibernate.impl.SessionFactoryImpl <init><br> [java] INFO: building session factory<br> [java] Nov 25, 2005 3:34:38 PM net.sf.ehcache.config.Configurator configure<br> [java] WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath:<br> jar:file:/home/franck/work/95_university/comp601/Project/code/lib/ehcache-1.1.jar!/ehcache-failsafe.xml<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance<br> [java] INFO: Not binding factory to JNDI, no JNDI name configured<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing extends queue<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing collection mappings<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing association property references<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing foreign key constraints<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing extends queue<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing collection mappings<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing association property references<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.cfg.Configuration secondPassCompile<br> [java] INFO: processing foreign key constraints<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.tool.hbm2ddl.SchemaExport execute<br> [java] INFO: Running hbm2ddl schema export<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.tool.hbm2ddl.SchemaExport execute<br> [java] INFO: exporting generated schema to database<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.tool.hbm2ddl.SchemaExport execute<br> [java] INFO: schema export complete<br> [java] Nov 25, 2005 3:34:39 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries<br> [java] INFO: Checking 0 named queries<br> [java] <B>-----------------------------------------------------</B><br> [java] <B>| Employee Name | CompletedTask | Uncompleted Tasks |</B><br> [java] <B>-----------------------------------------------------</B><br> [java] <B>| Employee 1 | 5 | 0 |</B><br> [java] <B>| Employee 2 | 4 | 1 |</B><br> [java] <B>| Employee 3 | 3 | 2 |</B><br> [java] <B>| Employee 4 | 2 | 3 |</B><br> [java] <B>| Employee 5 | 1 | 4 |</B><br> [java] <B>-----------------------------------------------------</B><br><br> [java] <B>-----------------------------------------------------</B><br> [java] <B>| Un-assigned tasks |</B><br> [java] <B>-----------------------------------------------------</B><br> [java] <B>| Unassigned Task, number 0 |</B><br> [java] <B>| Unassigned Task, number 1 |</B><br> [java] <B>-----------------------------------------------------</B><br><br>BUILD SUCCESSFUL<br>Total time: 5 seconds<br></code></table>Once this program has been executed, you should be able to use the mysql client to select the new Employees which have been created by this program.<table style="border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #eeeeee;margin-top:10px;margin-bottom:10px;" cellpadding="5" width=100%><tr valign="top"><td colspan="1"> <code>franck@linux:~/><b> mysql -u aUserName -p TESTHIBERNATE</b><br>Enter password:<br>Reading table information for completion of table and column names<br>You can turn off this feature to get a quicker startup with -A<br><br>Welcome to the MySQL monitor. Commands end with ; or \g.<br>Your MySQL connection id is 366 to server version: 4.0.21<br><br>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<br><br>mysql> select * from Employee;<br>+----+----------+---------+------------+<br>| id | hireDate | address | name |<br>+----+----------+---------+------------+<br>| 1 | NULL | NULL | Employee 1 |<br>| 2 | NULL | NULL | Employee 2 |<br>| 3 | NULL | NULL | Employee 3 |<br>| 4 | NULL | NULL | Employee 4 |<br>| 5 | NULL | NULL | Employee 5 |<br>+----+----------+---------+------------+<br>5 rows in set (0.00 sec)<br><br>mysql> select count(*) from Task;<br>+----------+<br>| count(*) |<br>+----------+<br>| 27 |<br>+----------+<br>1 row in set (0.00 sec)<br><br>mysql><br></code></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-27925906360933038992007-02-06T03:49:00.000-08:002007-02-06T03:56:38.801-08:00Hibernate Configuration File<h2>Table of Content</h2> <ol><li><a href="#Introduction">Introduction</a> </li><li><a href="#hibernate.properties">Configuration with hibernate.properties</a> </li><li><a href="#hibernate.cfg.xml">Configuration with hibernate.cfg.xml</a> </li></ol> <hr /> <h2><a name="Introduction">Introduction</a></h2> <a name="Introduction">In order to configure the Hibernate frameworks, a programmer must create a properties file. This file must be included in the class-path of the program which is using Hibernate. The best method to accomplish this is to place this file inside the application jar file. There are two available types of properties file for Hibernate. Both have the same functionality, however their formats are different. </a><h2><a name="hibernate.properties">Configuration with hibernate.properties</a></h2>This file can be copied from a Hibernate distribution, and modified as required. Most of the of the settings in this file do not need to be modified. A programmer should modify the database dialect, database connection, user name, and password. For instance, the following would connect to an Oracle database on the machine executing the program. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> ... hibernate.dialect org.hibernate.dialect.OracleDialect hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver hibernate.connection.username aUserName hibernate.connection.password aPassword hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl ... </code> </td></tr></tbody></table> <hr /> <h2><a name="hibernate.cfg.xml">Configuration with hibernate.cfg.xml</a></h2> <a name="hibernate.cfg.xml">This file can be </a><a href="file:///home/franck/work/95_university/comp601/Project/LO/LO-7/hibernate.cfg.xml">copied</a> from a Hibernate distribution, and modified as required. This method is a more career enhancing method to configurate the Hibernate framework since you can claim to your boss that you are using xml technologies. Unfortunately, this is the only difference between the two methods, so choose the one that suits your mood. The following xml document configures Hibernate to connect to the same database as the one given in the properties example. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> <?xml version='1.0' encoding='utf-8'?><br /><!DOCTYPE hibernate-configuration PUBLIC<br /> "-//Hibernate/Hibernate Configuration DTD 3.0//EN"<br /> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><br /><hibernate-configuration><br /> <session-factory><br /> <!-- Database connection settings --><br /> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property><br /> <property name="connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property><br /> <property name="connection.username">aUserName</property><br /> <property name="connection.password">aPassword</property><br /> <!-- JDBC connection pool (use the built-in) --><br /> <property name="connection.pool_size">1</property><br /> <!-- SQL dialect --><br /> <property name="dialect">org.hibernate.dialect.OracleDialect</property><br /> <!-- Echo all executed SQL to stdout --><br /> <property name="show_sql">true</property><br /> <!-- Drop and re-create the database schema on startup --><br /> <property name="hbm2ddl.auto">create</property><br /> </session-factory><br /></hibernate-configuration><br /></code> </td></tr></tbody></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-72984358697889765262007-02-06T03:07:00.000-08:002007-02-06T04:26:32.429-08:00Hibernate example (Basic)<h2>Table of Content</h2> <ol><li><a href="#Introduction">Introduction</a> <ol><li type="a"><a href="#EmployeeClass">Employee class</a> </li><li type="a"><a href="#HibernateHelperClass">HibernateHelper class</a> </li><li type="a"><a href="#CreateEmployeeClass">CreateEmployee class</a> </li><li type="a"><a href="#hibernate.properties">hibernate.properties</a> </li></ol> </li><li><a href="#RunningTheExample">Running the example</a> <ol><li type="a"><a href="#DownloadExample">Download the example</a> </li><li type="a"><a href="#InstallJava">Install Java 1.5 and Ant</a> </li><li type="a"><a href="#DatabaseConfiguration">Database Configuration</a> </li><li type="a"><a href="#RunBuildScript">Run the Ant build script</a> </li></ol> </li></ol> <hr /> <h2><a name="Introduction">Introduction</a></h2> <p><a name="Introduction">This Hibernate example maps a simply Java Object (Employee.java) to one database table. This example also creates some instances of this Object and saves them into a database. </a></p><p><a name="Introduction">The following is the database schema for the Employee Object: </a><table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> CREATE TABLE EMPLOYEE (<br /> ID BIGINT NOT NULL AUTO_INCREMENT,<br /> NAME VARCHAR(255) NOT NULL,<br /> HIRE TIMESTAMP,<br /> ADDRESS TEXT,<br /> PRIMARY KEY (ID)<br />);<br /></code> </td></tr></tbody></table> <a name="Introduction">This example consist of three Java classes which are as follows. </a></p><hr /> <!--=======================================================================--> <h3><a name="EmployeeClass">Employee class</a></h3> <p>The Employee class is a simple POJO which has been setup to be able to be used as an Hibernate Object. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> package com.francoisnadeau.test;<br /><br />import java.util.Date;<br />import javax.persistence.*;<br />/**<br />* A single Employee.<br />*<br />* @author Francois Nadeau<br />* @link http://www.FrancoisNadeau.com<br />*/<br /><br /><br /><b>@Entity <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 1<br />@Table(name = "EMPLOYEE") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 2</b><br />public class Employee {<br /> private Long theId;<br /> private String theName;<br /> private Date theHireDate;<br /> private String theAddress;<br /><br /> /**<br /> * The Employee's unique Id.<br /> *<br /> * @return the Employee Id<br /> */<br /> <b>@Id(generate = GeneratorType.AUTO) <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 3</b><br /> public Long getId() { return theId; }<br /> public void setId(Long aId) { theId = aId; }<br /><br /> /**<br /> * The Employee's name.<br /> *<br /> * @return the name<br /> */<br /> <b>@Basic <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 4</b><br /> public String getName() { return theName; }<br /> public void setName(String aName) { theName = aName; }<br /><br /> /**<br /> * The date that the Employee was hired.<br /> *<br /> * @return hired date<br /> */<br /> @Basic<br /> <b>@Column (name="hire") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 5</b><br /> public Date getHireDate() { return theHireDate; }<br /> public void setHireDate(Date aHireDate) { theHireDate = aHireDate; }<br /> /**<br /> * The employee's address<br /> *<br /> * @return the address<br /> */<br /> @Basic<br /> public String getAddress() { return theAddress; }<br /> public void setAddress(String aAddress) { theAddress = aAddress; }<br />}<br /></code> </td></tr></tbody></table> </p><ol><li><b>@Entity</b><br />Hibernate uses Sun's EJB3 Annotation standard to map persistent Objects. Because of this, all Hibernate Objects are treated as Entity Beans.<br /><b>Note</b>: Although Hibernate uses the EJB3 standard in this manner, the Objects do not need to be deployed in an EJB container to be used. An interesting benefit of this is that no modifications would be required for this class to be used inside a J2EE compliant server as an Entity Bean . </li><li><b>@Table(name = "EMPLOYEE")</b><br />This annotation defines which table inside the database this Object is to be mapped too. </li><li><b>@Id(generate = GeneratorType.AUTO)</b><br />This annotation defines the primary key for this Object. The following key generators can be used for generating IDs: AUTO, TABLE, IDENTITY, SEQUENCE, or NONE. </li><li><b>@Basic</b><br />This annotation is used to define an Object property. Each properties map to a single field in the database. </li><li><b>@Column (name="hire")</b><br />This annotation is used in combination with @Basic to force a property to be mapped to a different field. The omission of this annotation, in this example, would mean that this property would be mapped to the HireDate field in the database instead of the hire field. This would cause a RunTimeException to be thrown since this field does not exist in the database. </li></ol> <hr /> <!--=======================================================================--> <h3><a name="HibernateHelperClass">HibernateHelper class</a></h3> <p>The HibernateHelper class is used to access the Hibernate Sessions. This class is copied from and often referred to in the Hibernate documentation. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> package com.francoisnadeau.test;<br /><br />import org.hibernate.HibernateException;<br />import org.hibernate.Session;<br />import org.hibernate.SessionFactory;<br />import org.hibernate.cfg.AnnotationConfiguration;<br />/**<br />* This class is ued to access the Hibernate sessions.<br />*<br />* @author Francois Nadeau<br />* @link http://www.FrancoisNadeau.com<br />*/<br />public class HibernateHelper {<br /> private static SessionFactory theSessionFactory;<br /><br /> static {<br /> try {<br /> // Create the SessionFactory<br /> theSessionFactory = new AnnotationConfiguration()<br /> <b>.addPackage("com.francoisnadeau.test") <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 1</b><br /> <b>.addAnnotatedClass(Employee.class) <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 2</b><br /> <b>.buildSessionFactory(); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 3</b><br /> } catch (Throwable ex) {<br /> theSessionFactory = null;<br /> System.out.print("Error Initializing Hibenrate:\n");<br /> ex.printStackTrace();<br /> }<br /> }<br /><br /> public static Session getSession() throws HibernateException {<br /> <b>return theSessionFactory.openSession(); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 4</b><br /> }<br />}<br /></code> </td></tr></tbody></table> </p><ol><li><b>.addPackage("com.francoisnadeau.test")</b><br />This method adds package level metadata. This function is required for Hibernate Objects which have been mapped with hbm.xml files. These files where used prior to the release of annotations in Java 1.5 to define the mapping, and are not covered in this example. </li><li><b>.addAnnotatedClass(Employee.class)</b><br />This assigns persistent classes to the Hibernate session. This method must be called for each of the Objects that are to be used by this session. </li><li><b>.buildSessionFactory();</b><br />Construct the SessionFactory which will provide Hibernate sessions to be used to retrieve and store objects in the database. </li><li><b>return theSessionFactory.openSession();</b><br />Retrieve a Hibernate session to be used to retrieve and store Objects which were added to the Configuration. </li></ol> <hr /> <!--=======================================================================--> <h3><a name="CreateEmployeeClass">CreateEmployee class</a></h3> <p>The CreateEmployee class is a simple program which creates and saves 5 new Employees, and then outputs the number of Employees which are in the database. This is included in the package to demonstrate how the Employee class is to be stored and retrieved from the database using Hibernate. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> package com.francoisnadeau.test;<br /><br />import java.util.List;<br />import org.hibernate.*;<br />/**<br />* @author Francois Nadeau<br />* @link http://www.FrancoisNadeau.com<br />*/<br />public class CreateEmployee {<br /><br /> /**<br /> * Create and save some Employees.<br /> *<br /> * @param args<br /> */<br /> public static void main(String[] args) {<br /> <b>for (int i = 1; i <>Employee theEmployee = new Employee(); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 1</b><br /> <b>Session theSession = HibernateHelper.getSession(); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 2</b><br /><br /> theEmployee.setName("Employee " + i);<br /><br /> <b>theSession.save(theEmployee); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 3</b><br /> theSession.flush();<br /> theSession.close();<br /> }<br /><br /> Session theSession = HibernateHelper.getSession();<br /> <b>Criteria theCriteria = theSession.createCriteria(Employee.class); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 4</b><br /> <b>List allEmployees = theCriteria.list(); <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> 5</b><br /><br /> System.out.println("You now have " + allEmployees.size()<br /> + " Employees.");<br /> }<br />}<br /></code> </td></tr></tbody></table> </p><ol><li><b>Employee theEmployee = new Employee();</b><br />Creating Hibernate Object and accessing its properties is done in the same manner as any other POJO. </li><li><b>Session theSession = HibernateHelper.getSession();</b><br />A Hibernate session is required to store an Object. </li><li><b>theSession.save(theEmployee);</b><br />This is the call used to save an Object to the database. Other functions such as update and delete are also supported. </li><li><b>Criteria theCriteria = theSession.createCriteria(Employee.class);</b><br />Hibernate criteria are used to retrieve Objects from the database. The code above will retrieve all Employees in the database. The following code would return all Employee objects whose name starts with "Bob": <code> </code><table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> Criteria theCriteria = theSession.createCriteria(Employee.class)<br /> .add( Restrictions.like("name", "Bob%") ); </td></tr></tbody></table> </li><li><b>List allEmployees = theCriteria.list();</b><br />The criteria.list() function executes the query on the database, and the results are returned in a java.util.List. </li></ol> <hr /> <!--=======================================================================--> <h3><a name="hibernate.properties">hibernate.properties</a></h3> <p>The last component for this example is the Hibernate configuration file, which is required for the communicate with the database. Information such as the database location, user-name, and password are entered in this file. If you need more information about this file please refer to the following <a href="http://nadeaufrancois.blogspot.com/2007/02/hibernate-configuration-file.html">link</a>. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> ######################<br />### Query Language ###<br />######################<br />## define query language constants / function names<br />hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'<br />## package imports<br />#hibernate.query.imports com.kingdomfounder.data<br /><br />#################<br />### Platforms ###<br />#################<br />## MySQL<br />hibernate.dialect org.hibernate.dialect.MySQLDialect<br />hibernate.connection.driver_class com.mysql.jdbc.Driver<br />hibernate.connection.url jdbc:mysql://localhost/TESTHIBERNATE<br />hibernate.connection.username aUserName<br />hibernate.connection.password aPassword<br /><br />#################################<br />### Hibernate Connection Pool ###<br />#################################<br /><br />hibernate.connection.pool_size 2<br />hibernate.statement_cache.size 100<br /></code> </td></tr></tbody></table> </p><hr /> <!--=======================================================================--> <h2><a name="RunningTheExample">Running the example</a></h2> To run this example follow the following steps:<br /><h2><a name="DownloadExample">Download the example</a></h2> Download and un-pack the example code and binary libraries: <ul><li><a href="http://webprod12.megashares.com/index.php?d01=cd8018a&sq=&d01go=1&fln=/example.zip">example.zip</a> </li></ul> <h2><a name="InstallJava">Install Java 1.5 and Ant</a></h2> Download and install Java 1.5 and apache Ant: <ul><li><a href="http://java.sun.com/j2se/1.5.0/download.jsp">Download</a> and install Sun's JDK 1.5 if it is not already installed </li><li><a href="http://ant.apache.org/bindownload.cgi">Download</a> and install the Apache's Ant build tool if it is not already installed </li></ul> <h2><a name="DatabaseConfiguration">Database Configuration</a></h2> This example uses MySQL databse since it is Open Source, and freely available. <p>Once the server is install complete the following commands to load the database schema into the database. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> franck@linux:~/code> <b>cd scripts/</b><br />franck@linux:~/code/scripts> <b>mysql -u root -p</b><br /><b>Enter password: <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> The password is empty by default</b><br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 368 to server version: 4.0.21<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<br /><br />mysql> <b>source dbCreate.sql <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0lYghB8FudXUHzmkjWvfF6sav56Q9i_NlKEW1rWM24HE4iWBlwSXn3rpC_d2jIJuS-YY1yP4D6HSWn2_wFKnXJAvgXIhxF7dKc6lpDrOWEVcFKD5f2NMWr2OTb4_OQeraGbucaecHYrF/s320/arrow.gif" height="12" /> Execute the sql commands in file</b><br />Query OK, 0 rows affected (0.00 sec)<br /><br />Query OK, 1 row affected (0.00 sec)<br /><br />Query OK, 0 rows affected (0.00 sec)<br /><br />Database changed<br />Query OK, 0 rows affected (0.08 sec)<br /></code> </td></tr></tbody></table> </p><h2><a name="RunBuildScript">Run the Ant build script</a></h2> Open a command prompt and run the following command in the directory which was created when the source code was unpacked. <ul><p><b>ant run.CreateEmployee</b></p></ul> The following is the output that will be generated by this command. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> franck@linux:~/code> ant run.CreateEmployee<br />Buildfile: build.xml<br /><br />init:<br /> [mkdir] Created dir: /home/franck/code/build<br /> [mkdir] Created dir: /home/franck/code/build/classes<br /><br />resources:<br /> [copy] Copying 4 files to /home/franck/code/build/classes<br /><br />compile:<br /> [javac] Compiling 3 source files to /home/franck/code/build/classes<br /><br />jar:<br /> [jar] Building jar: /home/franck/code/build/hibernateTest-1.0.jar<br /><br />run.CreateEmployee:<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Environment <clinit><br /> [java] INFO: Hibernate 3.1 rc1<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Environment <clinit><br /> [java] INFO: loaded properties from resource hibernate.properties:<br />{hibernate.connection.driver_class=com.mysql.jdbc.Driver,<br />hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=org.hibernate.dialect.MySQLDialect,<br />hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.connection.username=aUserName,<br />hibernate.connection.url=jdbc:mysql://localhost/TESTHIBERNATE, hibernate.connection.password=****,<br />hibernate.statement_cache.size=100, hibernate.connection.pool_size=2}<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Environment <clinit><br /> [java] INFO: using CGLIB reflection optimizer<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Environment <clinit><br /> [java] INFO: using JDK 1.4 java.sql.Timestamp handling<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.AnnotationConfiguration addPackage<br /> [java] INFO: Mapping package com.francoisnadeau.test<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.AnnotationBinder bindPackage<br /> [java] WARNING: Package not found or wo package-info.java: com.francoisnadeau.test<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Configuration secondPassCompile<br /> [java] INFO: processing extends queue<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Configuration secondPassCompile<br /> [java] INFO: processing collection mappings<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Configuration secondPassCompile<br /> [java] INFO: processing association property references<br /> [java] Nov 19, 2005 12:15:37 PM org.hibernate.cfg.Configuration secondPassCompile<br /> [java] INFO: processing foreign key constraints<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br /> [java] INFO: Using Hibernate built-in connection pool (not for production use!)<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br /> [java] INFO: Hibernate connection pool size: 2<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br /> [java] INFO: autocommit mode: false<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br /> [java] INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/TESTHIBERNATE<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.connection.DriverManagerConnectionProvider configure<br /> [java] INFO: connection properties: {user=aUserName, password=****}<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: RDBMS: MySQL, version: 4.0.21<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.8 ( $Date: 2005/04/14 20:36:13 $, $Revision: 1.27.4.64 $ )<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.dialect.Dialect <init><br /> [java] INFO: Using dialect: org.hibernate.dialect.MySQLDialect<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.transaction.TransactionFactoryFactory<br />buildTransactionFactory<br /> [java] INFO: Using default transaction strategy (direct JDBC transactions)<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.transaction.TransactionManagerLookupFactory<br />getTransactionManagerLookup<br /> [java] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or<br />transactional second-level cache is not recommended)<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Automatic flush during beforeCompletion(): disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Automatic session close at end of transaction: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: JDBC batch size: 15<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: JDBC batch updates for versioned data: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Scrollable result sets: enabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: JDBC3 getGeneratedKeys(): enabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Connection release mode: null<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Maximum outer join fetch depth: 2<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Default batch fetch size: 1<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Generate SQL with comments: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Order SQL updates by primary key: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory<br /> [java] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init><br /> [java] INFO: Using ASTQueryTranslatorFactory<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Query language substitutions: {no='N', true=1, yes='Y', false=0}<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Second-level cache: enabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Query cache: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory createCacheProvider<br /> [java] INFO: Cache provider: org.hibernate.cache.EhCacheProvider<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Optimize cache for minimal puts: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Structured second-level cache entries: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Statistics: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Deleted entity synthetic identifier rollback: disabled<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.cfg.SettingsFactory buildSettings<br /> [java] INFO: Default entity-mode: POJO<br /> [java] Nov 19, 2005 12:15:38 PM org.hibernate.impl.SessionFactoryImpl <init><br /> [java] INFO: building session factory<br /> [java] Nov 19, 2005 12:15:38 PM net.sf.ehcache.config.Configurator configure<br /> [java] WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/franck/work/95_university/comp601/Project/code/lib/ehcache-1.1.jar!/ehcache-failsafe.xml<br /> [java] Nov 19, 2005 12:15:39 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance<br /> [java] INFO: Not binding factory to JNDI, no JNDI name configured<br /> [java] Nov 19, 2005 12:15:39 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries<br /> [java] INFO: Checking 0 named queries<br /> [java] <b>You now have 5 Employees.</b><br /><br />BUILD SUCCESSFUL<br />Total time: 5 seconds<br /></init></init></init></clinit></clinit></clinit></clinit></code> </td></tr></tbody></table> Once this program has been executed, you should be able to use the mysql client to select the new Employees which have been created by this program. <table style="border: 1px solid rgb(204, 204, 204); background-color: rgb(238, 238, 238); margin-top: 10px; margin-bottom: 10px;" cellpadding="5" width="100%"><tbody><tr valign="top"><td colspan="1"> <code> franck@linux:~/><b> mysql -u aUserName -p TESTHIBERNATE</b><br />Enter password:<br />Reading table information for completion of table and column names<br />You can turn off this feature to get a quicker startup with -A<br /><br />Welcome to the MySQL monitor. Commands end with ; or \g.<br />Your MySQL connection id is 366 to server version: 4.0.21<br /><br />Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<br /><br />mysql> <b>select * from EMPLOYEE;</b><br />+----+------------+----------------+---------+<br />| ID | NAME | HIRE | ADDRESS |<br />+----+------------+----------------+---------+<br />| 1 | Employee 1 | 20051119121539 | NULL |<br />| 2 | Employee 2 | 20051119121539 | NULL |<br />| 3 | Employee 3 | 20051119121539 | NULL |<br />| 4 | Employee 4 | 20051119121539 | NULL |<br />| 5 | Employee 5 | 20051119121539 | NULL |<br />+----+------------+----------------+---------+<br />5 rows in set (0.00 sec)</code> </td></tr></tbody></table>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com2tag:blogger.com,1999:blog-6190256010858253937.post-36351581202720461312007-02-06T03:05:00.000-08:002007-02-08T03:20:12.984-08:00Hibernate Tutorial<table width=100%><tr><td><a href="http://nadeaufrancois.blogspot.com/2007/02/hibernate-example-basic.html">Tutorial 1 (Basic)</a></td><td allign=right><a href="http://nadeaufrancois.blogspot.com/2007/02/learning-object-4-hibernate-example.html">Tutorial 2 (Intermediate)</a></td></tr></table><br /><h2><a name="Introduction"></a></h2><h2><a name="Introduction">Introduction</a></h2> <p>Hibernate is an Open Source Object-SQL framework for Java. It is often used in combination with J2EE technologies as a replacement for Entity Beans, as these tend to be inefficiently implemented by most J2EE application servers. Hibernate can also be used outside of an J2EE server which makes it very attractive for other applications needing to communicate with relational databases.</p><p>Object-SQL mapping is a programming technique used in Object Oriented programming languages to manipulate data as Objects instead of using SQL commands. The basic mechanism used to implement this technique is the creation of Objects which wrap around SQL commands to allow the storage of data in relational databases. Other benefits of Object-SQL frameworks include quicker development, decrease of complexity, and Object caching.</p><p><a name="FrameworkAvailability">The following is a short list of Object-SQL mapping frameworks available for various programming languages: </a></p><ul type="none"><li><a name="FrameworkAvailability"><b>Java</b> </a><ul><li><a href="http://java.sun.com/products/jdo/">Java Data Objects (JDO) </a>, produced by Sun. </li><li><a href="http://speedo.objectweb.org/">Speedo</a>, an open source implementation of JDO. </li><li><a href="http://www.jpox.org/index.jsp">JPOX</a>, an open source implementation of JDO. </li><li><a href="http://www.oracle.com/technology/products/ias/toplink/index.html">TopLink</a> produced by Oracle. </li><li><a href="http://www.hibernate.org/">Hibernate</a>, an open source project produced by JBoss. </li></ul> <br /></li><li><b>.Net</b> <ul><li><a href="http://www.x-tensive.com/">DataObjects.NET</a>, produced by X-Tensive. </li><li><a href="http://www.nhibernate.org/">Nhibernate</a>, open source port of Java's Hibernate. </li><li><a href="http://www.ormapper.net/">Wilson ORMapper for .NET</a>, produced by Wilson ORMapper. </li><li><a href="http://www.llblgen.com/">LLBLGen Pro</a>, produced by LLBLGen. </li></ul> <br /></li><li><b>Perl</b> <ul><li><a href="http://search.cpan.org/dist/Class-DBI/">Class::DBI</a>, an open source contribution. </li><li><a href="http://search.cpan.org/%7Ejsiracusa/Rose-DB-Object-0.079/">Rose::DB::Object</a>an open source contribution . </li></ul> <br /></li><li><b>Python</b> <ul><li><a href="http://sqlobject.org/">SQLObject</a>, open source contribution. </li><li><a href="http://skunkweb.sourceforge.net/pydo.html">PyDO</a>, open source contribution. </li><li><a href="http://www.webwareforpython.org/">Webware</a>, open source contribution. </li><li><a href="http://soiland.no/software/forgetsql">ForgetSQL</a>, open source contribution. </li><li><a href="http://www.qlime.org/">QLime</a>, open source contribution. </li></ul> <br /></li><li><b>Ruby</b> <ul><li><a href="http://ar.rubyonrails.com/">Active Record</a>, open source contribution. </li></ul> <br /></li><li><b>PHP</b> <ul><li><a href="http://www.meta-language.net/metastorage.html">Metastorage</a>, open source contribution. </li><li><a href="http://propel.phpdb.org/trac/">Propel</a>, open source contribution. </li><li><a href="http://pear.php.net/package/DB_DataObject">DB_DataObject</a>, open source contribution. </li><li><a href="http://www.phpobjectgenerator.com/">Php Object Generator Open Source online ORM Generator</a>, pretty much what its name says. </li><li><a href="http://cakephp.org/CakePHP">Framework modelled on Rails</a>, open source contribution.<a name="Introduction"><br /><br /></a></li></ul> </li></ul>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-86097932087245186172007-01-28T04:31:00.001-08:002007-01-28T04:55:59.227-08:00The Open Agent Architecture<hr /><br /><div style="text-align: center;">by<br />Francois Nadeau<br /><div style="text-align: left;"><hr /></div></div><br /><table style="width: 100%; border-style: dotted; border-width: 1px; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><tr><td><a href="#chapter1">Chapter 1: The Open Agent Architecture</a></td></tr><tr><td><a href="#chapter2">Chapter 2: Trends in Distributed Software System</a></td></tr></tbody></table><br /><br /><a name="chapter1"><h3>1 The Open Agent Architecture</h3></a><br />The Open Agent Architecture (OAA) is a framework used for constructing distributed software agents[1]. It was created by SRI International, which is a nonprofit research institution[2].<br /><br /><h4>1.1 The Strengths of the OAA Framework</h4><br />The strength of the OAA framework are as follows:<br /><ul><li>It provides software programmers with an environment to deploy software agents which can cooperate together to achieve common goals[3]. <br /></li><li>Agents allow the creation of system incrementally[1]. This is accomplished by developing a system's features as independent agents which provide services to each other, but do not relie exclusively on each other to function.<br /></li><li>Agents allows software developers to more easily incorporate 3rd party and legacy systems within a system[1].<br /></li><li>Agents can be used to process tasks in parallel[4]. The OAA framework accomplishes this with the use of a Facilitator agent, which is a centralized component used by all agents to communicate with each other. In this manner, the Facilitator can retain performance information about the agents in the system, and use this for selecting which agent should be used to accomplish new requests.<br /></li><li>It supports the following programming languages: PROLOG, C, C++, Java, Lisp, Visual Basic, and Delphi[3]</li></ul><br /><br /><h4>1.2 The Limitations of the OAA Framework</h4><br />The following are the limitations of using the OAA framework:<br /><uL><li>Agent oriented frameworks, such as the OAA, are not suited for static systems[1]. That is, systems which do not need to continuously adapt or upgraded should use more traditional methods such as Object Oriented architectures.<br /></li><li>An OAA system must have a Facilitator agent, who coordinates all of the other agents[3]. This architectural decision creates a central point of failure in the system since this agent can become unavailable or unreliable. An other problem with this architecture is a decrease in performance since agents must communicate with the Facilitator first before communicating with each other. <br /></li><li>The Facilitator agent must be executed on a Unix workstations or a PC[1]. This means that all agents in the OAA system are heterogeneous except the Facilitator agent.<br /></li><li>The OAA is not an open source project, and requires a license for commercial use[1]. Although this does not affect academic projects, commercial development teams need to properly analyse the legal issues of using this framework. That is, the users will be required to spend time to understand, comply, and monitor the legal requirements imposed on them by a commercial license.<br /></li><li>The OAA framework is no longer listed as an active project on the SRI International webpage[5]. Furthermore, the mailing list activity for this project has very few threads 25 threads in 2005, and some have do not have comments), which indicates a very small and unsupportive user community. I believe that this is by far the worst disadvantage of using the OAA framework as a distributed system platform. The lack of support and interest will be reflected in a lack of information required by a software development team, and therefore a more active framework should be sought and used.</li></ul><br /><br /><h4>1.3 Agent Oriented Architectural Pattern</h4><br />I believe that the Agent Oriented Architectural Pattern is a sound one, but that an other framework then the OAA should be used by software development teams wishing to develop agent based distributed systems. For instance, most of the limitations which I have listed in section 1.2 are specific to SRI International implementation of the AOO framework, and do not apply to other Agent Oriented framework such as Jade. <br /><br />Jade, like OAA, is an agent based framework which can be used to create systems with distributed agents. However, unlike AOO,(FIPA) organisation standard. This nonprofit IEEE organisation is the authoritative entity for distributed agent applications[7].<br /><br /><a name="chapter2"><h3>2 Trends in Distributed Software System</h3></a><br />The Internet is unquestionably the biggest manmade distributed systems in existence, and because of this I believe that most trends in distributed software systems deal with the technologies used within this field. Until recently, most web services, such as websites, simply responded to client requests and did not allow their users to interact in the same manner as a traditional nonnetworked <br />application. I also believe the biggest trend within the Internet, and therefore greatly influencing distributed software systems, is the Web 2.0 movement.<br /><br />As of the writing of this paper, the Information System community has not been able to agree on the exact scope or meaning of the term Web 2.0. However, most practitioners seem to agree that this term can be used to define the second generation of services available on the Internet[8]. I believe that the most significant difference between these newer services, when comparing them to the ones previously offered, is that the users now uploads information to the Internet. For example, the Picasa program allows its users to publish pictures on the Internet without having to worry about web server hosting[9]. This means that a user can now store images on the Internet, instead of locally on his hard disk. <br /><br />Images are not the only user generated artifacts which is now being created and stored on the Internet. For example, documents can be created and saved with Writely[10], spreadsheet files with Google's Spreadsheets[11], music with ITune[12] as Podcasts, videos with YouTube[13], and a <br />user's thoughts can now be published on a seemingly unlimited number of Blog[14] and chat servers. <br /><br />The implications of having users store their information on the Internet, instead of locally on their computer, is changing the way people see and use the Internet. I believe that as more and more users become relient on such storing mechanisms, applications will exclusively store information on the Internet, and this will mean that our current PCs will become little more then dumbterminals used for displaying userinterfaces and collecting user inputs. This will also mean that web based agents, such as the ones described in M. Huns Agents as Web Services article, will have access to all the necessary information for processing many of our bureaucratic responsibilities on our behalf. <br /><br />For software developers working on distributed systems, this shift in user philosophy is creating the following challenges:<br /><ul><li>Security issues: Until now, endusers have been responsible for their digital security when accessing the Internet. Users have been expected to use firewalls, virus checkers, safe passwords, and various other tools and techniques to protect their data from unwanted access. Web 2.0 services cannot follow such a strategy since the data is now being stored on the Internet. <br /></li><li>Data distribution: Data for Web 2.0 services needs to be distributed all over the world. Currently, most web servers use mirroring to do this. However, distributed datasets create serious challenges for distributed systems, such as the continuous need to have all of the data on the servers synchronized. <br /></li><li>Mobile Users: An increasing number of users are now accessing the Internet with mobile devices such as mobile phones. For example, a survey in 2001 found that 40,000 web sites in Japan could be viewed on Internetcapable mobile phones[15]. These devices, due primarily to their size, use a different interface for accessing the Internet, and therefore needs to be linked in a different manner then traditional websites. </li></ul><br /><br /><a name="bibliography"><h3>Bibliography</h3></a><br />[1] "Open Agent Architecture (OAA) v2.x FAQ", [Online document], Available at HTTP: <br /><a href="http://www.ai.sri.com/~oaa/distribution/doc//oaafaqv2.html#PG_1.1">http://www.ai.sri.com/~oaa/distribution/doc//oaafaqv2.html#PG_1.1</a><br />[2] "About: SRI International", [Online document], Available at HTTP: <a href="http://www.sri.com/about/">http://www.sri.com/about/</a><br />[3] D. Martin, A. Cheyer, D. Moran, "The Open Agent Architecture: A Framework for Building <br />Distributed Software", [Online document], Available at HTTP: <br />[4] "OAA vs Agent Communication Language (KQML,FIPA)", [Online document], Available at <br />HTTP: <a href="http://www.ai.sri.com/~oaa/oaaslides/sld023.htm">http://www.ai.sri.com/~oaa/oaaslides/sld023.htm</a><br />[5] "Artificial Intelligence Center: Current Projects", [Online document], Available at HTTP: <br />http://www.ai.sri.com/project_list/mode=Current/<br />[6] F. Bellifemine, G. Caire, A. Poggi, G. Rimassae, "JADE A White Paper", [Online document], <br />Available at HTTP: 1.1 Agent Oriented Architectural Pattern/<br />[7] "The Foundation for Intelligent Physical Agents", [Online document], Available at HTTP: <br />http://www.fipa.org//<br />[8] "Web 2.0", [Online document], Available at HTTP: http://en.wikipedia.org/wiki/Web_2.0/<br />[9] "Picasa", [Online document], Available at HTTP: http://picasa.google.com//<br />[10] "Writely", [Online document], Available at HTTP: http://www.writely.com//<br />[11] "Google Spreadsheet", [Online document], Available at HTTP: <br />http://spreadsheets.google.com//<br />[12] "Apple's ITune Overview", [Online document], Available at HTTP: <br />http://www.apple.com/itunes/overview//<br />[13] "YouTube", [Online document], Available at HTTP: http://www.youtube.com/<br />[14] "Blog", [Online document], Available at HTTP: http://en.wikipedia.org/wiki/Blog/<br />[15] "CYBER COUNSELLOR:Support Offered via Cell Phone for Quitting Smoking", [Online <br />document], Available at HTTP: http://webjapan.org/trends00/honbun/tj010321.html/Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-16788424402851962102007-01-28T02:13:00.000-08:002007-01-28T04:05:04.857-08:00Software Project Cost Management<hr /><br /><div style="text-align: center;">by<br />Francois Nadeau<br /><div style="text-align: left;"><hr /></div></div><br /><br /><table style="border-style: dotted; border-width: 1px; width: 100%; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><br /></td></tr><tr><td><a href="http://www2.blogger.com/post-edit.g?blogID=6190256010858253937&postID=1678842440285196210#chapter1">Description of Project Cost Management</a></td></tr><tr><td><a href="http://www2.blogger.com/post-edit.g?blogID=6190256010858253937&postID=1678842440285196210#chapter2">Cost Management's contribution to project management</a></td></tr><tr><td><a href="http://www2.blogger.com/post-edit.g?blogID=6190256010858253937&postID=1678842440285196210#chapter3">Cost Management Challenges</a></td></tr><tr><td><a href="http://www2.blogger.com/post-edit.g?blogID=6190256010858253937&postID=1678842440285196210#bibliography">Bibliography</a></td></tr></tbody></table><br /><br /><a name="chapter1"></a><h3> 1 Description of Project Cost Management</h3><br />Cost management is one of the three constraints on projects, and its primary concern is the financial management of a project. All of the activities in this process are part of one of the following four cost management processes, resource planning, cost estimating, cost budgeting, or cost control(Schwalbe 225).<br /><br />The processes which enable a project manager to estimate costs are used for planning and controlling costs. To complete these cost estimates, project managers may need to use information from the marketplace, commercial databases, cost estimating policies, cost estimating templates, historical information, project files, project team knowledge, and lessons learned(PMBOK 162). Furthermore, project managers may need to use expert opinions, project analogy, and disaggregation to properly estimate a project's cost(Cohn 54). Although not all of these processes need to be used for all projects, a combination of these techniques must be used in order to satisfy a project's financial needs.<br /><br />Once a project has been initiated, the project manager needs to continuously monitor and measure the project team's performance. Armed with this information, project managers can better predict the future outcome of a project, and therefore use these predictions when making business decisions. This data is also very important to the stakeholders since the quality of their decisions will depend on this data.<br /><br />The three project contraints of Time-Scope-Cost define the environment in which project's decisions must be made(Schwalbe 6). A project manager needs to balance the needs of the project's stakeholders by adjusting these constraints. For instance, a project manager may crash a project, which means that the overall project cost is increased in order to decrease the time required for delivering the project. Although this may mean that the project no longer falls within the original approved cost, an earlier project delivery may have financial benefits. For example, I have worked on a project were the customer asked us to deliver the project sooner then what had been planned. The reasoning behind such a decision by the customer was that the cost of crashing the project was lower then the cost of functioning without the product. Because of this, the customer was able to justify the higher project cost to his organization since it allowed them to save money elsewhere.<br /><br /><a name="chapter2"></a><h3>2 Cost Management's contribution to project management</h3><br />Cost management contributes to successful projects by making them financially viable. Through the various techniques of cost management, project managers show to the project's sponsor which project(s) they should invest into. To do this, project managers need to demonstrate that a project will generate an acceptable Return On Investment (ROI). However, the value generated by the project does not necessarily need to be only measured in a monetary terms, but can include other factors. For instance, projects undertaken by Green Peace do not measure the potential future income of the project, but instead tries to measure the impact that the project will have on the environment. Armed with these measurements, decision makers can decide which project should be started, continued, or cancelled.<br /><br /><h4>2.1 Resource Planning</h4><br />Resources need to be managed in order for an organization to be successful. Resources include physical items such as computers , and human entities such as employees. The use of any resource has an associated cost for the organization. For instance, employees are paid salaries and computers need to be either rented or purchased. Other costs such as cost depreciation, where an item's value decreases as time elapses, also need to be considered.<br /><br />Overhead costs is an other group of costs which are related to resources. These cost include the management of all resources, either performed by the human resource department or an inventory department. The sales and marketing departments are also overhead, since neither of them produce any goods which generates income for the organization. However, these departments are required by most modern organizations, since their effort are needed to attract customers for the products and services offered by the organization.<br /><br />An organization's head count is the number of employees which are currently employed by a company. Managers need to take this measurement into consideration when making decisions. For instance, an organization may refuse to begin a project which would require a too large percentage of their staff to complete. Reason for doing this can vary, but the management team may consider such undertaking as too risky since it does not allow the organization to be flexible. Critical mass is an other problem which managers need to monitor. This term refers to the minimal number of employees required to complete a project. For instance, an organization's customer may want to see a list of employees name and their skill sets in order to assure themselves that an organization has the capabilities to complete certain projects. In this manner, a company may not be able to layoff employees even if many of them are not currently needed, just to be able to pursue certain contracts. This can often be seen within companies which deal with military contracts, since these contracts can take a long time to be awarded and often require special conditions such as security clearances which may take years for an employee to receive. In such environment, companies which do not have the necessary number of qualified employees are unable to respond to project bids.<br /><br /><h4>2.2 Cost Estimating</h4><br />Project managers need to estimate the total and sub-component cost of projects in order to make correct business decisions. Just as the project with the best ROI needs to be chosen, the correct project tasks need to be worked on by the team. By doing this, it becomes possible for projects to successfully accomplish an appropriate ROI, without necessarily completing all of the tasks which were defined at the beginning of the project. For instance, most projects have features which must be implemented in order for the user to be able to use the system, while other requirements may not be needed or may have a low ROI. For example, the requirement that customers of an on-line banking system may login and check their bank account has a higher ROI value then the requirement that the bank managers can view a chart of how many persons have used the system in the past 30 days. Furthermore, the latter requirement has value only if the first requirement has been deployed, and the managers may be satisfied by getting a single number instead of a graph. Therefore, the project manager should complete the first requirement and then verify if the second requirement still fits the project stakeholders needs.<br /><br />To allow project managers to decide which projects should be worked on, a Rough Order of Magnitude (ROM) estimate needs to be created. This estimate, is compiled before the project is initiated, and is used by business decisions makers for selecting the projects which their teams should work on. Because these estimates are created prior to the start of the project, they normally have a great amount of uncertainty. Mike Cohn describes the range of the uncertainty at this level to be between -60% and 60% of the cost (Cohn 4), while the Project Management Institute (PMI) define this uncertainty to be between -25% and 75% of the project cost (Schwalbe 233).<br /><br />Mike Cohn states that there exist three methods to derive estimates. These methods are, expert opinion, analogy, and disaggregation (Cohn 54). The first one of these methods creates estimates by asking an expert's opinion as to how much such an activity would cost to complete. Experts are individuals who have a great deal of experience performing activities similar to the ones that the project manager is evaluating. Estimating by analogy is when each of the items to be estimated are compared to other similar artifacts which have already been created. In this manner, a manager tries to find some examples which are smaller then the activity to be estimated, and other examples which are bigger. These examples then become the range of the estimate. The last method, disaggregation, is when the manager breaks the activity to be estimated into smaller tasks, estimates all of them, and then assumes that the total cost will be the sum of all of these tasks. For example, this is what managers do when they create a Work Break Down (WBS).<br /><br /><h4>2.3 Cost Budgeting</h4><br />Project cost budgeting, just as departmental budgeting, is the analysis of the cost of operation over time. Activities such as the project's full-time equivalent (FTE), and ongoing costs such as rented and leased equipment needs to be considered. The budget needs to be set in order to allow the project to operate. Although cash flow analysis is considered part of cost estimating, this analysis is used for the purpose of budget allocation and projection. Basically, the manager needs to assign the right amount of resources to the project through out the project's life.<br /><br /><h4>2.4 Cost Control</h4><br />Once a project has been started, it is important for the project manager to control its cost and report any fluctuation to the stakeholders. To accomplish this, a project manager needs to measure a project's progress against compare this with the project's estimation.<br /><br />Earned value management (EVM) is a technique used to measure a project's performance(Schwalbe 242). This technique, compares how well a project is doing with its baseline which is the projected expected value. To accomplish this, a project manager needs to evaluate the value of the work that has been completed so far in the project. Once this value has been compiled it is than compared to the value that was expected to have been generated by that time.<br /><br />The planned value (PV) is one of the measurements used in the EVM(Schwalbe 243). This value is the estimated cost of a single item on the WBS. It is used when comparing the actual cost (AC) of the item, which is the recorded cost paid to complete the task. For example, if a WBS task was estimated to cost $100 but costed $200 to complete, then the PV for this item is $100 and the AC is $200.<br /><br />The earned value (EV) is an estimate of the value which was created by the work so far on the project(Schwalbe 244). This value is estimated by multiplying the PV of the WBS tasks which have had some work completed, with the percentage at which they have been completed. For example, if two WBS tasks have been started, and one has a PV of $100 and is 10% completed while the other has a PV of $200 and is 50% completed, then the EV is equal to 10% of $100 plus 50% of $200. That is, the EV is equal to $110, which represents the value which has been generated by the project so far. Interestingly, the EV calculation for projects which follow an agile development methodologies is calculated solely from tasks which have been delivered to the customer(Poppendieck 70). In other words, work can only have value if it has been delivered, and a company derives no EV from work which has been completed but not delivered.<br /><br />The cost variance (CV) of a project is a measurement of how close the project's actual budget is to the estimated budget(Schwalbe 245). This value is calculated by subtracting the AC from the EV. In this manner, a negative CV means that the project has used more money then was originally planned, while a positive value means that the project is spending less money then expected. However, this does not mean that the project is doing well or badly, since this only measures the current project cost with regards to the estimated cost. That is, a CV of -$10,000 simply means that the project has used ten thousand dollars more then was originally planned.<br /><br />Just like the CV, the schedule variance (SV) is a measurement of how well the project is progressing compared to what was originally planned(Schwalbe 245). However, unlike the CV, the SV is a measurement of the value that has been generated compared to the value that was expected to have been generated by this point in the project. That is, the SV measures whether or not the project is generating value at the same rate as what was projected at the beginning of the the project, while the CV measures whether or not the money spent on the project is generating value at the same rate as what was projected.<br /><br />The cost performance index (CPI) can be used to estimate what the cost to complete the project will be(Schwalbe 245). This value is calculated by dividing the EV by the AC. After calculating this ratio, a project manager can reestimate the total cost of the project by dividing the original cost estimate by the generated value. For example, lets assume that a project has an EV of $10,000, an AC of $20,000 and that the total cost is estimated to be $100,000. Then we can see that the CPI is equal to 0.5 and therefore the estimate at completion (EAC) for the project can be calculated to be $200,000 (this value is gotten by dividing $100,0000 by the CPI). This value, the project's EAC, represents the estimated cost for the project, and demonstrates the most probable total cost of the project by including the project's performance information.<br /><br />The schedule performance index (SPI) is a ratio between the project's EV and its PV(Schwalbe 245). While the CPI can be used to reevaluate the cost of a project, the SPI can be used to reevaluate the estimated completion date of the project. For example, if a project's EV is $1,000 and has a PV of $900, then the SPI value for this project is 1.11. This value means that the project is progressing 11% faster then originally planned, and therefore the estimated amount of time required to complete the project can be updated by shorting it by this difference.<br /><br /><a name="chapter3"></a><h3>3 Cost Management Challenges</h3><br />Without a doubt, cost management plays a large role in project management as it is represented in the the triple constraints, Scope-Cost-Time, of project management. Project managers need to pay close attention to a project's financial issues, and failure to do so may have dire consequences for an organization. Unfortunately, many difficulties can arise during the development of a project which often have effects on the cost of projects.<br /><br />The first and most important challenge faced by project managers is that developing cost estimates for a large software project is a very complex task and require a great deal of effort(Schwalbe 235). Mike Cohn even suggest that it is impossible to develop an accurate cost estimate at the beginning of the project. He further claims that, although 10% of estimating effort will give about 50% of the potential accuracy, working beyond this will yield small gains in accuracy or may even decrease the accuracy of the estimate(Cohn 50). Because of this problem, project managers must understand that projects which have been initiated do not have accurate cost estimate, and therefore will not be adequately budgeted and will require adjustment.<br /><br />An other significant problem when estimating the cost of projects is that project manager don't always have enough historical data and skill to properly estimate the cost of projects. This means that project managers which try to estimate project cost by analogy will not be able to create accurate estimates. These in turn will cause problems for the project once it has started.<br /><br />Many of the cost estimation problems are due to the fact that humans are biased towards underestimation(Schwalbe 236). This tendency means that estimations created by both the project managers and experts must be viewed as being in the range of -25% to +75%. That is, an estimate of $100 means that the cost will most likely be between $75 and $175.<br /><br />Even though there are many difficulties in creating cost estimations, this activity still needs to be completed to allow management to make successful business decisions(Schwalbe 236). By looking at the best and worst scenarios for each of the project proposals, managers can evaluate which projects better support the company's strategic goals, and which can be supported by the company. For this reason, cost management is essential to a company's functioning. Continuously estimating the work left to be completed once a project has started, may also remove unpleasant surprises for the project manager since it has been shown that estimation uncertainty decreases as the project progresses(Cohn 4).<br /><br />A companies head count can create interesting challenges for a project manager. For instance, although it has been shown that employees performance decreases as they are asked to multi-task between multiple projects(Cohn 15), the impact of this problem is difficult to evaluate on a project's schedule. Furthermore, employees may be required to perform other duties due to events outside of the project's scope, which may also be outside of the project manager's influence.<br /><br /><a name="bibliography"></a><h3>Bibliography</h3><br />Schwalbe, Kathy. Information Technology Project Management.<br /> Course Technology,2004.<br />Cohn, Mike. Agile Estimating and Planning. Pearson Education Inc,<br /> 2006.<br />PMBOK Guide - Third Edition v1.2 CD-ROM.<br /> Project Management Institute, 2004.<br />Poppendieck, Mary, Tom Poppendieck. Lean Software Development. <br /> Addison-Wesley, 2003.Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-75040812313669057722007-01-28T02:12:00.000-08:002007-01-28T04:02:09.968-08:00Towards a Service Oriented Software Industry<hr /><br /><div style="text-align: center;">by<br />Francois Nadeau<br /><div style="text-align: left;"><hr /><br /><ul><span style="font-weight: bold;">Abstract:</span><br />This report predicts that the software industry will not be able to continue using a Product Oriented business model, and will be forced towards business models which are Service Oriented. It concludes that although the Product Oriented business model for the software industry will still be lucrative, this model will not be sustainable in the long term, and the opportunities for applying it will diminish as the software industry matures.<br /></ul><hr /></div></div><br /><table style="width: 100%; border-style: dotted; border-width: 1px; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><tr><td><a href="#chapter1">Chapter 1: Introduction</a></td></tr><tr><td><a href="#chapter2">Chapter 2: Background</a></td></tr><tr><td><a href="#chapter3">Chapter 3: Discussion</a></td></tr><tr><td><a href="#chapter4">Chapter 4: Conclusion</a></td></tr><tr><td><a href="#chapter5">Chpater 5: Recommendations</a></td></tr><tr><td><a href="#bibliography">Bibliography</a></td></tr></tbody></table><br /><br /><a name="chapter1"></a><h3>Introduction</h3><br />This report is a prediction that business models followed by software companies will become predominantly service oriented. <br /><br />Current business models used by software companies can be grouped into three categories; Product Oriented (PO), Service Oriented (SO), and Hybrid Oriented (HO)[1]. <br /><br />Companies which follow the PO business model generate most of their income by selling software licenses. Licenses involve a onetime payment from the client for a packaged software solution. This model is based on the one used by companies which sell physical objects such as televisions, cars, and radios. A good example of a software PO company is Microsoft with its Windows Operating system[1].<br /><br />SO companies generate income by selling software services. These companies create, integrate, upgrade, or manage software for a client. Typically SO companies create unique solutions for their clients for specific needs, and normally these solutions cannot be packaged and sold "as is" to another client[1]. PriceWaterhouseCoopers is a good example of an SO company since most of its revenues are derived by services such as IT services, outsourcing, and consulting[2].<br /><br />HO companies generate their income from both products and services. Many PO companies become HO over time. For example, in 1993, 80% of Business Objects revenues were derived form its products versus 55% in 2002[1]. The rest of the revenues for Business Objects came from services. That is, although Business Objects was a PO company in 1993, it had become an HO company by 2002. <br /><br />I believe that as the software industry matures, companies will no longer be able to use a PO model. The discussion section of this report elaborates on the reasoning behind such a prediction. <br /><br /><a name="chapter2"></a><h3>Background</h3><br />Up to the 1980s, software was considered a public property. Software developers freely shared their code with each other in the same manner that academic research is shared in the public domain. However, in the 1980s, commercial companies started hiring programmers to create commercial proprietary software, and this caused a change in attitude[3]. <br /><br />In the beginning, the business community believed that software was a magical product. The inexpensive cost of reproducing software caused this belief, since large Return On Investment (ROI) could be acquired by selling multiple copies of the same software product. However, cheap reproduction cost also created a large problem, since customers could also reproduce the software very easily[3].<br /><br />Nevertheless, the software industry became awash with companies selling copies of prepackaged software. This created fierce competition between the software providers, and forced them to both invest in enhancement for their products, and lower their prices. At the same time, the computer user base increased drastically due to the introduction of Personal Computers (PC). Due to these market factors, the software industry has separated into two communities: platform leaders and platform complementers. Platform leaders are the base system onto which platform complementers create their products[4]. For example, Norton's AntiVirus is a complementer for the Microsoft's Windows platform. <br /><br />During this time of computer use expansion, the software industry had to struggle with "software piracy". This term refers to the use of commercial software without payment of the licensing fees. For example, it was estimated that in 2003, companies in the United States were deprived of 6.5 billion USD due to unpaid licensing fees[5]. <br /><br />The increased use of the Internet has greatly eroded the capability of PO companies to protect their products from being illegally copied. The Internet has done this by providing a medium from which software can be copied more easily then previously. Before the Internet, software had to be physically transferred by disk or other external devices, which greatly limited the radius of exposure. <br /><br />Although most of the media focus for the past twenty years has been on the innovative contributions from the private sector, the public sector has also made great contributions to the software industry. One of the most famous public sector contributions is the Open Source movement. For example, this report was created with an Open Source software named OpenOffice which is a freely available office tool. I did not have to pay any license fees for using it.<br /><br /><a name="chapter3"></a><h3>Discussion</h3><br />The research for this report was done by examining the Appendix section of Michael Cusumano's book The Business of Software, and by searching for historical events, examples, and definitions from the Internet. Although the cited book does not contain the prediction stated in this report, its author does describe changes in the business models used by large software companies in the past twenty years. <br /><br />The PO business model used by software companies is the same model used by companies which sell physical objects. This model functions well when selling physical objects, since these products have a reproduction cost. For example, an individual can copy the design and functionality of a toaster, and consequently construct their own instead of buying one. However, most persons would purchase this item, since the cost of the labor and material required to reproduce it is greater then the cost of the object at the store.<br /><br />Unlike physical objects, software does not cost anything to reproduce. That is, software companies which pursue a PO business strategy do not incur any cost for software reproduction. This creates an imbalance in the traditional PO system, and companies which use this model need to take measures to protect their interests. Some of these measures include the creation and enforcement of copyrights and Intellectual Property (IP) laws[6]. <br /><br />Copyright laws are legal restrictions placed on products. Their purpose is to protect materials which do not have a great reproduction cost from being imported, exported, modified, displayed, or sold without the originators' authorization. In most cases, it is the responsibility of the copyright holder to protect himself against violations[7].<br /><br />The legal term IP refers to rights granted to an individual to exclusively exploit an original idea. These laws treat intellectual work in the same manner as physical property. That is, just as a person can claim exclusive rights to property such as farm land, a person can also claim exclusive rights to ideas. Internationally, IP rights are protected by trade agreements between countries, and are championed by institutions such as the World Trade Organisation (WTO)[8].<br /><br />Another measure used by software producers is to cripple the software product so that the end user must either complete an online registration, enter a software license number, or use hardware modifications to be able to use the software. For example, AutoCAD's license lock is a small device which must be connected to the parallel or USB port in order to enable use of the software[9].<br /><br />Many PO companies such as Microsoft claim that the software industry could not function without these artificial mechanisms[10]. However, these mechanisms cost a great deal to use. For example, the cost of policing their userbase to make sure that all licenses are paid for, legal costs such as lawyers for suing unlicensed users, and development costs for code which impairs nonpaying customer from using the software. Although no added value for the endusers is generated by the use of these mechanisms, the cost of these measures is included in the license price paid by the end users. <br /><br />Software PO companies claim that the cost of software development can only be fully recovered from software sales. Although there is no proof for this claim, it has often been used to defend the PO model. Interestingly, there exist companies, such as MySQL, which do not charge any fees for the use of their software.<br /><br />MySQL commercial products are exclusively funded by revenues from support, training, certification, consulting, commercial licensing, and partnering. This means that MySQL's flagship product, the MySQL database, can be used by most people without paying any licensing fees[11]. Users are only required to purchases a licence if they want to modify the database source code without releasing the modifications under the GPL license. MySQL does not currently have as many features as Oracle, the current database leader, but many of Oracle's customers are switching to MySQL to avoid licensing fees[12].<br /><br />Support for the PO model can be found with people who believe that IP laws are required to create innovative technologies[10]. This belief is based on the assumption that inventors only share their discoveries if they stand to gain financially. By applying the behavioristic conditioning theory, it is possible to shown that the same result could be reached if inventors valued social recognition more than material gains. However, a full discussion of such an argument is not within the scope of this report.<br /><br />Another aspect of the protection of software licenses can be seen when comparing third-world countries with developed countries. The majority of software companies which use the PO business model are found in developed countries. This can be explained by the fact that developed countries have had exclusive access to the technology required to make and use software. As software becomes a requirement for countries entering the global economy, some countries are attacking the PO model. For example, the Peruvian government recently passed a legal bill requiring all state departments to use open source software exclusively[13]. The successful passing of this bill means that only companies following an SO business model can supply software to the government of Peru. <br /><br /><a name="chapter4"></a><h3>Conclusions</h3><br />Although some companies which follow a PO business model are trying to keep this model viable, I believe that it is not possible for the software industry to maintain this model. My belief is based on the costs of maintaining the PO system functional, and the fact that the software niches are decreasing as the software industry is maturing. I believe that the PO business model functioned for the past twenty years only because the industry was in its infancy. <br /><br />In the past, software prices have continuously decreased in response to competition. Assuming that this trend continues, software companies will eventually be forced to give away their software for free. Once this happens, companies which use a PO model will be required to start using an SO model. For example, the pressures felt by Oracle from MySQL, which was mentioned earlier in this report, are cause by Oracle licensing fees. Since Oracle has better features and a greater market share than MySQL, it could be possible for Oracle to eliminate the threat caused by MySQL by changing their business model to an SO model; that is, to provide Oracle for free to its customer base. I also believe that Oracle will have to do this in order to survive in the future. <br /><br />An interesting aspect of the Peruvian open source bill, cited earlier in this report, is that the government officials felt that the bill was needed. A Peruvian congressman stated two reasons for this in an open letter. The first is that the Peruvian government believes that the general public must be able to access all public information. Proprietary software does not allow this to occur, since it traditionally stores information in its own formats, which are not publicly open. The second reason for the bill is the fear that since each of the public department functions as an independent unit, it would be possible for some of these departments to accidentally purchase proprietary software, and hence inhibit the public access to their data[13]. <br /><br />Further research should analyze the current educational programs for IS professionals. I think that a great deal of resources are currently being used to train future knowledge workers without giving them proper humanistic skills. I believe that this will be a serious handicap for workers in an SO model.<br /><br /><a name="chapter5"></a><h3>Recommendations</h3><br />Software specialists wanting to stay in the IS industry need to adapt to changes in business model. The SO business model requires professionals who are capable of learning new technologies <br />quickly, and are able to adapt and function in an environment which is continuously evolving. Furthermore, the SO model does not generate the same level of ROI as the PO model. Because of this, compensations paid to software developers in developed countries will decrease as the model changes. <br /><br />As the software industry matures, opportunities for using the PO model will still be present. However, these opportunities will only be available for a short period of time, as competitors quickly form after new niches are created. Companies should calculate the rate at which they can convert from a PO to an SO model to maximize their profits. For instance, to evade competition, or to fully establish themselves as the global platform, Microsoft may want to offer its Windows <br />product free of charge. This would be the same strategy that it used when it started offering its Internet Explorer product free of charge. <br /><br />Software companies should focus on creating software teams that are employable in an SO model. Although such teams will need to have technological prowess, soft skills such as teamwork and communication also need to be valued. <br /><br /><a name="bibliography"></a><h3>Bibliography</h3><br />[1] M. Cusumano, The Business of Software, Free Press, 2004, pp 2585.<br />[2] M. Cusumano, The Business of Software, Free Press, 2004, pp 291.<br />[3] "A Brief History of Free/Open Source Software Movement", [Online document], Available at <br />HTTP: <a href="http://www.openknowledge.org/writing/opensource//scb/briefopensourcehistory.html">http://www.openknowledge.org/writing/opensource//scb/briefopensourcehistory.html</a><br />[4] M. Cusumano, The Business of Software, Free Press, 2004, pp. 7518.<br />[5] "Software piracy losses 2003, by selected countries", [Online document], Available at HTTP: <br /><a href="http://www.aic.gov.au/topics/cybercrime//stats/softwarePiracyLosses_2003.html">http://www.aic.gov.au/topics/cybercrime//stats/softwarePiracyLosses_2003.html</a><br />[6] J. Soderberg, "Copyleft vs. Copyright A Marxist Critique", [Online document], Available at <br />HTTP: <a href="http://www.firstmonday.org/issues//issue7_3/soderberg">http://www.firstmonday.org/issues//issue7_3/soderberg</a><br />[7] Wikipedia, "Copyright", [Online document], Available at HTTP: <br /><a href="http://en.wikipedia.org/wiki/Copyright">http://en.wikipedia.org/wiki/Copyright</a><br />[8] Wikipedia, "Intellectual property", [Online document], Available at HTTP: <br /><a href="http://en.wikipedia.org/wiki/Intellectual_property">http://en.wikipedia.org/wiki/Intellectual_property</a><br />[9] "AutoCAD 2002 and AutoCAD LT2002 Software Locking Q&A", [Online document], <br />Available at HTTP: <a href="http://www.tovna.com/main/softlock.htm">http://www.tovna.com/main/softlock.htm</a><br />[10] C.Mundie, "The Commercial Software Model and Sustainable Innovation", May, 2001[Online <br />document], Available at HTTP: <br /><a href="http://www.microsoft.com/resources//sharedsource/Initiative/speeches/mundie_model.mspx">http://www.microsoft.com/resources//sharedsource/Initiative/speeches/mundie_model.mspx</a><br />[11] "The Business Model and Services of MySQL AB", [Online document], Available at HTTP: <br /><a href="http://mysqld.activeventure.com//MySQL_AB_business_model_and_services.html">http://mysqld.activeventure.com//MySQL_AB_business_model_and_services.html</a><br />[12] "Oracle attracting MySQL users", [Online document], Available at HTTP: <br /><a href="http://www.infoworld.com/article/04/09//23/HNormysql_1.html">http://www.infoworld.com/article/04/09//23/HNormysql_1.html</a><br />[13] "Peruvian Congressman refutes Microsoft's "Fear, Uncertainty and Doubt"", [Online <br />document], Available at HTTP: <a href="http://www.opensource.org/docs/peru_and_ms.php">http://www.opensource.org/docs/peru_and_ms.php</a>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-27751412602250413082007-01-28T02:09:00.000-08:002007-01-28T04:28:40.550-08:00Tsunami Warning System and their Information Systems<hr /><br /><div style="text-align: center;">by<br />Francois Nadeau<br /><div style="text-align: left;"><hr /><br /><ul><span style="font-weight: bold;">Abstract:</span><br />This report describes some of the methods used by Tsunami Warning Systems (TWS) Information Systems (IS) to detect and warn coastal population of threats caused by Tsunamis. The report concludes that TWS have high detection capabilities.</ul><hr /></div></div><br /><br /><table style="border-style: dotted; border-width: 1px; width: 100%; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><br /></td></tr><tr><td><a href="#chapter1">Chapter 1: Introduction</a></td></tr><tr><td><a href="#chapter2">Chapter 2: Background</a></td></tr><tr><td><a href="#chapter3">Chapter 3: Discussion</a></td></tr><tr><td><a href="#chapter4">Chapter 4: Conclusion</a></td></tr><tr><td><a href="#chapter5">Chpater 5: Recommendations</a></td></tr><tr><td><a href="#bibliography">Bibliography</a></td></tr></tbody></table><br /><br /><a name="chapter1"></a><h3>Introduction</h3><br />This report describes some of the Information Systems (IS) used for detecting tsunamis, and warning coastal populations. Its purpose is to better understand the characteristics of tsunami Warning Systems (TWS) IS.<br /><br />Tsunamis are large waves generated in oceans or lakes when a large amount of water is suddenly displaced. Common causes for this phenomenon are "earthquakes, landslides, volcanic eruptions and large meteorite impacts"[1].<br /><br />Tsunamis create three challenges for coastal communities. The first challenge is the survival of the tsunami waves. For instance, it has been reported that 174,452 persons died during the 2004 Indian Ocean tsunami[2]. The second challenge is the economical difficulties created by the destruction. This includes financial difficulties such as the cost of rebuilding commercial companies, social infrastructures, individual homes, and feeding and sheltering the survivors. The third challenge is of an ecological nature. It includes the damage to vegetation and forest due to the force of the tsunami, chemical contamination due to commercial leakage, and salt contamination of farm land by sea water displaced during the tsunami. In the case of the 2004 Indian Ocean tsunami, it is expected that these challenges will take years to solve, and that the local inhabitants will have to endure a great deal of hardship[2].<br /><br />To eliminate the first threat caused by tsunamis, several governments have established TWS to warn coastal populations[3][4]. Due to the nature of tsunamis, there currently exist very few methods to prevent economic and ecological damages. The methods used by TWS to warn the population are further explored in the discussion section of this paper.<br /><br /><a name="chapter2"></a><h3>Background</h3><br />Approximately 85% of tsunamis occur in the Pacific Ocean[5]. These tsunamis are most often caused by the "Ring of Fire", which is a circle-like array of active volcanoes in the Pacific ocean. Other coastal areas in the world which have been affected in the past include East Europe, Eastern Canada, South America, and the Mediterranean[1].<br /><br />Although tsunamis can be devastating, they are not a common natural disaster. The National Geophysical Data Center has a tsunami Event Database which lists all recorded tsunamis from 2000 BC to the present day. As of the writing of this paper, this database system has 2399 entries for the entire world[6]. This represents an average of 0.6 Tsunami per year in the world since 2000 BC. <br /><br />Prior to the development of TWS, tsunami detection relied on the observation of symptoms, and the ability of the observer to properly evaluate the risk. Such symptoms included earthquakes, receding water, and frothing bubbles on the water's horizon[2]. However, there have been occurrences when the symptoms where either not detectable, or left uninterpreted by the coastal population. For example, Alaska's Aleutian Earthquake of April 1, 1946, occurred too far away to be felt by the population of Hawaii, though a tsunami caused by it devastated its coastal community.<br /><br />The 1946 Aleutian tsunami, mentioned above, forced the authorities to reevaluate the means used to detect tsunamis. From this initiative, the Pacific tsunami Warning Center (PTWC) was born in 1949 in Hawaii[7], and the West Coast/Alaska tsunami Warning Center (WC/ATWC) was established in 1967 in Alaska[8]. Both of these TWS have had success in warning the Pacific population of tsunami threats.<br /><br />Up to now, the establishment and maintenance of TWS have been a governmental responsibility. Although some commercial companies produce products for TWS, this writer was unable to find instances of privately owned TWS.<br /><br /><a name="chapter3"></a><h3>Discussion – Tsunami Warning System Information Systems</h3><br />Two different difficulties exist for a TWS to warn a coastal population of an approaching tsunami. The first is the detection of the tsunami, and the second is the communication or broadcasting of the approaching danger. Although these two challenges are not related to each other, both have to be accomplished quickly in order for the TWS to help the population. For example, the PTWC detected the earthquake which caused the 2004 Indian Ocean tsunami, and issued a communication 15 minutes later stating that there was no tsunami threat in the Pacific region, but that a tsunami near the epicenter of the earthquake was expected. Since the PTWC did not have an established communication channel to send this information to the affected countries,<br />warnings where not sent to the soon-to-be-affected coastal populations[9].<br /><br /><h4>IIIA. Detection mechanisms</h4><br />TWSs detect and monitor earthquakes with seismic devices to predict tsunamis. By recording the location and strength of earthquakes, experts at TWSs are able to evaluate the possibility of a threat caused by such events. For example, the PTWC issues a tsunami warning for earthquakes with a magnitude of 7.5 (Richter<br />scale) or greater within the Pacific basin region[7]. Instruments to detect tsunamis are used to evaluate threats from earthquakes which may not have been noticed, and to confirm predictions which were made with seismic devices. The most common methods are the Tide Gauges, Satellites, and the Deep-ocean Assessment and Reporting of Tsunamis (DART) system[10].<br />• The Tide Gauge is a device used to measure the height of the sea-surface. This device functions by sending a sound pulse inside a tube which has been inserted into the water. By measuring the time required for the sound pulse to return to it's originating location, scientist can monitor the height of a body of water within a 1mm accuracy.[10]<br />• Satellites can also be used to measure the height of the sea-surface. By sending electro-magnetic pulses down to earth from a satellite, and measuring the amount of time required for the pulse to return to the satellite, scientists can calculate an ocean's water height. Once this calculation has been completed, it is compared with pre-recorded ocean height. For example, during the 2004 Indian Ocean tsunami, the Jason satellite recorded water level variations between -40 cm to +50cm of their normal levels. However, the use of satellites in this manner has a major drawback, as a satellite needs to be located above a tsunami while it is occurring, which is not very common. For instance, the Jason satellite pases over the Indian Ocean approximately once a month[10].<br />• The DART system consists of an underwater pressure recorder, and a surface buoy. The pressure recorder is attached to the seabed, and communicates to the buoy by sonar. The buoy sends the information received by the pressure recorder to a TWS via satellite. Thanks to this mechanism,tsunamis can be detected and measured through the calculation of changes in water pressure reported by the system. Currently the buoy and pressure recorder are replaced once a year and every two years, respectively[10]. Each DART unit costs approximately 300,000 USD per month to operate[11].<br /><br />TWS ISs merge the data received from each devices, and create information such as the areas which will be affected, the strength of the tsunami at each of the locations, and the amount of time before the waves reach the areas. <br /><br /><h4>IIIB. Warning mechanisms</h4><br />Once the TWS has evaluated a tsunami threat, various methods are used to notify the areas which will be affected. These methods include radio, commercial television, the Internet, National Guards, and telephone systems[7]. The TWS IS can facilitate the notification mechanism for each of the broadcasting methods. For example, the PTWC has an on-line web-page used to display the latest warning information.<br /><br /><h4>IIIC. Current TWS IS</h4><br />A TWS is a linked network of detection stations. For instance, the PTWC has over 150 seismic stations and about 100 sea-level analyzing devices throughout the world[12]. The IS connecting these stations and the main control center uses various communication mechanisms such as satellite communication and radio waves[10].<br /><br /><h4>IIID. Special requirements for TWS IS</h4><br />This writer was not able to find any information specifying the requiremnets of TWS ISs. However, he feels that, due to the devastating nature of tsunamis, TWS ISs need to have a level of reliability which would allow them to function even during natural disasters. Furthermore, TWS ISs need to function year-round,<br />since tsunamis may occur at any time. <br /><br /><h4>IIIE. Similarity between TWS ISs and commercial ISs</h4><br />Ironically, unlike many commercial ISs, TWS IS do not need to be outfitted with the latest and most powerful computer systems. While calculating the specific information about a tsunami is a task which needs to be completed quickly, the bottleneck for the calculation is the detection devices, not the computers. Therefore, having computers which run faster does not provide any additional value to the IS.<br /><br />Companies such as Japan Radio Co. offer products for the Japanese market for broadcasting emergency messages such as tsunamis[13]. These products are sold to towns or regions who want a greater level of security for their citizens. Although these ISs serve the same purpose as TWSs, their role is only to broadcast messages, not evaluate threats. These products complete this task by retrieving weather information from the Geostationary Meteorological Satellite, which is a series of government-sponsored satellites used to monitor the earth's weather[14].<br /><br /><a name="chapter4"></a><h3>IV Conclusions</h3><br />Various devices for preventing the loss of death caused by tsunamis are now being used by coastal regions throughout the world. However, as it was seen in 2004, areas such as the Indian ocean are still lacking adequate TWSs. Although reasons such as tsunami infrequency in that region have been used to explain such a deficit, this maybe one effect of the economical difference between thirdworld and developed countries.<br /><br />Further research on the possibility of integrating all of the TWS with coastal communities in the third world should be carried out.<br /><br /><a name="chapter5"></a><h3>V Recommendation(s)</h3><br />Future TWSs should be constructed in cooperation with TWSs that have already been constructed, and communication channels should be created between these. This would allow each additional TWS to share its findings with the rest of the network, and would thereby increase its operational capabilities. <br /><br />An international standard for communicating tsunami warnings should be developed, and the current TWSs should broadcast all known information with this standard. For instance, it may be possible to create Internet client programs capable of warning coastal communities of a tsunami threat.<br /><br /><a name="bibliography"></a><h3>Bibliography</h3><br />[1] Wikipedia, "Tsunami", [Online document], Available at HTTP:<br /><a href="http://en.wikipedia.org/wiki/Tsunami">http://en.wikipedia.org/wiki/Tsunami</a><br />[2] Wikipedia, "2004 Indian Ocean earthquake", [Online document], Available at HTTP:<br /><a href="http://en.wikipedia.org/wiki/2004_Indian_Ocean_earthquake">http://en.wikipedia.org/wiki/2004_Indian_Ocean_earthquake</a><br />[3] P. Anderson, and G.Gow, "Tsunamis and Coastal Communities in British Columbia," pp.iii, 2004.<br />[4] "Tsunamis", [Online document], Available at HTTP: <a href="http://www.noaa.gov/tsunamis.html">http://www.noaa.gov/tsunamis.html</a><br />[5] J. Perce, "Tsunami warning systems", [Online document], Available at HTTP:<br /><a href="http://www.oceansatlas.org/servlet/CDSServlet?status=ND0xMjc2MC4xODIwOSY2PWVuJjMzPXdlYi1zaXRlcyYzNz1pbmZv">http://www.oceansatlas.org/servlet/CDSServlet?status=ND0xMjc2MC4xODIwOSY2PWVuJjMzPXdlYi1zaXRlcyYzNz1pbmZv</a><br />[6] "NGDC Tsunami Event Database", [Online document], Available at HTTP:<br /><a href="http://www.ngdc.noaa.gov/seg/hazard/tsevsrch_idb.shtml">http://www.ngdc.noaa.gov/seg/hazard/tsevsrch_idb.shtml</a><br />[7] "About The Pacific Tsunami Warning Center", [Online document], Available at HTTP:<br /><a href="http://www.prh.noaa.gov/ptwc/aboutptwc.htm">http://www.prh.noaa.gov/ptwc/aboutptwc.htm</a><br />[8] "History of the WC/ATWC", [Online document], Available at HTTP:<br /><a href="http://wcatwc.arh.noaa.gov/thewcatwc/history.htm">http://wcatwc.arh.noaa.gov/thewcatwc/history.htm</a><br />[9] "Scientific Background on the Indian Ocean Earthquake and Tsunami", [Online document],<br />Available at HTTP: <a href="http://iri.columbia.edu/~lareef/tsunami/">http://iri.columbia.edu/~lareef/tsunami/</a><br />[10] "Tsunami Information", [Online document], Available at HTTP:<br /><a href="http://www.bom.gov.au/info/tsunami/tsunami_info.html">http://www.bom.gov.au/info/tsunami/tsunami_info.html</a><br />[11] "Indonesia concerned about cost of tsunami warning system", [Online document], Available at<br />HTTP: <a href="http://english.people.com.cn/200503/19/eng20050319_177471.html">http://english.people.com.cn/200503/19/eng20050319_177471.html</a><br />[12] "Pacific Tsunami Warning Center", [Online document], Available at HTTP:<br /><a href="http://ioc3.unesco.org/itic/categories.php?category_no=192">http://ioc3.unesco.org/itic/categories.php?category_no=192</a><br />[13] "EARTHQUAKE and TSUNAMI INFORMATION RECEIVING and WARNING SYSTEM",<br />[Online document], Available at HTTP: <a href="http://www.jrc.co.jp/eng/product/system/tsunami.html">http://www.jrc.co.jp/eng/product/system/tsunami.html</a><br />[14] "Geostationary Meteorological Satellite Program Platform Document", [Online document],<br />Available at HTTP: <a href="http://ghrc.msfc.nasa.gov:5721/source_documents//gms_source.html">http://ghrc.msfc.nasa.gov:5721/source_documents//gms_source.html</a>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0tag:blogger.com,1999:blog-6190256010858253937.post-25105904450769929492007-01-28T00:18:00.000-08:002007-01-28T02:08:47.584-08:00The Role of Outsourcing in Information System Integration<hr /><br /><div style="text-align: center;">by<br />Francois Nadeau<br /><div style="text-align: left;"><hr /><br /><ul><span style="font-weight: bold;">Abstract:</span><br />This report describes some of the methods used to integrate outsourced Information Technology (IT) resources within an Information System (IS). The report concludes that as the outsourcing of IT resources shall continue to occur in the future, IS professionals need to be able to understand the mechanisms and effects of outsourcing IT resources.</ul><hr /></div></div><table style="width: 100%; border-style: dotted; border-width: 1px; text-align: left;color:lightgray;"><tbody><tr align="center"><td><span style="font-size:130%;">Table of Content</span></td></tr><tr><td><tr><td><a href="#chapter1">Chapter 1: Introduction</a></td></tr><tr><td><a href="#chapter2">Chapter 2: Background</a></td></tr><tr><td><a href="#chapter3">Chapter 3: Discussion</a></td></tr><tr><td><a href="#chapter4">Chapter 4: Conclusion</a></td></tr><tr><td><a href="#chapter5">Chpater 5: Recommendations</a></td></tr><tr><td><a href="#bibliography">Bibliography</a></td></tr></tbody></table><br /><br /><a name="chapter1"></a><h4>Introduction: Integrating Outsourced Information Technology Resources</h4><br />Outsourcing is a business decision in which some of the work required to be performed by a company is given to a third-party organisation[1]. The primary motivation for a company to outsource some of its work is to decrease its operational cost, as lower cost creates a competitive advantage[2,3].<br /><br />A company's Information Technology (IT) resources, both outsourced and internally staffed, need to be integrated into the Information System (IS) to maximize the company's return on investment[4]. This is because resources which have not been integrated will not add to a company's product value, and hence will not be able to increase sale revenues. It is important to note the difference between a company's product value and a company's value. The former refers to the perceived value of a product by its purchasers. The latter refers to the "book value" or actual value of a company[5]. That is, although a product which is not available to a company's clients (i.e., a non-integrated resource) has value to the company, it does not have any value for the clients.<br /><br />This report describes some of the methods which are used to integrate outsourced IT resources into an information system. Its purpose is to better understand what is required for an organisation to successfully integrate outsourced resources. <br /><br /><br /><a name="chapter2"></a><h4>Background: Outsourcing and information system integration</h4><br />A company's IS functions can be outsourced in two different ways. The first method is to subcontract a third-party company to be responsible for a specific business section of its operations[6]. For example this method has been used to outsource IT help desk functionalities and software development[7]. The second method requires the company to remain responsible for the section and contract a third-party company to provide the workers who will perform the work[6]. This method can be compared to the staffing industry, in which a worker's salary is not paid by the company which utilizes his skills but by the staffing agency.<br /><br />Before choosing an outsourcing method, the individuals responsible for the IS need to evaluate the advantages and disadvantages of outsourcing. Although the advantages of outsourcing are often identified uniquely as financial ones[2], the disadvantages of outsourcing can affect a company's long-term financial prospect[8].<br /><br />Regardless of the method pursued by a company which has decided to outsource some of its resources, the IS integration of outsourced IT resources can be a complex and difficult task. In the past, companies which have attempted to complete this task have had both successes and failures which have elevated or hurt them. Because of this, understanding how to integrate outsourced IT resources into an IS has become an important skill for IS professionals[9].<br /><br /><a name="chapter3"></a><h4>Discussion, analysis: Successful outsourcing practices</h4><br />Outsourcing successes have occurred in companies which took an active role in the project before, during and after its implementation.<br /><br />III.A. Before outsourcing : Companies need to do some planning<br />Before deciding to outsource an IT resource, a company needs to carefully research the effects of such a decision. Although the problems regarding outsourcing only surface once the outsourced project has begun, solving these problems before they occur is often more profitable than waiting for them to occur[10]. The following are some points to be taken into account before deciding to outsource:<br /> A.Internal issues<br /> A.1. Level of support and understanding for the outsourcing decision by the internal staff[10]<br /> A.2. The ability of the internal project managers[10]<br /> A.3. Long term business goals[10]<br /> B.Quality issues<br /> B.1. Culture issues between the company and the outsourcing agent[10]<br /> B.2. Contractual considerations[12]<br /><br />III.A.1. Internal issues<br />A company's internal staff can successfully derail a project which would otherwise have been successful if they feel the need to do so[10]. This unwanted side-effect has been explained as a response to a perceived threat to the employees' employment security[8]. Because of this, decision makers who are considering the outsourcing of some resources should evaluate the impact that this decision would have on their staff[10]. Furthermore, the internal staff should be made to understand the business rationale for outsourcing[13]. <br /><br />Overseeing an outsourced project takes skilled and dedicated managers[11]. A realistic evaluation of the key management individuals who shall be involved in the project must be completed before deciding to outsource. Should the result of the evaluation be negative, proper steps should be taken by the company to find and retain skilled managers for the duration of the outsourced project[11]. <br /><br />A company's long-term business goals could also be considered before making an outsourcing decision. This problem encapsulates a great number of issues which will be different for all companies. For example, outsourcing can be used to build economic relationships with the country in which the outsourcing company is located[12].<br /><br />III.A.2 Quality issues<br />For the past few years, many companies have followed a trend of outsourcing to companies located in other countries than their own[1]. Unexpected side-effects due to cultural difference such as one company's open willingness to experiment and an outsourcing company's unwillingness to stray from guidelines have occurred[11]. Due to the non-technical nature of such problems, forecasting and resolving these issues can be costly[10]. <br /><br />There exist various contractual solutions to safeguard the quality of the work performed by the outsourcing company. These include testing a potential company with smaller projects before starting on a bigger task[11], requiring that the outsourced company conforms to established standards and methodologies[10], relocating an internal staff member to the outsourcing company[8], establishing penalties for not meeting deadlines[12], creating a detailed specification document for the work to be completed[12], and allowing the contract to be adjustable so that changing business needs can be meet[15].<br /><br />III.B During outsourcing : Companies need to be actively working with the outsourcing agent<br />Effective communication between the company and the outsourcing staff must be maintained during the outsourcing activity[10]. Many companies, such as Cendant, have had negative outsourcing experiences due to communication failures[15]. To avoid such problems, a communication method needs to be established[15]. This communication method should include a mechanism for resolving conflicts[12]. Furthermore, the project manager must make sure that all communications are well-documented, easily accessible[10], and based on facts, not employees' emotions[15].<br /><br />Outsourcing companies have gained a reputation for having a high staff turnover, which may affect a company's project[10]. To minimize the risk created by such events, project managers should take steps to assure that key personnel in the outsourcing company will be involved for the duration of the project[12].<br />III.C After outsourcing : Companies must think about security and possible competition<br />Once an outsourced project has been completed, the outsourced team which completed the work will not necessarily share the company's business needs. For example, subsequent projects cannot assume the outsourcing team will be building on the knowledge that was acquired during the previous project, since the outsourcing company may provide a team with different members for future projects[16]. Competitive advantage is an other concern, since the business knowledge which was acquired during the project could be harnessed by the outsourcing company to directly compete against the company or to be sold to the company's competitors[17]. <br /><br />Some side-effects of outsourcing are difficult to predict. For instance, there has been a case of an employee committing suicide after being replaced by an outsourced employee[13]. Although the method for calculating business success does not have any penalties for such events, backlash from the public or government can occur[19]. These inconveniences may have negative effects on a company's public image and may in turn affect the company's profits[14]. <br /><br />III.D Further Research Areas<br />Although a lot of research has documented the short-term benefits of outsourcing IT resources, few have documented the long-term effects of outsourcing. This may be caused by the complexity of such research, and by the relative infancy of IT resource outsourcing. However, the question of whether or not a company which has outsourced its IT resources can enjoy greater long-term benefits then a company that has not outsourced, is still to be answered.<br /><br />The psychological strain on the world's population due to employment uncertainty caused by outsourcing needs further research. Without proper studies in this area, both government officials and business leaders' will be incapable of predicting the work force's behaviour. This will deprive our social leaders from proper information required to make decisions.<br /><br /><br /><a name="chapter4"></a><h4>Conclusions</h4><br />The outsourcing of IT resources can be an effective method for a company to gain a competitive advantage. However, to be successful, a company must have individuals who understand and know how to cope with the challenges involved. Furthermore, if a company wants to maximize its return on investment, the managers responsible for outsourced IT resources must continually work with the outsourcing company. Outsourcing is best viewed as a relationship between two companies, where both companies involved need to reinforce the trust between each other in order to be successful.<br /><br />The outsourcing process has many pit-falls which need to be avoided. Fortunately, due to the amount of IT outsourcing which has occurred until now, individuals wanting to learn about outsourcing have an abundance of projects to learn from. <br /><br /><br /><a name="chapter5"></a><h4>Recommendations</h4><br />Blindly directing the outsourcing of IT resources can increase, instead of decreasing, a company's operational cost. Therefore, it is important that companies which are considering the outsourcing of IT resources carefully evaluate their needs. <br /><br />It is expected that the current trend of outsourcing IT resources will continue to grow in the future. This growth is expected to occur due to enhancements in communication and transportation. For this reason, professionals who are responsible for the IT resources need to be made aware of successful outsourcing methods.<br /><br /><a name="bibliography"></a><h4>Bibliography</h4><br />[1] Wikipedia, [Online document], Available at HTTP: <a href="http://en.wikipedia.org/wiki/Outsourcing">http://en.wikipedia.org/wiki/Outsourcing</a><br />[2] Dictionary.com, [Online document], Available at HTTP: <a href="http://dictionary.reference.com/search?q=Outsourcing">http://dictionary.reference.com/search?q=Outsourcing</a><br />[3] R. Stair and G. Reynolds, Principles of Information Systems, 6th ed., Boston: Thomson Course Technology, 2003, pp. 57-61.<br />[4] T.Ohno, Toyota Productions System: Beyond Large-Scale Production, Productivity Inc, 1988, pp. 48<br />[5] T.Ohno, Toyota Productions System: Beyond Large-Scale Production, Productivity Inc, 1988, pp. 48<br />[6] R. Stair and G. Reynolds, Principles of Information Systems, 6th ed., Boston: Thomson Course Technology, 2003, pp. 55-56<br />[7] M.Bucken, "Global Dispatches: Kanbay to Expand Indian Operations", [August 2005], [Online document], Available at HTTP: <a href="http://www.computerworld.com/industrytopics/financial/story/0,10801,103926,00.html">http://www.computerworld.com/industrytopics/financial/story/0,10801,103926,00.html</a><br />[8] B.Perkins, "The Forgotten Side Of Outsourcing", [September 2003], [Online document], Available at HTTP: <a href="http://www.computerworld.com/managementtopics/outsourcing/story/0,10801,84591,00.html">http://www.computerworld.com/managementtopics/outsourcing/story/0,10801,84591,00.html</a><br />[9] "MSIS 2000", [January 2000], [Online document], Available at HTTP: <a href="http://cais.isworld.org/articles/3-1/article.htm">http://cais.isworld.org/articles/3-1/article.htm</a>, pp. APPENDIX 1<br />[10] S.Lemon, "Outsourcing requires careful planning", [July 2005], [Online document], Available at HTTP: <a href="http://www.networkworld.com/news/2004/0628towina.html">http://www.networkworld.com/news/2004/0628towina.html</a><br />[11] M.Ferranti, "To win at offshoring: Start slow, be deliberate", [June 2004], [Online document], Available at HTTP: <a href="http://www.networkworld.com/news/2004/0628towina.html">http://www.networkworld.com/news/2004/0628towina.html</a><br />[12] R.Petershack, "Consider the legal issues before outsourcing offshore", [July 2005], [Online document], Available at HTTP: <a href="http://wistechnology.com/article.php?id=2007">http://wistechnology.com/article.php?id=2007</a><br />[13] S.Overby "The Inner Cost of Outsourcing", [November 2004], [Online document], Available at HTTP: <a href="http://www.cio.com/archive/110104/interview.html">http://www.cio.com/archive/110104/interview.html</a><br />[14] J.Rifkin, The End Of Work, Jeremy P. Tarcher/Penguin, 2004, pp. 190-194.<br />[15] C.Mathews, "How to Improve Outsourcer Relationships", [July 2005], [Online document], Available at HTTP: <a href="http://www.cio.com/archive/070105/forum.html">http://www.cio.com/archive/070105/forum.html</a><br />[16] S.Overby, "Sticking with the Home Team", [July 2004], [Online document], Available at HTTP: <a href="http://www.cio.com/archive/071504/tl_outsourcing.html">http://www.cio.com/archive/071504/tl_outsourcing.html</a><br />[17] E.Anderson, JR, and M.Annanderson, "Are your decisions today creating your future competitors?", [Online document], Available at HTTP: <a href="http://www.coolingzone.com/Guest/News/NL_DEC_2000/Pegasus/pegasus.html">http://www.coolingzone.com/Guest/News/NL_DEC_2000/Pegasus/pegasus.html</a><br />[18] S.Overby "The Inner Cost of Outsourcing", [November 2004], [Online document], Available at HTTP: <a href="http://www.cio.com/archive/110104/interview.html">http://www.cio.com/archive/110104/interview.html</a><br />[19] "Sidebar: Backlash Triggers", [July 2004], [Online document], Available at HTTP: <A HREF="http://www.computerworld.com/managementtopics/outsourcing/story/0,10801,94403,00.html">http://www.computerworld.com/managementtopics/outsourcing/story/0,10801,94403,00.html</a>Francois Nadeau (フランソア ナドー)http://www.blogger.com/profile/16173441828463194428noreply@blogger.com0