<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss">
 	<channel>
		<title>WebObjects Tips | Twin Forces, Home of the Frictionless To-Do/GTD Program | Pierce T. Wetter III</title>
		<link>http://www.twinforces.com/webobjects_tips/</link>
		<description></description>
		<language>en</language>
		<lastBuildDate>Wed, 25 Jun 2008 12:45:40 -0700</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Sandvox Pro 1.5b3</generator>
		<item>
			<title>WO on Windows</title>
			<link>http://www.twinforces.com/webobjects_tips/wo_on_windows.html</link>
			<description>
<div id="k-svxTextBlock-06A9289AA1604CBE961B" class="kBlock kSummary kOptional kImageable"><p>Some people think that because Apple no longer supports Windows as a development platform that WO is "dead".</p>
<p>The reality is that WebObjects is supported about as well as any non-Microsoft web application development system is supported on Windows. Look at Hibernate/Struts/whatever. There's no "support" for these systems, merely an "active user community". </p>
<p>So what we think of as "support" for Windows really means that "the community deals with it". I don't blame Apple for stopping official support. </p>
<p>In this case, this means using Eclipse and WOLips to develop under Windows. Given that many WO users use Eclipse anyways, its not much of a stretch really.</p>
<p><a href="http://www.objectstyle.org/confluence/display/WOL/Install+WOLips+with+Eclipse+Update+Manager" target="_blank">Here's how to get started.</a></p>
</div>
			</description>
			<pubDate>Wed, 21 Jun 2006 12:25:31 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/wo_on_windows.html</guid>
		</item>
		<item>
			<title>Problem? Back up a step</title>
			<link>http://www.twinforces.com/webobjects_tips/problem_back_up_a_step.html</link>
			<description>
<div id="k-svxTextBlock-6DEB248125764DFBA098" class="kBlock kSummary kOptional kImageable"><p>When you have a particularly thorny problem with WebObjects, you may want to back up a step, because the problem you're having may be one of architecture, not the particular symptom you're experiencing.</p>
<p>A couple of times I've been asked:</p>
<p><span><i>How do you handle an optimistic locking failure?</i></span></p>
<p>The question always makes me cringe, because if you're asking that question, you have a schema problem, not a problem with WebObjects; you're asking the wrong question. The optimistic locking failure you're trying to work around is a symptom of a system problem. You need to back up a step and look at the bigger picture.</p>
<p>The real question you should be asking yourself is: Why do I have multiple processes trying to write the same piece of data at the same time, and what can I change the schema to prevent that? </p>
<p>If you ask yourself that question, you may find that the right answer for dealing with the error is actually to turn off the columns WO is locking on, because if your system is correctly designed, then the right answer to an optimistic locking failure is:</p>
<p>1. Failure. The failure is correct.</p>
<p>2. Ignore. The system can robustly handle duplicate changes.</p>
<p>3. Transactions. WO and databases support transactional changes, use them.</p>
<p>I have yet to see a system where dealing with the optimistic lock after it happened was the right answer. </p>
</div>
			</description>
			<pubDate>Fri, 16 Jun 2006 15:30:00 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/problem_back_up_a_step.html</guid>
		</item>
		<item>
			<title>Dealing with Performance Problems</title>
			<link>http://www.twinforces.com/webobjects_tips/dealing_with_performance_pr.html</link>
			<description>
