Re: newbie WO/EOF questions
Re: newbie WO/EOF questions
- Subject: Re: newbie WO/EOF questions
- From: Arturo PĂ©rez <email@hidden>
- Date: Sun, 2 Oct 2005 18:38:10 -0400
Well, you've taken the proper first step. Subscribing to this list.
You should look and see if any of the online community-developed stuff
helps you over this hurdle/speedbump.
My advice:
One of the things that raw SQL ppl do alot of is reconstructing things
from out of a heavily normalized (or even somewhat normalized)
database. Making views, making stored procedures, etc all to make the
data more usable by less capable SQL types. The EOF way of doing that
is to create an Entity. Many people think of Entities as single-table
things (that is, there's a one to one correlation between Entities and
tables). But that's completely wrong. Generally, an Entity uses as
many RDBMS tables as necessary to convey a concept. Many times it
takes only one but that's not a given.
The thing that SQL types get burned by is not letting EOF handle must
of the drudgery for you: PK generation, SELECT statement generation,
UPDATE statement generation, etc. Concentration on what you need to do
("I need to add a line item for 10 widgets to this invoice") rather
than on what the database requires ("I need to insert a record to the
line item table with foreign key 85 with a quantity field set to 10 and
item FK set to 96").
Finally, don't think of WOComponents and EOEntities as the same thing.
Think Model-View-Controller. Model=EOF, View=WOComponent,
Controller=RR loop.
-arturo
On Oct 2, 2005, at 2: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:
email@hidden
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