Re: Drupal profile table, how to handle this in webobjects?
Re: Drupal profile table, how to handle this in webobjects?
- Subject: Re: Drupal profile table, how to handle this in webobjects?
- From: Anjo Krank <email@hidden>
- Date: Thu, 12 Feb 2009 12:07:13 +0100
As you might notice, for a profile of a person with, let's say, 20
attributes, one would end up with a smorgasbord of 20 records in
default_profile_values.
I have two questions:
-would it be possible to replicate such a thing in WebObjects?
Sure, why not?
I can imagine creating the default_profile_fields table, that should
not be too hard. Creating the form using the data from the
default_profile_fields, and the values from default_profile_values
fills me with ?wonder?.
If "type" is a fixed set with some meaning like the value types in
EOAttribute, (number, small string, large string, boolean etc), then
you'd have a loop with either a rather complex bunch of conditionals
or a set of switch components that are named in a reasonable manner
(DRUPAL<Type>Edit, for example). This would make it easier for your
people to fill them out.
If not, the easiest you have a repetition of a label and a text fields.
Then when you enter the page, create values for each missing field
filled with the respective default value, and on save throw away any
value that still is the default. Which would be more user-friendly
then having a popup of fields with an "Add this field". That way you
can also nicely group them - I assume that is what "weight", "page",
"category" are about.
Alternately, you could put them in a dictionary and create the objects
later.
-will it blend, sorry, will it scale? I have doubts about this
schema when you start having large amounts of users. The enormous
amount of records that have to be fetched for for the profile of a
user make me question if this will be scalable.
Yes, well... what is large? You'd only fetch these things for active
users in one fetch per user per login. If you are yahoo, then I'd
probably wouldn't do it. If you have - say - 1000 concurrent users,
then what the hell.
Any ideas about this?
About what? Using a given schema and worrying if it handle huge loads?
If not, what would you do? Hack Drupal? The only other way around this
problem (create custom "attributes" at runtime) is to change the
tables on the fly, which is probably not a good idea. In particular
with EOF.
Examples of other WebObjects projects that do something similar?
ERIndexing with the Lucene-based attribute handling probably. But this
doesn't really have UI and isn't tested in any way either.
Cheers, Anjo
_______________________________________________
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