<div id="k-svxTextBlock-4AB48691EE334D48872E" class="kBlock kSummary kOptional kImageable"><p>Ok, so you've got some sort of performance problem. What do you do?</p>
<p>First, <span><i>measure</i></span> what's going on. The best thing I've found to use is some sort of sampling profiler that can go and sample all the threads and see what's going on. WebObjects applications have multiple possible bottlenecks, and its much easier to see what's going on with a 10 second snapshot of the stack then hours of speculation. The "sample" tool works particularly well with ObjC, but with Java you can use the Shark tools if you have access to the GUI. </p>
<p>Next, <span><i>architect</i></span>. Now that you know where the application is spending its time, backup a step and look at the system as a whole. Waiting for the database? Well, why are you doing so many database fetches? Can you optimize those away? At Marketocracy, we found that we were spending 1/3rd of the time doing date arithmetic which was mostly due to allocating/deallocating NSCalendarDates. Since we only needed one date per day, rather then optimized the date math, I made it so that we created all the dates since the beginning of the website at startup. 10K of memory made the site 30% faster. </p>
<p>Similarly, you have to design for scalability. It's not free. If your database is slow, and you have to do the fetches you're doing, then yeah, maybe you need to move the database to a faster machine. But maybe some parts of your system could live with a read-only replicated copy.</p>
<p>Finally, <span><i>optimize</i></span>. Sometimes, the right answer really is to optimize the code. But less often then you think. Optimizing can make something 10% faster, architecting can make something 10x faster.</p>
</div>
			</description>
			<pubDate>Fri, 16 Jun 2006 15:39:52 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/dealing_with_performance_pr.html</guid>
		</item>
		<item>
			<title>Home Page Should Be Static</title>
			<link>http://www.twinforces.com/webobjects_tips/home_page_should_be_static.html</link>
			<description>
<div id="k-svxTextBlock-8858B4524D684039851A" class="kBlock kSummary kOptional kImageable"><p>Your home page should be static. Robots, search engines, and browsers are just a fact of life, and 90% of the home page views won't go deeper. Why load up your server generating that page anyways? Design the page using direct actions and let the webserver do all the work.</p>
<p>If you like, you can still have it dynamically generated, just have a cron task to pull the web page once/day using curl and archive it.</p>
</div>
			</description>
			<pubDate>Fri, 16 Jun 2006 15:27:02 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/home_page_should_be_static.html</guid>
		</item>
		<item>
			<title>Real WO Programmers Edit their own HTML</title>
			<link>http://www.twinforces.com/webobjects_tips/real_wo_programmers_edit_th.html</link>
			<description>
<div id="k-svxTextBlock-710307F075B84327AB35" class="kBlock kSummary kOptional kImageable"><p>Seriously, if you're a WOBuilder user, you need to think about going down to the bare metal occasionally. WOBuilder has its uses, but long term WO programmers end up doing most of their own editing. </p>
</div>
			</description>
			<pubDate>Fri, 16 Jun 2006 11:13:39 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/real_wo_programmers_edit_th.html</guid>
		</item>
		<item>
			<title>Passing Through Bindings</title>
			<link>http://www.twinforces.com/webobjects_tips/passing_through_bindings.html</link>
			<description>
<div id="k-svxTextBlock-DC5CD4776B2D42079C74" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you have a component that manually pulls its values out of the bindings, if you have a ^ in front of a value name in a .wod file, that tells webobjects to look for that value in the bindings where the component is used. That is:</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">value = ^ value;</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">in a component’s .wod file, will let you pass through bindings without having to add accessors or instance variables. This makes it easy to pass through any options on your sub-components out to clients of your component. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">This need not be a declared binding. Since WebObjects will pass through any declaration on a basic dynamic element through to the HTML, any HTML attribute can be used as a setting. You can even change names as you pass them through, so that you can have:</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">height= ^imageHeight;</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">So the binding for your component will be “imageHeight=10” but it will be written into the HTML as height=”10”.</span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:34:27 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/passing_through_bindings.html</guid>
		</item>
		<item>
			<title>Load Balancing is Evil</title>
			<link>http://www.twinforces.com/webobjects_tips/load_balancing_is_evil.html</link>
			<description>
