Re: Apple Representation On WebObjects-Dev Mailing List?

2011-07-06 Thread Pierce T. Wetter III
Oh this is just too tempting. 

Radio is the code name for the next release of WO which has been rewritten in 
Scala and can handle 1M pages/sec in a single core, works in both Google App 
Engine and Elastic Beanstalk and ships this fall. 

Oh and the new version of iWeb supports WYSIWYG editing of Radio templates. 

Oh and you can create mobile web apps for iPhone with it that have the same 
power as native. 

Steve Jobs is an iWitch. 

On Jul 6, 2011, at 11:02 AM, Karl  wrote:

> So Apple re-defined the ‘radio’ as an asynchronous communication method.  Is 
> there an App for that?
> 
> Karl
> 
> On Jul 6, 2011, at 9:00 PM, Mike Schrag wrote:
> 
>> Alan, be advised that I've dispatched security to your office for breaking 
>> radio silence.
>> 
>> ms
>> 
>> On Jul 6, 2011, at 12:40 PM, Alan Ward wrote:
>> 
>>> 
>>> There are plenty of "insiders" on the list but I doubt any of them will 
>>> give you an "official" position.
>>> 
>>> Alan
>>> 
>>> 
>>> On Jul 6, 2011, at 10:27 AM, Robert B. Hanviriyapunt wrote:
>>> 
 Who, if anyone, represents Apple on this mailing list?  When it comes to 
 questions of open-sourcing WO or the availability of WO, the answer should 
 be posted by an Apple official rep. in this mailing list.  Anyone can 
 opine, but I think the group benefits greatly when an official word is 
 heard -- second best to that is an "insider", even if not officially 
 charged by Apple to represent in the list.
 
 Thoughts anyone?
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/award%40apple.com
 
 This email sent to aw...@apple.com
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com
>>> 
>>> This email sent to msch...@pobox.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/kgretton%40mac.com
>> 
>> This email sent to kgret...@mac.com
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/pierce%40twinforces.com
> 
> This email sent to pie...@twinforces.com
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Tip: Your next XRaid may be an SSD

2008-12-15 Thread Pierce T. Wetter III


On Dec 15, 2008, at 5:10 PM, Guido Neitzer wrote:


On 15.12.2008, at 15:27, Miguel Arroz wrote:

Excellent email! I've been arguing for some time now that SSD is  
the way to go for DBs, it's good that some real evidence is showing  
up. Seek time kills DBs. :)


There is some evidence showing up, true, but it also probably shows  
bad cache strategies or usage patterns resulting in bad hit rate on  
the cache.


If a change from HD to SSD results in a 40x increase in query  
performance, something seems to be badly wrong with what the  
database does - or the usage pattern and / or the database setup is  
not optimal.



It also might be a case where FrontBase hits some bad walls due to  
what it does while other databases will be not nearly as badly  
effected. For example lots of inserts into large tables with a  
couple indexes plain kills FrontBase performance (at least up to  
version 4.x).


So, these values might be valid for FrontBase, but need a careful  
look where the real gain is coming from as a fast RAID (I'm not  
talking about XserveRAID obviously) combined with a working cache  
will deliver a very high performance, too. Especially when writing  
to the disks.


   Well, there are a couple of issues unique to our data set.

First, realize, that its not a perfect apples/oranges comparison,  
because I didn't run the SQL test on our Production XRaid, but rather  
on my local hard disk. (Because, well, the XRaid is busy. :-)  )If  
you look at the XBench stats for Random Read/Writes, you can see that  
the RAID does pretty well, it's 28 times faster on writes then a  
single HDD, so that would mean the SSD is only 4x faster instead of  
93x for that stat. But still, 4x is nothing to sneeze at.


   Next, we have a high write/read ratio. So we're fundamentally  
limited by Random/Write speed, because that has to get flushed to disk  
(though actually in FB, only the Tlog has to be flushed for the commit  
to work). A lot of the SQL is basically saving a bunch of log file  
messages. So that data can't be cached.


   Also it was a freshly started database in all cases, so the row  
and disk caches probably weren't stabilized yet.


   So yeah, there are a whole bunch of things that databases do to  
take advantage of the 80/20 rule. But remember, this is the  
performance of a single drive, and its kicking butt.


 Pierce

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Tip: Your next XRaid may be an SSD

2008-12-15 Thread Pierce T . Wetter III


 So in an effort to get more performance out of FrontBase I've been  
experimenting with different values of the RDD cache on FrontBase. I  
thought I would pass along the results, as I figure there are probably  
more people on this list using FrontBase then anywhere else.


 Background Data Points:

1. Databases do mostly Random access.

2. FrontBase uses 4K block sizes internally.

3. Databases are primarily I/O limited. See #1. So writing a  
database is really about managing I/O.


4. In FB, Varchars > 32 chars are stored in a spelling table, <=  
32 are stored in the row. Chars switch at 64 chars.


5. When you execute a COMMIT, FrontBase won't return until it has  
confirmed that it has written the data to disk.


6. Our database is currently about 40GB, so 99% of the RAID goes  
on unused.


 So I started with our "oldschema" which was badly designed in a  
number of ways:


1. Varchars were often specified to be quite long, yet only a few  
bytes were used.


2. Varchars were used for fixed-length strings.

3. No column matching was used on any strings, so things like  
"ClassCode" would be independently stored for each row in certain ables.


  One of the great things about databases is that they are basically  
filters. SQL goes in one end and data gets written out the back end.  
So for my benchmark, I took a backup of our database, and the  
1,000,000 lines of logged SQL and fed it to FrontBase. FrontBase sent  
me their ClientSimulator tool which can take a raw SQL log and split  
it into a number of parallel executing streams, pretty much simulating  
how it executed in production. I then measured how long it took to go  
through those million lines of SQL on a single HDD:


 Old Schema with RDD=512: 200 lines/second.

 So that was my baseline. So the first thing I did was try increasing  
the RDD cache:


 Old Schema with RDD=1512: 224 lines/second

 So a 10% gain for more memory. Next I tweaked the schema to handle  
chars and varchars better, and to set column match appropriately:


 New Schema with RDD=1512: 240 lines/second

 To go above 2GB of RAM, I would need a 64-bit database. FrontBase is  
working on such a beast, so I got a prerelease from them for testing.


 New Schema, FB5, RDD=3500: 288 lines/second

 New Schema, FB5, RDD=5500: 359 lines/second

 New Schema, FB5, RDD=11000: 407 lines/second

 So RAM really helps, while the schema tweaks helped some, during  
this process I got a factor of 2x. I was then gearing up to work with  
Apple to test their new Promise-based RAIDs at their developer center  
when I started hearing good things about the Intel X25-E SSD drives.


 So I got two to try out, set them up as a RAID-Concatenated and ran  
my test:



 New Schema, FB5, RDD=(various), 8198 lines/second.

 That's a factor of 40x. Not only that, but the CPU ran at upwards of  
160% during the test compared to the 4-16% I was getting typically. So  
it was to some extent CPU bound. Changing the RDD size didn't make  
much difference, and may actually have slowed things down.


 Why this is so much faster:

 First off, since I didn't have a "spare" XRaid lying around, I'm  
comparing a single HDD to an SSD. In theory, the XRaid is going to be  
faster. So I also did some basic I/O experiments with the SSDs and the  
RAID. While I experimented with some exotic tests like iozone and  
bonnie++, it turns out that the easiest was just good old XBench. So  
here are the XBench stats:



 Single HDDXRaid SSD
Sequential 4K Write   17.3 MB/s   192   MB/s   214 MB/s
Sequential 4K Read41   MB/s   126   MB/s   197 MB/s
Random 4K Write1   MB/s28   MB/s93 MB/s
Random 4K Read .6  MB/s 9.6 MB/s16 MB/s

 So the XRaid is 12x faster then a single drive on sequential writes.  
Some of that is because the RAID isn't really writing, its really just  
putting it into the RAIDs cache.
 It's only about 3x faster on reads, as reads have to wait for the  
disk to catch up.


 For Random, which is what the database is mostly doing the single  
hard disk get's creamed because it has to physically move the disk  
head. The RAID does better, presumably because it may only have to  
seek one drive, or perhaps because its caching. Again, reads are  
slower then writes, because you can't fake that with cache really. The  
RAID is actually much faster then the single drive supposedly, but its  
hard to verify that because the RAID hardware might be caching the  
test file the XRAID is using.


 But if we look at the SSD numbers, they exceed all of the XRaid  
numbers, and kick its ass on Random accesses.


  So I'm seriously looking into switching from our XRaid to a set of  
SSD drives in production. However, there are some challenges with this:


  1. Intel only makes the SSD in 1.8 and 2.5" form factors. Which  
means most rack mount

Re: [OT] FrontBase problem when copying databases

2008-08-11 Thread Pierce T. Wetter III


On Aug 11, 2008, at 7:53 AM, Florijan Stamenkovic wrote:

I asked them about the architecture independence point actually...  
Here's the reply they gave:


"We did look into making the database and backup files binary  
compatible across different endian platforms a while back.
We concluded that the implementation would be "very" non-trivial and  
introduce a performance hit on one platform due
to a large amount of byte swapping. But since the PPC platform is  
dead the advantage gained by this feature will diminish.
Therefore putting the required manpower into this does not make much  
since."


  I used this as an excuse to get everyone in WebServices at PACE  
upgraded to Intel, since that's what production runs on.


  Every cloud has a silver lining.

  Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-10 Thread Pierce T. Wetter III


On Jul 10, 2008, at 4:33 PM, Lachlan Deck wrote:


On 11/07/2008, at 3:50 AM, Chuck Hill wrote:


On Jul 9, 2008, at 8:41 PM, Henrique Prange wrote:

The rest of the patternsets are also not an Ant issue, but a  
design philosophy in woproject (to not force a project layout).


Maven don't force a directory layout also.


My point was that using either Maven or woproject, if you want a  
flexible layout you need to do more work.  If you can accept a set  
layout, your life is easier.  It is not an Ant vs Maven issue as  
Pierce was suggesting.


Right. It's another alternative.

I don't know if Pierce's intention was to create a this vs that  
thing in general... more of a 'what works for him' thing which he  
thought he'd share. Obviously, assuming this assumption is correct,  
this was taken instead as an early jab given Mike's on the verge of  
droppingtheclasspath   ;-)


  Yeah, that was my intention, I dislike Ant, but like WOProject, and  
wish Ant worked like WOProject. I do some stuff in the GUI, and I'm  
done. If Mike is making WOProject work more that way, coolness!


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-10 Thread Pierce T. Wetter III


On Jul 10, 2008, at 10:50 AM, Chuck Hill wrote:



The rest of the patternsets are also not an Ant issue, but a  
design philosophy in woproject (to not force a project layout).


Maven don't force a directory layout also.


My point was that using either Maven or woproject, if you want a  
flexible layout you need to do more work.  If you can accept a set  
layout, your life is easier.  It is not an Ant vs Maven issue as  
Pierce was suggesting.


  That's not quite what I was saying. I was saying that if you use  
Ant, you end up using a standard layout to reduce the amount of work  
you do. But since everyone has their own concept of what a "standard"  
layout looks like, there is no standard. Similarly, in Ant you have to  
specify what targets you want. So again, there's a "standard". The  
maven philosophy is to have defaults, so that if you adhere to those,  
you have less work to do. But that standard really is a standard,  
across all projects at all companies.


  Ant: Specify everything, somewhere (even if its in generic.xml)
  Maven: Specify only your customizations.

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-10 Thread Pierce T. Wetter III


On Jul 9, 2008, at 8:37 PM, Henrique Prange wrote:


Hi Anjo,

Anjo Krank wrote:

Am 09.07.2008 um 06:16 schrieb Anjo Krank:
Oh, I forgot: will someone please fix the maven descriptions so  
they dual-build Wonder with 5.4 and 5.3. I mean, like we're doing  
now?


I have talked with Lachlan about a possible solution using profiles.  
It is on the queue. First things first. We have to build Wonder with  
WO 5.4 correctly in first place.


The priority of this issue 3 months ago was very low. I didn't know  
about any other team (besides mine) using Maven to build WO  
projects. When Lachlan started using Maven the priority changed.  
Other issues will became important with more people using Maven. For  
example, there is no easy way to deploy WO applications to  
JavaMonitor. I have not implemented this task yet because we deploy  
our application on Tomcat. But I think Lachlan and Pierce will like  
something in that way, right?


 Definitely. I'll tell you what we're doing here now, if you're  
interested.


 We use this freeware tool called Iceberg to build an Apple Installer  
package. So the build machine does an install, then Iceberg packages  
up the stuff in /Library/WebObjects into an installer package.


 Long term, I want to migrate this into something that works with  
continuum & maven.


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-09 Thread Pierce T. Wetter III



Now, what does maven do for this?  Unless it is reading  
the .classpath file, it also has to somehow, somewhere duplicate  
the information that Eclipse uses.


No. It's the opposite actually. The classpath is dynamic via the  
maven plugin / builder. i.e., the classpath in eclipse is derived  
from your pom. So there's no duplication there.


  Ah...Coolness.



And will Eclipse update the Maven information in the  pom.xml when  
a new framework is added?


Yes.


When a new jar is added to the project?


Yes.


  Ah...Coolness.





Or is that all manual pom fiddling?


You can do that also if you wish and there's nothing to do in  
Eclipse (except maybe refresh if you edited it externally from  
Eclipse). i.e., all of these three examples result in pom file  
updates.


 The screenshots Henrique posted of the upcoming m2eclipse changes  
look pretty cool.


How would Maven handle it if the package name for the Application  
were changed in Eclispe?


Huh?


  I think he means lets say you have your Application.java in a  
package thusly:


 com.twinforces.myCoolApp.Application

 And you change it to:

 com.twinforces.myCoolerApp.Application

 What do you have to edit so that the new value ends up in  
MacOSClassPath.txt.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-09 Thread Pierce T. Wetter III


On Jul 9, 2008, at 10:11 AM, Anjo Krank wrote:

Note: I don't think LOC is a good metric, but what the heck. Also,  
I'm not really interested in this discussion. I wouldn't participate  
if not for these unfounded claims you made.


  Sorry, I agree that LOC isn't a good metric. I especially think  
that I'd rather have 2000 lines of easily readable code then 1000  
lines of unreadable code.


  But a well founded claim of mine is that I'm a lot farther along in  
understanding maven builds then I've ever been with Ant builds. So far  
I've read 2 Ant books, and 0 maven books. So like the title says, I'm  
more optimistic about maven then I was last week.


I gave an example for a project ant build file and do not see how  
this is complicated at all. One may argue that docs on the  
trizillion properties is lacking, but haven't seen anyone asking on  
the list so far, so I can only assume they work well for everybody  
who is interested.


  Your example consists of variants of:

dir="../../../">

   
   

  Which means that to understand it, I have to then go into Build/ 
build/build.xml and figure out how things change based on the value of  
build.action. So I see this as a false simplicity. Our current build  
works exactly this way, and essentially I have to step through  
everything in build.xml and generic.xml in my mind to make sure  
they're doing the right things with the current values.





Fourth, adding a project typically requires five lines in Build/ 
build/build.xml to add it to the correct group and some props. I  
might consider moving these props from the build file to a  
build.properties and making Build/build/build.xml only specify the  
inter-related deps.


Except you have to add the build dependencies somewhere as well,  
which if you want to compare apples/oranges, you really have to  
count right? You also have to count the information in  
build.properties. The information in the pom.xml file for a new  
project without dependencies is more then 5 lines, its like 10  
lines, but 5 of those name the project so you can reference it  
elsewhere and the other 5 reference the super-pom


My top-level stuff for the project group(s) is also only a few lines.


 Same here. That wasn't quite what I was saying, I was saying that  
the minimum pom.xml file can be quite short as well.



But whatever: where is the maven dual build of Wonder with 5.4 and  
5.3?


  Again, you're asking the wrong person, I'm just learning maven.  
Right now, "woversion" is a parameter to the top level pom.xml, so  
presumably it would be possible to build it both ways. Or even better,  
against all the Apple nightly build snapshots. But I don't know how to  
do that yet.


Never mind. This is my last post on this topic,  maven users may  
find peace and prosperity wherever they thread.


  There's no reason the maven/Ant builds can't be complimentary. It's  
always good to have options.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-09 Thread Pierce T. Wetter III


On Jul 8, 2008, at 7:23 PM, Mike Schrag wrote:

Many of these jar files are duplicates of each other, or even  
worse, different versions of the same jar, like there is a version  
of commons-logging.jar in ERJGroupsSynchronizer and another one in  
EROpenID. Meanwhile, commons-logging is up to version 1.1.1.


To my way of thinking, the Wonder ant builds are already broken if  
EROpenID is building against commons-logging-1.03, but then  
deployed with 1.1.1...
It works unbelievably well. How well? Well, in the course of  
setting up pom.xml files for Wonder, I found out that Wonder was  
missing a secondary dependency, because it used a certain jar file,  
which used another jar file which wasn't included.


Please log bugs in the Wonder Jira for problems like this that you  
find.


I will, though I'm working with Henrique to get a set of final pom.xml  
files for Wonder first, and then Henrique wants to setup a maven  
repository for all the necessary jars to make it easier as well. If we  
do that, you should be able to do:


 svn co http://wonder.sf.net(etc) Wonder

 mvn compile

 And have everything you need. Then we should be able to push that  
information back to the appropriate ERJars and Libraries directories  
for the people who prefer Ant.


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Maven Optimism

2008-07-09 Thread Pierce T. Wetter III




 To give you some examples, for the current Wonder Ant builds,  
between build.xml files, generic.xml, build.properties  
files, .classpath and .patternset files, there are 5320 lines of  
build configuration information in the current Wonder build. The  
equivalent pom files are 2447 lines, which is not only more  
efficient, but includes more information to help avoid the  
jarmeggedon/jarhell problem.


Rubbish.

First, the build files are *way* lighter:


