Is there an actual working example of how to create a single user/session
database for all apps?

http://web2py.com/book/default/chapter/04#Cooperation doesn't really
provide much details on actually doing this.

On Fri, Mar 9, 2012 at 3:13 PM, Bruno Rocha <rochacbr...@gmail.com> wrote:

> The first important thing when you want to create a multi-app site is to
> share the same session/auth and maybe share the same database, at least the
> same users database.
>
> with web2py you can easily use the same database to store users, and also
> you can store sessions on that database too, it is the first pass to keep
> state between applications.
>
> Another option is using CAS to centralize the users (but I personally like
> to use the "one-db-session" approach)
>
> Having users and its state on all applications now you have to decide if
> you will connect the apps using ajax, urls or API's, for the 3 cases web2py
> has a solution.
>
> {{=LOAD(URL("otherapp", "controller", "function"), null, 'target') for use
> ajax coponents
>
> URL("otherapp", "controller", "function") to simply link the apps
>
> See RESTFUL and webservices on the book for the API's approach.
>
> There is one more important thing you can do: Put your apps general
> functions, classes and table definitions in modules, put the modules in
> "web2py/site-packages" so in any application you can do "import something".
>
> Besides the initial work on setting up the same db and sessions for the
> users, I see that it is very simple to have a multi-app website.
>
>
> On Fri, Mar 9, 2012 at 7:54 PM, bussiere adrien <bussi...@gmail.com>wrote:
>
>> this doc is outdated is there anything news for making a website with
>> more than one app ?
>>
>> regards
>> Bussiere
>>
>> Le lundi 15 mars 2010 16:19:23 UTC+1, mdipierro a écrit :
>>>
>>> For now look at the following links that may help you:
>>>
>>> For an example of {{=LOAD(...)}}
>>>
>>>    http://gluonframework.**wordpress.com/2010/03/07/**
>>> web2py-ajax-and-forms/<http://gluonframework.wordpress.com/2010/03/07/web2py-ajax-and-forms/>
>>>
>>> You can load an action from the same app or other apps.
>>>
>>> For ways an app can share data with another app:
>>>
>>>   
>>> http://www.web2py.com/book/**default/section/4/19<http://www.web2py.com/book/default/section/4/19>
>>>   
>>> http://www.web2py.com/book/**default/section/4/20<http://www.web2py.com/book/default/section/4/20>
>>>
>>> Hope this helps.
>>>
>>> Massimo
>>>
>>> On Mar 12, 7:26 am, Rahul <rahul.dhak...@gmail.com> wrote:
>>> >     Hi All, Massimo,
>>> >            I've been designing a  web app using web2py. Web2py is
>>> > really a
>>> >     very well designed framework. I am considering it along with
>>> > Django for a
>>> >     medium sized web app development. How ever I would like to know,
>>> > if I can
>>> >     code more applications for a single complex site (as we can do in
>>> > Django)
>>> >     and link it to one single application.I am not using CAS as I have
>>> > created
>>> >     my own authentication system. Here's an example to make it clear
>>> > of what I
>>> >     want-
>>> >      *my site*
>>> >             |__ site pages along with main page
>>> >             |__ link to app1 ( a blog that is a separate web2py app)
>>> >             |__ link to a app2 (chat client)  ( again a separate
>>> > web2py app)
>>> >             |__ link to my database triggered app3 (again a separate
>>> > web2py
>>> >     app)
>>> >
>>> >     In short how do I modularise my web2py project to combine
>>> > different
>>> >     applications into my original site web2py project. From the web
>>> > I've seen a
>>> >     post from Yarko that mentions this
>>> >
>>> >     {{=LOAD(...,application='
>>> >     otherapp')}}
>>> >
>>> >     but technically I could not find any documentation either in your
>>> > online
>>> >     book or site. Can you please provide methods of how this is
>>> > achievable
>>> >     without sacrificing simplicity. I have also heard about plugins
>>> > but not
>>> >     really sure what they are and should I be really using those.
>>> >
>>> >     Please suggest.
>>> >
>>> >     Sincerely, Rahul D
>>> >     (India)
>>>
>>>
>
>
> --
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fitnessfriendsfinder.com

Reply via email to