I am working on building a webapp. I have been learning Python on my own for a few months but I need help figuring out HOW to proceed with building the app, specifically which web framework/database to use.
我正在开发一个webapp。几个月来,我一直在自学Python,但我需要帮助理解如何继续构建应用程序,特别是使用哪个web框架/数据库。
As I'm fairly new to this, I may not be using the correct terms, and I'm sure many of these things may be obvious, but this is a basic list of what I need the framework to be able to do:
由于我对此相当陌生,我可能不会使用正确的术语,而且我确信许多事情可能是显而易见的,但这是一个基本的列表,我需要这个框架能够做到:
-
I need to have a database, I'm not sure how large, the data is coming from an API that API returns JSON which I parse in python using Simple JSON, so I think it's just string dictionaries. For the API data I'd prefer to have one large database with with every key/value from the dictionary being a column/value in the database, as this seems like it would be the easiest to query - please let me know if this is an incorrect assumption.
我需要一个数据库,我不确定数据有多大,数据来自API返回JSON的API我用简单的JSON解析它,所以我认为它只是字符串字典。对于API数据,我希望有一个大型数据库,其中字典中的每个键/值都是数据库中的列/值,因为这似乎是最容易查询的——请让我知道这是否是一个错误的假设。
-
In the front end of the webapp, which I've been told will need to be written in Javascript, users will query the datastore using various different parameters (e.g.show me the last 10 posts from blogs X,Y, and Z, show me topics that were posted to by blog A and blog B.)
前端的webapp,告诉我需要用Javascript编写的,用户会使用各种不同的参数查询数据存储(e.g.show我过去10博客的X,Y,和Z,我展示的主题被发布到博客和博客b)
-
The framework should track user activity and save the data to use it for future recommendations. Multiple users will be making queries at the same time, and the framework should be saving their activity while returning the data they requested.
框架应该跟踪用户活动,并保存数据以供将来的建议使用。多个用户将同时进行查询,框架应该在返回请求的数据时保存他们的活动。
-
The webapp should be scalable, so it can handle the requests in the event that the app gets a surge in traffic/users etc. for any reason. This is currently a small project but in the case that more people want to use it I'd like to have that be an option without having to re-program it from scratch.
webapp应该是可伸缩的,这样它就可以在任何原因导致流量/用户激增的情况下处理请求。这是目前的一个小项目,但如果有更多的人想要使用它,我希望这是一个选项,而不必重新编程。
-
Lastly, as I'm fairly new to programming, all things equal, or nearly equal I would much prefer a framework that is easy to use.
最后,由于我对编程相当陌生,所以我更喜欢易于使用的框架。
3 个解决方案
#1
3
Go with Django all the way https://www.djangoproject.com/
和Django一起走,https://www.djangoproject.com/
#2
0
There are many, many, many ways to do what you seem to want to do.
有很多很多方法去做你想做的事情。
I've been working on a home project that uses tornado.web (easy REST api), mongodb (storage, works espectially well with JSON documents), and nginx (load balancing for surges in requests).
我一直在做一个使用tornado的家庭项目。web(简单的REST api)、mongodb(存储,特别是与JSON文档工作良好)和nginx(为请求中的激增进行负载均衡)。
For the front-end, I'm using nginx to serve static web content... which is comprised of a Backbone.js application for various CRUD operations.
对于前端,我使用nginx来服务静态web内容……它由主干组成。用于各种CRUD操作的js应用程序。
But that's just how I did it.
但我就是这么做的。
#3
0
I suggest Google App Engine. It is free to start, very easy to use with lots of sample code. It is PAAS and see this short management introduction: http://www.youtube.com/watch?v=ckVyxODiTIo
我建议谷歌App Engine。它可以*启动,非常容易与大量示例代码一起使用。它是PAAS,并看到了这个简短的管理介绍:http://www.youtube.com/watch? vckvyxoditio。
#1
3
Go with Django all the way https://www.djangoproject.com/
和Django一起走,https://www.djangoproject.com/
#2
0
There are many, many, many ways to do what you seem to want to do.
有很多很多方法去做你想做的事情。
I've been working on a home project that uses tornado.web (easy REST api), mongodb (storage, works espectially well with JSON documents), and nginx (load balancing for surges in requests).
我一直在做一个使用tornado的家庭项目。web(简单的REST api)、mongodb(存储,特别是与JSON文档工作良好)和nginx(为请求中的激增进行负载均衡)。
For the front-end, I'm using nginx to serve static web content... which is comprised of a Backbone.js application for various CRUD operations.
对于前端,我使用nginx来服务静态web内容……它由主干组成。用于各种CRUD操作的js应用程序。
But that's just how I did it.
但我就是这么做的。
#3
0
I suggest Google App Engine. It is free to start, very easy to use with lots of sample code. It is PAAS and see this short management introduction: http://www.youtube.com/watch?v=ckVyxODiTIo
我建议谷歌App Engine。它可以*启动,非常容易与大量示例代码一起使用。它是PAAS,并看到了这个简短的管理介绍:http://www.youtube.com/watch? vckvyxoditio。