<div id="k-svxTextBlock-057FB6F5689A49D8A8C4" class="kBlock kSummary kOptional kImageable"><p><span style="background-color: transparent; font-size: 12px; color: black;">The settings for the WebObjects adaptor have this very temptingly named distribution method called “load balancing”.</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Don’t use it. Use round-robin, its simple, and it works. If you have multiple webservers, be sure and tweak the round-robin order that you distribute requests to or use random.</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;"><span><b>Why</b></span></span><span style="background-color: transparent; font-size: 12px; color: black;">: The LoadBalancing method leads to a cascade failure because what really happens is that the adaptor forwards ALL incoming requests to a single instance, bringing that instance down. That’s because the load balancing isn’t live, its the load </span><span style="background-color: transparent; font-size: 12px; color: black;">as of the last successful request</span><span style="background-color: transparent; font-size: 12px; color: black;">. </span></p>
<p style="text-align: left;"><span style="background-color: transparent; font-size: 12px; color: black;"><span><b>In Detail</b></span></span><span style="background-color: transparent; font-size: 12px; color: black;">: Lets say you have 3 instances, 1, 2, 3. To start, let’s say requests have been coming in slowly enough. So the instances will show up in the load balancing with various loads:</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 1 load: 3.4</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 2 load: 2.3</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 3 load: 4.5</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Now lets say your CEO goes on TV, and so 50 people fire up their browsers and jump to your site in the same moment. Where are those 50 new sessions going to go? All of them will go to instance 2, because it has the lowest load. </span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Now sure, instance 2 now has a higher load, but that’s the real-time load. The load number that WebObjects uses for the load balancing is based on the value returned from the last </span><span style="background-color: transparent; font-size: 12px; color: black;">completed</span><span style="background-color: transparent; font-size: 12px; color: black;"> request. So until the first of those 50 requests come back from instance 2, the adaptor will continue to forward requests to instance 2. </span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Even then, it won’t help you, because then it might look like this:</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 1 load: 3.4</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 2 load: 52.3</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 3 load: 4.5</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">So the next 50 requests will go to instance 1. The same thing will happen:</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 1 load: 53.4</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 2 load: 52.3</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 3 load: 4.5</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Now they will all go to instance 3. The same thing happens:</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 1 load: 53.4</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 2 load: 52.3</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 3 load: 54.5</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Ok, so now the surge passes, and instance 2 now has the lowest load average again, and completes some successful requests so that the adaptor pulls is lower load average:</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 1 load: 53.4</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 2 load: 2.3</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Instance 3 load: 54.5</span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">It will now be almost impossible for instance 1 and 3 to ever be used again. You’ve gone from having 3 instances to effectively having 1. </span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">That’s with 3 instances. If your site is as busy as ours so you need something like 45 instances to deal with load, the problem is even worse because what happens is that having all those requests go to a single instance basically destroys that instance. So then the adaptor sends the next set of requests to the next instance in the list, destroys that, etc. </span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">A cascade failure, which brings down the site. </span></p>
<p><span style="background-color: transparent; font-size: 12px; color: black;">Round-robin on the other hand is brutally simple, and always works if you have one webserver, because each instance gets allocated new sessions evenly. If you have multiple webservers, its a bit more tricky, because their roundrobin won’t be in sync. So instead of new sessions going to instance 1, 2, 3, 4, with two webservers it goes 1,1, 2, 2, 3, 3. You can fix this by either having one webserver allocate in reverse order 45,44,43 by editing the XML config file or by just having both use random.</span></p>
<span style="background-color: transparent; font-size: 12px; color: black;"><br />
</span>
</div>
			</description>
			<pubDate>Tue, 30 May 2006 16:31:16 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/load_balancing_is_evil.html</guid>
		</item>
		<item>
			<title>Direct Actions are easier</title>
			<link>http://www.twinforces.com/webobjects_tips/direct_actions_are_easier.html</link>
			<description>