Anjo counts the lines of xml in Build/build/*.xml...



These 1500 lines build *all* of Wonder in the way you specify, with  
the values you specify and the order you specify. *And* they allow  
you to specify your own builds with just a build property and a  
symlink to a build file. You could also use includes or or add your  
own customizations, but the tasks they do are very light.


I may have miscounted by overcounting the symlinks to build.xml though  
as I didn't notice those but I think you're undercounting by only  
looking at Build/build/*.xml.


I'm using this as a measure:

wc -l `find . -name "build.xml" -print` Build/build/build-*.xml Build/ 
build/generic.xml `find . -name "build.properties" -print` `find . - 
name "*.patternset" -print` `find . -name ".classpath" -print`


Because the problem as I've found with Ant is that the build  
information is in all of those files, not just build.xml. This makes  
it easier to use a single generic Ant build file, but to some extent  
that's the whole point of maven in my mind. With Ant, everything is so  
bloody explicit that you end up creating a sort of virtual maven via  
Wonder's generic.xml.


To quote from "generic.xml":

2) to build your own projects that have the same layout as a wonder  
project


So mvn/Wonder have the same approach. Standardize on a layout, so that  
you can use the same build methodology everywhere. You use the same  
recipe you get the same bread.


But I have to say, the ant build files are very complicated to  
understand compared to the pom.xml files. In the past, I've found that  
I end up having to grok all 1300 lines of Build/build/build.xml and  
Build/build/generic.xml in order to debug the build of one of my  
projects.




Second, the individual build files build way more projects:

macbook:Wonder ak$ find . -name build.xml|wc
 67  672775
macbook:Wonder ak$ find . -name pom.xml|wc
 56  562121


You're looking at what you have, but I've rewritten all of those and  
added new ones. I have files to build nearly everything in Wonder on  
my system:


sierramadre:Wonder pierce$ find . -name pom.xml | wc
  68  682440



Thirdly from what I've seen, someone needs to change all these files  
whenever we bump a version. All of Ulrichs commits so far where  
these xml fixes. All *I* need to do is set one property.


  I'm using a property in my pom.xml versions as well. So changing  
all those files isn't really necessary, I can change the version by  
changing the master pom.xml, same as you can. Eventually, I'll move  
all the jar references up to the master pom, which will save me a line  
per reference, and standardize the versions used.





Fourth, adding a project typically requires five lines in Build/ 
build/build.xml to add it to the correct group and some props. I  
might consider moving these props from the build file to a  
build.properties and making Build/build/build.xml only specify the  
inter-related deps.


  Except you have to add the build dependencies somewhere as well,  
which if you want to compare apples/oranges, you really have to count  
right? You also have to count the information in build.properties. The  
information in the pom.xml file for a new project without dependencies  
is more then 5 lines, its like 10 lines, but 5 of those name the  
project so you can reference it elsewhere and the other 5 reference  
the super-pom.





I'll grant you one point for the commons-logging versions, but I use  
neither ERJGroups or EROpenID. If I were and I'd be bothered, I'd  
figure out a way to keep them using only one.





  It's not just that jar. WO uses commons-logging as well. The real  
point here is that managing jar dependencies sucks. I know you feel  
criticized but you shouldn't take it personal because I'm talking  
about Wonder as my real point is that Wonder, which is widely used,  
and considered pretty stable, has some jar dependency issues. The  
solution to the jar problem that Wonder uses is the ERJars framework  
for common jars, and Libraries directories for unique jars, but that  
doesn't really solve the problem unless someone with Obsessive- 
Compulsive-Disorder dedicates their life to keeping ERJars in sync.  
Even then, what if you want some frameworks and not others from  
Wonder, or you need the same (but newer version) jar in one of your  
applications.


 The maven solution is to document the dependencies, and setup a  
whole bunch of infrastructure in order to be able

Maven Optimism

2008-07-08 Thread Pierce T . Wetter III


 Last week, I posted a thread titled Maven Skepticism to the  
WOProject list. It was about my misgivings about Maven, and the issues  
I was having getting started with it.


 So the last few days I've been playing with Maven.

 I am no longer skeptical.

 So I thought I would post about my newfound optimism with Maven. I  
feel I owe it to Henrique and Lachlan for their help. (Thanks guys) I  
also think the current maven evangelism documentation is written a  
little too formally to be comprehensive.


 Background:

 I've been programming since I was 12, which means nearly 30 years  
now. I have a saying:


  Every generation thinks they invented sex, and every generation  
tries to reinvent make.


 Consequently, I hate Ant. I think its implementation is completely  
fubar. I've ranted about it before. I also hate our current build  
process at work, which is basically to hope/pray that the ant build we  
do nightly for deployment/packaging matches the developer builds we do  
in Eclipse.


  Now that I've finally gotten my team on svn, its time to fix the  
build process and reorganize our projects. Hence the interest in  
Maven, basically precipitated by Apple publishing their nightly builds  
as a Maven repository.


  To get started with Maven, I sat down with the Wonder sources, and  
tweaked the existing pom.xml files that had been broken since the  
great re-org to work. (pom.xml are the only and only type of file that  
Maven uses for building)


 What I found:

 Maven is a lot closer to how I would design a build system then it  
is to Ant. In that, its a lot more similar to how typical modern IDEs  
work: If Maven sees a .java file in the right place, it will compile  
it and put in in the jar. If it sees a file in the right place, it  
will treat it as a resource file, and put it in the appropriate  
location.


  In short, for most projects, you don't have to specify a bunch of  
stuff,  you just have to put them in the right place. Additionally,  
unlike ant builds, there's very little redundant information in a  
maven pom file.


  To give you some examples, for the current Wonder Ant builds,  
between build.xml files, generic.xml, build.properties  
files, .classpath and .patternset files, there are 5320 lines of build  
configuration information in the current Wonder build. The equivalent  
pom files are 2447 lines, which is not only more efficient, but  
includes more information to help avoid the jarmeggedon/jarhell problem.


 Jarmeggedon/jarhell

 It seems like one of the greatest tools in a Java programmers  
arsenal is Google, or rather, 3rd party libraries. If you look at the  
Wonder source, there are 65 different .jar files included, about 1 per  
project on average. Many of these jar files are duplicates of each  
other, or even worse, different versions of the same jar, like there  
is a version of commons-logging.jar in ERJGroupsSynchronizer and  
another one in EROpenID. Meanwhile, commons-logging is up to version  
1.1.1.


 To my way of thinking, the Wonder ant builds are already broken if  
EROpenID is building against commons-logging-1.03, but then deployed  
with 1.1.1...


  Maven's solution goes by the fancy name of "dependency management".  
What that means in practice is that most of the information in the  
pom.xml is just a list of what other projects in your source tree a  
given project depends on, and what jars you need by name/version. In  
return, maven:


1. Finds and downloads any jars you're missing.
2. Finds and downloads any jars that those jars use!
3. Builds any inter-project dependencies.
4. Generates the correct classpath.
5. Packages jars as needed in the appropriate place.

   A dependency looks like the following:


commons-logging
commons-logging
1.1.1


   Most of the pom.xml file consists of these dependencies, and the  
site http://mvnrepository.com will even generate them for you.  
Moreover, if you put a "dependencyManagement" section in your top  
level pom as follows:





commons-logging
commons-logging
1.1.1




Then you can leave out the version specifier for your individual  
projects entirely:



commons-logging
commons-logging


Which means you only have to change a single file when you want  
to use version 1.1.2 or something.


 It works unbelievably well. How well? Well, in the course of  
setting up pom.xml files for Wonder, I found out that Wonder was  
missing a secondary dependency, because it used a certain jar file,  
which used another jar file which wasn't included.


It's pretty cool when your build system can find bugs that  
otherwise you 

Unsolicited Plug for OpenReports

2008-07-01 Thread Pierce T. Wetter III


 This is totally unsolicited. I'd like to recommend openreports: http://oreports.com/ 
 to the list as a happy customer.


 I've been using it for almost 2 years now, and recently paid to buy  
the commercial version instead of the open source version.


 One of the best features is actually not the Jasper or BIRT  
reporting, but the Query Report engine, because being able to slap  
together a SQL query together and turn that into a PDF/CSV/Excel  
report kicks butt. I originally set it up to satisfy the business  
people (that's how we calculate billing), but I find myself turning  
queries into reports for my own use as well.


 Since once/quarter someone asks the reporting question, I thought  
I'd toss in my $0.02.


 Pierce


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Zombies and Dead WOAs... Part Two..

2008-06-27 Thread Pierce T. Wetter III


On Jun 27, 2008, at 6:37 AM, James Cicenia wrote:


Will this detect the "no instance available" message?


  It will tend to prevent that message, because deadlocked instances  
will get killed, so you'll always have instances running. It can't  
guarantee that you'll have an instance available though, if you only  
have 2 and one is in "refuse new sessions" and one is deadlocked,  
you're going to get that message during the hour while the script is  
confirming that the instance is deadlocked. At that point, you need  
more instances.


  If you're getting that a lot, you might want to set ERXTimeToKill  
on the command line (assuming you're using Wonder). What that does is  
set a watchdog timer once refuse new sessions is clicked on, so that  
no matter what the instance dies after a certain period of time.  
Otherwise, it's possible to have an instance stuck in refuse new  
sessions because it thinks a session is active that isn't.


 Other ways to prevent this are turning on multithreading in your  
app, but that's not always easy to do if you haven't started out that  
way.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Zombies and Dead WOAs... Part Two..

2008-06-26 Thread Pierce T. Wetter III
I am currently having issues with instances "gumming up" and  
seemingly deadlocking and I also noticing lots of Zombie Java  
processes being created after an application restarts.


So my questions are really two fold..

Firstly, is it possible to attach Eclipse as a debugger to a remote  
running instance in order to see why things are fouling up. I have  
read Andrew Lindesay's document on using jdb, but I am hoping that  
there may be a way to debug everything in a little more detail.  
Worst case, I can pester him since he is in the office next door :-p


I am not sure, but jstack can give you a thread dump which is often  
all that you need to know.


  I have a perl script that pings all the apps on a regular basis and  
if one deadlocks it jstacks it and kills it.


  Let me know if you'd like it.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WOLips

2008-06-17 Thread Pierce T. Wetter III


On Jun 17, 2008, at 3:33 PM, Mike Schrag wrote:


Subversive will be part of the official distribution.

(Only thing I knew about, because I was researching the Subclipse  
vs. Subversive question yesterday).
It's still not installed by default, though (at least in the  
"classic build").  Maybe one of the other 27 configurations includes  
it ... I also had to manually add the Polarion SVN connectors site  
to my install, but maybe I just didn't go through the install  
process properly (the plugin install workflow is all new now).


 Ah, perhaps I was confused by this:


Ganymede simultaneous release
In order to include the Subversive project into Ganymede  
simultaneous release process we should perform following tasks:

• Check the plug-in compatibility with the Ganymede builds [done]
• Check Ganymede simultaneous release requirements [done]
• Rework bug reporting subsystem to the Mylyn-based one [done]
• Receive parallel IP process acceptance [done]


  So I'm guessing that maybe that just means that Subversive gets  
built along with Ganymede.


PIerce ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WOLips

2008-06-17 Thread Pierce T. Wetter III


On Jun 17, 2008, at 3:24 PM, Chuck Hill wrote:


Anything new and cool and useful in 3.4?


 Subversive will be part of the official distribution.

 (Only thing I knew about, because I was researching the Subclipse  
vs. Subversive question yesterday).


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Ahem. Do Not Run This Script

2008-06-17 Thread Pierce T. Wetter III


On Jun 17, 2008, at 2:04 PM, Lon Varscsak wrote:


This email is archive worthy...just so I never do that! :)


don't do this either:

for dir in Java* ; do opendiff $dir/5.4.2-SNAPSHOT $dir/5.5-SNAPSHOT;  
done


And doing this is really, really boring:

for dir in Java* ; do opendiff $dir/5.5-SNAPSHOT $dir/5.6-SNAPSHOT; done



Lon

On Tue, Jun 17, 2008 at 1:54 PM, Pierce T. Wetter III <[EMAIL PROTECTED] 
> wrote:

Whatever you do, do not install jad: http://www.kpdus.com/jad.html

Do not download nightly snapshots of WebObjects.

Do not extract them, then cd com/webobjects.

Do not run the following script. (see below)

Do not do

opendiff JavaWebObjects/5.4.2-SNAPSHOT JavaWebObjects/5.5-SNAPSHOT

Do not double click on "WOApplication.jad" in the resulting output.

I'm warning you.

Pierce


#!/bin/sh
cd JavaDTWGeneration/5.4.2-SNAPSHOT; jar -xf JavaDTWGeneration-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDTWGeneration/5.5-SNAPSHOT; jar -xf JavaDTWGeneration-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDTWGeneration/5.6-SNAPSHOT; jar -xf JavaDTWGeneration-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.4.2-SNAPSHOT; jar -xf JavaDirectToWeb-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.5-SNAPSHOT; jar -xf JavaDirectToWeb-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.6-SNAPSHOT; jar -xf JavaDirectToWeb-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.4.2-SNAPSHOT; jar -xf JavaEOAccess-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.5-SNAPSHOT; jar -xf JavaEOAccess-5.5-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.6-SNAPSHOT; jar -xf JavaEOAccess-5.6-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.4.2-SNAPSHOT; jar -xf JavaEOApplication-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.5-SNAPSHOT; jar -xf JavaEOApplication-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.6-SNAPSHOT; jar -xf JavaEOApplication-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.4.2-SNAPSHOT; jar -xf JavaEOControl-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.5-SNAPSHOT; jar -xf JavaEOControl-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.6-SNAPSHOT; jar -xf JavaEOControl-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEODistribution/5.4.2-SNAPSHOT; jar -xf  
JavaEODistribution-5.4.2-SNAPSHOT.jar; find . -name "*.class" -exec  
jad -o {} \;; cd ../..
cd JavaEODistribution/5.5-SNAPSHOT; jar -xf JavaEODistribution-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEODistribution/5.6-SNAPSHOT; jar -xf JavaEODistribution-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOExtensions/5.6-SNAPSHOT; jar -xf JavaEOExtensions-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.4.2-SNAPSHOT; jar -xf JavaEOGeneration-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.5-SNAPSHOT; jar -xf JavaEOGeneration-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.6-SNAPSHOT; jar -xf JavaEOGeneration-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.4.2-SNAPSHOT; jar -xf JavaEOInterface-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.5-SNAPSHOT; jar -xf JavaEOInterface-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.6-SNAPSHOT; jar -xf JavaEOInterface-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.4.2-SNAPSHOT; jar -xf  
JavaEOInterfaceCocoa-5.4.2-SNAPSHOT.jar; find . -name "*.class" - 
exec jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.5-SNAPSHOT; jar -xf  
JavaEOInterfaceCocoa-5.5-SNAPSHOT.jar; find . -name "*.class" -exec  
jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.6-SNAPSHOT; jar -xf  
JavaEOInterfaceCocoa-5.6-SNAPSHOT.jar; find . -name "*.class" -exec  
jad -o {} \;; cd ../..
cd JavaEOInterfaceSwing/5.4.2-SNAPSHOT; jar -xf  
JavaEOInterfaceSwing-5.4.2-SNAPSHOT.jar; find . -name "*.class" - 
exec jad -o {} \;; cd ../..
cd Jav

Ahem. Do Not Run This Script

2008-06-17 Thread Pierce T. Wetter III

Whatever you do, do not install jad: http://www.kpdus.com/jad.html

Do not download nightly snapshots of WebObjects.

Do not extract them, then cd com/webobjects.

Do not run the following script. (see below)

Do not do

opendiff JavaWebObjects/5.4.2-SNAPSHOT JavaWebObjects/5.5-SNAPSHOT

Do not double click on "WOApplication.jad" in the resulting output.

I'm warning you.

Pierce


#!/bin/sh
cd JavaDTWGeneration/5.4.2-SNAPSHOT; jar -xf JavaDTWGeneration-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDTWGeneration/5.5-SNAPSHOT; jar -xf JavaDTWGeneration-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDTWGeneration/5.6-SNAPSHOT; jar -xf JavaDTWGeneration-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.4.2-SNAPSHOT; jar -xf JavaDirectToWeb-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.5-SNAPSHOT; jar -xf JavaDirectToWeb-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaDirectToWeb/5.6-SNAPSHOT; jar -xf JavaDirectToWeb-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.4.2-SNAPSHOT; jar -xf JavaEOAccess-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.5-SNAPSHOT; jar -xf JavaEOAccess-5.5-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOAccess/5.6-SNAPSHOT; jar -xf JavaEOAccess-5.6-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.4.2-SNAPSHOT; jar -xf JavaEOApplication-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.5-SNAPSHOT; jar -xf JavaEOApplication-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOApplication/5.6-SNAPSHOT; jar -xf JavaEOApplication-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.4.2-SNAPSHOT; jar -xf JavaEOControl-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.5-SNAPSHOT; jar -xf JavaEOControl-5.5-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOControl/5.6-SNAPSHOT; jar -xf JavaEOControl-5.6-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEODistribution/5.4.2-SNAPSHOT; jar -xf JavaEODistribution-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEODistribution/5.5-SNAPSHOT; jar -xf JavaEODistribution-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEODistribution/5.6-SNAPSHOT; jar -xf JavaEODistribution-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOExtensions/5.6-SNAPSHOT; jar -xf JavaEOExtensions-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.4.2-SNAPSHOT; jar -xf JavaEOGeneration-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.5-SNAPSHOT; jar -xf JavaEOGeneration-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOGeneration/5.6-SNAPSHOT; jar -xf JavaEOGeneration-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.4.2-SNAPSHOT; jar -xf JavaEOInterface-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.5-SNAPSHOT; jar -xf JavaEOInterface-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterface/5.6-SNAPSHOT; jar -xf JavaEOInterface-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.4.2-SNAPSHOT; jar -xf  
JavaEOInterfaceCocoa-5.4.2-SNAPSHOT.jar; find . -name "*.class" -exec  
jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.5-SNAPSHOT; jar -xf JavaEOInterfaceCocoa-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterfaceCocoa/5.6-SNAPSHOT; jar -xf JavaEOInterfaceCocoa-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterfaceSwing/5.4.2-SNAPSHOT; jar -xf  
JavaEOInterfaceSwing-5.4.2-SNAPSHOT.jar; find . -name "*.class" -exec  
jad -o {} \;; cd ../..
cd JavaEOInterfaceSwing/5.5-SNAPSHOT; jar -xf JavaEOInterfaceSwing-5.5- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOInterfaceSwing/5.6-SNAPSHOT; jar -xf JavaEOInterfaceSwing-5.6- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOProject/5.4.2-SNAPSHOT; jar -xf JavaEOProject-5.4.2- 
SNAPSHOT.jar; find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOProject/5.5-SNAPSHOT; jar -xf JavaEOProject-5.5-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEOProject/5.6-SNAPSHOT; jar -xf JavaEOProject-5.6-SNAPSHOT.jar;  
find . -name "*.class" -exec jad -o {} \;; cd ../..
cd JavaEORuleSystem/5.4.2-SNAPSHOT; jar -xf JavaEORuleSystem-5.4.2- 
SNAPSHOT.jar; find . -name "*.cl

Re: WebObjects + iPhone SDK

2008-06-15 Thread Pierce T. Wetter III


On Jun 4, 2008, at 5:43 AM, James Cicenia wrote:

Now that I have created my first iPhone app, I see the need for a  
velogenerator to create Objective-C files.
Recreating them in Objective C while learning Objective C hasn't  
been the most fun.


  Here at work we've been putting together some interesting stuff  
based on CoreData, sqlite, litesql, Thrift, and mogenerator.


  What we do is create data models using the XCode modeler. Then we  
use mogenerator to create output files for litesql and Thrift.


  If you go to the litesql site, our last package is posted up there.  
We have a revision to mogenerator to generate multiple template files  
in one pass, name the files based on the templates, a whole bunch of  
cool stuff.


  If you're doing iPhone development, you should definitely check it  
out.


 Pierce

Definitions:

   sqlite - A flat-file database, available on  certain mobile  
platforms.
   litesql - A C++ Object Relational Mapper for sqlite (Not as good  
as EOF)

   Thrift - An Object Request Broker from the facebook guys.

 
___

Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: The sky is falling! The world is ending! WebObjects is Dead!

2008-04-03 Thread Pierce T. Wetter III


Why are WO sessions always announced "later"?


  Because all of the IT/Enterprise sessions are second class  
citizens, or rather every year the IT marketing types realize "Oh  
Shit! We have a whole track to fill at WWDC! What are we going to  
do!". Meanwhile, the Cocoa team cuts/pastes the list of new Frameworks  
and ta-da! The WWDC session list.


  It has nothing to do with WO per se.

  I wonder if I could get Apple to pick up the tab for sending me  
WWDC if I offered to give a talk:


  "Why WebObjects kicks Ruby on Rail's Ass"

  or

  "WO: RoR for grownups"

  Though probably not for:

  "Java Sucks, bring back WO ObjC!"

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Tips: Some Useful MacOSX tools.

2008-03-31 Thread Pierce T. Wetter III


 I haven't tried the new single file format style tags, but old style  
 tags don't seem to confuse Coda, from Panic. Of course, it  
doesn't look in the .wod file to figure out if things are FORM/INPUT,  
etc., but nothing has done that since GoLive.


 Useful if you're tweaking static HTML/CSS I suspect, because you can  
easily switch between Preview/HTML mode to make sure your  tags are  
balanced.


http://www.panic.com/coda/

 CSSEdit is nice too because you can point it at a WO Page and edit  
the CSS live.


http://macrabbit.com/cssedit/


Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Rant: Working, but I still hate Java Client

2008-03-28 Thread Pierce T. Wetter III


 This is a rant about Java Client, but really about  Java Web Start,  
XML config files, and Lazy Engineers.


 If you find such things amusing, read on.

 I do provide solutions to a couple of problems with Java Client in  
the hopes that with the aid of Google, this will help someone down the  
road.


 Ok, so I got our Java Client app working finally. But I still hate  
Java Client for several reasons.



  REASON #1: Java Web Start Sucks

  JWS is a classic example of sounds good in theory but sucks in  
practice. The theory is that instead of having to deal with upgrading  
a whole bunch of users to the latest version, you provide a  
configuration file of what jars are needed, and JWS will download the  
required jars if necessary to the users local system.


  In practice, JWS violates Pierce's Rule for config files on several  
levels. For those of you not familiar with Pierce's Rule for config  
files (and why would you be, I just made them up), I will state them.


   Pierce's Rule for config files: If writing a "Hello, World"  
application requires me to write a 2,000 line config file, your  
technology sucks. This means you Struts/Hibernate/Ant.


   Pierce's XML addendum: If the config file is in XML, make that 100  
lines, because XML is much less unforgiving then the average  
programmers "read a bunch of properties from a file" format. I also  
have yet to see a commented sample XML config file that does as good a  
job of being self documenting as say, apache.conf. That of course  
means that Struts/Hibernate/Ant suck by an extra factor of 20.


   Pierce's GUI exemption: If you provide a GUI for editing the  
config file so that I don't have to learn an entirely new programming  
language to get started, it doesn't matter how big the file is because  
I'll never look at it. (Every XML file I've ever seen is essentially  
learning a new programming language, which is yet another reason Ant  
sucks)


   Pierce's GUI exemption qualifier: If the GUI tool doesn't support  
everything the XML file does, then your config file format must suck.  
Rewrite the format to make the GUI tool easier to write. The GUI tool  
rules, not the XML. Otherwise, you can't claim the exemptions, Nyah


   So Java Web Start requires this giant JNLP file to be written.  
Helpfully, WebObjects generates this for you. However, JNLP is broken.  
It's broken because the idiot at Sun who created JNLP decided that  
JNLP would only allow one certificate to be used to sign jars per jnlp  
file. He did this so, get this, "you wouldn't have to specify multiple  
certificates in your .jnlp file".


   Translation: "I'm a moron who doesn't understand security."

  Since wojavaclient is signed by Apple, that means your remaining  
jars have to be unsigned, or you have to do the following doh-see-doh:


  Instead of using:



  Use:



 And then, you have to make yet another XML file that looks like the  
following:



 http://ws503"; href="Help.jnlp">
 
JavaHelp
Sun Microsystems, Inc.
 



 


See: 
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#213

  Why this is lamebrained: First off, this doesn't supply any extra  
security. Sun claims: This restriction avoids requiring the user to  
accept multiple certificates from the same source, and enables Java  
Web Start to know if the user has accepted all certificates used for  
an application.


  This is just so amazingly asinine a statement that I barely know  
where to begin. Since JNLP lets you load all the unsigned jars you  
want, this arbitrary restriction isn't providing any security. Unless  
like BouncyCastle, the jar requires itself to be signed, a cracker  
could substitute an unsigned jar, and Java Web Start wouldn't check.  
So there's already a giant security hole here, you should be able to  
specify that not only should a given jar be downloaded, but that it  
has to be signed. Additionally, the whole PKI system is built around  
the idea of one cert vouching for another, so the JNLP file should be  
able to say "Things signed by say, Sun" are ok, and if the user  
approved your cert, you can extend that to Sun. In other works, it  
violates another of Pierce's rules:


   Pierce's Rule on Code Signing: Signed Code should be superior to  
unsigned code, not inferior. If signed code is a second class citizen,  
your security system is broken.


  Plus this is Java Web Start, so one would think that perhaps if you  
served the jar file from an https server, they would all be considered  
to be signed by the servers cert. That would have been a much more  
sensible solution.


  Ok, so given the above, what do you think the chances are that  
Apple's helpful JNLP generator does the above doh-see-doh?


  Zero.

  Which means its basically broken. If your code uses a signed jar,  
it will generate bad JNLP files. My solution was a hack, I basically  
just hardcoded the list of jars to download and edited the ones that  
needed to be edi

Re: Creating Database Reports with EOF

2008-03-14 Thread Pierce T. Wetter III


On Mar 14, 2008, at 12:35 PM, Petite Abeille wrote:



On Mar 14, 2008, at 8:15 PM, Sennikov, Dimitri wrote:


How would I be able to do that in WO with EOF? Is there an easier way
than to get qualifiers for each month and create new  
FetchSpecifications

for each of the months? Wouldn't this method create too much overhead
(ie 12 queries just for one report).


Short answer: don't bother with EOF for reporting and let the  
database do the heavy lifting. You can always make the resulting  
data set available to EOF through your favorite database level  
representation such as views, store procedures, pipelined functions  
or such.


EOF is meant to shield you away from SQL, in the same way as WOF  
shield you from HTTP.


But for any non-trivial DMLs, you most likely want to use SQL  
directly.


One way or another, once you have your data, something like Jeff  
Martin's ReportMill might be useful:


http://www.reportmill.com/


 I use openreports personally. Reportmill is better if you need to  
access your businesslogic inside the report, but if you just want to  
turn SQL into a table, openreports is easier.


 http://oreports.com/

Pierce



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: WWDC 08

2008-03-13 Thread Pierce T. Wetter III

Perl: an abomination upon software development.

Chuck and not a great fan of Perl syntax


 Ya know, I used to feel like Perl was well, line noise.

 Then I read "Effective Perl Programing".

http://www.amazon.com/Effective-Perl-Programming-Programs-Developers/dp/0201419750/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1205446647&sr=8-1

 And I realized, Perl isn't line noise.

 It's math. Yeah, there's a lot of symbols and stuff, but math has  
lots of symbols and stuff. The whole regular expression thing makes  
the "line noise" problem worse, but regular expressions just look like  
that.


 I think people judge Perl a bit unfairly. It grew out of awk/sed/sh  
scripting, and its way better then any of those other options. I would  
much rather maintain a .pl script then a .sh script. At least with  
Perl I don't have to figure out the eval command every time I want to  
add two numbers together.


 So if I want to parse a text file, mangle the data in it, and spit  
out another text file, I use perl.


 If I want to write a .sh script that has any branching at all, I use  
perl instead.


 The real problem with perl is that people use it for programs > than  
about 2 pages of source. That's where you start getting into trouble.  
At that point, use Python, cause it can do the same regular expression  
stuff, and you end up with decent code at the end.


 So perl? Great tool, but its duct tape. Don't build your house out  
of it.


 Pierce

P.S.

 Meanwhile, Ant still sucks.






smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

WOLips "Stable"

2008-02-29 Thread Pierce T. Wetter III

http://wolips.blogspot.com/2008/02/wolips-33-stable.html

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Rant: Why I hate Java Client

2008-02-25 Thread Pierce T . Wetter III


That's absolutely fair, and to be honest, I was mostly grousing  
about our particular application which is D2JC. And really grousing  
about its lack of design. And the fact that it doesn't build  
naturally in Eclipse because no one has updated the config  
correctly. Programming is 1/3rd design, 1/3rd programming, 1/3rd  
testing, and if you skip on design, the other 2 parts just take  
longer.


You are a heretic Pierce ;-) Agile programming says you write some  
tests (2/3rds of the work), write some code to pass these tests  
(1/3rd)... ship product, fix customer problems really fast so your  
support looks responsive! (Don't get me too wrong, Agile has a lot  
of good things about it, and I have probably mischaracterized it :-).)


  When I first started programming professionally in my 20s, there  
were these 40-year-old curmudgeons who went around saying things like  
"Bah, everything old is new again." and who seemed mostly amused by my  
bright-eyed-bushy-tailed enthusiasm for new technologies.


  Now I'm one of those 40-year-old curmudgeons.

 Pierce

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Rant: Why I hate Java Client

2008-02-22 Thread Pierce T. Wetter III


On Feb 21, 2008, at 12:57 PM, Florijan Stamenkovic wrote:


Pierce,

Most of your arguments are valid only when talking about D2JC. And I  
actually agree with many of them, that's why I never used D2JC .


One correction however: JC as an architecture does not imply D2JC,  
it implies a Java process running on the client machine. And when  
talking about WOJC it implies a Java process running on the client  
machine, connecting to a WO server. Sorry for being a hairsplitter  
on this, but badmouthing WOJC because of the issues of D2JC is  
slander, simply put. It's like saying computers are bad, just  
because you are running Windows...


  That's absolutely fair, and to be honest, I was mostly grousing  
about our particular application which is D2JC. And really grousing  
about its lack of design. And the fact that it doesn't build naturally  
in Eclipse because no one has updated the config correctly.  
Programming is 1/3rd design, 1/3rd programming, 1/3rd testing, and if  
you skip on design, the other 2 parts just take longer.


Pierce

P.S.

  However, I would say that no technology is a panacea, and when you  
shove the internet between the "client" portion of your application  
and the "server" portion of your application, its worth thinking about  
what you're doing. WOJC isn't a bad architecture and Paolo's  
XMLBindingForJavaClient stuff looks cool.


  But JC is basically an implementation of the "Proxy" design  
pattern. http://en.wikipedia.org/wiki/Proxy_pattern


  That is, the client side objects function as proxies for the server  
side objects. So far so good. But sometimes, the "Facade" pattern is  
more appropriate: http://en.wikipedia.org/wiki/Fa%C3%A7ade_pattern


  That is, its often good to have a Facade sitting in front of your  
Model objects, turning the MVC model into FMVC. Then you can proxy the  
lightweight Facade object instead of the Model object.


  For instance, lets say you have a Model object as follows:

Movie Storage:
   String name;
   NSData GIANT_MULTI_GIGABYTE_BLOB;
   Integer PrimaryKey;

  If on the JC side, all you ever need is the name of the movie for a  
popup that says "what movie do you wish to stream" then it makes sense  
to have a facade object for just the data you need. So on the JC side:


  MovieNameReference:
String name;
Integer PrimaryKey

  Prevents you from streaming GIANT_MULTI_GIGABYTE_BLOB down to the  
JC side.


  Of course, this was an artificial example, but it general, when  
writing these sorts of apps, I always find it best to use a well  
designed Proxy interface like WOJC with a well designed set of Facade  
classes...







smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Rant: Why I hate Java Client

2008-02-21 Thread Pierce T. Wetter III


Any .jar files you want the client-side of the application to have  
access to must be in the WebServerResources/Java/ directory. The  
instructions here will help you setup an ant task to copy them over. http://wiki.objectstyle.org/confluence/display/WO/Java+Client-Building 
.


If you have additional .jars for that directory, you'll have to add  
additional ant statements  to the build file to copy them in there.


 Yeah, the problem is that we're using an old version of Project  
Wonder's generic.xml, which makes it all even more confusing.


 I have that stuff in the eclipse build, though the eclipse build  
doesn't work for me either (sigh).


 Pierce

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Rant: Why I hate Java Client

2008-02-21 Thread Pierce T. Wetter III





Interesting situation. The eoaccess package is not provided because  
it contains stuff that is irrelevant to the client. Mostly the  
"connect to database" stuff. So it makes sense it is not there.


Like Lachlan says, log the exception on the server.


 Yeah, I found that stuff on the Wiki and added that. My real problem  
I suspect is that what I really need to do is figure out how .jar  
files are supposed to be packaged up for the client side and send them  
all across as well. This is an internal tool, so I don't really care  
if our support people have to download bouncy castle, axis, etc. In  
other words, I'd be perfectly happy with a brute force solution that  
made the JC side include every jar referenced from the server side. Of  
course all the Apple docs are for Project Builder, which doesn't exist  
any more...



Plus none of this stuff works for me from Eclipse, because no one  
ever got around to porting it fully to Eclipse when they moved the  
rest of the projects over.


Meanwhile, the Support folks are whining, because I lowered the  
boom and told them Java Client was going away,


Very much not true. Let the light of the JC sun shine on you and  
realize: Apple is not dropping it! YAY! :)


  Our JC app is going away because giving support folks a Direct-2- 
Java-Client app as an admin app is stupid and lazy. (Or Direct2Web for  
that matter.) The Support folks actually have a love-hate relationship  
with it. They like that they can edit anything in the model but they  
hate the "oops, I brought the site down because I hit return in the  
wrong spot and it generated a table scan". Plus its buggy as all get  
out, and engineering just blinks at them when they complain.


  Our current app is like juggling chainsaws.

  Meanwhile, support management wants them to STOP going through and  
tweaking things in the model by hand. For 90% of what they do, there  
should be a single link they can click on to fix the problem; not 5  
different windows with 3 values each to edit. As we've started adding  
those features to the new admin app, the support folks have taken to  
calling it the "Easy Button".


  In other words, long before I get to the annoyances with the JC app  
architecture I run into the fact that it was never "designed" to begin  
with, so it sucks just on that basis.


 You should budget 5 admin pages for every dynamic page on your  
website.






so they have to adjust to an app that isn't just a thin coat of  
paint over Direct2JavaClient and actually come up with a  
specification for what all they use this piece of shit for.


I've spent 40 hours over the last 2 weeks fighting with this stupid  
thing. It takes me about an hour to build a screen in the new app  
that will replace this crap.


The new app being based on which technology?


  Something I've done at every company where I've deployed a WO  
solution is create a series of components that give me sort of the  
best of both worlds between writing everything by hand and a Direct 2  
anything app. Basically, you provide an array and a list of key paths  
in the wod file:


  ilokTable: PACERCTable {
list = user.iloks;
	displayPaths =  
"alias 
;serialNumber 
;creationDate 
;countAssets 
;countLicenses;countIncidents;status.statusTitle;coveredByZDTString";
	displayLabels = "Name;Serial;Creation  
Date;Assets;Licenses;Incidents;Status;ZDT";

creationDateFormat = "%Y-%m-%d %H:%M";
countAssetsFormat = "___";
countLicensesFormat = "___";
aliasTunnel = "AdminiLokDetail;encryptedPrimaryKey;ILokID";
countAssetsTunnel = "AdminAssetSummary;encryptedPrimaryKey;iLokID";
countLicensesTunnel = "AdminLicenseSummary;encryptedPrimaryKey;iLokID";
	countIncidentsTunnel =  
"AdminIncidentSummary;encryptedPrimaryKey;iLokID";

actionLinks = "Transfer Ownership;AdminILokMail;iLokID";
sortSearch = true;
tableTitle = "iLok(s)";
includeCountInTitle = true;
}

PACERCTable then builds an HTML table with all the data using the list  
of keypaths, formats, etc. The "Tunnel" specifiers specify a page, and  
parameters for the page, that generates the link. You can have  
additional links after the row.


 The current revision also allows editing, and the engineer I have  
working on it just integrated it with the DojoToolkit Grid stuff.


 This ends up being superior to the JC stuff because:

1. Its way faster. A browser can display a table faster then  
Swing can bring up a spreadsheet view, especially after having to  
transmit a whole bunch of stub objects across the link.
2. You can have cross links between tables of data which makes it  
trivial to follow

relationships.
3. It encourages you to actually design the damned thing, so  
you're more selective about what columns to display.
4. It actually ends up with more features then JC, because you  
can sort each column and do some other cool stuff that D2JC doesn't  
supply.

   

Rant: Why I hate Java Client

2008-02-20 Thread Pierce T. Wetter III

So I get this backtrace (see below).

So this is some sort of config problem, brought on somehow by the fact  
that I've moved all the .jar cruft we had hanging out in /Library/Java/ 
Extensions into a framework. It looks like the server is forwarding  
some sort of EOGeneralAdaptorException to the client which might have  
had useful information in it but client has no idea how to unarchive  
it because for some reason it can't access eocasses, so it then throws  
a completely different exception on the client side.


Debugging all this is like being put into a straightjacket,  
handcuffed, gagged, thrown into a pit, and then asked to make a full  
course dinner.


Plus none of this stuff works for me from Eclipse, because no one ever  
got around to porting it fully to Eclipse when they moved the rest of  
the projects over.


Meanwhile, the Support folks are whining, because I lowered the boom  
and told them Java Client was going away, so they have to adjust to an  
app that isn't just a thin coat of paint over Direct2JavaClient and  
actually come up with a specification for what all they use this piece  
of shit for.


I've spent 40 hours over the last 2 weeks fighting with this stupid  
thing. It takes me about an hour to build a screen in the new app that  
will replace this crap.


Pierce

Exception in thread "AWT-EventQueue-0"  
com.webobjects.foundation.NSForwardException for  
java.lang.NoClassDefFoundError: com/webobjects/eoaccess/ 
EOGeneralAdaptorException

  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:164)
  at  
com 
.webobjects 
.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:307)
  at  
com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java: 
291)
  at  
com 
.webobjects 
.eodistribution 
.client 
.EODistributedClassDescription 
.decodeObject(EODistributedClassDescription.java:434)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at com.webobjects.eodistribution.common._EOReferenceRecordingCoder 
$_Decoder.decodeObject(_EOReferenceRecordingCoder.java:704)
  at  
com 
.webobjects 
.eodistribution 
.common 
._EOReferenceRecordingCoder 
.decodeObject(_EOReferenceRecordingCoder.java:551)
  at  
com.webobjects.eocontrol.EOKeyGlobalID.decodeObject(EOKeyGlobalID.java: 
187)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at com.webobjects.eodistribution.common._EOReferenceRecordingCoder 
$_Decoder.decodeObject(_EOReferenceRecordingCoder.java:704)
  at  
com 
.webobjects 
.eodistribution 
.common 
._EOReferenceRecordingCoder 
.decodeObject(_EOReferenceRecordingCoder.java:551)
  at  
webobjectsexamples 
.authentication 
.common.AuthenticationInfo.decodeObject(AuthenticationInfo.java:82)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at com.webobjects.eodistribution.common._EOReferenceRecordingCoder 
$_Decoder.decodeObject(_EOReferenceRecordingCoder.java:704)
  at  
com 
.webobjects 
.eodistribution 
.common 
._EOReferenceRecordingCoder 
.decodeObject(_EOReferenceRecordingCoder.java:551)
  at  
com 
.webobjects 
.eodistribution 
.common._EOServerReturnValue.decodeObject(_EOServerReturnValue.java:62)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at com.webobjects.eodistribution.common._EOReferenceRecordingCoder 
$_Decoder.decodeObject(_EOReferenceRecordingCoder.java:704)
  at  
com 
.webobjects 
.eodistribution 
.common 
._EOReferenceRecordingCoder 
.decodeObject(_EOReferenceRecordingCoder.java:551)
  at  
com 
.webobjects 
.eodistribution 
.common 
._EOReferenceRecordingCoder 
.decodeObjects(_EOReferenceRecordingCoder.java:587)

  at com.webobjects.foundation.NSArray.decodeObject(NSArray.java:1309)
  at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
  at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

  at java.lang.reflect.Method.invoke(Method.java:585)
  at com.webobjects.eodistribution.common._EOReferenceRecordingCoder 
$_Decoder.

5.4.1 is out

2008-02-11 Thread Pierce T. Wetter III



 5.4.1 just got released y'all.

 Pierce

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: 2 WOLips Questions.

2008-02-11 Thread Pierce T. Wetter III


On Jan 27, 2008, at 7:07 AM, Jean-François Veillette wrote:

subversion is a nice improvement over cvs, but if you are going to  
switch, now is the time to take a look at the other options ...


Take a look at git (and/or mercurial) :
http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html
I think git's branching model is way better than the directory copy  
of svn.  And other (I've not used svn enough to tell myself) say  
that the merging capabilities of svn are not really better to cvs,  
if compared to git.
git only require one .git/ directory at the root of it, not in every  
directory inside, so you won't have any problem with tools  
integrations.  git already has 2 nice gui (built with tcl-tk), it  
has web front-end, and even the start of an eclipse plug-in.


I've used cvs for far too long (and still have to).  I've played  
with svn for a short time period.  I've used bzr for nearly 2 years,  
I've now switched to git for nearly one year.  I'm very pleased with  
the result !  I've successfully converted many cvs repository  
(amongst them wonder's repository), and it make the history more  
clear and easier to follow.


svn + svk is actually pretty interesting. svk is a set of perl scripts  
that make local branches and sharing branches between users much  
easier and more along the bzr model but with the idea that at some  
point, you're going to commit everything to a master repository  
anyways. Just using svk to manage your local branches can be pretty  
cool.


Except unless there's an eclipse plugin for it, I really wouldn't  
consider it for WO development...


 Pierce



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Any tutorials on using direct actions and/or component actions with AJAX

2008-01-03 Thread Pierce T. Wetter III
* I really mean prototype.js as being "pretty awesome" ...  
scriptaculous is actually kind of crappy ... but it was what the  
cool kids were using with rails, so I felt it was a pragmatic  
decision at the time.


 Two thumbs up on prototype.js, and agree with the thumbs down on  
scriptaculous.


 dojo is looking pretty sweet these days.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Date-Only NSTimestamps

2008-01-02 Thread Pierce T. Wetter III


On Jan 2, 2008, at 2:47 PM, Mike Schrag wrote:

It might be possible now using the new enum support in 5.4, but  
only as a hack, and I haven't looked at it.
It should, actually ... The bug I filed that I /think/ turned into  
this feature was to be able to do "CryptoString" that properly maps  
in and out of the DB, which is basically the same issue you're  
referring to but just with dates.


 Yeah, then you could store dates in the database as INTEGERs, and  
have a class to map to/from timestamps as needed. So its not just  
enums in 5.4, you can map attributes in general? The release note says  
"support for enum in attribute conversion", but I had no idea of the  
details.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Date-Only NSTimestamps

2008-01-02 Thread Pierce T. Wetter III


On Jan 2, 2008, at 2:36 PM, Galen Rhodes wrote:

Hm.  Well.   No.  I think you're assuming that the dates are  
stored as floating point or double precision real values.  Under WO  
5.x the NSTimestamp is descended from java.util.Date which stores  
the time as a long integer representing the milliseconds from the  
standard epoch.  I believe GregorianCalendar does as well.  And I  
believe this is the same way that MySQL stores them too.


So, in that case, there is definitely a difference between  
23:59:59.999 and 00:00:00.000.  All comparisons (and math) are done  
using the long millisecond value.


 Oh, gag. That means subtle rounding errors with Oracle and FrontBase  
when using dates. Oh joy. Because its quite possible to get/store  
23:59:59. in the database. Does that mean Monday becomes Tuesday?


 Stupid Java architects.

 I still say that endOfDay() is still wrong, you shouldn't assume  
what the internal format of the number is, and you shouldn't be using  
<=, only <.  It might work, but only because the Java implementation  
is broken in a different way.


 Pierce ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Date-Only NSTimestamps

2008-01-02 Thread Pierce T. Wetter III


On Jan 2, 2008, at 1:01 PM, David Avendasora wrote:


Hi all,

I am working on some date-related calculations for a report. On the  
report the user specifies a date, and I want to match to a  
NSTimestamp-typed attribute in my Entity. The problem is that, of  
course, the attribute also contains time information which for this  
report is meaningless.


I've come up with a couple ways to achieve what I'm trying to do,  
and they seem to work, but they feel _very_ clunky and overly  
difficult, which brings me back to the old WO axiom: if it's hard,  
you're probably not doing it the WO-way.


So, what are the best practices for working with an NSTimestamp  
field, when all you really want is the date, not the time?


 There's not really a good solution, in my experience. I'm A bit of a  
date/time wonk, so this may be an overly long and opinionated answer,  
but I feel like venting.


 First off, setting the time to 00:00:00 sucks. It sucks because at  
midnight, there is no different between Monday and Tuesday. Monday is  
23:59. (repeat ad infinitum).


 Why does this matter? Because you can easily ass-raped by time  
zones. Tuesday midnight can very easily turn into Monday midnight- 
almost. Monday not-quite-midnight can very easily turn into Tuesday  
midnight. I'll just skip over daylight savings time woes.


 A typical hack is to normalize everything to noon in a particular  
time zone instead. So anytime you get a date, you immediately move it  
to noon. In Objective-C, you could do this via a category, which could  
return a subclass of NSCalendarDate which knew it was normalized and  
would do the right thing, and it would override things so the math  
would work correctly (DST can screw up date calculations). So then you  
could go crazy calling "normalize" every time you got a date, and be  
safe, because the subclass knew that normalize was a no-op.


 Of course, we're in Java, so we're screwed. You'll have to add a  
completely separate class to do the normalization, which then just  
gives you a normal NSTimestamp back, so you can find that your app  
will spend an inordinate amount of time normalizing the dates.


 For as long as I've been using WebObjects, I've been submitting  
feature requests to be able to map the basic number types to custom  
alternative classes. That would have solved the problem directly,  
because then WO could pull an integer out of the database, which could  
then be mapped to a date class and back again.


 It might be possible now using the new enum support in 5.4, but only  
as a hack, and I haven't looked at it.


 Anyways, on to your problem, because none of that really affects you  
except the midnight issue.


 In your case, you're doing a report, so you have 2 date ranges. So  
this then becomes a UI question. Let's say someone wants to do a query  
for 2007. In most reporting software, that becomes:


 WHERE  date >= TIMESTAMP '2007-01-01 00:00:00' and date < TIMESTAMP  
'2008-01-01 00:00:00'


 that is, to get all of 2007, you really have to put the end date in  
as midnight of the first second of 2008. Which is weird UI, because  
the dates themselves are:


 2007-01-01  to 2007-12-31

 without the times...

 Similarly, putting in:

 2007-01-01 to 2007-01-01  gets you _zero_ days, because that's  
midnight to midnight of the same day.


 So What you can do is basically tweak the inputs. The low date  
is rounded _down_ to midnight, the high date is converted to the  
_next_ day then rounded down.


 where date >= input_low.beginningOfDay() and date <  
input_high.nextDay().beginningOfDay()


Note that this conflicts with the previous responses which tell you to  
do:


  WHERE date >= input_low.beginningOfDay and date <=  
input_high.endOfDay()


 David LeBer and Chuck Hill actually have a subtle bug, because they  
probably have endOfDay() coded as 23:59:59., but that means  
there's a whole second they won't be including, the time between  
23:59:59.1 and the next day... There's a  
whole second there that shows up in limbo. Which would really bum you  
out if say, the bank was adding up transactions for the day, and  
missed your paycheck if it was deposited right then...


 Having both <= and >= in a where clause dealing with dates is always  
a tip off for me. It should always be >= and <.


 You can make the "endOfDay()" limbo arbitrarily small, by encloding  
endOfDay() as 23:59:59.999  or some such, but then its really  
easy to have things roll over when you didn't want them to. It's  
better to use < instead of <=, and use midnight of the following day  
instead.


 Pierce




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

T

Re: Frontbase error - ailed to provide new primary key

2007-12-08 Thread Pierce T. Wetter III


On Dec 8, 2007, at 3:24 AM, ute Hoffmann wrote:


Hallo,
I experiment with frontbase (build a new database) and get this  
error when trying to insert a second object into a table via  
WebObjects (first entry worked):


java.lang.IllegalStateException: Adaptor  
[EMAIL PROTECTED] failed to provide new  
primary keys for entity 'Testtabelle'


Adaptor [EMAIL PROTECTED] failed to  
provide new primary keys for entity 'Testtabelle'


any idea what goes wrong here?


 Yep. The FrontBase plugin isn't loading, so its using the generic  
JDBC plugin, which relies on a special table for generating primary  
keys instead of the "select unique from foo;" that the FrontBase  
plugin does.


 Make sure the Frontbase plugin is in your class path.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Classcastexception _EOCheapMutableArray

2007-12-08 Thread Pierce T. Wetter III


On Dec 8, 2007, at 9:26 AM, Don Lindsay wrote:


Hello;

I recently picked up an old application from about a year ago. 
When I click save on any of my edit pages I get a classcastexception  
in WOComponentRequestHandler while handing  
java.lang.ClassCastException:  
com.webobjects.eocontrol._EOCheapCopyMutableArray.


 Last time I ran into this problem it was because I was expecting a  
single value from a key path. I.e.:


  String s = (String) object.valueForKeyPath("toMany.name");

  but "toMany.name" is an _array_ of names, because toMany is an  
_array_ of objects. So its not a single String, so you get a  
classcastexception.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Fat relationships: i.e. user <--->> transactions

2007-12-06 Thread Pierce T. Wetter III


On Dec 5, 2007, at 3:26 PM, Mike Schrag wrote:


  1. addToBothSides() should skip the inverse if it isn't faulted.
Yes!  I keep meaning to look into this .. I seem to recall there  
were several attempts on the wikibook (or wodev) that show how to do  
this, but they all had caveats with them.  I suspect this is a  
slippery change to make, but it makes total sense.  Log a bug  
against 5.4 -- It's not a black hole anymore :)


  Yeah, at the very least it could look for the fault on the object,  
and look for a snapshot in the database context and if its not there,  
no harm no foul. Hmmm... Or would it? Because if it had to fetch the  
relationship later on in the code, before the saveChanges() writes it  
out to the database, it wouldn't have the new object in it.


  So fetching is safe, because then you can create the superset.

  The only safe solution I can see is a SparseArrayFault fault  
handler class, which means a new setting on the to-many relationship  
"Sparse Relationship". That would tell EOF to use a different Array  
fault handler class.


  So I'm going to hold off filing the bug reporter item until I think  
about the problem a bit...






  2. I wish qualified/sorted relationships were built into EOF.  
This would mean:
I've always wanted this too ... Let the framework work it out under  
the covers to do caching + qualifiers.  There's no reason it can't.



Hmmm... This could be done via magic in the templates perhaps.

Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Getting EOGenericRecord when I don't want it...

2007-12-05 Thread Pierce T. Wetter III
I'd guess that it is a problem with NSBundle finding the classes in  
it.  Try logging out the various things that NSBundle will tell  
you.  And do that before the above code and see if just calling  
those methods makes a difference.  Calling NSBundle.mainBundle()  
might be enough.  I recall having to call NSBundle.allBundles() in  
some long ago version before that method was deprecated.


Yeah, I'm already calling and logging those results based on code you  
posted:


NSLog.out.appendln("Main bundle " + NSBundle.mainBundle().toString());
NSLog.out.appendln("frameworkBundles " +  
NSBundle.frameworkBundles().valueForKey("name"));
NSLog.out.appendln("frameworkBundle paths " +  
NSBundle.frameworkBundles());
NSLog.out.appendln("Loaded models " +  
EOModelGroup.defaultGroup().modelNames());


And the values look reasonable. I did play with the classpath such  
that the framework(s) I'm trying to debug/test loaded first, but that  
didn't help.



Its very weird that my local code can find the classes but  
_NSUtilties._classWithFullySpecifiedName(uent.className()) can't  
because they both end up calling java.lang.Class.forName(Class.java):


public static Class _classWithFullySpecifiedName(String className)
{
/* <-MISALIGNED-> */ /* 200*/Throwable throwable = null;
/* <-MISALIGNED-> */ /* 203*/try
{
/* <-MISALIGNED-> */ /* 203*/Class result =  
Class.forName(className);
/* <-MISALIGNED-> */ /* 204*/ 
_classesByPartialName.setObjectForKey(result, className);

/* <-MISALIGNED-> */ /* 205*/return result;


 So the only thing I can think is that its running into some security  
issue via java.security.AccessController where it can't make the class  
from inside WebObjects.





In desperation, you could try WOApplication.primeApplication()


That didn't work either (sigh).

That just calls NSBundle.mainBundle():

   public static void primeApplication(String s, String s1)
{
/* <-MISALIGNED-> */ /* 384*/if(_WOApp == null)
{
/* <-MISALIGNED-> */ /* 385*/NSBundle nsbundle = null;
/* <-MISALIGNED-> */ /* 387*/if(s != null)
/* <-MISALIGNED-> */ /* 388*/nsbundle =  
NSBundle.bundleWithPath(s);

/* <-MISALIGNED-> */ /* 390*/if(nsbundle == null)
/* <-MISALIGNED-> */ /* 391*/nsbundle =  
NSBundle.bundleForName("JavaWebObjects.framework");
/* <-MISALIGNED-> */ /* 393*/ 
NSBundle._setMainBundle(nsbundle);
/* <-MISALIGNED-> */ /* 396*/String s2 =  
NSProperties.getProperty(WOProperties._ApplicationNameKey);

/* <-MISALIGNED-> */ /* 397*/if(s2 == null)
/* <-MISALIGNED-> */ /* 398*/s2 =  
NSBundle.mainBundle().name();


H... This is interesting. This code:

NSLog.out.appendln("Verified class " + Class.forName(uent.className()));
NSLog.out.appendln("Verified2 class " +  
uent._concreteClassForDeferredFault());
NSLog.out.appendln("My class loader " +  
this.getClass().getClassLoader());
NSLog.out.appendln("NSUtilities loader " +  
_NSUtilities._CLASS.getClassLoader());


outputs this:

Verified class class com.paceap.businesslogic.server.User
[2007-12-05 15:48:22 MST]  Class  
'com.paceap.businesslogic.server.User' not found for Entity 'User',  
using EOGenericRecord instead

Verified2 class class com.webobjects.eocontrol.EOGenericRecord
My class loader [EMAIL PROTECTED]
NSUtilities loader [EMAIL PROTECTED]

So NSUtilities is using sun.misc.Launcher$ExtClassLoader instead of  
sun.misc.Launcher$AppClassLoader.


Now how to I fix that I wonder...

 Pierce




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Getting EOGenericRecord when I don't want it...

2007-12-05 Thread Pierce T. Wetter III

Problem:

  TestNG isn't working for me because even though I can access the  
class via Class.forName(), the bowels of WebObjects can't. I'm not  
enough of a java head to know why, so I'm asking for help.



In Detail:


 So I'm trying to get started with TestNG. (TestNG is a better  
version of JUnit)


 So I've written a bunch of unit tests, and figured out what I had to  
do to get everything up and running. What I've found so far:


   0. TestNG is much better then JUnit for writing tests. Their book  
is excellent as well.


   1. TestNG insists on kvetching about anything it doesn't  
understand in the command line items. So where I was defining a bunch  
of properties on the command line, I had to move them to - 
Dproperty=foo lines against the Java VM.


   2. You have to put build/foo.framework/Resources/Java in your  
classpath for every single Framework you include or NSBundle won't  
find them and load them.


   3. As Chuck Hill has pointed out, you need to setup your working  
directory as build/FrameworkUnderTest.framework/Resources/Java .


  Except, I'm having a problem that anything fetched from the  
database is coming back as EOGenericRecord instead of the correct  
class. I'm guessing this has something to do with something not being  
bootstrapped correctly in EOF under TestNG. Near as I can tell though,  
the classes are there:


EOEntity uent = EOUtilities.entityNamed(ec, "User");
EOClassDescription ucd = uent.classDescriptionForInstances();

try
{
			NSLog.out.appendln("Verified class " +  
Class.forName(uent.className()));

}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}

Prints out the appropriate thing. But:

NSLog.out.appendln("Verified2 class " +  
uent._concreteClassForDeferredFault());


Prints out:

[2007-12-05 10:42:33 MST]  Class  
'com.paceap.businesslogic.server.User' not found for Entity 'User',  
using EOGenericRecord instead

Verified2 class class com.webobjects.eocontrol.EOGenericRecord

Which is kind of weird, because the relevant code in EOEntity calls  
this routine in _NSUtilties which calls Class.forName()  (thank you  
jadclipse). So then I added:


NSLog.out.appendln("Verified3 class " +  
_NSUtilities._classWithFullySpecifiedName(uent.className()));


Which throws:

[2007-12-05 10:46:42 MST]  java.lang.ClassNotFoundException:  
com.paceap.businesslogic.server.User

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)

