Python Noob - a couple questions involving a web app

K

Kyle T. Jones

Been programming for a long time, but just starting out with Python.
Not a professional programmer, just that guy in one of those
organizations that won't hire a pro, instead saying "Hey, Kyle knows
computer stuff - let's have him do this (and that, and the other, etc)".

So, the higher ups want a web app that'll let them enter (from an
intranet page) a rather simple, but quite lengthy, list - details to be
stored in a MySQL database... just normal stuff here, entering, editing,
and deleting entries, sorting, etc.

On the internet side of things, folks get the info served up to them,
can sort it in a few ways, etc - it's pretty basic stuff.

So, normally, I'd just put something together with Javascript and some
PHP scripts on the back end - so the Javascript is used to make
requests, the php stuff makes the calls to the database then returns the
appropriate info.

I was thinking of doing the backend using Python instead of PHP - more
just to get some hands-on experience with the language than anything else.

So, first - is that a non-starter? - in other words, is it just
something that lends itself more to PHP than Python? That's how I would
normally do it, just thought this would be a good opportunity to get
some "practice" with Python. And I know Python supports MySQL
interactions, which, other than returning some info, is all that really
needs to be done server-side.

In a broader sense, any suggestions in terms of what I should be wary of
on the security side of things - the internet component I mentioned is
universally accessible... but the database itself can't be accessed that
way directly (requests have to be sent to the PHP/Python scripts, which
do have access to the MySQL stuff...)

Any thoughts or suggestions are appreciated!

Cheers.
 
A

Arnaud Delobelle

Kyle T. Jones said:
Been programming for a long time, but just starting out with
Python. Not a professional programmer, just that guy in one of those
organizations that won't hire a pro, instead saying "Hey, Kyle knows
computer stuff - let's have him do this (and that, and the other,
etc)".

So, the higher ups want a web app that'll let them enter (from an
intranet page) a rather simple, but quite lengthy, list - details to
be stored in a MySQL database... just normal stuff here, entering,
editing, and deleting entries, sorting, etc.

On the internet side of things, folks get the info served up to them,
can sort it in a few ways, etc - it's pretty basic stuff.

So, normally, I'd just put something together with Javascript and some
PHP scripts on the back end - so the Javascript is used to make
requests, the php stuff makes the calls to the database then returns
the appropriate info.

I was thinking of doing the backend using Python instead of PHP - more
just to get some hands-on experience with the language than anything
else.

So, first - is that a non-starter? - in other words, is it just
something that lends itself more to PHP than Python? That's how I
would normally do it, just thought this would be a good opportunity to
get some "practice" with Python. And I know Python supports MySQL
interactions, which, other than returning some info, is all that
really needs to be done server-side.

In a broader sense, any suggestions in terms of what I should be wary
of on the security side of things - the internet component I mentioned
is universally accessible... but the database itself can't be accessed
that way directly (requests have to be sent to the PHP/Python scripts,
which do have access to the MySQL stuff...)

Any thoughts or suggestions are appreciated!

Cheers.

It seems to me that it would be worth having a look at django
(http://djangoproject.com), a web framework that provides a lot of
functionality out of the box and easy integration with mysql (and other
database engines). It has good documentation and a good tutorial as
well. It has plenty of users and is actively developed.
 
E

Emile van Sebille

Kyle T. Jones wrote:
So, the higher ups want a web app that'll let them enter (from an
intranet page) a rather simple, but quite lengthy, list - details to be
stored in a MySQL database... just normal stuff here, entering, editing,
and deleting entries, sorting, etc.

The last couple times I've needed this kind of thing I've been real
pleased with Django.

YMMV,

Emile
 
B

Bruno Desthuilliers

Kyle T. Jones a écrit :
Been programming for a long time, but just starting out with Python. Not
a professional programmer, just that guy in one of those organizations
that won't hire a pro, instead saying "Hey, Kyle knows computer stuff -
let's have him do this (and that, and the other, etc)".

So, the higher ups want a web app that'll let them enter (from an
intranet page) a rather simple, but quite lengthy, list - details to be
stored in a MySQL database... just normal stuff here, entering, editing,
and deleting entries, sorting, etc.

