Hi Ryan, Thank you so much that make sense to me now. It is exciting me day by day and now i feel what a wonderful this Apache Shindig is.
Regards, Raj On Mon, Aug 11, 2014 at 10:50 AM, Ryan Baxter <[email protected]> wrote: > If I remember correctly I believe the difference is in the parameters > passed to the callback. I believe CommonContainer.rpcRegister will > pass some additional parameters to the callback most importantly the > GadgetSite object. > > On Wed, Aug 6, 2014 at 7:36 AM, Raj Janorkar <[email protected]> > wrote: > > Hi Ryan, > > > > I think i have resolved this slowness issue, yes you are right i was > using > > config[osapi.container.ContainerConfig.RENDER_DEBUG] = true; If i make it > > false then rendering is too fast. > > > > and below is the url for javascript container. > > > > > shindig/gadgets/js/core:open-views:opensearch:container:rpc:selection:views:actions:opensocial:xmlutil.js?c=1&debug=1&container=default > > > > I dont understand the difference between below two i know when the first > one > > when it is triggered but dont know commoncontaner one. > > > > gadgets.rpc.register('resize_iframe', this.setHeight); > > > > and > > > > CommonContainer.rpcRegister('resize_iframe', this.setHeight); > > > > Thank you very much > > > > Regards, > > Raj > > > > > > > > > > On Tue, Aug 5, 2014 at 12:14 PM, Ryan Baxter <[email protected]> > wrote: > >> > >> What is the URL you are using to include the container javascript? > >> Are you passing the debug and nocache query parameters? > >> > >> On Sun, Jul 27, 2014 at 6:54 PM, Raj Janorkar <[email protected]> > >> wrote: > >> > Hi Ryan, > >> > > >> > Yes it is on the same machine > >> > I am using the latest stable version of shindig. My mac is very fast > for > >> > other heavy stuff. I got high speed broadband too. > >> > It is just shindig slow. > >> > > >> > Dont know what is going wrong here other thing is why those param are > >> > not > >> > getting applied particularly cache. > >> > > >> > Any idea? > >> > > >> > Thanks. > >> > > >> > On Monday, July 28, 2014, Ryan Baxter <[email protected]> wrote: > >> >> > >> >> Is Shindig running on the same machine that you are rendering the > >> >> gadgets? It shouldn't be slow at all, even without caching things. > >> >> > >> >> On Sun, Jul 27, 2014 at 11:28 AM, Raj Janorkar < > [email protected]> > >> >> wrote: > >> >> > Thank you so much Ryan for providing details. > >> >> > It is 1:23 midnight in Australia i was still playing with my first > >> >> > container > >> >> > code > >> >> > > >> >> > Finally i created my first container it works perfectly fine. > >> >> > > >> >> > Below is the code > >> >> > > >> >> > var config = config || {}; > >> >> > config[osapi.container.ContainerConfig.RENDER_DEBUG] = '1'; > >> >> > //config[osapi.container.ServiceConfig.API_HOST] = > >> >> > window.location.origin; > >> >> > //config[osapi.container.ServiceConfig.API_PATH] = > >> >> > '/shindig/rpc'; > >> >> > > >> >> > var CommonContainer = new osapi.container.Container(config); > >> >> > CommonContainer.EnablePreferences = true; > >> >> > > >> >> > > >> >> > function below which build container > >> >> > > >> >> > buildGadget: function(result, gadgetURL, gadgetID) { > >> >> > var result = result || {}; > >> >> > var el = $('#' + gadgetID).get(0); > >> >> > var moduleID = gadgetID.split("-"); > >> >> > var params = {}; > >> >> > > >> >> > var gadgetSite = CommonContainer.newGadgetSite(el); > >> >> > > >> >> > params[osapi.container.RenderParam.WIDTH] = '100%'; > >> >> > params[osapi.container.RenderParam.HEIGHT] = '100%'; > >> >> > params[osapi.container.RenderParam.SCROLL] = false; > >> >> > params[osapi.container.RenderParam.USER_PREFS] = false; > >> >> > params[osapi.container.RenderParam.VIEW] = 'home'; > >> >> > params[osapi.container.RenderParam.NO_CACHE] = '0'; > >> >> > params[osapi.container.RenderParam.TEST_MODE] = '0'; > >> >> > params[osapi.container.RenderParam.MODULE_ID] = > moduleID[2] + > >> >> > moduleID[3]; > >> >> > var viewParams = undefined; > >> >> > > >> >> > CommonContainer.navigateGadget(gadgetSite, gadgetURL, > >> >> > viewParams, > >> >> > params); > >> >> > return gadgetSite; > >> >> > } > >> >> > > >> >> > Just few doubt i have and i could not able to find answers > >> >> > > >> >> > - just wondering why rendering is so slow - it take lot of time to > >> >> > render > >> >> > the gadgets i tried few gadgets also tried labpixis to do gadget. > >> >> > i use macbook pro, with latest OS, i5 process, apache PHP and > >> >> > apache > >> >> > Tomcat > >> >> > > >> >> > - when i am setting NO_CACHE to '0' in firfox debug i can see it is > >> >> > passing > >> >> > nocache=1 to gadget/ifr, why my shindig is not considering this > >> >> > param. > >> >> > > >> >> > am i missing anything here. > >> >> > > >> >> > thank you very much in advance. > >> >> > > >> >> > Regards, > >> >> > Raj > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > On Sun, Jul 27, 2014 at 11:21 PM, Ryan Baxter <[email protected] > > > >> >> > wrote: > >> >> >> > >> >> >> Hi Raj, > >> >> >> > >> >> >> You are right using a, container to render your gadgets is the > best > >> >> >> way. We have a set of JavaScript APIs that are part of Shindig > >> >> >> called > >> >> >> the common container which is meant to help you construct your own > >> >> >> container. The APIs are documented in the OpenSocial spec [1]. > The > >> >> >> spec contains a number of code samples to help you get started. > In > >> >> >> addition you may find it useful to look at the source code as well > >> >> >> [2]. The source code is contained within the folders that begin > >> >> >> with > >> >> >> container*. > >> >> >> > >> >> >> [1] http://opensocial.github.io/spec/2.5.1/Core-Container.xml > >> >> >> [2] > >> >> >> > >> >> >> > >> >> >> > https://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/ > >> >> >> > >> >> >> On Sat, Jul 26, 2014 at 8:03 PM, Raj Janorkar > >> >> >> <[email protected]> > >> >> >> wrote: > >> >> >> > Hi All, > >> >> >> > > >> >> >> > I am new to apache shindig and learning it since last 20 to 25 > >> >> >> > days, > >> >> >> > and > >> >> >> > finally i decided to implement it because it is great. (but > don't > >> >> >> > understand the fully the concept of gadget and container > >> >> >> > communication) > >> >> >> > > >> >> >> > > >> >> >> > I am currently using PHP for my website development and JAVA > >> >> >> > shindig > >> >> >> > for > >> >> >> > gadget rendering. > >> >> >> > > >> >> >> > I am rendering gadget using iframe dynamically src to > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > * > http://localhost/shindig/gadgets/ifr?url=http://gadgets.example.com/complex/amazon/amazon.xml > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > < > http://localhost/shindig/gadgets/ifr?url=http://gadgets.example.com/complex/amazon/amazon.xml > >* > >> >> >> > > >> >> >> > with other parameters it renders fine no issue. But as i am > using > >> >> >> > iframe > >> >> >> > i > >> >> >> > need to *Auto Resize iframe, *but it is not happening. after > >> >> >> > reading > >> >> >> > shindig doc i came to know that i need to build container. > >> >> >> > > >> >> >> > 1) Can i build container in javascript ? and make communication > >> >> >> > between > >> >> >> > gadget and container? because i don't want to use TOMCAT for all > >> >> >> > my > >> >> >> > website. So use apache PHP for website and just use Tomcat for > >> >> >> > gadget > >> >> >> > rendering. > >> >> >> Yes the common container uses a feature called RPC which allows > >> >> >> gadgets and containers to communicate. There are APIs within the > >> >> >> common container which are meant to assist you with doing this. > See > >> >> >> Container.rpcRegister. > >> >> >> > > >> >> >> > 2) how i can auto resize iframe > >> >> >> There is a gadget feature that is meant to help you do this called > >> >> >> dynamic-height and dynamic-width. They provide the gadget with > the > >> >> >> APIs gadgets.window.adjustHeight() and > gadgets.window.adjustWidth() > >> >> >> to > >> >> >> auto resize the iframe. > >> >> >> > >> >> >> > > >> >> >> > 3) how i can retrieve/submit user preferences from/to gadget to > >> >> >> > display > >> >> >> > to > >> >> >> > user for edit. > >> >> >> Shindig does not provide any UI to edit gadget preferences nor > does > >> >> >> it > >> >> >> provide a mechanism to persist gadget preferences, that is up to > >> >> >> you. > >> >> >> However we do provide APIs you can use to get the gadget before > you > >> >> >> render the gadget for the first time so you know what the > >> >> >> preferences > >> >> >> are. The Container.preloadGadget method allows you to load > metadata > >> >> >> for a gadget before rendering the gadget. Part of the metadata > >> >> >> provided to you are details about the gadget preferences. > >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > It looks like i may be asking very basic questions, but if any > >> >> >> > buddy > >> >> >> > can > >> >> >> > help me that would be really great. > >> >> >> > > >> >> >> > Thank you in advance. > >> >> >> > > >> >> >> > Regards, > >> >> >> > Raj > >> >> > > >> >> > > > > > >