So MY code can find the class, but WebObjects can't. Perhaps  
java.security.AccessController.doPrivileged is the problem, but ok,  
how do I bypass that?


 Pierce







___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Fat relationships: i.e. user <--->> transactions

2007-12-05 Thread Pierce T. Wetter III




  From a discussion about the danger of using  
"addToBothSidesOfRelationship" as default behavior.





It turns out to be almost never the case that you want to fetch all  
"Open Tasks".  It tends to be the case for us that you almost  
always want to have additional qualifiers on those searches, which  
ends up that you fault a HUGE (many thousands) of EO's in just to  
turn back around and filter them down in memory.  Instead, I can  
remove that relationship completely and provide just the variant of  
the to-many that takes a qualifier.


Of course not and I agree 100%. But the example was user <- 
>>transactions which *I* would not fetch manually unless I had  
problems with multiple instances.


And the case above would normally be in an SEC which would have no  
outgoing relations anyway.


  Well, it was my example, so I'll chime in (and change the subject)

  There's the _user_ side of the website, and there's the admin side.  
That's been true of every website I've worked on.


  The _user_ side never needs user->transactions.

  The _admin_ side often does. So I'm glad to hear there's a fix for  
the NSArray O(N^2) issue, that was in old Obj-C EOF as well.


  So removing the inverse relationship from a fat to-many isn't  
