Re: newbie WO/EOF questions
Re: newbie WO/EOF questions
- Subject: Re: newbie WO/EOF questions
- From: Mark Morris <email@hidden>
- Date: Sun, 2 Oct 2005 15:08:30 -0500
Hello Boris,
Some quick thoughts. I agree with Ken. I've been doing hard SQL for
over 15 years, and it took a month or two for me to really get my
head around the EOF way of doing things. (On very rare occasions,
I'll come across something that would be easier in straight SQL, but
the other 99.99% of the time I really appreciate what EOF is doing
for me.)
With an existing db, your life will be easier if it's using single-
column primary keys (except for correlation tables, of course).
Bonus points if they're arbitrary pk's. ;-)
Also, the method that existing applications use to generate new
primary key values needs to be looked at. WebObjects can do it a few
ways, but they need to be compatible.
I also agree with Ken that you should make a conscious effort not to
think about the SQL or optimization. If you have early performance
issues, it's most likely the kind of problem that can be solved by
adding an appropriate index. (You can log the SQL that EOF
generates, if necessary.) Another difference in mindset is that you
don't often directly execute fetches (queries). You use them to get
started, then hopefully your relationships will take care of most of
the rest for you.
Good luck!
Regards,
Mark
On Oct 2, 2005, at 1:58 PM, Boris Herman wrote:
Hello list,
I've been programming database applications for quite a while now.
First with flat files and manual indexes in the 80's, then with
local databases with concurrent lockings over to RDBMS and SQL.
I've been using several RAD tools in several programming languages
so the choices are plenty.
A client of ours wants to port (i.e. write anew) their business
system which now runs as a win/mac client connected to a SQL
server. They want to have it as an intranet application that runs
in a browser window. Since I've been writing my own SQL statements
for well over a decade the choice would be something like PHP but
I've been looking at WebObjects as it is more advanced, needs less
maintanence and vital components (such as SQL server) to a system
can be changed without major changes in program. I really like the
"upside-down" mechanism (frameworks) and the fact that most things
that have to be done manually in PHP are done completely automatic.
I know that WO is application server and PHP is just a scripting
language but I'm talking solutions here, not technologies. Also a
big plus is that the client already has 10.4 server up and running
(which includes deployment license for WO) and I'm doing most of
the work on my Macs anyway.
The trouble I'm facing (and I'm probably not the only one) is that
the EOF needs a totally different way of thinking which is
incompatible to my previous experience. I'm worried that during the
development I will subconciously revert to old style programming
and not the "WebObjects way". The moto I've read "if you are
writing code, you are doing something wrong" haunts me and reminds
me over and over that I really need to learn something new really
well.
I've purchased and digested several books on the topic, including
two that I've seen most recommended: Webobjects for Mac OS X by
Joshua Marker (which doesn't go deep enough for my taste) and
Practical WebObjects (which will most certainly become a priceless
resource AFTER I've become a full grown WebObjects developer). I've
also gone thru most of the tutorials and walktroughs available on
the net.
But I still don't know my ways around EOF, in particular to
relationships, be it to-one or to-many. I've grown so accustomed to
writing SQL queries (thinking SQL) and making relationships (or
iterating thru) with SELECTs I'm having a hard time grasping the
new concept. Until now I SELECTed any relationships either inner or
outer joins and used the foreign columns as they were columns in
the source table (hence the join). Now in WebObjects, I have whole
records (in to-one) and NSArrays of whole records (in to-many) as
the result of a relationship. Things get even more hairy when I
have relationships several levels deep and mixed to-one and to-many.
Where would a database app developer like me get proper guidance to
start seriously on WebObjects on a semi-large project? The client
database has about 20 tables, the main ones have over 2 mio
records, each full of metadata of different types and 5 foreign
keys. There is also a text field, which is occasionally searched
via fulltext index and relevance scoring.
Thanks for any input and suggestions,
Boris Herman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40onpointsoftware.com
This email sent to email@hidden
_______________________________________________
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