<div id="k-svxTextBlock-8B022B21748F4C7D8BC0" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Direct Actions are easier to use than regular actions because you can setup your application so that they don’t require any new code. Component actions require a method per action, which gets tedious quick.</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Override performActionNamed() in your DirectAction class to map action names over to pageWithName(), then pull the values out of the request and shove them into the page using takeValueForKey(). Remember that the values coming in from the request are always strings, and all you need add to the page are accessors like setValueS() that convert the strings and store them in their proper place.</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you add those accessors to a common superclass for all your pages, you only need write them once. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">After that, you can define a hyperlink to a page directly from the .wod file. directActionName becomes the page name, and you can simply add ?valueS=value for each parameter the page needs.</span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:39:40 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/direct_actions_are_easier.html</guid>
		</item>
		<item>
			<title>Base Classes Are DRY</title>
			<link>http://www.twinforces.com/webobjects_tips/base_classes_are_dry.html</link>
			<description>
<div id="k-svxTextBlock-CB3D759202E740A081BC" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you have a common base class that for all your components, pages, ajax actions, and EOF objects, you can keep from repeating yourself. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">You’ll want your base component class to inherit from WOComponent, your ajax action class to inherit from that, and your page component to inherit from that. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">WOComponent: BaseComponent : BasePagelet : BasePage</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">BaseComponent should have general utility functions useful for all components. BasePagelet should have functions so that it can pull values out of a DirectAction URL, but it should tell Session not to store the results in the backtracking cache, BasePage should tell Session that it does need to be stored in the backtracking cache. </span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:32:38 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/base_classes_are_dry.html</guid>
		</item>
		<item>
			<title>Stateless Components, Stateful Forms</title>
			<link>http://www.twinforces.com/webobjects_tips/stateless_components_statef.html</link>
			<description>
<div id="k-svxTextBlock-974DC80017A444CF8CCE" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Stateless components are a huge win with WebObjects. All of your basic UI components should be stateless. Occasionally, you’ll want to have pages with state, especially forms. That’s fine, just take the extra time with the things you use on every page like navigation bars, etc. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you can set all the instance variables of your component to NULL in sleep(), it can be stateless. </span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:35:42 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/stateless_components_statef.html</guid>
		</item>
		<item>
			<title>Single-Object Pages</title>
			<link>http://www.twinforces.com/webobjects_tips/single-object_pages.html</link>
			<description>
<div id="k-svxTextBlock-A8FD91BA4CB24BFA86E8" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">90% of your pages could be built with a URL of just the page name and the primary key of a root object. That is:</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">/cgi-bin/WebObjects/MyApp.woa/wa/MyPage?pkey=12</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Write code to grab a single object out of the editing context using objectWithPrimaryKeyValueEntityNamed() and setup the page’s object via a direct action and you can add new pages with minimal coding. </span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:29:48 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/single-object_pages.html</guid>
		</item>
		<item>
			<title>NULL is your friend</title>
			<link>http://www.twinforces.com/webobjects_tips/null_is_your_friend.html</link>
			<description>
<div id="k-svxTextBlock-0A5BB71ACCC34C1BB342" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you set as much as you possibly can to NULL in sleep() you’ll get along with the JVM and Garbage Collector much better.</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Additionally, on MacOSX, this is an even bigger win, because MacOSX has this three-stage lifecycle for objects. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you find yourself marking all of your instance variables NULL, consider making the component stateless. </span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:35:11 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/null_is_your_friend.html</guid>
		</item>
		<item>
			<title>Learn AJAX First</title>
			<link>http://www.twinforces.com/webobjects_tips/learn_ajax_first.html</link>
			<description>