always an option if you need one in one place, and another in a  
different place.


  A pure EOF solution would be to dynamically define the to many side  
of
 user ->>transactions relationship at runtime, based on the  
particular application's needs.


  That was one of the nice things about Obj-C categories...I could  
load certain code in only certain places.


  Anyways, the qualified relationships in Mike's Velocity templates  
are cool, but here's my wet dream for EOF:


1. addToBothSides() should skip the inverse if it isn't faulted.  
The fact that it will go off and fetch a large to-many when it doesn't  
have to as always seemed like a bug to me. That said, I suspect it  
does this because the fault might be getting filled from a snapshot  
from an editing context sharing the same database context. So its  
either fetch, or invalidate the database snapshot, but only at  
saveChanges() time because the editing context could be rolled back. I  
guess they feel its easier to just


2. I wish qualified/sorted relationships were built into EOF.  
This would mean:


   a. Changes to entity modeler to link a fetch spec with a  
relationship.
   b. Adding an object to the "master" relationship would update  
the "dependent" relationship as well.
   c. Invalidating the object would invalidate the snapshot of  
the dependent relationship.


  That would mean I could define user->recentTransactions to mean  
transactions over the last 30 days, and then everything would "just  
work". If I did transaction.setUserRelationship(user) and I'd filled  
recentTransactions, the new transaction would show up in user- 
>recentTransactions.


   3. Inheritance/additions for models. So you can have userModel,  
