Hi Ian,

>How are you populating the data in your model, is it via SQL scripts or the
code. I couldn't see insert, update, delete for people etc.

The SQL script included in the bundle
(bundle/sql_script/opensocial_mysql.sql) populates the database with some
initial data.

>An observation, did you intend to use string construction for  the SQL or
parameter binding, or are the parameters safe to use raw
If I understand you correctly, you're asking about how I construct the SQL
and if I'm being safe to avoid SQL injection. I actually cleanse the SQL
code manually, but it's definitely not bullet proof.  (yet) :-)

>The only problem with the work I did is that it depends on the model
entities being represented as interfaces and not concrete beans.

Yeah, I recall the discussion. I mainly did this as a tutorial for fun. I
also did a DB-first approach, as opposed to generating purely from Java. (In
my former life, I tended to use the DB approach quite a bit. :-)
The SQL script alone might help some none Java folks.

> Were you thinking of doing more work in this area ? Do you want to
collaborate ?

Sure, would be happy to.

-Chris

On Wed, May 14, 2008 at 7:43 AM, Ian Boston <[EMAIL PROTECTED]> wrote:

> Chris,
>
> An question and an observation.
>
> How are you populating the data in your model, is it via SQL scripts or the
> code. I couldn't see insert, update, delete for people etc.
>
> An observation, did you intend to use string construction for  the SQL or
> parameter binding, or are the parameters safe to use raw..... thats just a
> observation, because I do think this is a positive development.
> I had started but not completed, a Apache Cayenne based DB implementation
> of the Social data model.
> Its at https://source.sakaiproject.org/contrib//tfd/trunk/social-db/ and
> should work against everything that Cayenne supports. The only problem with
> the work I did is that it depends on the model entities being represented as
> interfaces and not concrete beans.
>
> Were you thinking of doing more work in this area ?
> Do you want to collaborate ?
>
> Ian
>
>
>
>
> On 14 May 2008, at 14:20, Christian Schalk wrote:
>
>  Hi Shindig-dev,
>>
>> As some of you know, I've been working on a MySQL backend data layer for
>> Shindig. For these tutorials, I created a backend database in MySQL for
>> Shindig, then I created my own custom services for activities, people,
>> data
>> along with a custom data handler.
>>
>> For database code, I toyed with using something like Hibernate, but for
>> now
>> I chose just straight JDBC. Anyone can take what I implemented and swap it
>> out for Hibernate or other OR code.
>>
>> Here's the HTML version of the tutorial:
>>
>> http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/
>> shindig_data_tutorials.html
>>
>> Also, if you want to jump past the HTML tutorial, you can just download
>> the
>> zip file which contains pretty verbose READMEs.
>> http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/
>> shindig_sql.tar.gz
>>
>> And finally, since Shindig these days is a moving target, I saved off a
>> complete Shindig code bundle from May 9th and saved it here:
>> http://chrisschalk.com/shindig_docs/shindig_sql_tutorial/
>> shindig-5-9-save.tar.gz
>>
>> You can apply this tutorial to this version of Shindig and be assured that
>> the tutorials will work.
>>
>> Feel free to have a look and let me know what you think.
>>
>> -Chris
>>
>> p.s. I'll probably tweak the database code a bit to better support
>> OpenSocial, but for now, you can list friends, create activities, store
>> persistent data. Also, be sure to checkout the "simplecontainer.html"
>> file,
>> as it contains some simple gadgets to test with. Have fun!
>>
>>
>>
>> --
>> Chris Schalk, Google Developer Advocate
>>
>
>


-- 
Chris Schalk, Google Developer Advocate

Reply via email to