As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This question possibly doesn't
belong here. We'll see how the answers
pan out, if this doesn't belong here
please move it to where it belongs.
I'm following the getting started guide for Google App Engine, and I'm seeing what it can and can't do.
Basically, I'm seeing it's very similar to an MVC pattern. You create your model, then create a View that uses that Model to display information.
Not only that, but it uses a controller of some kind in this fashion:
application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
My question is, why would you use this Google App Engine if it's the same as using a number of other MVC frameworks?
Is the only benefit you gain the load balancing being handled by Google automagically?
What is a good example of something you would need the App Engine for?
I'm trying to learn, so thanks for the discussion.
Google App Engine isn't a framework. Google App Engine is platform as a service. The App Engine is a platform for developing applications where the server components are managed for you by Google so that you aren't distracted by the mundane details of configuring a server. It let's you focus on what you do best, building software to solve a business problem.
There are many different frameworks for App Engine. A framework isn't the same as a platform. Take the Java SDK for App Engine for instance. I have a version of the JQuery Form builder, built in PHP, running on App Engine using the Java Querces servlet to interpret the PHP. Another developer I know has used Struts on App Engine, Restlets, and Spring.
Examples of what you can do:
Host a company website
Host a live chat application using the ChannelAPI (Comet for App Engine)
Host a blog using Bloog or other Blog software written in Python
Many more things
Spring and Struts are MVC frameworks whereas Restlets is a REST framework. The JQuery Form Builder I have running isn't on a framework at all as it was a hackjob solution using Querces to run PHP on App Engine.
In short, there are probably a number of frameworks you can use for Python's SDK for App Engine as well, but App Engine is not a framework.
In short, you can choose to host the application yourself or through a pay-for provider, or you can use Google's next generation model.
Perhaps the most attractive thing for me about Google App Engine is how fast I can get something running, even programming in Java. The App Engine SDK will hot-swap changes by compiling the code after every change. Deployments are also one-click in Eclipse. I can have something in production by just clicking a button.
There is also a lot of scalability on platform as a service models, which can scale up or down depending on the volume on your application.
Lastly, it's free for low usage.
I think this question misses the point of app engine. The question assumes app engine is just a web framework, but it is really an entire platform. A web framework is one layer in a stack of software that is required to run a web site. Most websites will also need a database, an operating system to run the software and database on, physical servers to run all that on, etc. App engine gives you all that wrapped up in one integrated package, which you can pay for as you need it. Plus you get some for free if you are just getting started.
Is the only benefit you gain the load balancing being handled by Google automagically?
This is a huge benefit. Have you ever tried to run a web site that is big enough to need multiple servers? How much did it cost? How much time did you spend configuring servers, patching them, etc?
The main benefit of App Engine is it's scalability for relatively low costs. This brings it's own negative points though. Because of it's scalability it locks you in to doing stuff 'their way' which leaves a plethora of 'gotchas' when first setting up.
I could list all the points but pretty much everything I have to say can be found here... Pros & Cons of Google App Engine
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am about to start a new personal web / iphone app project which requries the following:
Storing data on the backend
authenticating the user via openid
Generate JSON based APIs for reading and writing data
I normally use Django for all of my projects but thought I would take this opportunity to learn something new. So, are their any Python based web development frameworks that are good alternatives to Django? Ideally ones that are strong on the points listed above?
Bonus points if the framework is:
lightweight
easy to install, deploy and developwith
Any recommendations?
I've only ever used Django and I love it, but here's a couple others (I think Flask is your best bet for a very small and very lightweight web app)
Flask
"Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions."
- http://flask.pocoo.org/
Pylons
"Rather than focusing on a single web framework, the Pylons Project will develop a collection of related technologies. The first package from the Pylons Project was the Pyramid web framework. Other packages have been added to the collection over time, including higher-level components and applications. We hope to evolve the project into an ecosystem of well-tested, well-documented components which interoperate easily." - http://www.pylonsproject.org/
Grok
"Grok is a web application framework for Python developers. It is aimed at both beginners and very experienced web developers. Grok has an emphasis on agile development. Grok is easy and powerful." - http://grok.zope.org/
TurboGears
"TurboGears will help you to create a database-driven, ready-to-extend application in minutes. All with code that is as natural as writing a function, designer friendly templates, easy AJAX on the browser side and on the server side and with an incredibly powerful and flexible Object Relational Mapper (ORM)." - http://www.turbogears.org/
More Python Framework Resources
After a little more digging I found this resource: http://wiki.python.org/moin/WebFrameworks/
I've used web2py for a couple small projects and really liked it.
It is pretty lightweight, has great documentation, and in my experience very simple to deploy.
I've never used Django, so I'm not sure how it compares.
A few hello worlds:
def hello1():
return "Hello World"
def hello5():
return HTML(BODY(H1(T('Hello World'),_style="color: red;"))).xml() # .xml to serialize
def hello3():
return dict(message=T("Hello World"))
The corresponding view for hello3:
{{extend 'layout.html'}}
<h1>{{=message}}</h1>
Use web.py can be found at http://webpy.org/ Very simple URL handling and lots of built in functionality but still light weight
I'm slightly confused on what is meant by a "web application". I.e. Django positions itself as "a web framework" for the development of "web apps", quite similar to the description of Pyramid. What I'm looking for is a framework for an application that has a browser interface but is very database driven. In short: It's a system that should handle transaction and subscriptions. These transactions are registered through a web interface. The backend consists of XML/JSON feeds of these subscriptions/transactions and an administrative interface to generate statistics and reports. Quite similar to a ticketing/box office system.
Now: Is it a good decision to start out with something like Django/Pyramid even though they seem more focussed on the creation of "websites" rather than (scalable) input/output "applications". Is there any python framework that I'm better of using or are they perfectly suited for the kind of software that I'm describing?
Any help would be greatly appreciated!
I don't know Pyramid at the time of writing so I'll answer the Django part, though I can imagine the answer to apply to Pyramid as well as the distinction between websites and web application is quite vague.
Django is suitable for both websites and web applications: you can create an informative website for your local library as well as an all-in web application with lots of interactive features. Django simply facilitates the creation of the backend of a web system. Both websites and web applications use databases, have caching and can have interactive parts with forms.
It's just that websites are usually just for informing the user (most sites out there) or interacting with others (such as forums). A web application is best described with some examples, such as webmail, administrative interfaces, Google Docs, etc; it serves as a replacement of a desktop application.
From a technical perspective, there's no clear cut thing that separates the world of websites from web applications, it's just a matter of what you create with your web framework.
To answer your question, Django is quite suitable for creating a database-driven web application as it supports multiple databases, caching, autmatic creation and handling of forms, etc. I can imagine Pyramid to be suitable as well but I can't answer that. It's good to explore your options.
I believe that at this point you might want to think more about the overall architecture of your application rather than frameworks. For Example
Single Tier - Just a simple webapp, using simple file or object storage
Two Tier - Webapp + Relational Database. The webapp contains the presentation logic + business logic using MVC principles
Three Tier - Webapp + Middle Tier + Relation Database. In this setting, the Middle Tier will basically contain all the business & processing logic. The Webapp is then just a presentation layer
Once you decide the architecture, you can then start thinking about which framework to use for each of the component of the architecture.
I believe progressing this way will be less confusing and will give clarity of thought.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Currently I have a website on the Google App Engine written in Google's webapp framework. What I want to know is what are the benefits of converting my app to run with django? And what are the downsides? Also how did you guys code your GAE apps? Did you use webapp or django? Or did you go an entirely different route and use the Java api?
Thanks
With Django on GAE, you get all the benefits (and also the non-benefits) of GAE. The benefits are mainly automatic scalability and high reliability at a very low cost.
You may want to start by checking out the following:
Stack Overflow: Django on Google App Engine
Stack Overflow: Django and App Engine
Google Code: Running Django on Google App Engine
YouTube: Google I/O 2008 - Python, Django, and App Engine
Django on Google App Engine in 13 simple steps
Google - Why App Engine?
As it turns out, I asked this same question:
Why use Django on Google App Engine?
It mostly resolved to two items:
In functionality where webapp and Django overlap, Django tends to be a bit nicer and/or more flexible.
If you were to later want to move away from GAE, Django is a porting goal.
My question (in combination with the wealth of information Daniel Vassallo provided) should answer your question completely.
GAE is a great tool for new and small projects, that do not require a relational database. I use a range of web hosting solutions.
1) I built www.gaiagps.com on the App Engine, because it was just some brochureware, and a tiny key-value store for the blog part.
2) My colleague also built a web crawler on GAE, because it was just some simple Python scripts that collected web pages. That app actually sends the data over to EC2 though, where more work is done.
3) I host www.trailbehind.com on EC2 because it uses a geo-database (PostGIS) which you would basically have to implement yourself on App Engine.
4) I host TRAC and SVN on WebFaction, because it's off-the-shelf for any slice there.
If I need to do a site in a couple of days, I use GAE. If it's a large or existing project, or has a funky database, I use something else.
I've recently changed my development from webapp to django (using app-engine-patch b/c they have added more features). Check out app-engine-patch here:
http://code.google.com/p/app-engine-patch/
I really liked how simple webapp was to use and it had all the tools I needed for a while. However when it came to adding user accounts on to my site I found that I either had to roll my own system (with sessions etc. which can get complicated on GAE) or use google/gmail accounts with webapp.
I didn't want my users to have to sign up for google/gmail first before they signed up with me.
Therefore I'm trying out django with app-engine-patch because they have already implemented the user functionality from django and it seems to work just fine.
With Django vs. Webapp they both have similar performance, and both offer the automatic scalablity etc.
Django has some nifty form validation etc. but i see the user stuff as the biggest difference between the two.
Good Luck.
I did some django/GAE work a last summer (see Plunging into Web Development). The App Engine Patch is a must.
The only real problem I ran into was the 1M upload/download limit imposed by GAE. I could upload larger files by using HTTP directly to S3, but I couldn't retrieve them through GAE. I hope they've lifted this restriction since then.
If you are looking other GAE CMS frameworks besides Django, take a look at Vosao. It is a Java CMS framework which uses Velocity for templates. The framework is still in alpha and is under heavy development. The current version (0.2.3) is stable and highly functional.
You can see an example of a working Vosao site on my personal domain.
I prefer webapp. It scales better according to Google and seems to better integrated with the App Engine infrastructure. Plus it's more lightweight.
try kay-framework if you are looking for framework specifically designed for google app engine.
I would like to ask about some sources for developing applications with Python and Google App Engine.
For example, some controls to generate automatically pages with the insert/update/delete of a database table, or any other useful resources are welcome.
Thank you!
The Python community tends to look askance at code generation; so, #Hoang, if you think code generation is THE way to go, I suggest you try just about any other language BUT Python.
#Dominic has already suggested some excellent resources, I could point you to more (App Engine Fan, App Engine Utilities, etc, etc) but they're all based on the Pythonic mindset: understand what you need and what you could be doing, wrap as much of it as feasible into reusable components, reuse those components from your own sources.
You want magic, wizards and code generation that basically excused you (in theory) from STUDYING and UNDERSTANDING: give up on Python, it's SO not the language for that,
The google app engine "Getting Started" tutorial is very good. The django documentation is also really detailed.
Take a look at GoogleIO on youtube and watch some of the tutorials.
App Engine Documentation
http://code.google.com/appengine/docs/
App Engine Google Group
http://groups.google.com/group/google-appengine
Google I/O conference videos
http://code.google.com/events/io/
App Engine Cookbook
http://appengine-cookbook.appspot.com/
and, of course, stackoverflow
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this:
Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback.
Any other success/failure notes would be great.
I have tried app engine for my small quake watch application
http://quakewatch.appspot.com/
My purpose was to see the capabilities of app engine, so here are the main points:
it doesn't come by default with Django, it has its own web framework which is pythonic has URL dispatcher like Django and it uses Django templates
So if you have Django exp. you will find it easy to use
But you can use any pure python framework and Django can be easily added see
http://code.google.com/appengine/articles/django.html
google-app-engine-django (http://code.google.com/p/google-app-engine-django/) project is excellent and works almost like working on a Django project
You can not execute any long running process on server, what you do is reply to request and which should be quick otherwise appengine will kill it
So if your app needs lots of backend processing appengine is not the best way
otherwise you will have to do processing on a server of your own
My quakewatch app has a subscription feature, it means I had to email latest quakes as they happend, but I can not run a background process in app engine to monitor new quakes
solution here is to use a third part service like pingablity.com which can connect to one of your page and which executes the subscription emailer
but here also you will have to take care that you don't spend much time here
or break task into several pieces
It provides Django like modeling capabilities but backend is totally different but for a new project it should not matter.
But overall I think it is excellent for creating apps which do not need lot of background processing.
Edit:
Now task queues can be used for running batch processing or scheduled tasks
Edit:
after working/creating a real application on GAE for a year, now my opnion is that unless you are making a application which needs to scale to million and million of users, don't use GAE. Maintaining and doing trivial tasks in GAE is a headache due to distributed nature, to avoid deadline exceeded errors, count entities or do complex queries requires complex code, so small complex application should stick to LAMP.
Edit:
Models should be specially designed considering all the transactions you wish to have in future, because entities only in same entity group can be used in a transaction and it makes the process of updating two different groups a nightmare e.g. transfer money from user1 to user2 in transaction is impossible unless they are in same entity group, but making them same entity group may not be best for frequent update purposes....
read this http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine
I am using GAE to host several high-traffic applications. Like on the order of 50-100 req/sec. It is great, I can't recommend it enough.
My previous experience with web development was with Ruby (Rails/Merb). Learning Python was easy. I didn't mess with Django or Pylons or any other framework, just started from the GAE examples and built what I needed out of the basic webapp libraries that are provided.
If you're used to the flexibility of SQL the datastore can take some getting used to. Nothing too traumatic! The biggest adjustment is moving away from JOINs. You have to shed the idea that normalizing is crucial.
Ben
One of the compelling reasons I have come across for using Google App Engine is its integration with Google Apps for your domain. Essentially it allows you to create custom, managed web applications that are restricted to the (controlled) logins of your domain.
Most of my experience with this code was building a simple time/task tracking application. The template engine was simple and yet made a multi-page application very approachable. The login/user awareness api is similarly useful. I was able to make a public page/private page paradigm without too much issue. (a user would log in to see the private pages. An anonymous user was only shown the public page.)
I was just getting into the datastore portion of the project when I got pulled away for "real work".
I was able to accomplish a lot (it still is not done yet) in a very little amount of time. Since I had never used Python before, this was particularly pleasant (both because it was a new language for me, and also because the development was still fast despite the new language). I ran into very little that led me to believe that I wouldn't be able to accomplish my task. Instead I have a fairly positive impression of the functionality and features.
That is my experience with it. Perhaps it doesn't represent more than an unfinished toy project, but it does represent an informed trial of the platform, and I hope that helps.
The "App Engine running Django" idea is a bit misleading. App Engine replaces the entire Django model layer so be prepared to spend some time getting acclimated with App Engine's datastore which requires a different way of modeling and thinking about data.
I used GAE to build http://www.muspy.com
It's a bit more than a toy project but not overly complex either. I still depend on a few issues to be addressed by Google, but overall developing the website was an enjoyable experience.
If you don't want to deal with hosting issues, server administration, etc, I can definitely recommend it. Especially if you already know Python and Django.
I think App Engine is pretty cool for small projects at this point. There's a lot to be said for never having to worry about hosting. The API also pushes you in the direction of building scalable apps, which is good practice.
app-engine-patch is a good layer between Django and App Engine, enabling the use of the auth app and more.
Google have promised an SLA and pricing model by the end of 2008.
Requests must complete in 10 seconds, sub-requests to web services required to complete in 5 seconds. This forces you to design a fast, lightweight application, off-loading serious processing to other platforms (e.g. a hosted service or an EC2 instance).
More languages are coming soon! Google won't say which though :-). My money's on Java next.
This question has been fully answered. Which is good.
But one thing perhaps is worth mentioning.
The google app engine has a plugin for the eclipse ide which is a joy to work with.
If you already do your development with eclipse you are going to be so happy about that.
To deploy on the google app engine's web site all I need to do is click one little button - with the airplane logo - super.
Take a look the the sql game, it is very stable and actually pushed traffic limits at one point so that it was getting throttled by Google. I have seen nothing but good news about App Engine, other than hosting you app on servers someone else controls completely.
I used GAE to build a simple application which accepts some parameters, formats and send email. It was extremely simple and fast. I also made some performance benchmarks on the GAE datastore and memcache services (http://dbaspects.blogspot.com/2010/01/memcache-vs-datastore-on-google-app.html ). It is not that fast. My opinion is that GAE is serious platform which enforce certain methodology. I think it will evolve to the truly scalable platform, where bad practices simply not allowed.
I used GAE for my flash gaming site, Bearded Games. GAE is a great platform. I used Django templates which are so much easier than the old days of PHP. It comes with a great admin panel, and gives you really good logs. The datastore is different than a database like MySQL, but it's much easier to work with. Building the site was easy and straightforward and they have lots of helpful advice on the site.
I used GAE and Django to build a Facebook application. I used http://code.google.com/p/app-engine-patch as my starting point as it has Django 1.1 support. I didn't try to use any of the manage.py commands because I assumed they wouldn't work, but I didn't even look into it. The application had three models and also used pyfacebook, but that was the extent of the complexity. I'm in the process of building a much more complicated application which I'm starting to blog about on http://brianyamabe.com.