that has a subset of the relationships. Then "adminModel" adds all the  
inverse ones.


   4. Or perhaps you can just specify the array fault class for a  
relationship in EOModeler, and you can specify one that doesn't do the  
reverse fetch for add/removes until it has too, and perhaps can even  
answer count() without building 10,000 objects. So then you could go  
in and specify a "sparse" class for those fat relationships.


  Pierce


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Java Packages for Dummies

2007-12-04 Thread Pierce T. Wetter III


On Dec 4, 2007, at 4:33 PM, Owen McKerrow wrote:


Hi Chuck, Miguel and Art,

Yup I see what your saying. I think the light just switched on, in  
fact it did Art's email confirmed it.


As all the way through out the old projects we never had a method  
called setPersonRelationship, just setPerson we dropped the word  
Relationship from the template. Doh ! Ohh well looks like its time  
to hunt down all the cases where we did it the old way and change  
them to use setAttributeNameRelationship instead.


  Be aware that if you have a two-way relationship where one side is  
light, and one side is heavy, i.e.:


   user <--->> transactions

  You might want to call transaction.setUser(u) over  
transaction.setUserRelationship(u), because the relationship call has  
to fetch all the transactions for a given user because its not smart  
enough to notice that user->transactions() is a fault, so it can  
ignore the "add" step for now...


 Pierce



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Java Packages for Dummies

2007-12-04 Thread Pierce T. Wetter III



 public void setPerson(edu.uow.ris.framework.eo.Person aValue) {
   if( aValue == null ) {
   edu.uow.ris.framework.eo.Person object = person();
   if( object != null )

removeObjectFromBothSidesOfRelationshipWithKey( object, "person" );

   } else
   addObjectToBothSidesOfRelationshipWithKey( aValue,  
"person" );

   }



This method should be exactly the same as the original method (other  
than the signature).  Adding packages changes nothing.   
addObjectToBothSidesOfRelationshipWithKey will result in a call to  
setPerson.  In your case, setPerson then calls  
addObjectToBothSidesOfRelationshipWithKey which calls setPerson,  
which calls addObjectToBothSidesOfRelationshipWithKey etc. etc.



   public void setPerson(edu.uow.ris.framework.eo.Person value) {
   takeStoredValueForKey(value, "person");
   }




  In detail, you want to tweak your templates to look more like this:


 public void setPerson(edu.uow.ris.framework.eo.Person value) {
   takeStoredValueForKey(value, "person");
   }


 public void setPersonRelationship(edu.uow.ris.framework.eo.Person  
aValue) {

   if( aValue == null ) {
   edu.uow.ris.framework.eo.Person object = person();
   if( object != null )

removeObjectFromBothSidesOfRelationshipWithKey( object, "person" );

   } else
   addObjectToBothSidesOfRelationshipWithKey( aValue,  
"person" );

   }

 so setPerson() sets one side, setPersonRelationship() sets both sides.

 Pierce ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Why has D2JC been deprecated?

2007-11-12 Thread Pierce T. Wetter III


On Nov 12, 2007, at 1:53 PM, Jean Pierre Malrieu wrote:


I am not using it, so my question is just for curiosity.
I thought that dynamic D2JC apps were not using nib files, and that  
swing interfaces where created out of xml descriptions, or by  
programmatically creating controllers.
Is there a technical reason for deprecating D2JC, or is it that  
without the possibility of mixing with nib-based interfaces, D2JC  
looses so much interest that maintaining it becomes more costly than  
useful?
If the reason for deprecating D2JC is not technical, I find it a  
little bit sad that all this amount of code (and there seems to be  
quite a lot code for controllers, etc.) just disappears. I  
understand that Apple does not want to maintain a tool that is not  
widely used, and that will be even less used now that the possiblity  
of mixing dynamic and nib based interface is gone. But If xml-based  
D2JC can still be used, maybe the relevant parts of the code could  
be made public?
Of course, if there is a purely technical reason for deprecating  
D2JC (like the reason for deprecating WOBuilder), please forget my  
last question.


  Because while D2JC sounds good in theory, in practice D2JC  
applications are a nightmare to maintain. You end up factoring your  
code 3 days:


   .common
   .server
   .client

  On top of whatever splitting EOGenerator does for you.

  It's practically a given that you'll be in the wrong "Person.java"  
when you go to do anything.


 They're a royal bitch to debug, because you have the client talking  
to the server talking to the client.


 So I suspect Java Client just got given up as a bad idea. Just my  
$0.02 at having to maintain a Java Client app, everyone in the company  
hates it, and we decided to just drop it in the trash even before  
Apple deprecated the whole idea.


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WebObjects 4.5 and Daylight Savings Time change.

2006-11-14 Thread Pierce T. Wetter III


On Nov 6, 2006, at 6:37 PM, James Stead wrote:


Hi,

I have a client with a substantial number of WO 4.5 apps still in  
production and we are looking into the upcoming change in the start  
and end dates of Daylight Savings Time in 2007. Is anyone else  
still on 4.5? And if so have you given any thought to this issue?


 It shouldn't be a problem, because all of that is in Foundation,  
not WO itself.


 Unless:

   1. You haven't been patching your WO 4.5 installation to keep  
current with Tiger.

   2. You're not on MacOSX.

  If either of those are true, yeah, you might have problems.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: WebObjects Foundation

2006-08-15 Thread Pierce T. Wetter III


On Aug 15, 2006, at 6:34 AM, Pascal Robert wrote:

I fully agreee with you Janine, we should start with "marketing"  
site first, and build out the Foundation in the background.   
Creating it and finding the board could take a lot of time and some  
politics ;-)


 First a joke:

  If open source has taught me anything, its that programmers will  
write code for free, but you have to PAY THEM to fix bugs.


 Second a comment:

  Show me the code!

  If code/docs come, the rest will follow. So contribute your code  
first, worry about what we'll name the website later.


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Marketing WO

2006-08-14 Thread Pierce T. Wetter III


On Aug 13, 2006, at 9:56 PM, [EMAIL PROTECTED] wrote:

Pierce, I agree with just about everything you (and others) have  
said today about the need to build a strong community.  And, lest  
anyone forget, I did start this thread by asking what you all would  
want to see Apple doing and then pointing out that maybe the  
community could do some of it ourselves.  So it's not like I am  
expecting Apple to do it all for us.


But there are a few things that I think it is important for Apple  
to do.


  Well, I agree with that too. As long as part of WO is closed  
source, we'll need Apple to do certain things on the code front. Like  
perhaps we should come up with a list of things we'd like to see in  
WO 6.x, and perhaps even code them.


Maybe I am the only one with super-picky clients, but I know that  
it will not take long for a prospective client to come to me and  
say that they have been reading what Apple says on their web site  
about WO and it's awfully skimpy.


  Tell them that since they made $1B from using it to build the  
iTMS, they've stopped marketing it so heavily. :-)


  The Wikipedia entry isn't so bad.

  But perhaps we can get them to "loan" the community  
www.webojects.org.


  However, since I seem to be the only one still concerned about  
this, I'll stop posting about it and send my thoughts directly to  
Apple.


  Maybe you should just organize it.

  I think that "if we build it they will come".

  Just like we organized the WO meet, perhaps we should organize the  
WO speakers for the next WWDC. I suspect Apple might be delighted to  
give us a room.


  Next WWDC, Wednesday will be WODay with a full day of WO sessions...

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Marketing WO

2006-08-13 Thread Pierce T. Wetter III


 I challenge the fundamental premise of this thread.

 Bottom Line:

  The collection of people who know/love WebObjects need to start  
thinking of themselves as "The WebObjects Community" and start  
thinking of Apple as "one of the major contributors to WebObjects".


 That is, even without any NDA info, I can easily point out from  
what Apple has
said long ago in public that they consider WebObjects more of a  
technology then a product. That happened when they made it free on  
MacOSX.


 Yet these days, a thriving internet technology needs a thriving  
community. We need to stop expecting Apple to lead WebObjects  
somewhere. Apple uses WO in house to a huge extent. They are going to  
continue to maintain and enhance WO. So its not, and never will be  
"dead", despite the rumors every year.


 But at this point the community has surpassed Apple. It wasn't  
Apple who worked so hard to get WOLips working, write an EOModel  
editor from scratch, or write a Rules editor they now consider  
superior to their own. Every day there is more open source code in  
"WebObjects" as used by most WO developers. At some point, the  
community will have contributed more source to WO then Apple has. [if  
they haven't already, I haven't compared the source output from the  
jad decompiler to Wonder lately.]


 "Lead, Follow, or Get Out of the Way".

  Apple hasn't really been leading WO since about 5.0. They haven't  
been following the community either, because there's been no  
community. (In fact, its only the last year or so that WO programmers  
have started thinking of themselves as a community.) I can't tell you  
what Apple said at WWDC, but I can tell you my take: Apple is getting  
out of the way.


  It's up to us to rise to the challenge.

  Recently, as part of my job search, I was talking to the President  
of a firm that employs about 20 WO programmers. He told me that he  
was worried about the future of WO, so he was trying to port some of  
his stuff to Hibernate/Struts.


  It was impossible (a hello world app requires 200 lines of XML  
code first...), so now he's shopping for a J2EE technology that is as  
capable as WO. He hasn't found one.


  There are quite a few WO shops out there who have built up their  
own in-house libraries. That's one of the key competitive advantages  
of WO: the more work you do, the more you can get done.


  Perhaps those houses need to stop thinking of the other WO  
consultants as your competition and start thinking of them as your  
allies. You need to start contributing to Wonder, so that you and  
your allies get web applications jobs rather then the hordes of  
nameless idiot J2EE developers.


  That is, the stronger the WO community as a whole becomes, the  
richer everyone in the WO community gets. So if you work at as WO  
consulting firm, have you thought about open-sourcing your internal  
frameworks? Would you rather make $150/hour doing WO or $75/hour  
editing XML files in Hibernate? When you keep your internal  
frameworks proprietary, that's the choice you're making.


  Which brings us to the premise of the thread.

  We're WO developers, not marketeers. We don't need to market WO,  
we need to contribute our code to the community. With a thriving  
community comes interest, O'Reilly books, and magazine articles. WO  
is a development system, not a new car, having an ad won't get people  
interested.


  If we do that, I think we'll find that more and more of what Apple  
does with WO gets open sourced. They already contribute to Wonder.  
When the community reaches the point that the closed source portion  
of WO is only 25% of the total, I think that either:


   1. We won't need Apple anymore at all and someone may dig in and  
replace everything.

   2. Apple will open source the rest.

  So we need not market WebObjects. Market yourself as a web  
application developer, and realize that one of the best ways to  
market yourself as an app developer is to contribute to the  
community. When I was an independent consultant, every time I  
contributed back to the community, I was able to bill at a higher  
rate, because people/firms who contribute to the community end up  
being recognized as experts

by that community. I reaped far more then I sowed.

  Pierce

P.S.

 None of this required any NDA knowledge (I had these thoughts  
before the show.) so you non-WWDC attendees can feel free to chime in  
before whatever public announcements come.


  One non-Apple thing I took away from the show: There are actually  
more WO programmers then there have been in the past (post-bubble was  
especially bad), and that we all have started to think of ourselves  
as a community.


 _Apple_ may only be making a few _billion_ a year on WO (if you  
count the iTunes Music Store), but there are quite a few of us making  
money on WO beyond that. So the community isn't going to go away and  
WebObjects isn't going to go away. So enough FUD!


 Instead, let

Re: WOComponents are dead, long live smart tags!

2006-08-13 Thread Pierce T. Wetter III


On Aug 13, 2006, at 9:00 AM, Jerry W. Walker wrote:


Hi, Pierce, et al,

I strongly prefer the simplicity built into the current named-WO- 
tag reference to attributes in the .wod file. At times I would  
prefer slightly more convenience at product creation time when I'm  
hand editing the files, but that always weighs against the limited  
amount of trouble that the current scheme can allow neophytes to  
cause as I'm professionally called in to clean up their messes.


  Point zero:

Any templating scheme can be in addition to the current scheme  
and may be
more appropriate useful then the current schemes in additional  
contexts like
XML and Javascript generation. It's mostly a matter of having a  
different
template parser on the front end. Tweaking the templating scheme  
might then make it easier to hook into an open-source WYSIWYG editor  
like Nvu or whatever Eclipse has.


  In regards to your point:

   A tool that understands WO tags might make it _harder_ for a  
neophyte to cause a mess.


 Pierce



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: WOComponents are dead, long live smart tags!

2006-08-12 Thread Pierce T. Wetter III


In any case, I respectfully (and without a great deal of deep  
thought) disagree with your position. I have always appreciated how  
relatively clean WO left the html template file with the only tag  
added being a simple  tag that our graphics  
designers had no trouble recognizing or working around.


I still prefer that over the clutter that some of the other web  
serving technologies leave in their html templates.


  There are good parts and bad parts to the current syntax.

 Is  clean? Absolutely. I also think the  
separation between code and HTML is one of the strengths of WO.


  But doing the following:

 
 


  form: WOForm
  {
action=doit;
  }

 Bugs me... I think:

  

  Would be just as clean, and an HTML editor would know that FORM  
tags can be enclosed.


  If you've ever done complex XML with WO, you can see how it can  
get weird quick.

  
  
  
  
  
  
  
  

 If I was going to design a new templating system, it would be based  
on the following ideas:


  1. Code and HTML should be separate. So yes, Virginia, there will  
be .wod files, especially because of feature #3. Rather then be  
religious about it, some wo declarations can be in the .html, but the  
wod wins.


 i.e.

 

 userFont : attributes
 {   name=user.preferences.fontName; }

 Might be less readable/maintainable then:

 

 So .wod files will be there, which implies a bundle  
with .api, .java, .woo, but for simple tags, you can omit the  
declaration. You might not want to, because of feature #3, because if  
you're doing the same declaration over and over, it makes sense to be  
in a common .wod.



  2. Any tag can be made dynamic by adding the appropriate  
attribute. An in-html attribute determines the action taken:  
attributes sets the tag attributes leaving the tag and any contents  
alone, replace replaces the tag and contents, contents replaces the  
tag contents. (See HotMeTaL in Zope, Tapestry, etc.) This is  
especially helpful in XML.


  3. .WOD files can #include other files, providing both a primitive  