<div id="k-svxTextBlock-A1A47FB4766B48EB8B25" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">AJAX as a technology involves a lot of different pieces. You need to understand the HTML Document Object Model, JavaScript, XMLHttpRequest, how the application server deals with requests, not to mention the particular Javascript library you’ve chosen and what it’s doing.</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Once you have those down, integrating with WebObjects is actually very simple, because WebObjects has an outstanding component model that will let you build super-smart components. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><a href="http://www.amazon.com/exec/obidos/redirect?tag=twinforces&link_code=xm2&camp=2025&creative=165953&path=http://www.amazon.com/gp/redirect.html%3fASIN=0596101694%26tag=twinforces%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0596101694%253FSubscriptionId=02ZH6J1W0649DTNS6002"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px;">This book</span></a><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;"> can get you started.</span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:36:09 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/learn_ajax_first.html</guid>
		</item>
		<item>
			<title>id and name attributes</title>
			<link>http://www.twinforces.com/webobjects_tips/id_and_name_attributes.html</link>
			<description>
<div id="k-svxTextBlock-96944789BD0D4A918675" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">WebObjects will happily provide name attributes for form fields but you don’t have to let it. Just add a name=”foo” binding, and WebObjects will name the form field foo instead. If the form field is inside a WORepetition, you’ll have to make sure the name field is unique since normally WebObjects does this for you. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Similarly, you can put id=”foo” or really, anything=”foo” on any dynamic element and WebObjects will pass it through into the HTML for you.</span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">So if you have a Javascript WYSIWYG editor or other smart component, and you want to attach it to your WO form fields, id=”xxx” is all you need to add to your wod file.</span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:39:18 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/id_and_name_attributes.html</guid>
		</item>
		<item>
			<title>Awake/Sleep? No, accessors+reset</title>
			<link>http://www.twinforces.com/webobjects_tips/awakesleep_no_accessorsrese.html</link>
			<description>
<div id="k-svxTextBlock-7C4E01F32C5047969169" class="kBlock kSummary kOptional kImageable"><p><span style="background-color: transparent; font-size: 12px; color: black;">Instead of using awake and sleep, consider lazily building things in your accessors, making your components stateless, and using reset instead. Stateless components are a huge win in WebObjects and most people don't realize it, but their components could easily be made stateless.</span></p>
</div>
			</description>
			<pubDate>Wed, 14 Jun 2006 17:34:21 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/awakesleep_no_accessorsrese.html</guid>
		</item>
		<item>
			<title>Avoid Component Actions</title>
			<link>http://www.twinforces.com/webobjects_tips/avoid_component_actions.html</link>
			<description>
<div id="k-svxTextBlock-DBA134F82D9C43EE92DA" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Component actions are great when your page has state. Almost anything that involves a form submission works much more simply and fluidly as a component action (links that look like 1.2.3.4). Component actions let you But 90% of the pages on your site are going to be read-only. For a read-only page, a direct action make much more sense. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">Unless there was a &lt;FORM&gt; tag involved, you probably don’t need a component action.</span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:40:25 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/avoid_component_actions.html</guid>
		</item>
		<item>
			<title>AJAX and Component Actions</title>
			<link>http://www.twinforces.com/webobjects_tips/ajax_and_component_actions.html</link>
			<description>
<div id="k-svxTextBlock-4540121CB140493A8176" class="kBlock kSummary kOptional kImageable"><p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">If you’ve built these super-smart ajaxified components, ‘ware the backtracking cache. Component actions rely on the backtracking cache to map numbers: 1.2.3.4 to a specific page state. 1 Ajax-savvy page, followed by 20 ajax requests might burn through the backtracking cache. </span></p>
<p style="font: normal normal normal 16px/normal Hoefler Text;"><span style="background-color: transparent; font-family: Helvetica Neue; font-size: 12px; color: black;">In general, you should setup your pages to cache, and your ajax responses NOT to cache. Alternatively, if your Ajax actions are also direct actions, you won’t have anything to worry about. </span></p>
<p><br />
</p>
</div>
			</description>
			<pubDate>Thu, 15 Jun 2006 14:36:57 -0700</pubDate>
			<guid>http://www.twinforces.com/webobjects_tips/ajax_and_component_actions.html</guid>
		</item>
 	</channel>
</rss>
