I wanna build a simple social network use python. Just like twitter but smaller than twitter.I just wanna make a few features like follow,BE followed,view others profile,etc.
My question is that i should use web.py or Tornado?
BTW, is there any tutorial about Tornado? I feel it hard to understand when i read the documenations on the offical.
(Oops,my english is week. :P )
these two are different things.
Tornado is web server while web.py is a framework.
therefore you can use both of them.
Answer to your Q:
write your app with web.py ! I'm sure we can build a twitter copy based web.py very soon .
And then , you'd better to know these:
web.py is a small but charp python web framework
tornado is a web server, but also can do more things .
The document of tornado http://www.tornadoweb.org/documentation/index.html is good,and I guess you want some examples ? Click here https://github.com/facebook/tornado/tree/master/demos
You might consider using Pinax. When I used it, it had the self-concept of 'django with an opinion.' I'm not sure where it's at now, but my experience was that it was best suited for exactly what you want to do. One of the base projects is actually a fully functional social network site. You could then customize from there.
Related
I am currently developing my first more complex Web Application and want to ask for directions from more experienced Developers.
First I want to explain the most important requirements.
I want to develop a Web App (no mobile apps or desktop apps) and want to use as much django as possible. Because I am comfortable with the ecosystem right now and don't have that much time to learn something new that is too complex. I am inexperienced in the Javascript World, but I am able to do a little bit of jQuery.
The idea is to have one database and many different Frontends that are branded differently and have different users and administrators. So my current approach is to develop a Backend with Django and use Django Rest Framework to give the specific data to the Frontends via REST. Because I have not that much time to learn a Frontend-Framework I wanted to use another Django instance to use as a Frontend, as I really like the Django Template language. This would mean one Django instance one Frontend, where there would be mainly TemplateViews. The Frontends will be served on different subdomains, while the backend exposes the API Endpoints on the top level domain.
It is not necessary to have a Single Page App. A Normal Website with mainly the normal request/response-cycle is fine.
Do you think this is a possible approach to do things? I am currently thinking about how to use the data in the frontend sites in the best way. As I am familiar with the Django template language I thought about writing a middleware that asks about the user details in every request cycle from the backend. The thought is to use a request.user as normally as possible while getting the data from the backend.
Or is ist better to ask these details via jQuery and Ajax Calls and don't use the django template language very much?
Maybe there is also a way to make different Frontends for the same database without using REST?
Or what would you think about using a database with each frontend, which changes everytime I make a change in the main database in the backend? Although I don't really like this approach due to the possibility of differences in data if I make a mistake.
Hopefully this is not to confusing for you. If there are questions I will answer them happily. Maybe I am also totally on the wrong track. Please don't hesitate to point that out, too.
I thank you very much in advance for your guiding and wish you a nice day.
as per my experience and knowledge, you are almost going towards correct direction.
my recommendation is for making backend rest api Django and django rest framework is the best option however for consuming those api you can look for the angular or react both works very well in terms of consuming API.
Thank you for your input om tripathi.
I think it really does make sense to use the modern js frameworks for consuming a REST API.
I looked a little further into my problem and found multitenancy to fit my requirements perfectly. There are also great plugins and good reads for that use case. Just for others some informations I stumbled upon:
https://djangopackages.org/grids/g/multi-tenancy/
https://www.vinta.com.br/blog/2017/multitenancy-juggling-customer-data-django/
Especially the second link gave me information about different design approaches. For myself I chose to go the way with one database for every Client and then using the site framework from django to seperate data. For the Subdomain resolving I use django-hosts.
Thank you again and have a nice day.
I am going to develop a auto text summarization tool as my FYP. I am going to use Python and it's going to be a web application. Since, there would be no database involved in my tool is it a good idea to use Django? Can anyone recommend any other framework? Thanks.
If there's no database in your application then you presumably won't be using Django's ORM, which is one main reason to use it rather than something lighter.
Having said that, if you're familiar with Django, use Django. If you're not and are looking for a Python web framework, how about something like Flask? The templating module (Jinja2, I think) is a bit more powerful than Django's templates.
It doesn't matter if database is involved or not, but for overall web development, it's an easy to use framework.
I'm looking for a python web framework that is easy to use and allows me to generate some nice looking user interfaces on the fly. I have not much experience with web development and don't want to spent much time to learn internals.
So far I use cherrypy and mako templating to serve the app. My problem is, it just looks awful. I'd like to have some nice (maybe AJAX?) features available to make the app a little bit more fancy.
My app is a simple search site without any database connection. So I have a main page where the user enters the search string and a result page. In the end it should look like the Goole search, with some hover effects for the results, nice keyboard controls, maybe even something similar like the page preview from Google.
So to achieve this, should I use a different framework or do I need to write the CSS and javascript by hand? What options do I have?
Thanks!
Your user interface has nothing to do with the web framework you choose to use.
That said, you might find Bootstrap useful:
Bootstrap is a toolkit from Twitter designed to kickstart development
of webapps and sites. It includes base CSS and HTML for typography,
forms, buttons, tables, grids, navigation, and more.
You might also find this article useful: http://web.archive.org/web/20120418061148/http://jamie-davidson.com/2012/01/resources-to-hack-design/ (original article at: http://jamie-davidson.com/2012/01/resources-to-hack-design/ is no longer available)
"easy to use"
Django
"generate some nice looking user interfaces on the fly"
Django!
"don't want to spent much time"
Django!!
For javascript, I strongly suggest jQuery and for some CSS: Grid 960.
How about Django or Pinax? Maybe BlueBream? There are so many Python frameworks... If you're new to dev work, however, choose one in which there's a solid offline local community to lean on...to go to with questions to help get the app built. (In L.A., it's Django.) But, specifically to your app, my question would be: if you only have essentially just two different page layouts--i.e., the main search page where a user inputs their query, and then X number of dynamically generated pages for the results...and no database--do you really need a whole Python "framework" for that? You write that you're also looking to dynamically generate "nice looking user interfaces on the fly"...which is a little confusing given the stated scope of your app.
Pyjamas - Python Javascript Compiler, Desktop Widget Set and RIA Web Framework
I found interesting web2py framework, easy to install, and it has o lot of features as "from the box"
Wanting to get some feedback on frameworks. Web/Desktop. It doesn't seem to be much difference in most respects expect web can go everywhere and desktop can't.
For a small user base however using database database driven application, where 70% input would come from files, and 30% for the user. Would I get more benefit from a desktop based solution like Camelot Camelot or Dabo & Pyjamas matched against say Django, Grok, Plone or Pyramid?
I was going to learn django based largely on docs Django Book and apparent ease of learning. Thought i should check first before diving in if its the most appropriate.
For data driven project where display/input/reporting facilites(charts/graphs) required is there a best fit or a "better fit". Can't see that I would loose anything by using a web framework for this these days, but where the desired output is more "business" logic based rather than a web page which avenue should i go web v desktop and if either better option?
Edit: I have found another possible solution/answer web2py web2py
I think you'll find web2py very easy to learn and use. Note, if desired, you can easily distribute your web2py app to individual users for installation on their own computer like a desktop app (using the browser as the user interface) -- see here. The users don't need to have anything else installed on their computer (not even Python), and web2py itself doesn't require installation, just unzipping.
I'm a C/C++ developer and I also have experience developing web apps with C#, ASP.NET MVC and fluent nhibernate. I'm looking for non-MS alternatives for web development and I'm really interested in python so I went out after Django but I've been told that Django makes it difficult for me to personalize my HTML (not sure if this is accurate).
What I'm looking for is a Python web development framework that is integrated with an ORM, is able to generate the interfaces BUT provides an easy way for me to customize the interface to create an AJAX intensive app
go for django.
does all you wanted,
has perfect docs and even free book,
partially runs on appengine,
has really large user base,
it is mature:
db sharding, (With model router)
xss protection in forms
memcache,
localisation,
well tested support for unicode,
really easy to learn because of level of it documentation.
I'm using Flask (a very minimal web framework) and SQLAlchemy as my ORM. I'm exceedingly happy with it. Disclaimer: I'm only using this for personal projects at the moment, though I do plan to launch a web app in the next 6 months using this setup.
Various options in Python you can look at -
Django (obviously!)
Pylons
Nagare
Flask
Django is really good. And no your info is not correct, HTML templates are real easy to edit them.
Also this is from a developer of Nagare -
Ajax without to write any Javascript
code or the use of continuations makes
a Web application looks like a desktop
one. In fact we have often found that
developers like you, without prior Web
experiences, can be quicker to get
Nagare because they have nothing to
"unlearn".
I am going deeper into this framework Since you said that your app is AJAX intensive. From what I have heard, Nagare makes it easy to do so...
All these frameworks are really good. Some are really good in some areas, others not. So may be explore them all & see which best suits your purpose.
For Web applications development, we're using Nagare, coming with YUI for AJAX communications.
Having a look to Nagare might be an option.
I'm in agreement with the rest of the answers and think that Django is by-far the best choice as a "complete framework" and I think their template system is second-to-none.
If you are looking to create an ajax intensive application, I'd suggestion checking out django-piston (http://bitbucket.org/jespern/django-piston/wiki/Home). Piston is a REST API framework built on top of Django. I've used it for a number of ajax intensive applications and have found it's workflow to be incredibly clean, quick and flexible.
If you are wanting to go a bit slimmer and lighter-weight though, I'd suggest checking out web.py (http://webpy.org/) or Tornado (http://www.tornadoweb.org/).
I would definitely look into Pylons which is very thoroughly documented and has sql alchemy (one of the best python ORM's) baked in. Plus it's easy to setup and learn.
I currently am working with a framework called restish which is flavor of pylons that (surprise, surprise) puts the focus on sticking to RESTful web design. I don't think it's exactly what you're looking for in that it lacks good documentation and any form of an ORM.
Just A side note I'm pretty sure that Django uses Mako templating which gives you excellent control over the HTML.