form of inheritance (#include ) and an easy way to have  
constant declarations:


   timeDisplay: WOString  
{ timeformat=application.localization.timeFormat; }


 This would save me cutting/pasting the superclasses .wod file  
everytime I make a subclass, which means I've just copied all the  
bugs as well! This would work pretty simply as last binding wins:


foo: WOString { value=x;}
foo: WOString { value=y; dateformat="%b"; }
foo: WOString { value=z; }

results in:

foo: WOString
{
  value=z; dateformat="%b";
}

You can remove a binding this way:

  dateformat= ;


  4. It would understand at least one WYSIWYG include mechanism, so  
that you can use their existing component like architecture. That is,  
DreamWeaver lets you build sites out of pieces just like WO does.


  5. 

There would be a mode you could put the application into that  
leaves the WO specific stuff in such that an Artist could save the  
HTML (with sample data!) to disk, edit the HTML and give it back to a  
programmer.


That is, even as a hard-core-edit-the-raw-HTML person, I'd love  
to be able

  to store sample data in elements:

  User Name>

  What do you think of those principles?

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


WOComponents are dead, long live smart tags!

2006-08-12 Thread Pierce T. Wetter III



 Starting hopefully a new, productive thread of discussion.

 Personally, I find the whole way WO does dynamic tags to be very  
1995...


 These days, I think WO should have tags more along the lines of  
what's become more of a standard: legal XHTML tags like the following:


 Sample Data

(accompanying WOD)

  food: WOString
  {
value=session.food; /// hmmm... I must be hungry.
  }

 The big problem for the WYSIWYG editors has always been that they  
have to read two places to figure out what a tag resolves to in HTML  
terms. Why not have:



  ...stuff


hamburger : WOForm
{

}

Perhaps rather then whine about WOB dying, we should turn dreamweaver/ 
Golive/That firefox thing into WOB...


 What do you all think? Really, it's just a matter of replacing the  
template parser, and thanks to jadclipse, that stuff all has the  
source available...



 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: WOProject/WOLips first impressions from an Xcode user ( sans sniping)

2006-08-12 Thread Pierce T. Wetter III
On Aug 11, 2006, at 7:38 PM, Robert Walker wrote:Hi all,I did some experimenting with WOProject/WOLips today.  I posted my impressions on my blog page in case anyone is interested.  I'd love to hear your feedback.Here's the link:http://web.mac.com/robertwalker1/iWeb/Site/Welcome.html --  I feel your pain. Eclipse can be kind of a pain to use until you get used to it. Basically, I ended up talking my boss into two 20" widescreen monitors ($299 each at Fry's last week). One for Eclipse, one for everything else. It's very Windows 3.1 with its "tiled windows" approach. Then again, Xcode has a mode like this too (I just don't use it), and it is possible to "undock" windows in Eclipse.   However, I have to say that Eclipse is worth it. Eclipse really, really, "groks" Java codeI would say the math works like this:   Productivity gained due to Eclipse features:  10%   Productivity lost due to Eclipse being designed by open-source Java programmers: -1%- Net Productivity gain: 9%   Hey, that's cool features of Eclipse: 25%   Pain of annoying UI quirks of Eclipse (The "where is that?" syndrome) which always hit   you when you have a fix a bug, like yesterday...: -15%  -    Net Coolness: 10%     Utility of new WOLips tools (Rule Editor/Entity Modeler): 100%     Utility of Apple equivalents: -10%  ---     Net Gain: 90%  Cost of two 20" Widescreen monitors: $598  Playing Counterstrike on two monitors: :-)   So do I "like" Eclipse? No.   Would I go back to XCode? No.    So stick with it Rob. Besides, WOLips maintains XCode projects in parallel, so its sort of risk-free to try it.    Pierce ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: General List Disclosure of WWDC WO info

2006-08-11 Thread Pierce T. Wetter III


On Aug 10, 2006, at 10:42 PM, Cliff Tuel wrote:


Perhaps some of the Apple WO staff could determine how much of the
information announced today at WWDC can be shared with the other list
members?


Someone asked this in the WebObjects Lab today.  He was told a public
statement is coming next week or the week after.


 Personally, I now am pretty reassured about WO. (I can say that, my  
personal feelings about things aren't under NDA.)


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: How to create an action binding?

2006-07-14 Thread Pierce T. Wetter III


On Jul 14, 2006, at 2:19 PM, Miguel Arroz wrote:


Hi!

  I'm creating a component that contains a form and a submit  
button. I want to be able to include that component inside another  
one, and that the submit button binds to an action on the  
"external" component. What I need is a "action" binding like those  
ones found in WOHyperlink and such. How do I do this?


 Try using a "pass-through" binding:

 action: ^action

 in the .wod file for your submit button. That tells WebObjects to  
pull the value of "action" not from the enclosing component, but from  
where that component is bound. In fact, you can pass through all the  
WOSubmitButton options if you like the same way.


 But as others have said, you'll want to be manually pulling  
bindings in that case. Otherwise WO will happily try to shove the  
value of "action" into your component where its referenced, and you  
don't want that.


 Pierce



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Creating Charts and Graphs - Recommendations

2006-06-15 Thread Pierce T. Wetter III


 vvi.com has a free service for this:

http://www.vvi.com/services/charts/index.html?make_graphs=Click+To 
+Make+Graphs



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: javadoc for webobjects

2006-06-09 Thread Pierce T. Wetter III


On Jun 9, 2006, at 8:07 AM, Mark Morris wrote:

And, of course, use the appropriate paths and path format for your  
OS



Personally, Javadoc output makes my eyes bleed.

Check out: http://www.stack.nl/~dimitri/doxygen/


WOTip: Have a common superclass for your components, pages, and  
EOObjects. It will help you be DRY

More Tips: http://www.twinforces.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Running WO

2006-06-06 Thread Pierce T. Wetter III


On Jun 6, 2006, at 7:25 AM, Paul Lynch wrote:



On 6 Jun 2006, at 12:57, Frank Gibau wrote:


WO-Deployment.
We run WO an two G5 (Dual) with MacOS-X-Server-Software. On each  
computer (WO1, WO2) we have 8 instances of our applictation  
running. One computer (WO1) ist running WOMonitor to manage the  
load balancing.
We want to install a third computer (G5). Must we install MacOS X- 
Server on this computer or could we use an normal MacOS X  
System ?. Has MacOS X-Server-Sortware an advantage ?.

What is the best laod balancing method for 3 or more WO Server?


You can use plain MacOS X.  Server has only minor advantages, which  
mainly come down to various preinstalled utilities, and the Server  
Admin app.  If you have any familiarity with Unix systems at all,  
you might as well avoid the extra cost of MacOS X Server.


Depending on what you mean by load balancing (saying that  
JavaMonitor is managing load balancing implies that you may have a  
slightly different meaning from me), just create a reasonable  
number of instances on the new server, and use round-robin.  In  
other words, the same as for two servers, and not significantly  
different from one server.



 When using round-robin, be sure and do:

 instance 1:  machine 1   port 1000
 instance 2:  machine 2   port 1000
 instance 3:  machine 1   port 1001
 instance 4:  machine 2   port 1001

 That is, interleave the machines with the instances. Otherwise, if  
you're running several instances on one machine:


 instance 1:  machine 1   port 1000
 instance 2:  machine 1   port 1001
 instance 3:  machine 1   port 1002

 Then all the requests will first go to machine 1, then machine 2,  
rather then distributing among machines.


 Similarly, if you have multiple webservers in front of the  
instances for redundancy, random may work better, since the  
webservers have no way to coordinate unless you create a custom XML  
file for each webserver so that their round robin doesn't work in  
parallel.


 Personally, in production, I've found that its better to use an XML  
file on the webserver and shell scripts on the application machines  
then to fuss with JavaMonitor.


Pierce



WOTip: Don't use load balancing in the adaptor. Use roundrobin.
More Tips: http://www.twinforces.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: What is the best way to synchronize EOs between coordinators?

2006-06-05 Thread Pierce T. Wetter III


On Jun 4, 2006, at 8:37 PM, John Bruce wrote:


I've also had some success with jgroups (http://www.jgroups.org).
Using the NotificationBus class it is quite easy to send serialized
java objects to applications on the same network using multicast. I
just changed the existing JMS based change notification framework to
use this instead. The NotificationBus expects to send a Serializable
object.

If anyone is interested I could post the code to wocode but it's easy
to implement on it's own.


 Thanks for the link. The nice thing about spread is that we use it  
for other things too, like we use it to post notifications for other  
things besides changed objects. (Like every night when the stock  
prices get updated.)



WOTip: Use a direct action unless a  tag or Ajax was involved  
somewhere.

More Tips: http://www.twinforces.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: What is the best way to synchronize EOs between coordinators?

2006-06-05 Thread Pierce T. Wetter III


On Jun 4, 2006, at 3:53 PM, Lachlan Deck wrote:


Hi there,

On 02/06/2006, at 6:00 AM, Pierce T. Wetter III wrote:


On Jun 1, 2006, at 2:35 AM, Adam Czysciak wrote:

What is your experience guys? Is setting the default fetch  
timestamp lag recommended? If so, what value do you recommend? (I  
know, this is really app specific...)


I've never had good luck with the object timestamp thing. What  
ends up happening is any object you cached gets arbitrarily  
refetched when you least expect it.


Well the 'object timestamp thing' is always a factor. It's not an  
either/or choice. It's just a matter of time ;-) before the tsl  
(timestamp lag which defaults to 1 hour) kicks into play...


  Yeah, we bump ours to infinity.



Instead, what we do is all of our servers run something called  
spread. (http://www.spread.org) That basically gives us a robust  
broadcast messaging system so that we can publish messages to all  
the servers.


We then use a category on EOEditingContext


Bring back WO-Objective-C ;-)


 Look into AspectJ. Enjoy.

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Help with code screen using model-view-controller

2006-06-02 Thread Pierce T. Wetter III


On Jun 2, 2006, at 3:00 PM, Art Isbell wrote:


On Jun 1, 2006, at 10:23 AM, Carter Wojcik wrote:


Does anyone know of a good reference or examples that
can demonstrate model-view-controller?


	I have found WO apps to be much more difficult to model using MVC  
than Cocoa apps.


 Personally I've always found MVC to be a myth even in Cocoa.

 Model, sure.
 V+C, depends on the app.

 I mean yeah, an NSColorWell is definitely a "view". But the window  
that holds that NSColorWell often functions as both view (adjusting  
the presentation) and controller (implementing logic related to the  
view).


 Not to mention "Facade" classes like NSNumberFormmatter because  
often you have to translate between the actual data and the  
representation for the user.


 Now we have MFVC: Model, Facade, View, Controller

 Is the "document" class in Cocoa part of the facade, the view or  
the controller?


 Seems to depend on the app.

 Similarly, components tend to be pure view, but pages tend to be  
view+controller, just like NSDocument ends up doing double duty.


 Ok, enough philosophy, answering the actual question...

 Model: An NSColor.
 View: An NSColorWell
 Controller: The code that notices when the value in the NSColorWell  
changes, updates the model, and applies the color change.



 Pierce


WOTip: Have a common superclass for your components, pages, and  
EOObjects. It will help you be DRY

More Tips: http://www.twinforces.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: What is the best way to synchronize EOs between coordinators?

2006-06-01 Thread Pierce T. Wetter III

On Jun 1, 2006, at 2:35 AM, Adam Czysciak wrote:



Hi everyone!

Lately I discovered this Wiki article on EO objects freshness.
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/ 
Caching_and_Freshness#Recommended


Previously I've been synchronizing objects with EOF delegate -  
whenever object changes (new/updated/deleted), I do invalidate its  
GID in all of my registered coordinators. The good point is that I  
can control which entities and which actions need to be  
synchronized. But - this technique of course may cause EOF locks.


For me it looks that setting default lifetime for objects *may*  
improve the process, however in some cases it will cause useless  
fetches.


What is your experience guys? Is setting the default fetch  
timestamp lag recommended? If so, what value do you recommend? (I  
know, this is really app specific...)




  I've never had good luck with the object timestamp thing. What  
ends up happening is any object you cached gets arbitrarily refetched  
when you least expect it.


  Instead, what we do is all of our servers run something called  
spread. (http://www.spread.org) That basically gives us a robust  
broadcast messaging system so that we can publish messages to all the  
servers.


  We then use a category on EOEditingContext to add a method called  
"saveChangesAndNotify". We use this method anytime we want to  
broadcast that an object has changed. This calls processRecentChanges  
to get a list of the changed objects, then broadcasts the GIDs on the  
invalidate channel. Processes that care connect to the invalidate  
channel on their local spread daemon and invalidate the GID (which  
invalidates it in all the local ecs. )


 It's simple, it works, and its not very application specific  
because you can selectively choose where to call saveChanges() and  
where to call saveChangesAndNotify(). You can even make sure that the  
parent relationships get refetched by adding the GID of the parent to  
the broadcast as needed; something the fetch timestamp may not do.


 Pierce


WOTip: WebObjects will be more then happy enough to pass along any  
id='blah' setting you put in the .wod file for use with Javascript  
and the DOM.

More Tips: http://www.twinforces.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Strange localInstanceOfObject behaviour...

2006-05-31 Thread Pierce T. Wetter III


And just for fun, you can have multiple peer editingContexts which  
all reference the temporary EO so long as the temporary object is  
registered in an editingContext which is common to both peers. :-)


 I thought I'd expand on that last sentence because  
localInstanceOfObject seems to confuse multiple people.


 localInstanceOfObject() actually returns a _fault_ from the new  
editing context for the passed in object.


 If you have 2 peer contexts:

  databaseContext -> ec1
  -> ec2

  and you call localInstanceOfObject(), and the object is in the  
database, you'll get a copy of the databaseContext snapshot of the  
object when the fault resolves from ec2. That is, the editing context  
goes up one level to the database context and returns whatever the  
database context has, not whatever ec1 has (because they're peers).  
If its an uncommitted object, then the object only exists in ec1, so  
the fault can't resolve into ec2. Similarly, any uncommitted changes  
in general from ec1 won't show up in ec2, because they're peers.


  What Mark just said was that if you have an uncommitted object,  
and you have:


  databaseContext -> ec1 -> ec2
 -> ec3

  (i.e. ec2 and ec3 are child editing contexts of ec1, but peers of  
each other)


  Then when the fault fires in ec3, it goes up one level, pulls the  
objects and changes from ec1 (committed or not) and returns it to you  
in ec3. But that only works because ec1 is common to both ec2 and  
ec3. In other word, localInstanceOfObject() returns an object from  
"one level above" the source editing context which is not necessarily  
a copy of the object you want, it depends on how the destination  
context lies with respect to the source context.


Pierce


WOTip: Don't use load balancing in the adaptor. Use roundrobin.
More Tips: http://www.twinforces.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: newbie question regarding WOPopUp

2006-05-30 Thread Pierce T. Wetter III


On May 30, 2006, at 11:45 AM, Timmy wrote:


Pierce,

Thanks for the tip. When I bind my selectedBuilding variable to  
"value" I actually get null in my DirectAction for request 
().formValueForKey("buildingString").  So, actually a step back -  
or I'm doing something else wrong. Here is what my current bindings  
look like.


displayString   currentBuilding
itemcurrentBuilding
listbuildingList (instantiated as indicated below)
name"buildingString"
selection   selectedBuilding
value   selectedBuilding



 Oh, you're at the WOBuilder level.

 Short answer: bind value to currentBuilding.

 Long Answer:

  It's important when learning WO to make lots of use of "View  
Source" in FireFox to reverse-engineer what WO is doing on the HTML  
level. This is especially useful for something like WOPopupButton  
which writes multiple HTML tags.


  In order to build a popup in HTML, you have to write out

 

  
  
 

 If you were doing this by hand, you'd end up writing out the select  
tag, then writing out each option via a WORepetition.


 So if you look at the list of bindings, that's where those come  
from. Some of those bindings are for the repetition, some are for the  
popup as a whole.


   list:   the list for the WORep.
   item:   the item for the worep
   displayString: "name" for the option tag, usually going to be  
item.something
   value: "value" for the option tag, usually going to be  
item.something. This is optional, if you leave it out, WO will create  
it's own (useful for selection below)

   name: the name of the _select_ tag, for the form
   selection: WO will compare the binding of value to this binding  
when writing out the option tags, if they match, then that item is  
considered selected. When reading a value from a form, it does this  
in reverse.


 That's the basics. There's some more voodoo that happens when  
mapping between "selection" and the list items with component  
actions, but that shouldn't concern you, since you're using a direct  
action and pulling the forum values.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: newbie question regarding WOPopUp

2006-05-30 Thread Pierce T. Wetter III


On May 30, 2006, at 11:15 AM, Timmy wrote:


WOList:

I'm adding a WOPopUp element to a search page I am creating. I am  
manually creating the NSArray with String values that will populate  
the pop-up rather than using EO's. I am building my list like so:


NSArray buildingList = new NSArray(new Object[] {"Building  
One","Building Two","Building Three"});


for my PopUp, I'm binding 'name' like "myElementName."


My WOSubmit is executing a DirectAction which is grabbing the  
selected PopUp value via request().formValueForKey 
("myElementName"). The value returned by that method is a String  
representing the index of the selected item from my WOPopUp rather  
than the actual text string ("Building One", etc.). I'm sure this  
must be the expected behavior but I could use a nudge in the right  
direction to get the actual selected string value back rather than  
the index value.


Thanks for any available assistance,


 bind value in addition to name. Value is what the form passes back  
to you, name is what the form displays.



WOTip: Don't use load balancing in the adaptor. Use roundrobin.
More Tips: http://www.twinforces.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: generating response in different thread

2006-05-28 Thread Pierce T. Wetter III


On May 27, 2006, at 6:29 PM, Art Isbell wrote:


On May 26, 2006, at 11:05 PM, Gennady Kushnir wrote:


Were the documentation for WOLongResponsePage can be found?
It is not descripted neither in WO API nor in reference.


	There is a WOLongResponsePage javadoc page, but it merely lists  
the public API.


	The WOLongResponsePage.java source is in /Developer/Examples/ 
JavaWebObjects/Source/JavaWOExtensions, so that's the ultimate  
documentation :-)


	But the best "documentation" that I have found is the LongRequest  
example in /Developer/Examples/JavaWebObjects.


  Though if your long response is because of database access,  
WOLongResponsePage won't necessarily help you.






WOTip: 90% of your pages could be built with a URL of just the page  
name and the primary key of a root object. Write that code once  
somewhere and you can add pages with minimal coding.

More Tips: http://www.twinforces.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Another take on a NY WebObjects Users Group

2006-05-25 Thread Pierce T. Wetter III


On May 24, 2006, at 3:22 PM, Andrus Adamchik wrote:

There was an attempt two years ago by Arthur Shiraz and Scott  
Lopatin. We even got access to the Apple store conference facility.  
Unfortunately there was very little attendance and limited  
presentation content. I guess this might change if we do beer/food  
instead of presentations? :-)


 Clearly meeting in a pizza parlor with beer will win every time.

 Pierce


WOTip: Set things to NULL when you're done with them. It makes the  
JVM happy, and saves you GC time later.

More Tips: http://www.twinforces.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-23 Thread Pierce T. Wetter III


On May 23, 2006, at 12:54 PM, Mike Schrag wrote:

Contributions of any kind are welcomed ... My goal recently with  
the framework has been to provide all the Ajax capabilities that  
Ruby brags of, but in the WO-way.  I know you aren't a component- 
action fan :) ,


 Actually, I LOVE component actions. I just tell my engineers I  
better see a  tag somewhere... And component actions would be  
great for lots of Ajax stuff, because you want to be able to pull  
state into the URL.



but that's been my focus with the framework recently -- so that  
it's not just a thin wrapper around the libraries, rather you  
actually get some of the WO component-action-style "magic" with it  
too (drag-and-drop is a good example of that ... It actually lets  
you drag and drop real objects (as far as your components are  
concerned) vs just having ID's passed around -- feels too servlety  
to me :) ).  However, having a good set of DirectAction-based Ajax  
tools would be very cool, and I do have wikibook fetish as of late,  
so I'm all for documentation as well.  I would say to take your  
pick, because people will be into either one, I think.


  Well, I'll start on the wikibook stuff and we'll go from there.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-23 Thread Pierce T. Wetter III


On May 23, 2006, at 11:21 AM, Mike Schrag wrote:

For the record, I'm only one of about three people who have worked  
on Wonder's Ajax framework ... Don't want too much credit  
attributed :)


 Ah, then there shouldn't be any issues if I make additions to it,  
