0

The requirement is to develop a HTML based facebook app. It would not be content based like a newspaper site, but will mostly have user generated data which would be aggregated and presented from database + memcache. The app would contain 4-5 pages at most, with different purposes.

We decided to write the app in Python instead of PHP , and tried to evaluate django. However, we found django is not as flexible as how CodeIgniter in PHP is i.e. putting less restrictions and rules, and allowing you to do what you want to do.

PHP CodeIgnitor is minimalistic MVC framework, which we would have chosen if we were to develop in PHP.

Can you please suggest a flexible and minimalistic python based web framework? I have heard of pylons,cheeryPy,web.py , but I am completely unaware of their usage and structure.

Cœur
  • 37,241
  • 25
  • 195
  • 267
DhruvPathak
  • 42,059
  • 16
  • 116
  • 175
  • Take a look at Flask (http://flask.pocoo.org) – Arsh Singh Aug 01 '12 at 12:31
  • 1
    Please, can you tell the restriction you faced with django or an example of flexibility that you need? – machaku Aug 01 '12 at 12:47
  • @machaku one example would be Django's ORM, my app does not need it, and Django's raw sql is not pretty developed. Other would be that django does a lot for you by itself, I would want to gain more control over what the framework is doing. – DhruvPathak Aug 01 '12 at 13:06
  • http://stackoverflow.com/faq#dontask – Chris Pratt Aug 01 '12 at 14:41
  • @DhruvPathak , Probably you are right, (you don`t need ORM , and other django features, etc). Just remember, Nothing forbids to override most of default django behaviours or add your own behaviours, (eg, context_processors, MiddlewareClasses, ModelFields, mimetypes, settings etc) . You don't have to stick with Django ORM, you can even create an app without `models.py` and do much of stuffs in you views. Plus Django is just python, which means you can do almost anything pythonic within django (eg, perform sql queries with you favorite python lib or do things in your own pythonic ways ) . – machaku Aug 01 '12 at 14:55
  • if you aren't using djangos orm, then there's not that many compelling reasons left to use django. – Tom Willis Aug 21 '12 at 14:38

4 Answers4

1

For my experience, I will recomend you Django:

Developed by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.

It is really easy to learn and you will be able to develop those features after going through the official walkthrough

juankysmith
  • 11,839
  • 5
  • 37
  • 62
1

Check (Flask) It's a very clever micro-framework with a quiet active community. You will not regret it ;)

user570937
  • 19
  • 2
1

For the fastest development you may dive into Django. But Django is probably not the fastest solution. Flask is lighter. Also you can try Pyramid.

1

Pyramid and Flask are both good options. Personally I think where pyramid shines is in it's flexibility in routing requests to view functions. You can do route based which is similar to how django does it though it's not full on regex matching and if you are willing to use resources/traversal you can do some really crazy things with access control lists.

You may not need that stuff and you are free to not use it. But it does scale up nicely to a super complex application. And it runs on python 3 where I don't think flask does yet, but it will eventually.

Tom Willis
  • 5,250
  • 23
  • 34