pilsprog / netchallonged

A programming challenge system.
http://codephun.com
1 stars 1 forks source link

Initialize web framework (or not) #1

Closed steinbitglis closed 12 years ago

steinbitglis commented 12 years ago

Decide whether we should use:

http://stackoverflow.com/questions/958258/anyone-not-using-a-web-framework-why

Do it!

technocake commented 12 years ago

Neither of us have experience using Rails nor Django. On the other hand, both these frameworks have a massive bunch of users, and good documentation / help to find on the interwebz. So my question then is: Is it too much to dwelve into how to use Django / Rails ? What benefits does it give us?

I really liked the principle steinbitglis introduced: Build on what you need. We don't need a hangar ship to cross a river.

I feel we would have to test the different frameworks to see what they really feels like. Are they typing with us or against us:P?

technocake commented 12 years ago

http://mustache.github.com/mustache.5.html

Mustache seems very straight-forward.

steinbitglis commented 12 years ago

I want to play with CouchDB. Let's just steer clear of Django and Rails for the moment and worry about frameworks later?

In the worst case, we will experience how much it takes to develop our own framework. That's a good thing.

technocake commented 12 years ago

Im opting for dropping rails and Django too. However, I think we should understand the diffeence between mongoDB and couchDB before choosing our db backend.

As I understood it, couchDB is a giant list of Key, Value pairs. Where the values are JSON documents. They are both pretty similar, but couchDB is perphaps too simple. MongoDB is the same?

I see there is a difference between how to handle queries. (snatched from: http://stackoverflow.com/questions/1990086/are-mongodb-and-couchdb-perfect-substitutes )

Quote begin - I've actually used both pretty extensively, both for very different projects.

I'd say they are equally well suited for the requirements you list, however there are quite a lot of differences between the two. IMO the biggest is their query-ability. CouchDB doesn't have 'queries' in the RDBMS sense (select * from ...) but instead uses 'views' which are more like stored procedures (essentially, static queries defined in the database (1)). MongoDB has much more 'usual' querying.

Essentially it comes down to your application requirements. If you give more information I might be able to shed some more light on what might matter in that situation.

(1): you can have temporarily, non-static queries in CouchDB but they aren't recommended for production use

Thats cool, you shape the way you interact with the db (couchDB) from within the db itself :D.

OK, I'm almost convinced CouchDB is the db to go.

steinbitglis commented 12 years ago

We're not qualified to make this decision properly, so let's not.

http://www.mongodb.org/display/DOCS/Comparing+Mongo+DB+and+Couch+DB http://www.ted.com/talks/dan_gilbert_asks_why_are_we_happy.html

Frankly, at this point, I don't care if we pick the best one or not. I'm just happy to have some fun task to solve, some tool to do it with and a team to collaborate with. Hell I've solved sudoku puzzles from stdin with prolog once. It was like creating a site with nginx and assembler :-) That was fun too!

technocake commented 12 years ago

Ok, that convinced me. Im voting: CouchDB + Mustache.

Now for the Some Server-Language-X: I'm voting python. Mainly because thats the same language as the server is written in, and most of us are variously familiar with the language.

A natural alternative is the good old fashioned php. Since couchDB is REST based, it should not be too hard making a php binding. Or to find one :).

Both these candidates is based on the assumption that the web-framework will run on Apache (which is ready and setup on pompel.komsys.org). Is that a good assumption?

steinbitglis commented 12 years ago

Assuming you're more comfortable with using Apache, that's what we'll do. Otherwise, lighttpd is also cool. I've had quite effortless migrations from Apache to lighttpd before, so it doesn't really matter.

I have not had the opportunity to use PHP in a proper way before. Last time I used it, I often had ~10x code replication. That's a long time ago.

I think python will fit nicely with the rest of the system. But let's try and keep the web server as independent as possible. Looking forward to start hacking :-)

steinbitglis commented 12 years ago

Here's a fantastic couch wiki http://wiki.apache.org/couchdb/

steinbitglis commented 12 years ago

Client: JavaScript + JQuery Server: Python 2.7 + CouchDB (using JavaScript for queries)

JavaScript Mustache will be used on the client and Python Mustache on the server, if the need for templates arises.