as long as I follow my own advice and document them well.


 Or would you rather I spent time on the documentation? It's almost  
easier for me to do that at the moment...


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-23 Thread Pierce T. Wetter III

So exactly what problems are you having with dojo/wo? Consider that
the problem may be dojo, not WO in particular. You could easily
create a WODynamicElement for every new dojo tag, collect them in
components, and have something much easier to use then straight dojo.



I have tried to run the sample dojo application under WO, but without
success. I have the job to port an existing java-app to WO/AJAX.  
But without
official WO docs, i have no plan how to do this. I tried to run the  
dojo

example to understand how i can integrate a dojo widget and let it
communicate with the WO server.

The first problems arise with the following statements:


dojo.require("dojo.widget.Button2");



 Well, you're missing HTML and Javascript..

This line is HTML:



This line is Javascript:
dojo.require("dojo.widget.Button2");

This should be:



dojo.require("dojo.widget.Button2");


Also, the path you have is wrong, since its relative, you probably  
want a leading slash:




Because otherwise its going to try to pull from "/cgi-bin/WebObjects/ 
YourApp.woa/js/dojo/dojo.js" or whatever instead of:


"/js/dojo/dojo.js"

I haven't done any WO stuff yet...




Then i have to call a java method on server on occurence of events  
to get
actual data.  But you have said that this is possible with direct  
actions
using WOActionURL. I have to try it. But are direct actions  
compatible with

sessions?



  Yes. Sessions are "optional" with direct actions, while they're  
not for "component actions", because a component action URL of the form:


  1.2.3.4

  means:

   go to 4th child of 3rd child of 2nd component of 1st page

 which implies that the WO server has kept a history of all that so  
it can look up which component "1.2.3.4" references.







I also think, that from this example, dojo is a bit weak as a
Javascript toolkit. You'll spend a lot of time wiring stuff up in
Javascript with Dojo compared to Prototype. Or contrast dojo with the
Yahoo UI library:



I explored some AJAX libraries like RICO, but decided to use dojo,  
because

of the rich widget set. But i can you the yahoo toolkit too, if i can
integrate it easily in WO.



 There's the zimbra toolkit too.




Pierce, can you write a small exaple app (Xcode project), just like  
the dojo
HelloWorld example, to show how the integration of the Yahoo UI (if  
you wish
Rico ...) can be accomplished in WebObjects? I think that i'm not  
the person

alone facing big problems with AJAX and WO.



 No, because I don't have the spare time and I don't think it WO  
that's the problem, I think its the Ajax.


 Adding "AJAX" to an application, no matter what the application  
framework is not an easy task. You have to understand the DOM, how  
javascript interacts with the DOM, the javascript library(ies) you're  
using, how the application server responds to requests, XML, how to  
generate XML with your application framework, SOAP and HTML.


 Those are the foundations you have to build on. Once you have that  
under your belt, integrating with WO is trivial. There are some  
tricks you can do to make it easier like Mike's Ajax toolkit in  
Project Wonder has done, but that's icing.


 Instead, forget completely about WO. The HelloWorld example seems  
to have disappeared, but it had almost no server side code in it  
anyways. Get dojo working in a plain .html file _first_. When you  
have that working. move the .html into a .wo file, and get that  
working (you'll have to fix things like the leading slash above).  
When you have that working, then you can worry about the "response"  
portion of Ajax, and that's when you'll need something like  
WOActionURL, or Mike's toolkit.


  At that point, myself or others on the list can help you. But at  
that point you should be asking more detailed questions like "how do  
I build a URL to shove in this bit of JavaScript code". Rather than  
"how do I integrate Ajax with WO".


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: [Wonder-disc] Re: AJAX WebObjects Integration

2006-05-23 Thread Pierce T. Wetter III


On May 23, 2006, at 1:05 AM, Anjo Krank wrote:


Am 23.05.2006 um 08:25 schrieb Mike Schrag:

I put up some initial docs on the components available in Wonder's  
Ajax framework to try to address some of the "documentation gap".


Brrr. What a pompous asshole... I thought about writing something  
re his "myth" stuff, but why bother.


 Obviously this mail wasn't meant to be sent to two mailing lists.  
I apologize for that, but I'm really short fused when I hear this  
"Wonder has no docs" crap over and over and over again.




 Well, I'll let it go this time, but I'm pretty furious about being  
insulted in public, not to mention having personal information spread  
across the list. I'm under a lot of stress right now, I didn't need  
more. If you have a problem with me in the future, talk to me, not  
the mailing list. Email is an imperfect medium; always assume that  
how you took something may not be how it was meant. In return, I'd  
like you to grant me a moment of your time, and listen with an open  
heart.


 In this case, I don't think I said "no docs" I said there was a gap  
and I wasn't just talking about Wonder, I was talking about WO in  
general. I'll probably keep bitching about the WO documentation until  
there's a book at least as good as the Rails book on WebObjects. The  
newbies need a step by step guide that points them towards D2W and  
Direct Actions and away from component actions. Even Apple isn't  
immune, look at store.apple.com or jobs.apple.com.


 As far as Wonder goes, I was only referring to the new Ajax  
Framework of Mike, and it looks like he's doing a great job of  
addressing it. Good enough in fact, that I'm going to approach him  
about working together on the Ajax framework instead of rolling my  
own and having to reconcile them later. I think I'll even contribute  
to his docs.


But obviously there is a gap, or people wouldn't keep saying "no  
docs". If one person says "you have a big nose", they're a pompous  
asshole. If two people say "you have a big nose", they're probably  
still pompous assholes, but you probably have a big nose. (Note: I  
have no idea what Anjo looks like.) Even open source/free projects  
needs to listen to their customers, and in this case, the customers  
are saying "we'd like more docs".


 Now at least part of the problem is that someone new to Wonder is  
pointed at wonder.sf.net, and sort of left there.  Wonder does have  
"javadoc" documentation that I've been able to find, and I've seen  
short articles here and there about Wonder, but if you go to  
wonder.sf.net, there is no tab that says "documentation". I think I  
found the javadoc documentation by accident via google, later on I  
found a link in the "news section".


 And personally, I think this trend of lazy programmers to just  
throw together some javadoc documentation and consider themselves  
done isn't that great. (You'd think they'd at least run doxygen to  
get slightly better looking docs.) Wonder has gotten fairly big, and  
now has numerous libraries, some of which are orthogonal to each  
other. But god knows what exactly you need to install if you want one  
feature over another... (unless you read the top level README.txt  
file, but then you've downloaded everything...)


 So Anjo, if you're tired of hearing no docs "crap":

   1. Make a web page that links to all the existing Wonder articles  
and such from sf.net to stepwise or wherever. Put THAT on the getting  
started page.  In general, ask yourself: What can I find out about  
Wonder from wonder.sf.net? What can I find from Google? Why isn't  
that the same set of information.


   2. Try doxygen instead of javadoc, and put the link up on the  
main sf site. Reading javadoc makes my eyes bleed.


   3. Pull some of the contents from the various README files into  
web pages on sf.net. Start with the very top README.txt file, there's  
no reason why someone should have to download the whole set of source  
code to find out what's in "Adaptors".


   4. Break the Orthogonal components into separate downloads so  
newbies can ease into Wonder.


   I think at least some of the complaints would go away at that point.

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-23 Thread Pierce T. Wetter III
On May 22, 2006, at 11:25 PM, Mike Schrag wrote:I put up some initial docs on the components available in Wonder's Ajax framework to try to address some of the "documentation gap".  It's just the initial pass, and there's obviously more that can be done.  Anything that is explained in Scriptaculous or Prototype docs, for instance, is not further documented at the moment, only that the particular bindings exist.http://en.wikibooks.org/wiki/Programming:WebObjects/Project_WONDER/Frameworks/Ajax  Hey, that looks great.   Thanks for doing that, I'd looked through the Ajax stuff several times and managed to miss the whole "AjaxUpdateLink" action.  Pierce ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: AJAX WebObjects Integration

2006-05-19 Thread Pierce T. Wetter III


On May 19, 2006, at 11:53 AM, Chuck Hill wrote:


Pierce, thank  you.  That was superb!  One small edit and a note:

On May 19, 2006, at 10:48 AM, Pierce T. Wetter III wrote:


 Reality: WebObjects is actually a better framework for use with  
WebObjects then Rails because it has a better component system  
then Rails.


Think this should read Reality: WebObjects is actually a better  
framework for use with AJAX than Rails because it has a better  
component system then Rails.


 Doh. Yep.





 [[[However, there's a gotcha there, because component actions  
called from javascript count towards your backtracking count.  
Since someone might be going down through the page clicking rating  
after rating, that could be a problem. If your max backtracking  
count was 10, and you had 20 postings on a page, they wouldn't be  
able to rate the 11th page. ]]]


To avoid problems like this, I have added methods like this to  
Session:


public void savePage(WOComponent aPage)
{
if (shouldCachePage(aPage))
{
super.savePage(aPage);
}
}




/**
 * Returns true if the passed WOComponent is  
eligible to be added to the page cache.  This is used to keep pages  
that do not need to be cached from the page cache.  For example,  
pages that are generated only from Direct Actions and which do not  
contain Component Action URLs do not need to be cached.

 *
 * @param aPage the WOComponent to check for eligibility
 * @return true if the passed WOComponent is  
eligible to be added to the page cache

 */
public boolean shouldCachePage(WOComponent aPage)
{
return ! (aPage instanceof PartialPage);
}


Where PartialPage is an interface that components can implement to  
indicate that they don't belong in the page cache.


  Hey, great tip. That makes component actions easier to use with Ajax.

  Hmmm... So I'll have to go adjust my component class hierarchy:

  WOComponent
EZComponent
  EZPagelet
 EZPage

  So both EZPagelet and EZPage can pull stuff out of a direct action  
URL via key value coding, but EZPagelet's default to not being  
cacheable. I can avoid the "instance of" call by doing:


public void savePage(WOComponent aPage)
{
if (((EZPagelet) aPage).shouldCache())
{
super.savePage(aPage);
}
}

and making sure that EZPagelet and EZPage both implement shouldCache 
() (pagelet returns false, page returns true).


  That's going to enforce that all direct actions are subclasses of   
EZPage or EZPagelet, but that's a good thing for security anyways.


 Pierce


 
   
___

Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-19 Thread Pierce T. Wetter III


I read your earlier "WebObjects on Rails" post with much interest  
and started to throw together a small sample application that used  
EZ... classes.  I slowed and stalled because I had to fill in a lot  
of the gaps -- I'm not adverse to doing that, but time is money/ 
precious and I'll have to wait till the weekend to get the spare  
time!!


In reading your posting today, I had the same, "this is neat, I  
need to try this" desire.


Where I'm headed with this is to wonder if you have a small,  
functional example of the various ideas you've put together on this  
topic or, if not, if this is something that you think would be good  
to do.  People learn by example and I'd be happy to assist in  
putting something together.




  The Wrox site has the sample code from my old book chapter, let me  
look...  here it is, you want Chapter 7:


http://support.apress.com/books.asp?bID=1861004311&s=0

  As for the Ajax stuff, the problem is that Marketocracy is  
Objective-C not Java, so all my stuff is coded in ObjC at the moment.  
That's why my posts have been more "conceptual" then "code" lately.  
It's the same API, but I don't want to scare people with lots of [].


  I interviewed at the iTMS on Monday, so maybe that will change. :-)

  What I really want to do though is put this all together into a  
framework to help jumpstart people with WO. Wonder is cool, but its  
kind of more focused at the advanced WO practitioner then someone who  
just wants to get something done.


   Maybe Wonder just needs a "WO Recipes" section. I've come to love  
Recipes books...


In passing, I'll note that the aspects of WebObjects that you are  
highlighting are the ones that I find so powerful.  Many people say  
the power of WO is EOF, and while EOF is an astonishing piece of  
work, I'll argue that WO without EOF is still extremely powerful.   
I particularly like your "Myth: WebObjects generates HTML" comment!


Thanks for your contribution, you're more articulate than I would  
be on this ...


 Thanks, its very encouraging when I get feedback like this from one  
of my long posts.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Explaining the power of Direct to Web

2006-05-19 Thread Pierce T. Wetter III


On May 19, 2006, at 9:53 AM, David Holt wrote:

After reading all the Direct to Web stuff I could get my hands on,  
I was trying to describe to my boss why we need to be looking at it  
and moving towards it. The metaphor I came up with was that D2W is  
like CSS for objects. I think that sort of describes its power, but  
I would be interested in how others make the argument for (ER)D2W  
to non-programmers (or programmers for that matter!).


 CSS for objects is a pretty good one-line answer.

 A longer one would be that D2W lets you describe the meta  
information about an object: How to format its data, how to label it,  
what data should be editable, etc. It can then build user interface  
from that description.


Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-19 Thread Pierce T. Wetter III

Hi Mike,

I'm primarily interested in general widgets and form widgets.

I'm tired of trying to bring together WO and Dojo, so wanna give  
up. I think

WebObjects clashes with AJAX. It doesn't make sense to use AJAX with
WebObjects.

If anybody wants to convince me of the opposite, i'm willing ...


 Easy enough, I've been doing a lot of this lately. Warning, its  
going to be long, because I've been thinking about writing a post  
like this for a long time. I hereby give permission in advance if  
anyone wants to put this post on a website somewhere, just please  
attribute it and email me.



 Myth: Rails is a better framework for Ajax then WO.

 Reality: WebObjects is actually a better framework for use with  
