[web2py] Re: Understanding web2py coming from a PHP background

2012-02-23 Thread pbreit
It's not a Python thing. It's a web development thing. URLs should typically correspond to one resource. That's an OK case for rewriting but quite different from the previous example. Depending on how necessary it is to avoid an extra URL segment, you could easily set it up as myserver.com/user

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Anthony
> > I have been reading further more and I found out that deploying Python > applications with Apache might be a better idea than nginx due to its > non-blocking nature and pythons, natural nature. > You don't have to stick with Apache. Nginx + uWSGI is another recommended configuration: http:

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Anthony
> > In PHP, I really like Kohana. All URL requests are first filtered through > URL mapping settings which can be extended and set in any way necessary. > Then depending on that URL routing, a controller is triggered either > because it's requested via the URL or because it's set as "default".

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Anthony
> > PHP allows writing stupid code. Because even if a part of the code starts > performing an infinite root or somthing, the process in the end dies > without affecting other connections or parts of the web-app. > > How does this work with Python? What happens if a part of the app, during > pr

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Anthony
On Wednesday, February 22, 2012 7:46:53 AM UTC-5, JeanM wrote: > > I see, but why is it poor app design? If you have, let's say, a social > network and you want user profiles to be displayed directly at > mysocialnetwork.com/username, then it would be necessary I don't think it would be poor de

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Anthony
> > Is it possible to have wildcard URL mappings without specifying the > controller in the url? > Say for instance if I want to have, "myurl.com/random1" and " > myurl.com/r4nd0m2" to be forwarded to a single controller to perform an > action within that controller, how can that be done with w

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Jean M.
I see, but why is it poor app design? If you have, let's say, a social network and you want user profiles to be displayed directly at mysocialnetwork.com/username, then it would be necessary, Could you tell why with Python would it be a poor design? I am asking to learn the essence of the cultu

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Jean M.
Hello again, I have been reading further more and I found out that deploying Python applications with Apache might be a better idea than nginx due to its non-blocking nature and pythons, natural nature. Once you set up Apache to work with mod_wsgi, is it enough to upload files like in a PHP fr

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread pbreit
Web2py sounds similar but you generally skp the mapping part and just name your controller files and functions according to how you want our urls structured. It works really well if ou keep our app cleanly designed and avoid the urge to do "dumb" things. There's a little bit of "magic" getting

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread pbreit
You can do it with URL rewrites but I'd advise against it. It's typically unnecessary and poor app design.

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread LightDot
In PHP, when an HTTP call is made, Apache, using the PHP, interpretes the > PHP file and sends the outcome. But python, an app needs to > be triggered with a specific port. Why is this so? I am not saying PHP is > better. I just want to understand the "how" python functions, > the fundamental

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Jean M.
Massimo, I have done some more technical reading and have a direct question about web2py's basics. I would like to ask why does web2py come with it's own wcgi daemon instead of relying on an apache with embded wcgi? Thank you.

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Jean M.
Hello Anthony, thank you for your answer. Is it possible to have wildcard URL mappings without specifying the controller in the url? Say for instance if I want to have, "myurl.com/random1" and "myurl.com/r4nd0m2" to be forwarded to a single controller to perform an action within that controlle

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread Jean M.
Good morning, This community is very understanding and helpful, I really appreciate the input from all of you. In PHP, I really like Kohana. All URL requests are first filtered through URL mapping settings which can be extended and set in any way necessary. Then depending on that URL routing,

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-22 Thread LightDot
Is there a specific PHP framework you use? Perhaps someone could offer some comparisons based on that. I used CakePHP a lot before starting with web2py and I always compared the two in the beginning. It's a natural thing to do, I guess.

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread pbreit
Not really. It's probably more like PHP than Java in that there isn't really any compiling. With more Python-based web development, you can edit files directly and the edits will be immediately visible in the browser. I'm sure some really sloppy code could cause some problems but I suspect it m

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Anthony
> > 3) What is web2py approach to configuration, settings and programming? > As noted, the only real configuration file is routes.py, which is optional and used for routing (URL rewrite and routes on error). In addition to the root routes.py file in the /web2py folder, you can also have app-spe

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Jean M.
Thank you, both of you. I am really struggling to understanding the very basics of how Python Web-apps work. Your answers do help. So basically, a python app (running on web2py or not) is actually an app, and it runs on Python interpreter (just like Java apps). So they also contain, naturally, t

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread pbreit
1) Python hosting is much harder than PHP hosting. While hosts that support Python should be able to support Web2py, that is not always the case because they don't support one of the web server communication mechanisms such as mod_wsgi or fastcgi. If the host supports Django apps, it should be

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Massimo Di Pierro
On Feb 21, 4:33 pm, "Jean M." wrote: > Hello, > > I am a PHP developer interested in understanding the fundamentals of web2py > framework and after reading the book and the documentation, I have some > questions which I would very much appreciate to have answered. > > 1) Why (or "is") a VPS is n