首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Google App Engine的项目结构

Google App Engine的项目结构
EN

Stack Overflow用户
提问于 2008-09-07 14:08:47
回答 6查看 27.9K关注 0票数 118

我在Google App Engine中启动了一个应用程序,就在它出现的时候,用它来玩玩技术,并从事一个我已经考虑了很长时间但从未开始的宠物项目。结果是BowlSK。然而,随着它的发展和特性的增加,组织工作变得非常困难-主要是因为这是我的第一个python项目,在我开始工作之前我对它一无所知。

我所拥有的:

  • Main Level包含:
    • all .py files (不知道如何使软件包工作)
    • all .html templates for main level for main level for main level main level

  • Subdirectories:
    • 用于css、图像、js等的单独文件夹。保存子目录类型urls

的.html模板的

  • 文件夹

示例:

http://www.bowlsk.com/映射到HomePage (默认包),模板位于"index.html“

http://www.bowlsk.com/games/view-series.html?series=7130映射到ViewSeriesPage (同样是默认包),模板位于“ViewSeriesPage/view-Series.html”

真的很恶心。我该如何重构?我有两个想法:

索引主文件夹包含: appdef、

  • 、main.py?

代码语言:javascript
复制
- Subfolder for code.  Does this have to be my first package?
- Subfolder for templates.  Folder heirarchy would match package heirarchy
- Individual subfolders for css, images, js, etc.

  • 主文件夹包含appdef、main.py、

代码语言:javascript
复制
- Subfolder for code + templates.  This way I have the handler class right next to the template, because in this stage, I'm adding lots of features, so modifications to one mean modifications to the other.  Again, do I have to have this folder name be the first package name for my classes?  I'd like the folder to be "src", but I don't want my classes to be "src.WhateverPage"

有没有最佳实践?我只是简单地开始尝试这些东西,看看哪个看起来更好,但是pyDev的重构支持似乎不能很好地处理包移动,所以让所有这些东西重新工作起来可能是一项不平凡的任务。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48458

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档