WebObjects then Rails because it has a better component system then  
Rails. You spend a lot of time coding little tiny XML and HTML  
generators when doing Ajax and WO's component system makes that very  
DRY (Don't Repeat Yourself).


 Myth: WebObjects is hard to use with Ajax.

 Reality: WebObjects is easy to use with Ajax, its just that there  
is only one known library for Ajax-WO support, and its not well  
documented. Even then the library only goes so far in that it just  
provides new components to wrap a few script.aculo.us tags. I think  
its more of a documentation gap, not a code gap.


  Additionally, the WO documentation has always pushed people  
erroneously towards component actions and away from direct actions.   
If you use 90% direct actions like I do in my application, (See my  
"WebObjects on Rails" post), you'll find that direct actions are  
simple to code in reality, and very much like Rails which basically  
doesn't have component actions at all.


 Myth: You can't assign the name or id value of tags in WebObjects.  
I'm mentioning this one explicitly, because I had someone ask me  
about this recently, because they were trying to assign a WYSIWYG  
JavaScript editor to a text area.


 Reality:

 Actually, what really happens is that if you DON'T have a  
name=value or id=value line for your TextArea in WebObjects, it will  
generate a unique one for you. But you're more then welcome to  
specify one in your .wod file, and WO will use that. It's then up to  
_you_ to make sure its unique, so that you don't have multiple text  
area tags with the same name. In other words if you only have one  
textarea you wish to attach a Javascript WYSIWYG editor to, just add:


textarea: WOText
{
 id='wysiwyg';
 name='wysiwyg';
 value=textValue;
}
in your .wod file and you can use id with your Javascript just fine.

 Myth: WebObjects generates HTML

 Reality:

   Just because the components of your .wo file are .html and .wod  
doesn't mean WebObjects can only generate HTML. WebObjects is really  
at heart, a very, very, very, complicated printf. The result of a  
component can be HTML, XML, JavaScript, or even binary data. You can  
actually put whatever you want in the .HTML and treat WebObjects like  
a giant merge engine. For instance, you could generate PDF files  
using WebObjects; they're just text, and you could substitute text  
into the middle of the PDF boilerplate pretty easily.



 Background:

We haven't used a lot of JavaScript at www.marketocracy.com, for  
a very simple reason: We don't have the testing staff to fire up 10  
different browser variations to test the site. And lets face it,  
programming in JavaScript sucks.


Since someone invented that cool acronym though, that's  
changing. You would think it shouldn't matter that something has a  
name, but it does. I remember when the GoF Design Patterns book came  
out. There was nothing in there I hadn't figured out on my own, but  
now they had a name! I could say "Singleton" to my co-workers and  
they would know what I was talking about. I could buy a junior  
engineer the book, and he would soon be programming at a much higher  
level.


   So having a name helped, and the result is that there are a lot  
of cool toolkits out there. Since someone else wrote the JavaScript,  
that means I don't need to test 10 different browser variations.


  Which means I can make the site much easier to use and more  
interactive. Huzzah!


 Research:

  So the first thing I did was that I'd heard that Rails was cool  
and made Ajax easy. I'd heard that before, but that was when the  
version number was 0.13... So I went out and bought the Rails books  
and you know what I found?


  It's not that Rails rocks with Ajax, its that the Prototype  
Javascript library rocks. The documentation makes a big deal about  
doing Ajax with one line of code.


 
 <%= link_to_remote  [div to update] [link options] -> %>


The reality is that all Rails is doing is writing one line of  
JavaScript. From the Ajaxy "rating" code I've been adding to my app,  
look at the following:




1




Ok, so lets break it down. The way Ajax.Updater works from the  
Prototype library is you give it the id of a DOM object and a URL,  
and it

Re: Most EOF-like FOSS?

2006-05-18 Thread Pierce T. Wetter III


On May 17, 2006, at 6:41 AM, Arturo Perez wrote:


Hi all,

As many know I'm a great partisan of WebObjects.  Unfortunately my  
current position makes using it out of the question.  I'm wondering  
what FOSS software is most like EOF out there?
I have an application using a really horrid ORMS called Torque  
(named after the feeling it gives you when you try to use it) on  
top of MySQL.  I am planning to rip it out and replace it with  
possibly Cayenne and definitely PostgreSQL.


 FrontBase changed their licensing scheme recently, you might want  
to check them out.


What are other possible ORMS that are feature-competitive with  
EOF?  Hibernate is WAY beyond my needs.  My current relational  
model has 4 major tables (biggest table has about 10K rows) with  
various join tables and is 99% read-only.  It's a tiny thing.


 Going back and reading the question after all the follow ups out of  
curiosity, I thought I'd ask a followup question.


  1. If your database is so tiny/simple, why its Torque inadequate?  
(I admit, it reminds me of ActiveRecord from Rails, without the  
excuse of being a 1.0 release).


  Otherwise, Cayenne is the closest thing to EOF.

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Sample code wanted...

2006-05-12 Thread Pierce T. Wetter III


On May 12, 2006, at 1:39 PM, Randy Wigginton wrote:

I have an app that involves some LONG operations - literally an  
hour or
more.  In this case, I would like to display a page saying "Results  
will be
e-mailed to you", then a new thread should perform the processing,  
then
email a WOComponent page.  Is there anything similar I can use as a  
model?
Hard to believe this is the first time such a thing is needed  
(nothing I

could find on WOCode.com)


 You basically have the idea, I think the thing you're missing is this:

  component= pageWithName("BigAssPage")
  response=component.generateResponse()

 As others have pointed out though, you'll probably want to setup a  
separate database context, etc. or you'll end up locking everyone out  
of the database for an hour.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: two databases from one application

2006-05-11 Thread Pierce T. Wetter III


On May 11, 2006, at 2:32 AM, David Avendasora wrote:


Pierce,

Can you elaborate on some of the easier ways to do this? I am  
facing this requirement for a project I am working on now. The  
intent is to add the functionality after the core system is up and  
running but I'd feel much more comfortable with at least having a  
strategy now.


I need to maintain a history of a subset of the date in my database  
for use in forecasting and recall.


 I'm not sure what a history of the "subset of the date" means.  
Here's a generic answer.


 This gets discussed a lot, so there's plenty of examples around.  
For instance, here's an implementation by someone else I found via  
Google:


http://homepage.mac.com/i_love_my/code.html

 However, unless you're insane enough to need to log every change to  
every object, the concept of an "audit trail" ends up being  
application specific in many cases. If you can simplify the  
requirements at all, do so. For instance, at www.marketocracy.com, we  
never "delete" a fund, we just mark it deleted. Similarly in forums,  
we don't "delete" forum posts we don't want to show, we "hide" them.


  Funds we can't delete because they are cross linked to too many  
objects, but forum posts I purposely setup to not be deleted because  
I knew the day would come when someone went "oops" (and they did). So  
those tables have a flag, and the relationship is defined such that  
it ignores the "deleted" objects.


  For "forecasting and recall" on www.marketocracy.com we record  
every trade already, so it was fairly easy in the business logic to  
add methods so that you could "time travel" to any point in time.  
That is, a trade adds shares to your account while subtracting from  
your cash (or the reverse). So shares on any position at any point in  
time is sum(trade.shares where date < desired  time). So we've been  
able to avoid the need for an audit trail, because we already have an  
"accounting model" in that every operation is recorded as a  
transaction. In fact if I had to do Marketocracy over again, I might  
implement it as a double-entry bookkeeping system instead.


 If I was going to log every change to every object, some typical  
hints are that if you subclass EOEditingContext, then prior to any  
saveChanges() operation you can get a list of the inserted/deleted/ 
changed objects (you have to call processRecentChanges() first). If I  
was designing this, I'd make all my EOF objects have a common  
superclass/interface that implemented something like:


  auditTrailChanged()
  auditTrailInsert()
  auditTrailDelete()

 Then on a class-by-class basis I could decide what to do. That  
could include inserting additional objects, etc. Like an object could  
compare itself to its snapshot if it had changed and it could record  
the old and new values to a generic object that stored AuditTrail 
(class name, primary key of object, username, timestamp, attribute,  
old value (string), new value(string)).


 In psuedo code:

  override saveChanges()
 self.processRecentChanges()
 foreach obj (self.changedObjects)
   obj.auditTrailChanged()
 foreach obj (self.insertedObjects)
   obj.auditTrailChanged()
 foreach obj (self.deletedObjects)
   obj.auditTrailChanged()
 super.saveChanges()

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: two databases from one application

2006-05-10 Thread Pierce T. Wetter III

On May 10, 2006, at 1:42 PM, Arturo Perez wrote:



Pierce T. Wetter III wrote:



On May 10, 2006, at 10:34 AM, Anjo Krank wrote:



WO application I am working on was pretty simple up to
this point: one apache webserver and one database
server serving data to it. The things turned more
complicated now: In addition to the first database, we
now want to add access to another database. Both of
these databases have identical schema, and the tables
in question are identical. Think of the second
database as a backup.



The discussion been interesting and all but why not just set up  
some sort of replication scheme at the database level?  I think all  
the RDBMs popular on this list can do that




 The original author, Milan, isn't replicating the object, he's  
migrating it in that he's copying the record from database1 to  
database2, then deleting the copy in database1.


 I suspect some kind of audit trail, like he doesn't really want to  
"delete" the object, as much as mark it deleted by moving it into the  
other database. So if I'm following the code correctly, the second  
database ends up being a record of all the objects that have been  
deleted.


 Which, as I said, there's much easier ways to do...so I was hoping  
Milan would talk about the real problem...


 Pierce


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: two databases from one application

2006-05-10 Thread Pierce T. Wetter III


On May 10, 2006, at 10:34 AM, Anjo Krank wrote:


WO application I am working on was pretty simple up to
this point: one apache webserver and one database
server serving data to it. The things turned more
complicated now: In addition to the first database, we
now want to add access to another database. Both of
these databases have identical schema, and the tables
in question are identical. Think of the second
database as a backup.


You simply can't do that in an easy way.


 Yeah the problem is that EOF associates specific classes with  
specific tables in specific databases.


 However, I think you can work around that if you make a duplicate  
EOModel called "Backup", and then have every entity in that model  
_subclass_ from the primary model. (Remember to mark the  
relationships in the subclasses to point at the new subclass as well.


So that would work around the EOF association of specific classes  
with specific databases. EOF would know that the subclass lived in  
your new database. Copying over the primary keys and such to the new  
database will be tedious if its important to have the same values,  
and the relationship recursion can get complicated if you have any  
trees in your relationship.


 But you'll have to manually create/store the new subclasses,  
there's no way to change the class of an EOF object on the fly.


So in psuedo code:

 1. Fetch the entities you want to copy into the ec.
 2. for each object:

copy over the attributes of the old object into an instance
of the new class. (you can loop over self.entity.attributes)

recurse through the relationships and do the same thing...

 3. ec.saveChanges()


 Though I'm wondering what problem you're trying to solve where you  
want to delete records from the first database while making copies in  
the second database? I'm guessing an audit trail? There are easier  
ways to do that...



Also, your code won't work because "localInstanceOfObject" doesn't  
really make a copy, it makes a fault for the original object. When  
you then touch that object, it causes EOF to clone the original  
object into the new editing context based on the snapshot stored when  
the object was fetched, but without any of the changes from the first  
editing context.


Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: seamleass integration with other application

2006-05-09 Thread Pierce T. Wetter III


On May 9, 2006, at 2:47 PM, PS ps wrote:


Hi!

What are the different approaches for integrating a
web object application with other web based/desktop
based applications(eg iTunes)?


Typical methods:

 1. Java client.

 2. XML-RPC communication between applications.

 3. Its just barely concievable that you could use Core Data on the  
client side, but have it read write XML back to the server side.


 Those are some starting points.

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: FrontBase license now free!

2006-05-04 Thread Pierce T. Wetter III


- Doesn't use index with or-clauses.



  I seem to remember this getting fixed quite awhile ago (3.x ish?).  
Are you still running into it? I know it was definitely fixed for the  
common EOF case you're probably thinking about.





- Has problems with some types of joins (extremely slow).



  Sure, that's true of all databases, even Oracle/DB2/etc.




We had also issues with crashes sometimes without being able to  
reproduce it.




 Oracle crashes too...FB recovers faster in my experience.

 FYI, if you turn on SQL logging, FrontBase has a tool that will  
replay your SQL operations in order, and they can use that to fix the  
bug pretty quickly. We've gotten them to fix some obscure bugs (1  
every 10,000,000 database operations) that way. Uptime on our  
database is now measured in months...





This should not say, that I don't like Frontbase - I use it in  
several projects and know the advantages. But I know the  
disadvantages as well.




  There you go, I agree.


  Personally, the biggest advantage for me is very subtle: Because  
there's a one to one mapping between FB types and Foundation types,  
there's no "impedance mismatch" between the database and your code.  
So if you write a value to the database, and read it back, you get  
the same answer. That's not always the case with some datatypes and  
other databases. This is especially a big deal with optimistic  
locking and EOF.


 Pierce


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: FrontBase license now free!

2006-05-03 Thread Pierce T. Wetter III


On May 3, 2006, at 3:50 PM, Miguel Arroz wrote:


Hi!

  Yes, but I did ask about PostgreSQL! :) I know that almost  
everything out there is better than MySQL. What I was asking for  
was a comparison between PgSQL and FrontBase, to know if the  
FrontBase advantages are good enough to make me thing about using  
FrontBase instead of PgSQL.


 The problem with that is I don't know anything about PgSQL. 6 years  
ago when I was picking databases, it was kind of feeble, and not  
supported very well on OSX.


 Don't know where its at now.

 I do know that FB works extremely well with WO, which is why I  
posted that info here.


 :-)

Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: FrontBase license now free!

2006-05-03 Thread Pierce T. Wetter III


On May 3, 2006, at 1:49 PM, Miguel Arroz wrote:


Hi!

  Good point. How does FrontBase compare do PostgreSQL in stuff  
like speed, reliability, data coherence, etc? Easy of use is not  
the most important feature in a DB for me.


  Yours

Miguel Arroz

On 2006/05/03, at 21:06, Arturo Perez wrote:


 1. Its a real database. IMHO it rivals Oracle, not MySQL/Postgres.


What does this mean?  I don't have much experience with imaginary  
databases...


 Well, for a long time, MySQL didn't have transaction support. Now  
it does, but only if you use the InnoDB storage.


 FrontBase has always had transactions.

 FrontBase fully supports the SQL92 standard, plus the '99 additions.

 here's the feature chart from their site:

*  Tera-byte size databases
* Giga-byte size CHARACTER column values (UTF8 encoded)
* Giga-byte size BLOBs and CLOBs
* Datastore encryption (block mode, on the fly)
* Client/server communication encryption (streaming, on the fly)
* In-memory caching of tables
* Row-level privileges
* Sophisticated locking model
* Backup of live databases
* Multi-column optimized B-tree indexing with very low overhead
* Replication/mirroring
* Super-fast start-up times
* Stored procedures and functions
* Server side cursors
* Query plan information
* Multiple non-rectangular result sets
* Clusters
* Streaming QuickTime content
* MySQL migration tool
* FileMaker migration tool


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: FrontBase license now free!

2006-05-03 Thread Pierce T. Wetter III


On May 3, 2006, at 10:08 AM, David Avendasora wrote:

Okay, I'll bite. Why would I want to use it over other options? Are  
there features (besides cost) about it that would make me use it  
over other databases?



 1. Its a real database. IMHO it rivals Oracle, not MySQL/Postgres.

 2. It supports every Foundation type directly.

 3. If you pay for support, its outstanding.

 4. 3 choices for db admin tools: a web server, a cocoa app, and a  
java app


 5. The database connection library is really simple for you bare  
metal guys. I have
a PyObjC wrapper for it in Python that lets me poke around in  
the database using

Python.

 6. My compatriot at Marketocracy just got it working with Ruby on  
Rails, and of course, its supported WO from the get-go.


 Anecdote: We did a shootout at Marketocracy, and Frontbase was  
faster then Oracle, and worked better with WebObjects then anything  
else. Frontbase easily saved us $300,000 over Oracle, if not more  
because:


a. We could administrate it ourselves.
b. Our developers could run their own databases as needed.
c. Once the database is shutdown, databases just look like files  
so you can move

   them around using obscure tools like "cp" and "mv".

 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: FrontBase license now free!

2006-05-03 Thread Pierce T. Wetter III


On May 3, 2006, at 11:13 AM, Ray Kiddy wrote:



On May 3, 2006, at 9:22 AM, David Holt wrote:


Hi Pierce,

It is NOT generally known! Thanks for the heads up. Why isn't this  
being shouted from the mountaintops?? There's actually not too  
much information about it on their website either. I sent in the  
request for the free license and got it a few minutes later. I  
can't wait to start using it instead of mysql! Are there any  
issues with using FrontBase that we should know starting out??


David



I think the reason more people do not know about this is the text  
on their web site. From the downloads page:


 I think its because its only been a while. Good catch though, I'll  
send the note to Geert.


 Note that Frontbase always had this development license that was free.

 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


FrontBase license now free!

2006-05-01 Thread Pierce T. Wetter III


 I don't know if this is generally known, but FrontBase licenses are  
now free, FrontBase having switched to a paid-support model instead.  
So if any of you are using MySQL or Postgres, you might want to  
consider FrontBase instead.


 Pierce
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: WO Ajax

2006-04-27 Thread Pierce T. Wetter III


On Apr 27, 2006, at 11:27 AM, Mike Schrag wrote:


(sorry about hijacking the previous thread)

Make that "the ethereal WO-vs-Ruby comparison in the sky" ...


 I posted one to the OTHER wo-dev list back a bit, let me dig it up...

 http://www.omnigroup.com/mailman/archive/webobjects-dev/2006-April/ 
002194.html

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Switch Component question...

2006-04-27 Thread Pierce T. Wetter III


On Apr 27, 2006, at 10:23 AM, Mike Schrag wrote:

You should really take a look at the new Ajax stuff, it's pretty  
cool and offers a lot of possibilities. Oh, here's a cool Ajax- 
based app I've stumbled across:
Sort of a wonder-dev topic, but judging by emails I've gotten,  
there's a fair amount of interest about Ajax in webobjects-dev  
too ... I'm curious what other Ajax components people would like to  
see WO-wrapped?  We have the core interactive Scriptaculous  
features wrapped.  Currently none of the effects are wrapped, but  
then I'm not sure having WO wrappers lends too much over just  
javascript calls (open for opinions here).  If you've run into a  
situation where WO didn't bring it for your UI and the current  
components don't provide support, drop me a line.  I'd love to  
remove a Ruby checkmark in the WO-vs-Ruby comparison.


 My $0.02:

 The thing I love about Ajax is that other people have written the  
Javascript. I absolutely hate writing/debugging/testing on 10  
different browsers/etc. Javascript.


 I think that WO could actually surpass Rails in making Ajax easy to  
use, because WO has an understanding of "pages as state machines" and  
of a particular point in a particular page being a particular state  
that Rails is missing.


 I think WO could also excel in rendering pieces of pages like some  
of the more advanced ajaxy stuff does: www.wetpaint.com


 That is, if you look at zimbra, like Anjo pointed out, or  
wetpaint.com, there's definitely this element of turning the browser  
window into a Cocoa app that I find really attractive about Ajax. I  
think WO could actually beat Rails at that game, but it would take  
some architecture work on the WO side.


 Pierce

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


WebObjects on Rails

2006-04-26 Thread Pierce T. Wetter III
(If you received this twice, that's because I just found out there  
are TWO WO mailing lists, one at Apple and one at OmniGroup and sent  
it to both)


The Ruby On Rails book has inspired me to share some of the tricks  
I've learned over the years to make WebObjects more streamlined.


Let's start with the following:

public class EZDirectAction extends DirectAction {

public EZDirectAction(WORequest aRequest) {
super(aRequest);
}

public WOActionResults performActionNamed(String name) {
EZPage nextPage=(EZPage) pageWithName(name);
nextPage.takeFormValues(request().formValues());

return nextPage;
}
}

public class EZPage extends EZComponent {

// better solution is actually to have EZComponent implement the
// EOKeyValueCodingAdditions protocol, then this is one line
// self.takeValuesFromDictionary(values)

public void takeFormValues(NSDictionary values) {

java.util.Enumeration enum=values.getValueList().objectEnumerator();
while (enum.hasMoreElements()) {
String key=(String) enum.nextElement();

Object obj= values.valueForKey(key);
if (obj != null) {
self.takeValueForKey(obj,key);
}
}
}

Ok, now this code is making only one assumption, and its a good one:

 a. All your _page_ components are subclasses of EZPage.

What this code does is enable direct actions for every single page in  
your WO application, _without any additional coding_. All you have to  
do is add it to the project and your application will automatically  
understand URLs of the form:


/wa/MyPage?valueS=1&value2S=2

This is doing a bit of voodoo if you're not familiar with the ins and  
outs of
the lower levels of the the WO frameworks, but basically the code  
does two things.


First, rather then use the default behavior of "performActionNamed",  
which appends "Action", and then looks for a method of that name, we  
simply map pages to action on a 1-1 basis (which is what you do 99.9%  
of the time anyways).


Now WO doesn't really make a distinction between pages and  
components, but we'll do it here for simple security reasons because  
we don't necessarily want users to be able to pull up arbitrary bits  
of the application (even though /wo/Component.wo works in most WO  
apps anyways). Plus I've always found that pages function as a  
controller in the MVC paradigm anyways so you end up needing things  
at the page level you don't need at the component level. So its  
incredibly useful to have cross-application base classes for both  
your components and your pages.


Then, although its calling "form values", what that's really doing is  
pulling all of the key-labeled strings out of the URL and shoving  
them into the page using key-value-coding. WOComponent doesn't  
implement EOKeyValueAdditions, so you can't just shove in the whole  
dictionary in one line, you have to walk through the dictionary and  
shove them in one by one instead.


So if "MyPage" above takes two parameters, rather then have to  
explicitly do any initialization in the direct action, what I instead  
do is write a method like the following:


public class MyPage extends EZPage {

   public void setValueS(String s)
   {
self.setValue(s.toInteger())
   }
}

That is, what happens is that all values in URLs are string, rather  
then integers, or whatever. So if you have string parameters, you're  
done, but if you have non-string parameters, you have to convert them  
as part of the key-value-coding process.


If your page is tied to an EO object its not much more complicated:


   public void setKeyS(String s)
   {
self.setValue(EOUtilities.objectWithPrimaryKeyValue(
self.session().defaultEditingContext(),
"MyObject",s.toInteger())
   }

In fact, if you like, you can sometimes put that code in your page  
baseclass

so that its only in one place. Or perhaps all the pages that can inspect
a particular type of object will have a superclass with that method.

Ok, not much code, and the payoff is that now you can write links as  
follows:


link: WOHyperlink
{
   directActionName: "MyPage";
   ?value1S=value1;  // URL generation converts value[12] to a string
   ?value2S=value2;
   ?keyS=object.key; // grab the primary key
   ?wosid=NO; //assuming you're using cookies
}

Which means you no longer have to craft an action for 99% of the  
links on your site, because most of the time you're just going to  
just going to link to a specific object. And your links will be  
bookmarkable, etc.


So no more links like this:

https://jobs.apple.com/cgi-bin/WebObjects/Employment.woa/1/wo/ 
fpzfbEkBBR22HLXV28KMDg/5.34.33.29.3.3.1.1.1


 Ok? :-)

Pierce


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-