You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by David Primmer <da...@gmail.com> on 2008/04/24 00:05:13 UTC

directory for api server files

I'm wondering what the rationale is for the source directory naming
is. There seems to be a lot of legacy stuff hanging around that is
making me think twice.

in social/
http://svn.apache.org/repos/asf/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/

There seems to be few random bits of java code along with social/model
and samplecontainer sub directories.

I don't really want the social/ dir to be too filled with java files,
so I was thinking about making a subdir like /serverimpl or /abdera
(not sure about naming here either). Then, under there, I'll have a
few more dirs/packages with some sub components.

So, does this sound good or should I assume that the files in social/
are temporary (Cassie Wire Protocol) and will go away soon and just
put everything in social? Why are there subfolders called
'opensocial'?  'social/opensocial' seems redundant. Why
samplecontainer?

thanks.

Re: directory for api server files

Posted by Cassie <do...@apache.org>.
Ha - this isn't legacy stuff. This is the -current stuff- as nothing in
restful land has been proposed or committed yet :)
If the restful stuff gets written and works for javascript then yes, all of
the current code can go away. Please, in your patches, put the restful code
in the top level social dir as it should be sharing code with the json wire
format code.

Definitely all of the opensocial/model code should be shared, and the
opensocial/*Service interfaces should be shared.

The directory names can be explained with the following:
- I wanted whatever wire format we used to be easily extendable for
non-opensocial specific data. ie photos, movies etc.
- So, the top level dir contains all the common code needed for making
dataHandlers, taking java pojo to json etc
- The opensocial dir is everything that is specific to opensocial, ie the
java code that matches 1 to 1 to the js apis
- The samplecontainer dir is everything that is necessary for the
samplecontainer to run. This includes implementations for the opensocial
apis -as well as- a non-opensocial handler for all of the state file
commands. This is a direct example of a type of dataHandler that is needed
outside of opensocial's specific mandate.
- If I were to make a new container, perhaps a db based one, "dbcontainer",
I would personally make a directory parallel to the samplecontainer dir. In
this directory would go db backed implementations of the services + any
custom handlers the db container needed.

We can of course change the directory structure to be anything we want.
However:
- the restful wire format needs to be able to handle the state file data
requests without being a huge pain. it shouldn't be hardcoded to opensocial.
- until the restful stuff has feature parity with the json wire format, the
json format needs to stay around.
- we should just get stuff checked in and working and then we can make stuff
prettier later. so lets not worry too much about getting it perfect the
first time. as the code progresses i'm sure a natural directory structure
will fall into place


Thanks.
- Cassie


On Thu, Apr 24, 2008 at 12:05 AM, David Primmer <da...@gmail.com>
wrote:

> I'm wondering what the rationale is for the source directory naming
> is. There seems to be a lot of legacy stuff hanging around that is
> making me think twice.
>
> in social/
>
> http://svn.apache.org/repos/asf/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/
>
> There seems to be few random bits of java code along with social/model
> and samplecontainer sub directories.


>
> I don't really want the social/ dir to be too filled with java files,
> so I was thinking about making a subdir like /serverimpl or /abdera
> (not sure about naming here either). Then, under there, I'll have a
> few more dirs/packages with some sub components.
>
> So, does this sound good or should I assume that the files in social/
> are temporary (Cassie Wire Protocol) and will go away soon and just
> put everything in social? Why are there subfolders called
> 'opensocial'?  'social/opensocial' seems redundant. Why
> samplecontainer?
>
> thanks.
>