continuing....
I have deleted statefileparser.js which is not needed in a production
environment. And then began the almost hardest part of the
implementation: "requestData".
This function is used by the gadgets to access or modify data.
Here is the final requestData, at least for now:
opensocial.WebdekinetContainer.prototype.requestData =
function(dataRequest,callback) {
var request = JSON.stringify(dataRequest);
new Ajax.Request('/api/gate.aspx',
{
method:'post',
parameters: {r: request},
onSuccess: function(transport){
try {
var json = transport.responseText.evalJSON(true);
}catch (ex) {alert (ex);}
opensocial.WebdekinetContainer.prototype.dataLoaded(callback,
dataRequest, json);
},
onFailure: function(){ alert("Error"); }
});
}
In here we convert dataRequest object into json for the ajax call. My
gate.aspx file get the json object, handle the requests and returns a
json object back with the responses.
Now i am working on the "dataLoaded()" function.
feel free ask anything in here.
more to come...
On 6 Ocak, 14:40, Mehmet Ecevit <[EMAIL PROTECTED]> wrote:
> About server reqirement, i haven't finished implementing. So i haven't
> run any stress tests to make a report.
> And for the tutorial, i haven't find any on the net. But these mails
> will form a tutorial in the next days i hope.
>
> For your last question, opensocial containers need server side scripts
> (asp, jsp, php) for the following reasons:
> 1) parsing the module's xml (not the initial state)
> 2) accesing/modifying the data in the db.
> At least i will use .net for these reasons. You can do these things in
> php. So we don't need java.
>
> On 6 Ocak, 10:31, alphalouis <[EMAIL PROTECTED]> wrote:
>
> > Hi Mehmet
>
> > Do you have any idea about the server requirements to implement an
> > OpenSocial Container? I am php programmer. Any tutorials on how to
> > implement a container? Also can I run it on my shared hosting package
> > or does it require some extras like Java etc... I am using PHP.
>
> > alphaLouis
>
> > On Jan 6, 1:19 pm, Mehmet Ecevit <[EMAIL PROTECTED]> wrote:
>
> > > I am the javascript coder of Webdeki.net (A Turkish social site) and i
> > > began to implement the opensocial.
>
> > > I like to share with you the steps i have done and i will do, for your
> > > comments, critics and exchanging ideas.
>
> > > I am using:
> > > - Prototype 1.5.1.1 for ajax calls.
> > > - Json as the data carrier.
> > > - A simple C# page for gateway to retrieve data from db.
> > > - XmlToJson class (#1) to let our c# developers comfortly use xml for
> > > populating data.
>
> > > A quick tutorial what i have done:
> > > I have downloaded OpenSocial Container Sample 0.6 (#2), and done the
> > > following things in the first step.
> > > - Deleted all cookie-setters/getters and jquery stuff. Coz i won't
> > > need them in production environment.
> > > - StateFileParser.js: Implemented protoype and json support instead of
> > > xml. Coz prototype is the best/fas and json is the best for using oop
> > > like data. For example here is the latest status of person loader.
>
> > > StateFileParser.loadPerson = function(person, container, isViewer,
> > > isOwner) {
> > > var fields = {
> > > 'id' : person.id,
> > > 'name' : person.name,
> > > 'thumbnailUrl' : person.thumbnail,
> > > 'profileUrl' : person.profilUrl};
>
> > > var personTMP = container.newPerson(fields, isViewer, isOwner);
> > > return personTMP;
>
> > > };
>
> > > And then i cleaned up the samplecontainer html page to fit our site.
> > > Now demo opensocial pages work good as expected.
>
> > > More is coming soon... In the next steps, i will try to implement the
> > > most needed functions. i will share with you sure :)
>
> > > Any asp.net containers out there? Lets discuss what we have done so
> > > far in here and share ideas.
>
> > > Sorry for my pure english ;)
>
> > > #1:http://www.phdcc.com/xml2json.htm
> > > #2:http://kisaurl.com/?48M
>
> > > Regards,
> > > Mehmet Ecevit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Implementing OpenSocial Containers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/opensocial-container?hl=en
-~----------~----~----~----~------~----~------~--~---