I am copying this question from SO as it seems to be off-topic over there.

I have some GAE apps which I am thinking to separate into three modules: 
*default*/*www*, *mobile* and *api* but I am having some difficulties 
understanding Modules and how to organize the code.

According to the image found here 
<https://cloud.google.com/appengine/docs/python/modules/#Python_Configuration> 
this is how an app should look like:

<https://cloud.google.com/appengine/docs/images/modules_yaml_files2.png>



This is the simplified structure I came up with so far:

    gae-app/
    ├── modules
    │   ├── api
    │   │   ├── app.yaml
    │   │   └── src
    │   │       └── main.py
    │   ├── mobile
    │   │   ├── app.yaml
    │   │   └── src
    │   │       └── index.html
    │   └── www
    │       ├── app.yaml
    │       └── src
    │           ├── main.py
    │           └── templates
    ├── cron.yaml
    ├── index.yaml
    └── queue.yaml



 - The *api* module provides bunch of API functions and works fine on its 
own.

 - The *mobile* module is just a bunch of html+js which is working just 
fine with the *api* module via ajax.

 - The *default*(*www*) module will someday become just like the *mobile* 
module 
containing only html+js files and working with *api* module via ajax but 
for now most of the templates are generated server side via *jinja2* which 
is causing some questions.


So the questions are:

1. Since both *api* and *default*(www) modules are working server side with 
Datastore for now, where do I keep my Datastore models in this 
image/structure? In addition to that they both share some libraries, where 
do I keep them? Do I create a new "**lib**" folder in app's root folder and 
store the common/shared files there and then symlink it to each module?

2. What's the best way to make all this work with separate git repos? I 
would want each of my modules to have its own repository. How would that 
work with shared models/libs from Q1? GAE apps with Modules seem to allow 
only one *dispath.yaml* / *cron.yaml* / *index.yaml* / *queue.yaml* / etc 
per app (not per module) so which repo would have those files?

I realize that there isn't a single correct answer to the questions but I 
am looking for best practices. Note that I just started working with 
Modules earlier today so my understanding how they work might be completely 
wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to