• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Language/Framework Rec for New Build (RoR too much, but Python?)

stim

n00b
Joined
Jul 17, 2010
Messages
49
Hey all,

I'm in the initial stages of planning out a new website and I really want to make sure I get the inside scoop on my options when it comes to implementation.

My background includes only rudimentary coding experience, but I do have a few years of SQL and basic HTML/CSS under my belt.

At its core, my project really only requires a text field and submit button on the front end, and then server-side scripts to interpret input and interface with what will hopefully become a large database handling multiple concurrent connections.

I started to explore Python through the MIT OpenCourseWare series, which I would highly recommend for anyone interested in a free, lecture and example-oriented crash course in the language.

After digging around for a while, I caved and started in on a full Ruby on Rails implementation, but after working through a few sample programs it looks like this may be way more than I need. I don't need tons of views, lists, etc etc. I'm not building basecamp or twitter, just something to take an input, run logic and kick out a new string. quick and easy.

Future features could include mining and visualizing the database, as well as browser add-ins.

What do you guys think? Is the magic of python where it's at? Is RoR still an option for such a simple setup? Should I give up my ophidiophilia and skinny-jean wishes for the pragmatic ubiquity of PHP?
 
You could do it in Python+Django, perhaps? It seemed fairly nice (and well documented) last time I used it.

That said, all frameworks will have some overhead - on the trivial end, it's easier to just bang together some PHP.
 
If you plan on writing a really simple web app, don't bother with a complicated framework. A lot of frameworks abstract away the DB to the point where your RDBMS is just an object store - the worst of both worlds. Just find something lightweight that abstracts out some of the low-level CGI/wscgi stuff and gives you a good templating engine. I hear a lot of good things about Pylons and web2p - they give you a solid MVC base to work from but don't completely dictate how your whole app should be designed.

Alternately, if you're just getting started, deal with the low-level stuff yourself so you know what's actually going on. Starting from scratch with CGI/wsgi will give you a lean, simple, lightweight app that only does what you need it to. Along the way, you get to learn all the 'magic' that a rich framework provides you with.
 
What do you need to return? Are you saving data to a DB or something? If not, why not just use plain-ol' Javascript? Are you required to use a server-side language? If RoR is too much, then why would you need Python? Javascript can do a lot of work on strings (Regex included!) and works great for simple webapps.

On a side note: thank you for the MIT OpenCourseWare link. I've never heard of that. You just gave me something to do when I run out of work on my coop. I know some python, but this will definitely build me up. Kudos.
 
If you plan on writing a really simple web app, don't bother with a complicated framework. A lot of frameworks abstract away the DB to the point where your RDBMS is just an object store - the worst of both worlds.

Eh, a decent ORM can be a nice thing to have. If you're just using the DB as a data store for tabular data with some foreign key links, and the queries are simple selects/updates/inserts, you might as well let a framework handle the busywork of writing the actual SQL.

In a project on that kind of scale, it can also make for nice readable code: Using Django and python as an example, it's relaxing to be able to write code like this:
Code:
# value__gte=X means "value greater than or equal to X".

# In idiomatic python, with a list comprehension:
owners = [ c.owner for c in  Car.objects.filter(value__gte=100000) ]

# or as a for loop:
owners=[]
for car in Car.objects.filter(value__gte=100000) :
    owners.append(car.owner)
 
What do you need to return? Are you saving data to a DB or something? If not, why not just use plain-ol' Javascript? Are you required to use a server-side language? If RoR is too much, then why would you need Python? Javascript can do a lot of work on strings (Regex included!) and works great for simple webapps.

Yea, doing DB checks and updates on each entry. Output for first-attempt program is just new a text string delivered back into the main page. (there's a little AJAX magic, eh?)

On a side note: thank you for the MIT OpenCourseWare link. I've never heard of that. You just gave me something to do when I run out of work on my coop. I know some python, but this will definitely build me up. Kudos.

Yea, definitely check it out. There are a bunch of random classes, but the intro to python course is under "Intro to CS".

Eh, a decent ORM can be a nice thing to have. If you're just using the DB as a data store for tabular data with some foreign key links, and the queries are simple selects/updates/inserts, you might as well let a framework handle the busywork of writing the actual SQL.

Heh. SQL is the one thing I could actually do right out of the box for this.


Allright, gonna dig into Pylons and check around for other lightweight frameworks. I also just found this site for some example code. http://showmedo.com/videotutorials/python (kind of like a free peepcode for python)
 
Back
Top