<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tmtbox &#187; Open Source</title>
	<atom:link href="http://www.tmtbox.com/tag/open-source/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tmtbox.com</link>
	<description>technology media and telecomm</description>
	<lastBuildDate>Sun, 01 Jan 2012 17:38:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Sony Pictures Imageworks Five Open Source Projects</title>
		<link>http://www.tmtbox.com/sony-pictures-imageworks-five-open-source-projects</link>
		<comments>http://www.tmtbox.com/sony-pictures-imageworks-five-open-source-projects#comments</comments>
		<pubDate>Sat, 01 Aug 2009 13:36:51 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Sony Pictures Imageworks]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/?p=844</guid>
		<description><![CDATA[Open Source: It&#8217;s always been a part of what makes Imageworks tick. However, up until now we haven&#8217;t had a chance to contribute back to the open source community. We&#8217;re beginning to change that now. We&#8217;ve chosen 5 projects to release as open source. This software can be freely used by large and small studios [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Open Source</strong>: It&#8217;s always been a part of what makes Imageworks tick. However, up until now we haven&#8217;t had a chance to contribute back to the open source community. We&#8217;re beginning to change that now.</p>
<p>We&#8217;ve chosen 5 projects to release as open source. This software can be freely used by large and small studios around the world. We&#8217;ve intentionally chosen popular non-restrictive licensing models to help ensure you have lots of options.</p>
<p>Each of these projects have passionate people behind them who are interested in seeing the code widely used. We&#8217;re into the idea of building small development communities around this code. If you&#8217;re interested in contributing, join the respective mailing lists and introduce yourself.</p>
<p>Take a moment to familiarize yourself with Imageworks&#8217; open source offerings. I hope you find something useful.</p>
<p>Rob Bredow<br />
CTO<br />
Sony Pictures Imageworks</p>
<p><a title="OSL" href="http://opensource.imageworks.com/?p=osl" target="_blank"><img class="alignnone size-full wp-image-845" title="spi_r1_c1" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c1.gif" alt="" width="178" height="139" /> </a><a title="Scala Migraions" href="http://opensource.imageworks.com/?p=scalamigrations" target="_blank"><img class="alignnone size-full wp-image-846" title="spi_r1_c2" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c2.gif" alt="" width="183" height="139" /> </a></p>
<p><a title="Field3D" href="http://opensource.imageworks.com/?p=field3d" target="_blank"><img class="alignnone size-full wp-image-847" title="spi_r1_c3" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c3.gif" alt="" width="181" height="139" /> </a><img class="alignnone size-full wp-image-852" title="spi_r1_c6" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c6.gif" alt="" width="180" height="139" /></p>
<p><a title="PyString" href="http://opensource.imageworks.com/?p=pystring" target="_blank"><img class="alignnone size-full wp-image-848" title="spi_r1_c4" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c4.gif" alt="" width="182" height="139" /></a> <a title="Maya Reticle" href="http://opensource.imageworks.com/?p=mayareticle" target="_blank"><img class="alignnone size-full wp-image-849" title="spi_r1_c5" src="http://www.tmtbox.com/wp-content/uploads/2009/08/spi_r1_c5.gif" alt="" width="179" height="139" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/sony-pictures-imageworks-five-open-source-projects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Awesome Open Source Resources for Writers and Writing Majors</title>
		<link>http://www.tmtbox.com/50-awesome-open-source-resources-for-writers-and-writing-majors</link>
		<comments>http://www.tmtbox.com/50-awesome-open-source-resources-for-writers-and-writing-majors#comments</comments>
		<pubDate>Tue, 21 Jul 2009 06:29:48 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Writers]]></category>
		<category><![CDATA[Writing Majors]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/?p=837</guid>
		<description><![CDATA[With the popularity of blogging and online journals, writers working in the online realm have a growing number of opportunities all the time to practice and refine their craft, and maybe even get paid for it. And if you&#8217;re a writing major, why not take advantage of all the opportunities to get great free and [...]]]></description>
			<content:encoded><![CDATA[<p>With the popularity of blogging and online journals, writers working in the  online realm have a growing number of opportunities all the time to practice and  refine their craft, and maybe even get paid for it.  And if you&#8217;re a writing major, why not  take advantage of all the opportunities to get great free and open source  resources that can help you to write, edit and organize your work? Here&#8217;s a list  of fifty open source tools that you can use to make your writing even better.</p>
<p><strong>Word Processors </strong></p>
<p>Why pay for expensive word processing programs when you can get high quality  and open source alternatives for much less? Here are a few programs to try.</p>
<ol>
<li><strong><a href="http://www.spacejock.com/yWriter4.html">yWriter</a>: </strong>This word processor is designed especially for writers. Created and  maintained by a novelist, writers will enjoy the features that are specialy  tailored to their needs that help writers stay organized and focused.</li>
<li><strong><a href="http://www.openoffice.org/">OpenOffice Writer</a>: </strong>Part of the incredibly popular OpenOffice suite, this word processor is  a great alternative to more traditional options like Microsoft Word. Writer is  just as fully featured and easy to use, making it a powerful choice for writers.</li>
<li><strong><a href="http://www.jhorman.org/wikidPad">wikidPad</a>: </strong>This tool is a wiki-style notepad that allows users to to quickly and  easily jot down their ideas and notes. Perhaps one of the best features of it is  that it allows you to easily cross-reference information, helping you more  easily draw plot points and facts together.</li>
<li><strong><a href="http://www.neooffice.org/neojava/en/index.php">NeoOffice</a>: </strong>Similar to OpenOffice, this open source suite contains a word processor  that allows Mac users to enjoy great functionality and ease of use when typing  up manuscripts or anything else.</li>
<li><strong><a href="http://www.tiddlywiki.com/">TiddlyWiki</a>: </strong>Another  wiki style notebook, TiddlyWiki allows users to take notes or jot down ideas  anywhere they have an Internet connection. Users can easily link and organize  their thoughts using the program.</li>
<li><strong><a href="http://notepad-plus.sourceforge.net/uk/site.htm">NotePad++</a>: </strong>An open source version of Microsoft&#8217;s NotePad, NotePad++ has more  features and functionality for users built right in. For writers looking for a  very simple way to get their ideas written down, this can be a good, lightweight  choice.</li>
<li><strong><a href="http://www.scribus.net/">Scribus</a>: </strong>Scribus has  much more than just word processing capabilities, it&#8217;s also a great open source  desktop publishing solution. Whether you&#8217;re printing your own writings out or  want to organize documents for online viewing, Scribus can be perfect tool.</li>
<li><strong><a href="http://www.salsbury.f2s.com/rd.htm">RoughDraft</a>: </strong>Created with writers in mind, this free tool is a great way to organize  a story or screenplay. Writers will enjoy formatting, instant backups and  automatic generation of cover pages.</li>
<li><strong><a href="http://www.abisource.com/">AbiWord</a>: </strong>One of the  most popular open source word processors, AbiWord can be a great alternative to  Microsoft Word. It&#8217;s available in a number of languages and for a wide variety  of operation systems for writers of all kinds.</li>
<li><strong><a href="http://www.osalt.com/kword">Kword</a>: </strong>Create  great literary works using this fully-featured word processing program. You&#8217;ll  be able to write and organize your writings easily in the program&#8217;s frame-based  setting.</li>
<li><strong><a href="http://www.bean-osx.com/">Bean</a>: </strong>Bean is an  incredibly lightweight word processing program for Mac OS X that can make it  easy to type up and edit your writings.</li>
<li><strong><a href="http://sourceforge.net/projects/wordit">WordIt</a>: </strong>This small word processor is ideal for <a href="http://www.jobprofiles.org/">students</a> or business writers. The program  is simple to use and provides advanced features like PDF exports.</li>
</ol>
<p><span id="more-837"></span></p>
<p><strong>Reference</strong></p>
<p>Everyone needs a little help with spelling and grammar now and again, and  these programs can get you on the right track.</p>
<ol>
<li><strong><a href="http://jalingo.sourceforge.net/">JaLingo</a>: </strong>This  OS independent program allows users to easily look up words in a dictionary  right from their desktop, whether they have an Internet connection or not. It  has a sleek and easy-to-use interface.</li>
<li><strong><a href="http://stardict.sourceforge.net/">StarDict</a>: </strong>StarDict is available on multiple platforms and allows you to easily  look up words in a desktop dictionary, even if you are way off in your initial  spelling.</li>
<li><strong><a href="http://aspell.net/">GNU Aspell</a>: </strong>Get the best of  the best of spell checks with this open source spell checker that can be used  independently or with another program.</li>
<li><strong><a href="http://www.dontpokebadgers.com/spellchecker">WBOSS</a>: </strong>This open source script allows users to paste text into the website and  find any spelling errors so they can be fixed before you publish your work.</li>
<li><strong><a href="http://www.wordweb.co.uk/free">WordWeb</a>: </strong>Writers can take advantage of this free and easy to use dictionary and  thesaurus program to help ensure their writing is clearly spelled and isn&#8217;t  repetitive.</li>
<li><strong><a href="http://www.gnu.org/software/diction/diction.html">GNU Style  and Diction</a>: </strong>Once you&#8217;ve checked that your spelling is all right,  style and diction are next up. This program makes it easy to check to see if your  writing is overly wordy or contains common cliches.</li>
<li><strong><a href="fhttp://sourceforge.net/projects/bibus-biblio">Bibus</a>: </strong>If you&#8217;re writing nonfiction, you&#8217;ll likely need to cite your sources.  This program makes it easy to organize and maintain your citations without extra  work.</li>
<li><strong><a href="http://sourceforge.net/projects/graviax">Graviax</a>: </strong>Give your grammar a once-over with this free open source tool. It goes  through your writing to ensure you&#8217;re using words correctly and forming complete  sentences.</li>
<li><strong><a href="http://sourceforge.net/projects/rassistant">Research  Assistant</a>: </strong>If you&#8217;re doing research for your next project you can  organize your findings with this helpful research assistant. You can keep all  your information in one place so you can easily access it later.</li>
</ol>
<p><strong>Organization</strong></p>
<p>Working online isn&#8217;t always conducive to organization. Here you&#8217;ll find some  helpful open source resources to keep you clutter free.</p>
<ol>
<li><strong><a href="http://www.spacejock.com/Sonar.html">Sonar</a>: </strong>Getting published can be an uphill battle, but Sonar can make it a  little easier. It helps you to track your submissions and who you&#8217;re waiting to  hear back from.</li>
<li><strong><a href="http://www.celtx.com/">Celtx</a>: </strong>If you&#8217;re writing  a screenplay or another kind of specially formatted story Cletx can be an  incredibly valuable tool for keeping all your writing straight.</li>
<li><strong><a href="http://storybook.intertec.ch/en">StorYBook</a>: </strong>When writing a long story, it can be harder to keep storylines straight  or get a general overview of what you&#8217;re writing. StorYBook takes care of that  by helping you keep all your data in order so your story will be more coherent,  organized and easier to write.</li>
<li><strong><a href="http://www.evernote.com/">EverNote</a>: </strong>EverNote  can be a great way to capture, store and organize information that you&#8217;re using  in your writings. Best of all, you can use it from anywhere, even on your phone.</li>
<li><strong><a href="http://www.sandbaggers.8m.com/samm.htm">SAMM</a>: </strong>Another submissions tracking program, SAMM makes it easy to keep on top  of where you&#8217;ve sent your writings and what they&#8217;ve said in response.</li>
<li><strong><a href="http://www.lyx.org/Home">LyX</a>: </strong>Organize and  format your writing with this convenient tool. It works to create easy-to-read  scientific and mathematical documents as well as screenplays and novels.</li>
<li><strong><a href="http://www.treepad.com/treepadfreeware">TreePad  Lite</a>:</strong> Writers can keep track of their notes, emails, texts and  reference materials with this all-in-one organizer. Looking like Windows  Explorer, the program is easy to use and can be a great way to keep everything  you need for writing in one place.</li>
</ol>
<p><strong>Helpful Tools </strong></p>
<p>Everyone loves a tool or resource that makes doing their job a little easier. Try these and see if  they can help streamline your work.</p>
<ol>
<li><strong><a href="http://www.creativity-portal.com/howto/writing/writing.prompts.html">Prompts</a>: </strong>Need a little help getting inspiration? This program can provide you  with some helpful prompts to get your creative juices flowing.</li>
<li><strong><a href="http://www.launchy.net/">Launchy</a>: </strong>Make opening  all the programs you need to start writing super easy with Launchy. With just a  few keystrokes you can start your word processor, web browser or anything else.</li>
<li><strong><a href="http://sourceforge.net/projects/asuite">ASuite</a>: </strong>Take all your important documents with you on your USB drive or iPod  with this helpful application. It launches files, folders and webpages from  anywhere you need to access them.</li>
<li><strong><a href="http://txt2tags.sourceforge.net/">txt2tags</a>:</strong> If  you&#8217;re putting your writings up on the web, then you may well need to code them  before they can go up. This program makes that super easy by adding html tags to  your text documents.</li>
<li><strong><a href="http://www.inkscape.org/">Inkscape</a>: </strong>Unless  you&#8217;re publishing a boring, lifeless blog or webpage, you&#8217;ll want to have some  images or drawings on them. This program can make it easy to create original  drawings or map out parts of your stories.</li>
<li><strong><a href="http://periapsis.org/tellico">Tellico</a>: </strong>Tellico  is a program that works to help you manage a collection, whether it&#8217;s of your  short stories or of your favorite novels. It can help you keep track of anything  writing related that requires database maintenance.</li>
<li><strong><a href="http://freemind.sourceforge.net/wiki/index.php/Main_Page">Freemind</a>: </strong>Brainstorm new ideas with this great open source mind mapping tool.  You&#8217;ll get your great ideas down so you won&#8217;t forget them, and the format may  help you come up with even better ones.</li>
<li><strong><a href="http://sourceforge.net/projects/pdfcreator">PDF  Creator</a>: </strong>Don&#8217;t pay for a program that can generate PDF files: use  this convenient tool instead. You&#8217;ll be able to create PDF files of all your  best writings to show off to others and get published all over the Web.</li>
<li><strong><a href="http://amanda.zmanda.com/">ZManda</a>: </strong>Make sure  you don&#8217;t lose your important files and writings by backing up all your  information. ZManda makes it easy to create daily or weekly backups of all your  stuff.</li>
<li><strong><a href="https://addons.mozilla.org/en-US/firefox/addon/4718">Word  Count Plus</a>: </strong>Sometimes you need to know just how many words you&#8217;ve  written, especially if you&#8217;re going for quantity. This simple tool can give you  the answer and let you know if you&#8217;ve met your quota.</li>
<li><strong><a href="http://holloway.co.nz/docvert">Docvert</a>: </strong>If you  have old files saved in a Windows format and want to convert them to work with  some open source programs more easily you can do so with this handy tool.</li>
<li><strong><a href="http://eyeos.org/en">EyeOS</a>: </strong>Wanna bring your  desktop with you? You can with this great mobile desktop. You can use your word  processing programs from anywhere, letting you get inspiration even when you&#8217;re  not at home.</li>
</ol>
<p><strong>Web Tools</strong></p>
<p>Online writers need to not only be able to write well but to be able to  publish quickly and easy to the Web. These tools can help you get your writing  up where people can read it.</p>
<ol>
<li><strong><a href="http://www.suite101.com/view_image.cfm/354700">Amaya</a>: </strong>Amaya is a Web editing program that allows you to update or edit  content directly on the Web, though it serves a dual purpose as a Web browser as  well.</li>
<li><strong><a href="http://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a>: </strong>Easily publish and edit your webpages online without even using an FTP  program with MediaWiki. MediaWiki is the software that powers the online  encyclopedia Wikipedia and allows you to easily share and create content online.</li>
<li><strong><a href="http://store.digitalriver.com/servlet/ControllerServlet?Action=DisplayPage&amp;Env=BASE&amp;Locale=en_US&amp;SiteID=sunstor&amp;id=ProductDetailsPage&amp;productID=50984800">Sun  Weblog Publisher</a>: </strong>If you&#8217;re looking for a way to make publishing  your blog super easy, then this program from Sun has you covered. Working with  StarOffice and OpenOffice, this extension works with WordPress, Blogger, Roller  and other blogging platforms to quickly put your content on the Web.</li>
<li><strong><a href="http://www.truecrypt.org/">TrueCrypt</a>: </strong>If you  want to send material to a friend or boss for editing but want to ensure it  stays private, use this encryption program. It works to secure almost any kind  of file and keeps them away from prying eyes.</li>
<li><strong><a href="http://fireftp.mozdev.org/">FireFTP</a>: </strong>Those  using the Web for storage or to publish a website will likely need to make use  of an FTP program sooner or later. This program works directly with Firefox to  make it easy and simple to get content up on the Web.</li>
<li><strong><a href="http://www.gimp.org/">GIMP</a>: </strong>If you plan on  putting images on your site you might want to have an image editing program.  GIMP can handle everything from a simple crop to much more complex photo  manipulation tasks.</li>
<li><strong><a href="http://filezilla.sourceforge.net/">FileZilla FTP</a>: </strong>One of the most popular open source FTP tools, this program will allow  you to efficiently move your writing content to the Web, making it easier to  publish and share your work.</li>
<li><strong><a href="http://wordpress.org/">WordPress</a>: </strong>If you&#8217;re  into blogging at all you have to have heard of WordPress. This open source  software allows users to create and maintain a fully customizable blog.</li>
<li><strong><a href="http://www.seamonkey-project.org/">Mozilla SeaMonkey</a>: </strong>Want an all-in-one tool for your Web  editing, browsing, chatting and email? SeaMonkey does that and more making  it a great go-to for simple updates to your blog or for a little informative  reading.</li>
<li><strong><a href="http://www.nvu.com/">NVU</a>: </strong>If you&#8217;re in the  market for an open source alternative to a product like Dreamweaver, then NVU  could be just what you&#8217;re looking for. A fully featured Web authoring system,  NVU makes it simpler to create great webpages to display your writing.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/50-awesome-open-source-resources-for-writers-and-writing-majors/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>11 Free And Useful Open-Source Alternatives For Designers</title>
		<link>http://www.tmtbox.com/11-free-and-useful-open-source-alternatives-for-designers</link>
		<comments>http://www.tmtbox.com/11-free-and-useful-open-source-alternatives-for-designers#comments</comments>
		<pubDate>Wed, 25 Feb 2009 11:21:34 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/?p=679</guid>
		<description><![CDATA[Jahshaka Alternative: Adobe After Effects Jahshaka give you the power of movie editing and effects in open source environment. You can edit with flexibility and speed and can create Effects in real time. With this software animate with unlimited features and Paint/design on moving video. It will let you work in any format at any [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://jahshaka.org/" target="_blank">Jahshaka</a></strong></p>
<p><a href="http://jahshaka.org/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/jahshaka.jpg" alt="jahshaka.jpg" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.adobe.com/products/aftereffects/" target="_blank">Adobe After Effects</a></strong></p>
<p>Jahshaka give you the power of movie editing and effects in open source environment. You can edit with flexibility and speed and can create Effects in real time. With this software animate with unlimited features and Paint/design on moving video. It will let you work in any format at any resolution as well.</p>
<p><span id="more-679"></span></p>
<p><strong><a href="http://www.cinepaint.org/" target="_blank">CinePaint</a></strong></p>
<p><a href="http://www.cinepaint.org/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/cinepaint.jpg" alt="CinePaint" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.adobe.com/products/photoshop/" target="_blank">Adobe Photoshop</a></strong></p>
<p>CinePaint is used to retouch feature films and in pro photography. CinePaint opens high fidelity image file formats such as DPX, 16-bit TIFF, and OpenEXR, and conventional formats like JPEG and PNG. It has a flipbook for movie playback of image sequences in RAM. It supports 8-bit, 16-bit and 32-bit color channels, HDR and CMS.</p>
<p><strong><a href="http://www.w3.org/Amaya/" target="_blank">Amaya </a></strong></p>
<p><a href="http://www.w3.org/Amaya/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/amaya.jpg" alt="Amaya" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.adobe.com/products/dreamweaver/" target="_blank">Adobe Dreamweaver</a></strong></p>
<p>Amaya is a Web editor, i.e. a tool used to create and update documents directly on the Web. Browsing features are seamlessly integrated with the editing and remote access features in a uniform environment. This follows the original vision of the Web as a space for collaboration and not just a one-way publishing medium.</p>
<p><strong><a href="http://www.openoffice.org/product/draw.html" target="_blank">Open Office Draw</a></strong></p>
<p><a href="http://www.openoffice.org/product/draw.html" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/open-office-draw.jpg" alt="Open Office Draw" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://office.microsoft.com/en-us/visio/default.aspx" target="_blank">Microsoft Visio</a></strong></p>
<p>DRAW &#8211; from a quick sketch to a complex plan, DRAW gives you the tools to communicate with graphics and diagrams. With a maximum page size of 300cm by 300cm, DRAW is powerful tool for technical or general posters, etc.</p>
<p><strong><a href="http://www.blender.org/" target="_blank">Blender</a></strong></p>
<p><a href="http://www.blender.org/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/blender.jpg" alt="Blender" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.autodesk.com/3dsmax" target="_blank">Autodesk 3ds Max</a></strong></p>
<p>Blender is the free open source 3D content creation suite, available for all major operating systems. It includes tools for modeling &#8211; fast subdivision surface and polygon tools, multi-resolution mesh sculpting, metaballs, NURBS, vector fonts, and curves; uv mapping; shaders and texturing &#8211; both paint based and node based; ik and fk animation tools with rigging, constraints, skinning, morph targets, drivers, deformers, and modifiers; simulation tools including hard bodies, soft body, cloth, and fluids; and particle systems including hair. Blender has integrated rendering with both its native renderer and the raytracer Yafray as well supporting many external renderers; and python based scripting.</p>
<p><strong><a href="http://imgv.sourceforge.net/" target="_blank">Imgv</a></strong></p>
<p><a href="http://imgv.sourceforge.net/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/imgv.jpg" alt="Imgv" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.acdsee.com/" target="_blank"><span id="opmodule_acd_productdetailspage_contentbody" class="opDefaultContent">ACDSee</span></a></strong></p>
<p>Imgv is a unique and feature rich Image Viewer. It is released as free software with full source code. Imgv is portable and can run on Windows, Linux, BSD, OSX, and other operating systems. Features include a GUI that doesn’t get in the way of viewing your images, a file browser, slideshows, zooming, rotating, on-the-fly Exif viewing, histograms, fullscreen support, wallpaper settin and much more…</p>
<p><strong><a href="http://www.inkscape.org/" target="_blank">Inkscape</a></strong></p>
<p><a href="http://www.inkscape.org/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/inkscape.jpg" alt="Inkscape" /></a></p>
<p><strong>Alternative:</strong> <strong><a href="http://www.adobe.com/products/illustrator/" target="_blank">Adobe Illustrator</a></strong></p>
<p>An Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format.  Inkscape supports many advanced SVG features (markers, clones, alpha blending, etc.) and great care is taken in designing a streamlined interface. It is very easy to edit nodes, perform complex path operations, trace bitmaps and much more.</p>
<p><strong><a href="http://plasticbugs.com/?page_id=294" target="_blank">Gimpshop</a></strong></p>
<p><a href="http://plasticbugs.com/?page_id=294" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/gimpshop.jpg" alt="Gimpshop" /></a></p>
<p><strong>Alternative: </strong> <strong><a href="http://www.adobe.com/products/photoshop/" target="_blank">Adobe Photoshop</a></strong></p>
<p>Gimpshop is a hack made on top of the original Gimp project which changes all menues, dialogs, etc., in order to make them look as much as their counterparts in Photoshop. This makes users who are already familiar with the layout of Photoshop feel right at home in this open source application. Please note that all features in Photoshop in not available in Gimpshop, since it is based on the Gimp project and it’s feature set.</p>
<p><strong><a href="http://www.xaraxtreme.org/" target="_blank">Xara LX</a></strong></p>
<p><a href="http://www.xaraxtreme.org/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/xara-lx.jpg" alt="Xara LX" /></a></p>
<p><strong>Alternative: <a href="http://www.corel.com/servlet/Satellite/ca/en/Product/1191272117978#versionTabview=tab0&amp;tabview=tab0" target="_blank">CoralDRAW</a></strong></p>
<p>Xara Xtreme for Linux is a powerful, general purpose graphics program for Unix platforms including Linux, FreeBSD and (in development) OS-X. It offers some of the most powerful graphics tools available. Xara Xtreme has a clean, un-cluttered user interface. Few floating dialogs, palettes, menus etc.</p>
<p><strong><a href="http://avidemux.sourceforge.net/" target="_blank">Avidemux</a></strong></p>
<p><a href="http://avidemux.sourceforge.net/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/avidemux.jpg" alt="Avidemux" /></a></p>
<p><strong>Alternative: <a href="http://www.apple.com/finalcutstudio/finalcutpro/" target="_blank">Final Cut Pro</a></strong></p>
<p>Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.</p>
<p><strong><a href="http://www.les-stooges.org/pascal/pencil/" target="_blank">Pencil</a></strong></p>
<p><a href="http://www.les-stooges.org/pascal/pencil/" target="_blank"><img src="http://www.smashingapps.com/wp-content/uploads/2009/02/pencil.jpg" alt="Pencil" /></a></p>
<p><strong>Alternative: <a href="http://www.toonboom.com/products/toonBoomStudio/" target="_blank">Toon Boom Studio</a></strong></p>
<p>Pencil is an animation/drawing software for Mac OS X, Windows, and Linux. It lets you create traditional hand-drawn animation (cartoon) using both bitmap and vector graphics. Pencil is free and open source.</p>
<p>(Source : http://www.smashingapps.com/2009/02/18/11-free-and-useful-open-source-alternatives-for-designers.html)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/11-free-and-useful-open-source-alternatives-for-designers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Googe Android Open Source</title>
		<link>http://www.tmtbox.com/googe-android-open-source</link>
		<comments>http://www.tmtbox.com/googe-android-open-source#comments</comments>
		<pubDate>Thu, 23 Oct 2008 03:16:55 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Googe]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/?p=529</guid>
		<description><![CDATA[When Google announced Android, its software platform for mobile devices, it released an SDK for developers to work with, but it also promised to eventually release the code under an open-source license. Today, Google and its partners in the Open Handset Alliance did exactly that. You can now download the code and help Google and [...]]]></description>
			<content:encoded><![CDATA[<p>When Google <a href="http://android-developers.blogspot.com/2007/11/posted-by-jason-chen-android-advocate.html">announced</a> Android, its software platform for mobile devices, it released an SDK for developers to work with, but it also <a href="http://android-developers.blogspot.com/2008/10/android-is-now-open-source.html">promised to eventually release</a> the code under an open-source license. Today, Google and its partners in the <a href="http://www.openhandsetalliance.com/">Open Handset Alliance</a> did exactly that. You can now <a href="http://source.android.com/">download the code</a> and help Google and its partners to develop it further. The source code has been <a href="http://www.apache.org/licenses/LICENSE-2.0">released under the Apache 2.0 license</a> and consists of the complete codebase of Android, including all the libraries, media codecs, and applications.</p>
<p>The timing of this announcement coincides with the release of the first Android phone, the <a href="http://www.readwriteweb.com/archives/google_phone_unveiled_can_it_beat_iphone.php">T-Mobile G1</a>, which will go on sale tomorrow.</p>
<h2>Apache License</h2>
<p><img src="http://www.readwriteweb.com/images/androids_logos.png" alt="androids_logos.png" align="right" />The <a href="http://en.wikipedia.org/wiki/Apache_License">Apache License</a> allows developers to distribute and modify the source code in any way they want, and developers are not required to distribute the new code under the same license. The new license does not even have to be an open-source license, which will give companies the option to develop their own, proprietary platforms on the basis of Android.</p>
<h2>iPhone and Android Compete for Developers</h2>
<p>It will be interesting to see where developers will take the Android platform now that they have full access to it. We have already seen the <a href="http://www.readwriteweb.com/archives/3_hot_g1_android_apps_already.php">release</a> of quite a few very interesting programs for Android in anticipation of the G1 launch.</p>
<p>This announcement also sets Google apart from Apple, which is trying to keep complete control over its iPhone platform. While most users probably don&#8217;t care about the politics behind the scenes, the Android platform might siphon off quite a few developers from the iPhone &#8211; especially given Apple&#8217;s erratic behavior around including applications in the iTunes store lately.</p>
<p>Read Video <a title="ReadWriteWeb" href="http://www.readwriteweb.com/archives/android_goes_opensource.php" target="_blank">Here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/googe-android-open-source/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Movable Type Open Source</title>
		<link>http://www.tmtbox.com/movable-type-open-source</link>
		<comments>http://www.tmtbox.com/movable-type-open-source#comments</comments>
		<pubDate>Sun, 16 Dec 2007 07:51:39 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[media]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Movable Type]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/archives/movable-type-open-source</guid>
		<description><![CDATA[As of today, and forever forward, Movable Type is open source. This means you can freely modify, redistribute, and use Movable Type for any purpose you choose. Just want the details and downloads? Skip to the bottom. But you might like the story of how we got here. Like many of us on the team, [...]]]></description>
			<content:encoded><![CDATA[<p class="entry-body">As of today, and forever forward, <strong>Movable Type is open source</strong>. This means you can freely modify, redistribute, and use Movable Type for any purpose you choose.</p>
<p>Just want the details and downloads? <a href="http://www.movabletype.org/2007/12/movable_type_open_source.html#thankyou">Skip to the bottom</a>. But you might like the story of how we got here.</p>
<p>Like many of us on the team, some of you have been waiting for this moment for years. For a business, an open source license affects boring things like how a product is created, updated, and distributed. But the open source movement has always been about something more important: Freedom. With a name like &#8220;Movable Type&#8221;, we&#8217;ve always been keenly aware of the importance of freedom, as that name echoes both the birth of the printing press and the creation of independent media that an individual can control.</p>
<p>Our goal has always been to create the best blogging platform in the world and to put that power in the hands of as many people as possible. And we want to honor a tradition of openness that Movable Type has embodied for over six years:</p>
<ul>
<li>From TrackBack to Atom to OpenID, we&#8217;ve always invented and popularized key technologies that were delivered with open source implementations, freely-available specs, and no patents.</li>
<li>Movable Type has always had all of its source code freely available for review, from its first release.</li>
<li>MT&#8217;s license has <em>always</em> permitted users to modify the code for any reason.</li>
<li>Every major release of Movable Type, from version 1.0, has included contributions or patches created by outside developers in the community.</li>
<li>Many members of today&#8217;s MT team began as contributors to the MT code or creators of MT plugins.</li>
<li>There was a public code repository with nightly builds of Movable Type as far back as four years ago, though it lacked dedicated resources.</li>
<li>There&#8217;s always been a free (as in beer) version of Movable Type.</li>
<li>We&#8217;ve always wanted people who pay for a Movable Type license to do so because they <strong>believe in what we&#8217;re doing</strong> &#8212; whether that&#8217;s standing behind our work with professional support, or the new era of benefits like plugins and themes for paid users.</li>
</ul>
<h3> Fighting For Openness</h3>
<p>And so, while this is a milestone for Movable Type and for our community, this is something of an <em>evolution</em> for the platform, not a revolution. In fact one story stands out from the earliest days of our company. I got to witness the conversations between our cofounders Ben and Mena Trott (who were then the entire staff of Six Apart) and Joi Ito, who would go on to lead the initial investment in Six Apart from his company Neoteny.</p>
<p><span class="mt-enclosure mt-enclosure-image"><a href="http://www.movabletype.org/images/mt-logo-small.gif"><img src="http://www.movabletype.org/assets_c/2007/09/mt-logo-small-thumb-300x68.gif" alt="mt-logo-small.gif" class="mt-image-left" style="margin: 0pt 20pt 20px 0px; float: left" height="34" width="150" /></a></span>Back in late 2002 and early 2003, Ben and Mena had both been adamant about one particular point from the very beginning of the negotiations: That there would always be a free version of Movable Type with the source code freely available. To their credit, the team at Neoteny was always wholeheartedly behind the idea. Of course, Joi Ito&#8217;s reputation in supporting and fighting for openness on the web since then is well-documented, from his work with Creative Commons to ICANN to the Mozilla Foundation to the Open Source Initiative itself.</p>
<p>But as a passionate MT user, it struck me that, even in those days when there were only a few thousand bloggers out there and the whole idea of starting a business around blogging was extremely risky, Ben and Mena were <em>really committed</em> to setting the standard that Movable Type would always be open, and would always be free, just as much as they were committed to making sure Six Apart would be a solid company that could hire passionate members of the community to stand behind its products.</p>
<p>That&#8217;s the truth, but of course, that might not have always been our reputation. Ever since the changes with our version 3.0 launch three years ago, there have been those who are quick to judge or quick to question whether the intention of openness was ever there. And of course, we&#8217;ve since learned a lot about how to communicate better with our community, and how to build a sustainable business that we&#8217;re proud of, so that we can ensure even greater investments in Movable Type. We hope that it&#8217;s not just the launch of MTOS that demonstrates our commitment to openness &#8212; from our community feedback process (which has already yielded a <a href="http://wiki.movabletype.org/">completely new MT wiki</a>) to our creation and promotion of open standards for the web to our genuine interest in dialogue with the communities we serve, we truly believe Movable Type is the most open platform around.</p>
<p>Movable Type 4.0&#8242;s release earlier this year has been the most successful launch of a new version of MT ever. It&#8217;s been one of the milestones in the history of Six Apart, too, by re-establishing our flagship platform as an unquestioned leader in blogging, and demonstrating what the tool can do when we&#8217;ve worked with our community to invest a tremendous amount of resources in the platform.</p>
<p>And <strong>stay tuned</strong>: There&#8217;s even more exciting news for MT coming soon! You&#8217;ll want to <a href="http://movabletype.org/atom.xml">subscribe to the movabletype.org XML feed</a> for all the updates.</p>
<h3>Thank You</h3>
<p><a href="http://www.movabletype.org/cgi-bin/athena/mt-static/html/editor-content.html?cs=utf-8" name="thankyou"></a>The Movable Type Open Source project exists thanks to the passion, dedication, and inspiration of a community that has been incredibly generous for more than six years. We thank you for all the work leading up to this launch, and especially for the valuable contributions you&#8217;ll be making in the future. Today, we&#8217;re honoring the spirit of openness that&#8217;s always been part of the Movable Type community and taking it to its logical conclusion: Please welcome <strong>Movable Type Open Source</strong>.</p>
<p>A few quick answers to questions you might have about MTOS:</p>
<p><span class="mt-enclosure mt-enclosure-image"><img src="http://www.movabletype.org/mt4-bug-mt-white.png" alt="mt4-bug-mt-white.png" class="mt-image-right" style="margin: 0pt 0px 20px 20pt; float: right" height="60" width="120" /></span></p>
<ul>
<li> MTOS has <strong>every feature in Movable Type 4.0</strong> along with several new minor improvements and bug fixes.</li>
<li> All <a href="http://plugins.movabletype.org/">plugins</a>, themes, templates, designs, and APIs that work with MT4 work with MTOS. MTOS also works with other Six Apart open source technologies such as <a href="http://www.danga.com/memcached/">memcached</a>.</li>
<li> MTOS is one of the only open source blogging tools with built-in support for an unlimited number of blogs, an unlimited number of authors, and sign-in with OpenID, with no plugins needed.</li>
<li> We&#8217;ll be adding <strong>additional paid benefits</strong> for people who&#8217;ve paid for commercial licenses for Movable Type, with benefits like improved technical support and custom add-ons such as plugins or themes.</li>
<li>MTOS is complemented by the <a href="http://www.movabletype.com/products/">paid software products</a> we sell on top of the MT platform, such as our Enterprise Solution, Community Solution and personal and commercial licenses which include support.</li>
<li> There&#8217;s a <a href="http://movabletype.org/opensource/getting-the-source.html">public Subversion repository</a> for getting the MTOS code and <a href="http://www.movabletype.org/opensource/nightlies/">nightly builds</a>.</li>
<li>Once there are stable public builds, those downloads will be on movabletype.org as well.</li>
<li> You can find out how to contribute to the MTOS project and the MT community at movabletype.org.</li>
<li> MTOS support is provided by other members of the community. (A great place to start is the <a href="http://wiki.movabletype.org/">new Movable Type Wik</a>i.) You can buy a <a href="http://www.movabletype.com/download/">standard paid license</a> for one of the existing Movable Type products if you&#8217;d like professional support directly from Six Apart.</li>
<li> Movable Type Open Source is being released under the standard GPL license.</li>
<li> We welcome and encourage the distribution and reuse of all or part of MTOS in other open source projects. Get in touch if you want to work together.</li>
</ul>
<p>Be sure to <a href="http://movabletype.org/mtos/">check out the full MTOS details</a> for more details on how MTOS works, a list of Frequently Asked Questions, and information about how you can contribute.</p>
<p>[via <a href="http://www.movabletype.org/2007/12/movable_type_open_source.html" title="Movable Type open source" target="_blank">Movable Type</a>] </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/movable-type-open-source/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Launches Gears Open Source Project to Bring Offline Capabilities to Web Applications</title>
		<link>http://www.tmtbox.com/google-launches-gears-open-source-project-to-bring-offline-capabilities-to-web-applications-2</link>
		<comments>http://www.tmtbox.com/google-launches-gears-open-source-project-to-bring-offline-capabilities-to-web-applications-2#comments</comments>
		<pubDate>Fri, 16 Nov 2007 10:10:53 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[Gears]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Web Applications]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/archives/google-launches-gears-open-source-project-to-bring-offline-capabilities-to-web-applications</guid>
		<description><![CDATA[At Google Developer Day, New Browser Extension Provided to Developer Community Google Developer Day 2007 SYDNEY, Australia&#8211;(BUSINESS WIRE)&#8211;Google Inc. (NASDAQ:GOOG) today announced at Google Developer Day 2007 that it is providing developers with Google Gears??, an open source technology for creating offline web applications. This new browser extension is being made available in its early [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold">At Google Developer Day, New Browser Extension Provided to Developer Community</span></p>
<p>Google Developer Day 2007</p>
<p>SYDNEY, Australia&#8211;(BUSINESS WIRE)&#8211;Google Inc. (NASDAQ:GOOG) today announced at Google Developer Day 2007 that it is providing developers with Google Gears??, an open source technology for creating offline web applications. This new browser extension is being made available in its early stages so that everyone can test its capabilities and limitations and help improve upon it. The long-term hope is that Google Gears can help the industry as a whole move toward a single standard for offline capabilities that all developers can use.</p>
<p id="more" class="entry-more"> Google Gears marks an important step in the evolution of web applications because it addresses a major user concern: availability of data and applications when there<span id="bwanpa1">’</span>s no Internet connection available, or when a connection is slow or unreliable. As application developers and users alike want to do more on the web<span id="bwanpa2">—</span>whether        it<span id="bwanpa3">’</span>s email or CRM or photo editing<span id="bwanpa4">—</span>enhancements        that make the browser environment itself more powerful are increasingly        important.</p>
<p>&#8220;With Google Gears we&#8217;re tackling a key limitation of the browser in order to make it a stronger platform for deploying all types of applications and enabling a better user experience in the cloud,&#8221; said Eric Schmidt, Chief Executive Officer of Google. <span id="bwanpa5">“</span>We        believe strongly in the power of the community to stretch this new        technology to the limits of what<span id="bwanpa6">’</span>s possible        and ultimately emerge with an open standard that benefits everyone.<span id="bwanpa7">”</span></p>
<p>Google is offering Google Gears as a free, fully open source technology in order to help every web application, not just Google applications. As a first example of what is possible, the Google Reader<span id="bwanpa8">™</span>        feed reader (<a href="http://reader.google.com/" target="_blank" shape="rect">http://reader.google.com</a>)        is available today with Gears-enabled offline capabilities.</p>
<p><strong>Industry support</strong></p>
<p>Google will be working closely with all members of the web community to converge upon a standard so developers have one consistent API for offline functionality.</p>
<p>&#8220;We&#8217;re very excited to be collaborating with Google to move the industry forward to a standard cross-platform, cross-browser local storage capability,&#8221; said Kevin Lynch, senior vice president and chief software architect at Adobe. &#8220;The Gears API will also be available in Apollo, which enables web applications to run on the desktop, providing developers with consistent offline and local database solutions.&#8221;</p>
<p>&#8220;This announcement is a significant step forward for web applications,&#8221; said Brendan Eich, CTO at Mozilla Corporation. &#8220;We&#8217;re pleased to see Google working with open source and open standards bodies on offline web applications.&#8221;</p>
<p>&#8220;Opera and Google share the common goal of making Web applications        richer and more robust,&#8221; said H<span id="bwanpa11">å</span>kon Wium Lie, CTO, Opera Software. &#8220;Developers have long desired the functionality and flexibility Google Gears can offer browsers. Because Opera has always prioritized giving our users what they want, we&#8217;re excited to work with Google to extend the reach and power of Web applications.&#8221;</p>
<p><strong>Another tool in the application development toolbox</strong></p>
<p>Google Gears builds on the web&#8217;s existing programming model by introducing new JavaScript APIs for sophisticated data storage, application caching, and multi-threading features. With these APIs, developers can bring offline capabilities to even their most complex web applications. Google Gears works with all major browsers on all major platforms: Windows, Mac and Linux.</p>
<p>Google Gears is available now at <a href="http://gears.google.com/" target="_blank" shape="rect">http://gears.google.com/</a>.</p>
<p><strong>About Google Inc.</strong></p>
<p>Google<span id="bwanpa9">’</span>s innovative search technologies connect millions of people around the world with information every day. Founded in 1998 by Stanford Ph.D. students Larry Page and Sergey Brin, Google today is a top web property in all major global markets. Google<span id="bwanpa10">’</span>s targeted advertising program provides businesses of all sizes with measurable results, while enhancing the overall web experience for users. Google is headquartered in Silicon Valley with offices throughout the Americas, Europe and Asia. For more information, visit <a href="http://www.google.com/" target="_blank" shape="rect">www.google.com</a>.</p>
<p><em>Google, Google Gears, and Google Reader are trademarks of Google Inc. in the United States and/or other countries. Other trademarks are the property of their respective owners.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/google-launches-gears-open-source-project-to-bring-offline-capabilities-to-web-applications-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wiring Your Web Application with Open Source Java</title>
		<link>http://www.tmtbox.com/wiring-your-web-application-with-open-source-java</link>
		<comments>http://www.tmtbox.com/wiring-your-web-application-with-open-source-java#comments</comments>
		<pubDate>Fri, 16 Nov 2007 01:46:57 +0000</pubDate>
		<dc:creator>kevin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://www.tmtbox.com/archives/wiring-your-web-application-with-open-source-java</guid>
		<description><![CDATA[by Mark Eagle http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html 04/07/2004 Building non-trivial web applications with Java is no trivial task. There are many things to consider when structuring an architecture to house an application. From a high-level, developers are faced with decisions about how they are going to construct user interfaces, where the business logic will reside, and how to [...]]]></description>
			<content:encoded><![CDATA[<p><span class="postbody">by Mark Eagle<br />
<a href="http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html" target="_blank">http://www.onjava.com/pub/a/onjava/2004/04/07/wiringwebapps.html</a><br />
04/07/2004<br />
Building non-trivial web applications with Java is no trivial task. There are many things to consider when structuring an architecture to house an application. From a high-level, developers are faced with decisions about how they are going to construct user interfaces, where the business logic will reside, and how to persist application data. Each of these three layers has their own questions to be answered. What technologies should be implemented across each layer? How can the application be designed so that it is loosely coupled and flexible to change? Does the architecture allow layers to be replaced without affecting other layers? How will the application handle container level services such as transactions? </span><span class="postbody"></span></p>
<p><span class="postbody">There are definitely a number of questions that need to be addressed when creating an architecture for your web application. Fortunately, there have been developers that have run into these reoccurring problems and built frameworks to address these issues. A good framework relieves developers from attempting to reinvent the wheel for complex problems; it is extensible for internal customization; and it has a strong user community to support it. Frameworks generally address one problem well. However, your application will have several layers that might require their own framework. Just solving your UI problem does not mean that you should couple your business logic and persistence logic into a UI component. For example, you should not have business logic with JDBC code inside of a controller. This is not the functionality that a controller was intended to provide. A UI controller should be a lightweight component that delegates calls to other application layers for services outside the UI scope. Good frameworks naturally form guidelines where code should be placed. More importantly, frameworks alleviate developers from building code such as persistence from scratch and allow them to concentrate on the application logic that is important to a client.</p>
<p>This article will discuss how to combine several well-known frameworks to achieve loose coupling, how to structure your architecture, and how to enforce a consistent design across all application layers. The challenge is combining frameworks so that each layer is exposed to each other in a loosely coupled manner, regardless of the underlying technologies. This article will discuss one strategy for combining frameworks using three popular open source frameworks. For the presentation layer we will use Struts; for our business layer we will use Spring; and for our persistence layer we will use Hibernate. You should be able to substitute any one of these frameworks in your application and get the same effect. Figure 1 shows what this looks like from a high level when the frameworks are combined.</p>
<p><img src="http://www.onjava.com/onjava/2004/04/07/graphics/wiring.gif" border="0" /><br />
Figure 1. Overview of framework architecture with Struts, Spring, and Hibernate.</p>
<p>Application Layering<br />
Most non-trivial web applications can be divided into at least four layers of responsibility. These layers are the presentation, persistence, business, and domain model layers. Each layer has a distinct responsibility in the application and should not mix functionality with other layers. Each application layer should be isolated from other layers but allow an interface for communication between them. Let&#8217;s start by inspecting each of these layers and discuss what these layers should provide and what they should not provide.</p>
<p>At one end of a typical web application is the presentation layer. Many Java developers understand what Struts provides. However, too often, coupled code such as business logic is placed into an org.apache.struts.Action. So, let&#8217;s agree on what a framework like Struts should provide. Here is what Struts is responsible for:</p>
<p>Managing requests and responses for a user.<br />
Providing a controller to delegate calls to business logic and other upstream processes.<br />
Handling exceptions from other tiers that throw exceptions to a Struts Action.<br />
Assembling a model that can be presented in a view.<br />
Performing UI validation.<br />
Here are some items that are often coded using Struts but should not be associated with the presentation layer:</p>
<p>Direct communication with the database, such as JDBC calls.<br />
Business logic and validation related to your application.<br />
Transaction management.<br />
Introducing this type of code in the presentation layer leads to type coupling and cumbersome maintenance.</p>
<p>The Persistence Layer<br />
At the other end of a typical web application is the persistence layer. This is usually where things get out of control fast. Developers underestimate the challenges in building their own persistence frameworks. A custom, in-house persistence layer not only requires a great amount of development time, but also often lacks functionality and becomes unmanageable. There are several open source object-to-relational mapping (ORM) frameworks that solve much of this problem. In particular, the Hibernate framework allows object-to-relational persistence and query service for Java. Hibernate has a medium learning curve for Java developers who are already familiar with SQL and the JDBC API. Hibernate persistent objects are based on plain-old Java objects and Java collections. Furthermore, using Hibernate does not interfere with your IDE. The following list contains the type of code that you would write inside a persistence framework:</p>
<p>Querying relational information into objects. Hibernate does this through an OO query language called HQL, or by using an expressive criteria API. HQL is very similar to SQL except you use objects instead of tables and fields instead of columns. There are some new specific HQL language elements to learn; however, they are easy to understand and well documented. HQL is a natural language to use for querying objects that require a small learning curve.</p>
<p>Saving, updating, and deleting information stored in a database.</p>
<p>Advanced object-to-relational mapping frameworks like Hibernate have support for most major SQL databases, and they support parent/child relationships, transactions, inheritance, and polymorphism.</p>
<p>Here are some items that should be avoided in the persistence layer:</p>
<p>Business logic should be in a higher layer of your application. Only data access operations should be permitted.</p>
<p>You should not have persistence logic coupled with your presentation logic. Avoid logic in presentation components such as JSPs or servlet-based classes that communicate with data access directly. By isolating persistence logic into its own layer, the application becomes flexible to change without affecting code in other layers. For example, Hibernate could be replaced with another persistence framework or API without modification to the code in any other layer.</p>
<p>The Business Layer<br />
The middle component of a typical web application is the business or service layer. This service layer is often the most ignored layer from a coding perspective. It is not uncommon to find this type of code scattered around in the UI layer or in the persistence layer. This is not the correct place because it leads to tightly coupled applications and code that can be hard to maintain over time. Fortunately, several frameworks exist that address these issues. Two of the most popular frameworks in this space are Spring and PicoContainer. These are referred to as microcontainers that have a very small footprint and determine how you wire your objects together. Both of these frameworks work on a simple concept of dependency injection (also known as inversion of control). This article will focus on Spring&#8217;s use of setter injection through bean properties for named configuration parameters. Spring also allows a sophisticated form of constructor injection as an alternative to setter injection as well. The objects are wired together by a simple XML file that contains references to objects such as the transaction management handler, object factories, service objects that contain business logic, and data access objects (DAO).</p>
<p>The way Spring uses these concepts will be made clearer with examples later in this article. The business layer should be responsible for the following:</p>
<p>Handling application business logic and business validation<br />
Managing transactions<br />
Allowing interfaces for interaction with other layers<br />
Managing dependencies between business level objects<br />
Adding flexibility between the presentation and the persistence layer so they do not directly communicate with each other<br />
Exposing a context to the business layer from the presentation layer to obtain business services<br />
Managing implementations from the business logic to the persistence layer<br />
The Domain Model Layer<br />
Finally, since we are addressing non-trivial, web-based applications we need a set of objects that can move between the different layers. The domain object layer consists of objects that represent real-world business objects such as an Order, OrderLineItem, Product, and so on. This layer allows developers to stop building and maintaining unnecessary data transfer objects, or DTOs, to match their domain objects. For example, Hibernate allows you to read database information into an object graph of domain objects, so that you can present it to your UI layer in a disconnected manner. Those objects can be updated and sent back across to the persistence layer and updated within the database. Furthermore, you do not have to transform objects into DTOs, which can get lost in translation as they are moved between different application layers. This model allows Java developers to work with objects naturally in an OO fashion without additional coding.</p>
<p><span style="font-weight: bold">Wiring Together a Simple Example</span><br />
Now that we understand the components from a high level, let&#8217;s put this into practice. Again, for this example, we will combine the Struts, Spring, and Hibernate frameworks. Each one of these frameworks has too much detail to cover in one article. Instead of going into many details about each framework, this article will show how to wire them together with simple example code. The sample application will demonstrate how a request is serviced across each layer. A user of this sample application can save a new order to the database and view an existing order in the database. Further enhancements might allow the user to update or delete an existing order.</p>
<p>You can download the source code of the application.</p>
<p>First, we will create our domain objects since they will interoperate with each layer. These objects will allow us to define what should be persisted, what business logic should be provided, and what type of presentation interface should be designed. Next, we will configure the persistence layer and define object-to-relational mappings with Hibernate for our domain objects. Then we will define and configure our business objects. After we have these components we can discuss wiring these layers using Spring. Finally, we will provide a presentation layer that knows how to communicate with the business service layer and knows how to handle exceptions that arise from other layers.</p>
<p>Domain Object Layer<br />
Since these objects will interoperate across all layers this might be a good place to start coding. This simple domain model will contain an object that represents an order and an object that represents a line item for an order. The order object will have a one-to-many relationship to a collection of line item objects. The example code has two simple objects in the domain layer:</p>
<p>com.meagle.bo.Order.java: contains the header-level information for an order.<br />
com.meagle.bo.OrderLineItem.java: contains the detail-level information for an order.<br />
Consider choosing package names for your objects that reflect how your application is layered. For example, the domain objects in the sample application can be located in the com.meagle.bo package. More specialized domain objects would be located in subpackages under the com.meagle.bo package. The business logic begins in the com.meagle.service package and DAO objects are located in the com.meagle.service.dao.hibernate package. The presentation classes for forms and actions reside in com.meagle.action and com.meagle.forms, respectively. Accurate package naming provides a clear separation for the functionality that your classes provide, allows for easier maintenance when troubleshooting, and provides consistency when adding new classes or packages to the application.</p>
<p>Persistence Layer Configuration<br />
There are several steps involved in setting up the persistence layer with Hibernate. The first step is to configure our domain business objects to be persisted. Since Hibernate works with POJOs we will use our domain objects for persistence. Therefore the Order and OrderLineItem objects will need to provide getter and setter methods for all fields that they contain. The Order object would contain setter and getter methods such as ID, UserName, Total, and OrderLineItems in a standard JavaBean format. The OrderLineItem would similarly follow the JavaBean format for its fields.</p>
<p>Hibernate maps domain objects-to-relational databases in XML files. For our Order and OrderLineItem objects there will be two mapping files to express this. There are tools such as XDoclet to assist with this mapping. Hibernate will map the domain objects to these files:</p>
<p>Order.hbm.xml<br />
OrderLineItem.hbm.xml<br />
You will find these generated files in the WebContent/WEB-INF/classes/com/meagle/bo directory. The Hibernate SessionFactory is configured to know which database it is communicating with, the DataSource or connection pool to use, and what persistent objects are available for persistence. Session objects provided by the SessionFactory are the interface used to translate between Java objects and persistence functions such as selecting, saving, updating, and deleting objects. We will discuss configuring the SessionFactory that Hibernate requires to handle Session objects in a later section.</p>
<p>Business Layer Configuration<br />
Now that we have our domain objects we need to have business service objects that perform application logic, make calls to the persistence layer, take requests from the UI layer, deal with transactions, and handle exceptions. To wire all of this together and make this easy to manage we will use the bean management aspect of the Spring framework. Spring uses inversion of control (IoC), or setter dependency injection, to wire up objects that are referenced in an external XML file. Inversion of control is a simple concept that allows objects to accept other objects that are created at a higher level. This way your object is free from having to create objects and reduces object coupling.</p>
<p>Here is an example of an object creating its dependencies without IoC, which leads to tight object coupling:</p>
<p><img src="http://www.onjava.com/onjava/2004/04/07/graphics/nonioc.gif" border="0" /><br />
Figure 2. Objects arranged without IoC. Object A creates objects B and C.</p>
<p>And here is an example with IoC that allows objects to be created at higher levels and passed into objects so that they can use the implementations directly:</p>
<p><img src="http://www.onjava.com/onjava/2004/04/07/graphics/ioc.gif" border="0" /><br />
Figure 3. Objects arranged with IoC. Object A contains setter methods that accept interfaces to objects B and C. This could have also been achieved with constructors in object A that accepts objects B and C.</p>
<p>Building Our Business Service Objects<br />
The setters we will use in our business objects accept interfaces that allow loosely defined implementations of the objects that will be set, or injected. In our case we will allow our business service object to accept a DAO to handle the persistence of our domain objects. While the examples in this article use Hibernate, we can easily switch implementations to a different persistence framework and inform Spring of the new implementation DAO object to use. You can see how programming to interfaces and using the dependency injection pattern loosely couples your business logic from your persistence mechanism.</p>
<p>Here is the interface for the business service object that is stubbed for a DAO object dependency:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">public interface IOrderService {<br />
public abstract Order saveNewOrder(Order order)<br />
throws OrderException,<br />
OrderMinimumAmountException;</p>
<p>public abstract List findOrderByUser(<br />
String user)<br />
throws OrderException;</p>
<p>public abstract Order findOrderById(int id)<br />
throws OrderException;</p>
<p>public abstract void setOrderDAO(<br />
IOrderDAO orderDAO);<br />
}</td>
</tr>
</table>
<p><span class="postbody"><br />
Notice that the code above has a setter for a DAO object. There is not a getOrderDAO method because it is not necessary since there is often no need to access the wired OrderDAO object from the outside. The DAO object will be used to communicate with our persistence layer. We will wire the business service object and the DAO object together with Spring. Because we are coding to interfaces, we do not tightly couple the implementation.</p>
<p>The next step is to code our DAO implementation object. Since Spring has built-in support for Hibernate this example DAO will extend the HibernateDaoSupport class, which allows us to easily get a reference to a HibernateTemplate, which is a helper class that simplifies coding with a Hibernate Session and handles HibernateExceptions. Here is the interface for the DAO:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">public interface IOrderDAO {</p>
<p>public abstract Order findOrderById(<br />
final int id);</p>
<p>public abstract List findOrdersPlaceByUser(<br />
final String placedBy);</p>
<p>public abstract Order saveOrder(<br />
final Order order);<br />
}</td>
</tr>
</table>
<p><span class="postbody"><br />
We still have a couple more objects to wire together for our business layer. This includes the HibernateSessionFactory and a TransactionManager object. This is done directly in the Spring configuration file. Spring provides a HibernateTransactionManager, which will bind a Hibernate Session from the factory to a thread to support transactions (see ThreadLocal for more information). Here is the Spring configuration of the HibernateSessionFactory and the HibernateTransactionManager:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">&lt;bean id=&#8221;mySessionFactory&#8221;<br />
class=&#8221;org.springframework.orm.hibernate.<br />
LocalSessionFactoryBean&#8221;&gt;<br />
&lt;property name=&#8221;mappingResources&#8221;&gt;<br />
&lt;list&gt;<br />
&lt;value&gt;<br />
com/meagle/bo/Order.hbm.xml<br />
&lt;/value&gt;<br />
&lt;value&gt;<br />
com/meagle/bo/OrderLineItem.hbm.xml<br />
&lt;/value&gt;<br />
&lt;/list&gt;<br />
&lt;/property&gt;</p>
<p>&lt;property name=&#8221;hibernateProperties&#8221;&gt;<br />
&lt;props&gt;<br />
&lt;prop key=&#8221;hibernate.dialect&#8221;&gt;<br />
net.sf.hibernate.dialect.MySQLDialect<br />
&lt;/prop&gt;<br />
&lt;prop key=&#8221;hibernate.show_sql&#8221;&gt;<br />
false<br />
&lt;/prop&gt;<br />
&lt;prop key=&#8221;hibernate.proxool.xml&#8221;&gt;<br />
C:/MyWebApps/&#8230;/WEB-INF/proxool.xml<br />
&lt;/prop&gt;<br />
&lt;prop key=&#8221;hibernate.proxool.pool_alias&#8221;&gt;<br />
spring<br />
&lt;/prop&gt;<br />
&lt;/props&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</p>
<p>&lt;!&#8211; Transaction manager for a single Hibernate<br />
SessionFactory (alternative to JTA) &#8211;&gt;<br />
&lt;bean id=&#8221;myTransactionManager&#8221;<br />
class=&#8221;org.<br />
springframework.<br />
orm.<br />
hibernate.<br />
HibernateTransactionManager&#8221;&gt;<br />
&lt;property name=&#8221;sessionFactory&#8221;&gt;<br />
&lt;ref local=&#8221;mySessionFactory&#8221;/&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</td>
</tr>
</table>
<p><span class="postbody"><br />
Each object can be referenced in the Spring configuration within a &lt;bean&gt; tag. In this case the bean mySessionFactory represents a HibernateSessionFactory and the bean myTransactionManager represents a Hibernate transaction manager. Notice that the transactionManger bean has a property element called sessionFactory. The HibernateTransactionManager class has a setter and getter for sessionFactory, which is used for dependency injection when the Spring container starts. The sessionFactory property references the mySessionFactory bean. These two objects will now be wired together when the Spring container initializes. This wiring relieves you from creating singleton objects and factories for referencing and creating these objects, which reduces code maintenance in your application. The mySessionFactory bean has two property elements, which translate to setters for mappingResources and hibernatePropertes. Normally, this configuration would be stored in the hibernate.cfg.xml file if you were using Hibernate outside of Spring. However, Spring provides an easy way to incorporate the Hibernate configuration within the Spring configuration file. For more information see the Spring API.</p>
<p>Now that we have our container service beans configured and wired together we need to wire our business service object and our DAO object together. Then we need to wire these objects to the transaction manager.</p>
<p>Here is what this looks like in the Spring configuration file:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">&lt;!&#8211; ORDER SERVICE &#8211;&gt;<br />
&lt;bean id=&#8221;orderService&#8221;<br />
class=&#8221;org.<br />
springframework.<br />
transaction.<br />
interceptor.<br />
TransactionProxyFactoryBean&#8221;&gt;<br />
&lt;property name=&#8221;transactionManager&#8221;&gt;<br />
&lt;ref local=&#8221;myTransactionManager&#8221;/&gt;<br />
&lt;/property&gt;<br />
&lt;property name=&#8221;target&#8221;&gt;<br />
&lt;ref local=&#8221;orderTarget&#8221;/&gt;<br />
&lt;/property&gt;<br />
&lt;property name=&#8221;transactionAttributes&#8221;&gt;<br />
&lt;props&gt;<br />
&lt;prop key=&#8221;find*&#8221;&gt;<br />
PROPAGATION_REQUIRED,readOnly,-OrderException<br />
&lt;/prop&gt;<br />
&lt;prop key=&#8221;save*&#8221;&gt;<br />
PROPAGATION_REQUIRED,-OrderException<br />
&lt;/prop&gt;<br />
&lt;/props&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</p>
<p>&lt;!&#8211; ORDER TARGET PRIMARY BUSINESS OBJECT:<br />
Hibernate implementation &#8211;&gt;<br />
&lt;bean id=&#8221;orderTarget&#8221;<br />
class=&#8221;com.<br />
meagle.<br />
service.<br />
spring.<br />
OrderServiceSpringImpl&#8221;&gt;<br />
&lt;property name=&#8221;orderDAO&#8221;&gt;<br />
&lt;ref local=&#8221;orderDAO&#8221;/&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</p>
<p>&lt;!&#8211; ORDER DAO OBJECT &#8211;&gt;<br />
&lt;bean id=&#8221;orderDAO&#8221;<br />
class=&#8221;com.<br />
meagle.<br />
service.<br />
dao.<br />
hibernate.<br />
OrderHibernateDAO&#8221;&gt;<br />
&lt;property name=&#8221;sessionFactory&#8221;&gt;<br />
&lt;ref local=&#8221;mySessionFactory&#8221;/&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</td>
</tr>
</table>
<p><span class="postbody"><br />
Figure 4 is an overview of what we have wired together. This shows how each object is related and set into other objects by Spring. Compare this with the Spring configuration file in the sample application to see these relationships.</p>
<p><img src="http://www.onjava.com/onjava/2004/04/07/graphics/spring_wiring.gif" border="0" /><br />
Figure 4. This is how Spring will assemble the beans based on this configuration.</p>
<p>This example uses a TransactionProxyFactoryBean, which has a setter for a transaction manager that we have already defined. This is a convenience object that knows how to deal with declarative transaction handling and your service objects. You can define how transactions are handled through the transactionAttributes property, which defines patterns for method names, and how they participate in a transaction. For more information about configuring isolation levels and commits or rollbacks on a transaction see TransactionAttributeEditor.</p>
<p>The class TransactionProxyFactoryBean also has a setter for a target, which will be a reference to our business service object called orderTarget. The orderTarget bean defines which business service class to use and it has a property which refers to setOrderDAO(). This property will populate the orderDAO bean that is our DAO object to communicate with our persistence layer.</p>
<p>One more note about Spring and beans is that beans can operate in two modes. These are defined as singleton and prototype. The default mode for a bean is singleton that means that one shared instance of the bean will be managed. This is used for stateless operations like a stateless session bean would provide. The prototype mode allows new instances of the bean to be create when the bean is served through Spring. You should only use prototype mode when each user needs their own copy of the bean.</p>
<p>Providing a Service Locator<br />
Now that we have wired up our services with our DAO we need to expose our services to other layers. This is generally used from code in a layer such as UI that uses Struts or Swing. An easy way to handle this is with a service locator patterned class to return resources from a Spring context. This can also be done directly through Spring by referencing the bean ID.</p>
<p>Here is an example of how a service locator can be configured in a Struts Action:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">public abstract class BaseAction extends Action {</p>
<p>private IOrderService orderService;</p>
<p>public void setServlet(ActionServlet<br />
actionServlet) {<br />
super.setServlet(actionServlet);<br />
ServletContext servletContext =<br />
actionServlet.getServletContext();</p>
<p>WebApplicationContext wac =<br />
WebApplicationContextUtils.<br />
getRequiredWebApplicationContext(<br />
servletContext);</p>
<p>this.orderService = (IOrderService)<br />
wac.getBean(&#8220;orderService&#8221;);<br />
}</p>
<p>protected IOrderService getOrderService() {<br />
return orderService;<br />
}<br />
}</td>
</tr>
</table>
<p><span class="postbody"><br />
UI Layer Configuration<br />
The UI Layer for the example application uses the Struts framework. Here we will discuss what is related to Struts when layering an application. Let&#8217;s begin by examining an Action configuration within the struts-config.xml file.<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">&lt;action path=&#8221;/SaveNewOrder&#8221;<br />
type=&#8221;com.meagle.action.SaveOrderAction&#8221;<br />
name=&#8221;OrderForm&#8221;<br />
scope=&#8221;request&#8221;<br />
validate=&#8221;true&#8221;<br />
input=&#8221;/NewOrder.jsp&#8221;&gt;<br />
&lt;display-name&gt;Save New Order&lt;/display-name&gt;<br />
&lt;exception key=&#8221;error.order.save&#8221;<br />
path=&#8221;/NewOrder.jsp&#8221;<br />
scope=&#8221;request&#8221;<br />
type=&#8221;com.meagle.exception.OrderException&#8221;/&gt;<br />
&lt;exception key=&#8221;error.order.not.enough.money&#8221;<br />
path=&#8221;/NewOrder.jsp&#8221;<br />
scope=&#8221;request&#8221;<br />
type=&#8221;com.<br />
meagle.<br />
exception.<br />
OrderMinimumAmountException&#8221;/&gt;<br />
&lt;forward name=&#8221;success&#8221; path=&#8221;/ViewOrder.jsp&#8221;/&gt;<br />
&lt;forward name=&#8221;failure&#8221; path=&#8221;/NewOrder.jsp&#8221;/&gt;<br />
&lt;/action&gt;</td>
</tr>
</table>
<p><span class="postbody"><br />
The SaveNewOrder Action is used to persist an order that the user submitted from the UI layer. This is a typical Struts Action; however, notice the exception configuration for this action. These exceptions are also configured in the Spring configuration file, applicationContext-hibernate.xml, for our business service objects in the transactionAttributes property. When these exceptions get thrown back from the business layer we can handle them appropriately in our UI. The first exception, OrderException, will be used by this action when there is a failure saving the order object in the persistence layer. This will cause the transaction to rollback and propagate the exception back through the business object to the Struts layer. The OrderMinimumAmountException will also be handled in a transaction within the business object logic that fails when the order placed does not meet the minimum order amount. Again, the transaction will rollback and this exception can be handled properly by the UI layer.</p>
<p>The last wiring step is to allow our presentation layer to interact with our business layer. This is done by using the service locator that was previously discussed. The service layer acts as an interface to our business logic and persistence layer. Here is how the SaveNewOrder Action in Struts might use a service locator to invoke a business method:<br />
</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>代码:</strong></span></td>
</tr>
<tr>
<td class="code">public ActionForward execute(<br />
ActionMapping mapping,<br />
ActionForm form,<br />
javax.servlet.http.HttpServletRequest request,<br />
javax.servlet.http.HttpServletResponse response)<br />
throws java.lang.Exception {</p>
<p>OrderForm oForm = (OrderForm) form;</p>
<p>// Use the form to build an Order object that<br />
// can be saved in the persistence layer.<br />
// See the full source code in the sample app.</p>
<p>// Obtain the wired business service object<br />
// from the service locator configuration<br />
// in BaseAction.<br />
// Delegate the save to the service layer and<br />
// further upstream to save the Order object.<br />
getOrderService().saveNewOrder(order);</p>
<p>oForm.setOrder(order);</p>
<p>ActionMessages messages = new ActionMessages();<br />
messages.add(<br />
ActionMessages.GLOBAL_MESSAGE,<br />
new ActionMessage(<br />
&#8220;message.order.saved.successfully&#8221;));</p>
<p>saveMessages(request, messages);</p>
<p>return mapping.findForward(&#8220;success&#8221;);<br />
}</td>
</tr>
</table>
<p><span class="postbody"><br />
Conclusion<br />
This article covers a lot of ground in terms of technology and architecture. The main concept to take away is how to better separate your application, user interface, persistence logic, and any other application layer you require. Doing this will decouple your code, allow new code components to be added, and make your application more maintainable in the future. The technologies covered here address specific problems well. However, by using this type of architecture you can replace application layers with other technologies. For example, you might not want to use Hibernate for persistence. Since you are coding to interfaces in your DAO objects it should be apparent to you how you might use another technology or framework, such as iBATIS, as a substitute. Or you might want to replace your UI layer with a different framework than Struts. Switching UI layer implementations should not directly affect your business logic or your persistence layer. Replacing your persistence layer should not affect your UI logic or business service layer. Wiring a web application is not a trivial task but it can be made easier to deal with by decoupling your application layers and wiring it together with suitable frameworks.</p>
<p>Mark Eagle is a Senior Software Engineer at MATRIX Resources, Inc. in Atlanta, GA.</span><span class="postbody"><br />
_________________<br />
Make the best forever.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tmtbox.com/wiring-your-web-application-with-open-source-java/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