On the internet side of things, folks get the info served up to them,
can sort it in a few ways, etc - it's pretty basic stuff.
(snip)

I can only second Arnaud and Emile : Django is very probably what you're
looking for, and by all means better than any PHP thingie - wrt/ both
development time and security.

You'll indeed first have to learn the framework (and Python of course),
and learn how to deploy your app in production (which can be a bit
tricky if you're not familiar with server admin), but there's a good
documentation and a very helpful community around both the Django
framework and the Python language.
 
K

Kyle T. Jones

Bruno Desthuilliers, my dear, dear friend, there was this time, oh,
4/29/2009 3:02 AM or thereabouts, when you let the following craziness
loose on Usenet:
Kyle T. Jones a écrit :
(snip)

I can only second Arnaud and Emile : Django is very probably what you're
looking for, and by all means better than any PHP thingie - wrt/ both
development time and security.

You'll indeed first have to learn the framework (and Python of course),
and learn how to deploy your app in production (which can be a bit
tricky if you're not familiar with server admin), but there's a good
documentation and a very helpful community around both the Django
framework and the Python language.

Thanks everyone! Wow, pretty much a consensus - a rarity with these
"types" of questions, at least in my experience.

Ok, sounds like I need to be looking at Django. Thanks for the advice!

Cheers!
 
D

David Smith

Kyle said:
Bruno Desthuilliers, my dear, dear friend, there was this time, oh,
4/29/2009 3:02 AM or thereabouts, when you let the following craziness
loose on Usenet:

Thanks everyone! Wow, pretty much a consensus - a rarity with these
"types" of questions, at least in my experience.

Ok, sounds like I need to be looking at Django. Thanks for the advice!

Cheers!

Consensus?! ... that just won't do. :)

I've started with Pylons and have found it very nice. Loose enough to
tinker with the inner workings but complete and working right out of the
box (or paster in Pylons case).

--David
 
B

Bruno Desthuilliers

David Smith a écrit :
Kyle T. Jones wrote:

(snip question and answers recommending Django)
Consensus?! ... that just won't do. :)
>
I've started with Pylons and have found it very nice. Loose enough to
tinker with the inner workings but complete and working right out of the
box (or paster in Pylons case).

Pylons is great too. But it requires much more Python knowledge, and
learning half a dozen dictinct packages. Which is why I wouldn't
recommand it here.
 
C

Carl Banks

Been programming for a long time, but just starting out with Python.
Not a professional programmer, just that guy in one of those
organizations that won't hire a pro, instead saying "Hey, Kyle knows
computer stuff - let's have him do this (and that, and the other, etc)".

So, the higher ups want a web app that'll let them enter (from an
intranet page) a rather simple, but quite lengthy, list - details to be
stored in a MySQL database... just normal stuff here, entering, editing,
and deleting entries, sorting, etc.

On the internet side of things, folks get the info served up to them,
can sort it in a few ways, etc - it's pretty basic stuff.

So, normally, I'd just put something together with Javascript and some
PHP scripts on the back end - so the Javascript is used to make
requests, the php stuff makes the calls to the database then returns the
appropriate info.

I was thinking of doing the backend using Python instead of PHP - more
just to get some hands-on experience with the language than anything else..

So, first - is that a non-starter? - in other words, is it just
something that lends itself more to PHP than Python?  That's how I would
normally do it, just thought this would be a good opportunity to get
some "practice" with Python.  And I know Python supports MySQL
interactions, which, other than returning some info, is all that really
needs to be done server-side.

In a broader sense, any suggestions in terms of what I should be wary of
on the security side of things - the internet component I mentioned is
universally accessible... but the database itself can't be accessed that
way directly (requests have to be sent to the PHP/Python scripts, which
do have access to the MySQL stuff...)

Any thoughts or suggestions are appreciated!

I will echo the recommendations for Django.

I looked at Django hoping to write a personal little app to manage
some personal data. It turns out I didn't have to write an app at
all. Django comes with a spiffy and versatile content editor, all I
had to do was input the database schema and configure the data entry
fields.

I figure you and your bosses can do the same thing to manage your
private Wolverine image stash.


Carl Banks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top