Re: New (sorta) to WebObjects and looking for some insight.
Re: New (sorta) to WebObjects and looking for some insight.
- Subject: Re: New (sorta) to WebObjects and looking for some insight.
- From: Chuck Hill <email@hidden>
- Date: Mon, 20 Mar 2006 12:50:23 -0800
Hi,
On Mar 20, 2006, at 12:19 PM, Andrew Satori wrote:
Thanks for the quick reply
On Mar 20, 2006, at 2:53 PM, Chuck Hill wrote:
The question of PostgreSQL versus MSSQL is not really a question
in my opinion. Use PostgreSQL. In fact, I would prefer
PostgreSQL over OpenBase due to its SQL92 standard-ness.
FrontBase is my platform of choice, but it is not free for
deployment. When free / open is required, PostgreSQL is a fine
solution.
I've looked at FrontBase before, but pricing has always been an
issue. I've got a large amount of money and knowledge invested in
MSSQL, where I have 30+ customers nationwide deployed on MSSQL, in
addition to my own business where I have several MSSQL and
PostgreSQL servers deployed. For me to move to FrontBase at this
point would cost me and my customers several hundreds of thousands
of dollars since we would all fall into the Small Business or
larger licenses :-(.
I'll blame it on Monday. I misread that the first time, thoughi it
said MySQL not MSSQL. I've not used MSSQL, but it should be fine.
Chuck
I've worked with ASP, JSP and ASP.NET pretty heavily over the
years, and as I sit down with WO today, what I see is an
environment that implemented 'CodeBehind' logic years before
ASP.NET, and deploys cleaner than a typical JSP war. Building
upon just that makes WO a nice tool, I've already rebuilt my
basic website with a blog style news & announcements system that
works, though it's using Java classes that I hand coded for a JSP
implementation of another site a year or so ago, and not use EOF.
Here's where I've hit a wall.
I've got this WebApp, with a subpage, but I can't seem to
generate a link to that subpage without first linking to it from
the main page and generating a session, and I think I'm missing
something that's probably incredibly obvious. For example, I
want to be able to pass a link to the rss feed from the main
page, something like http://somesite/cgi-bin/WebObjects/
myWebApp.woa?rss.wo or similar. This needs to be done in such a
way that the it doesn't require that main link. I could
obviously do this as a seperate WebApp, but that seems like
wasted overhead in this instance.
Hell yes that is wasted overhead. What you want are called Direct
Actions. In a nutshell, a direct action associates a particular
URL with one method in a class. They allow for multiple "entry
points" into your application. In your particular example, the
URL would/could look like this:
http://somesite/cgi-bin/WebObjects/myWebApp.woa/wa/rssFeed
Note:
/wa/ indicates a Direct Action
/wo/ indicates a standard component action
rssFeed is the name of the direct action
Then in DirectAction.java add:
// Note the method name is the name of the direct action plus
"Action"
public WOActionResults rssFeedAction() {
return pageWithName("RSSFeedPage");
}
Excellent, that kills two birds with one stone, it addresses the
how to link to sub pages from HTML as well as the action, most
excellent, works like a charm too.
The second item deals directly with EOF. While I see the
advantages from an intellectual standpoint, I've not had much
luck in working with EOF and any DB engine other than OpenBase,
usually getting syntax errors on the generated SQL. I've also
tried the Project Wonder stuff, but since CVS has been impossible
to get to, I can't build the EOPlugins to generate proper SQL.
You need those plugins. They are not optional. E-mail me off
list and I can send you a built version of the Postgres one and
instructions.
If I can just get the source, I'm pretty confident I can make it
work, and if I do, I'll probably build it unibin and get it into
the PostgreSQL binary installer that's on SourceForge to make both
WO and PG more approachable to others. I know I'm not the only one
that's hit this problem.
Which brings me to the other issue, reverse usage, using EOF with
pre-existing schemas where the Primary Keys are identity (MSSQL)
or serial (PostgreSQL) columns. While *read* seems to work with
these models, update and insert do not. Again, I suspect User
Error, probably along the lines of over complicating things based
upon my background. I'm really just looking for some pointers or
a gently nudge in the right direction.
You can't (easily, with software almost anything is possible given
enough effort) use identity and serial columns with WebObjects.
WO needs to know the PK at the time of save so that it can find
the object again)
I was afraid of that, though both implementation have methods of
getting the newly inserted key back, it means that I'll have to
stick to the hand-coded classes for the preexisting schema's.
Knowing that makes it alot easier to cope with though, It's easy to
get frustrated trying to make something work that won't :-).
Andy
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden