|
|
|
|
|
by ionrock
5750 days ago
|
|
Personally, I'd avoid node.js. It is most definitely cool, interesting and has been proving itself useful, but (!) there are a lot of details that won't come up until you really need them. If you're focusing on business logic and you already have a rather large set of applications that are relatively "bleeding edge", then I'd stick to a language that has a bit more history on the basics. It is the really simple things like form parsing and cookies/sessions that may not be fully fleshed out in Node.js. Not that it won't be soon, but it is a nightmare to spend time on low level issues when you don't have to. This has always been the issue trying new languages and frameworks for projects. I get part of the way there and realize that some basic aspect of web development hasn't been done. Sometimes I start to handle the issues, but if the project is something I want to finish, it usually ends up with me turning back to Python. This might be a bad reflection on myself, but when you want to get something done that doesn't need the latest/greatest tech, it is nothing but frustrating to hit your head against a wall doing basics. Just my two cents! |
|
I was trying to get out a huge concept in my head, and probably wasn't very clear. The real "web development" will be happening in CouchApp. I'm just putting node.js in front to provide a couple services, each of which I expect to be very small.
I'm expecting to write well less than 100 lines of node.js code to interface in front of CouchApp. Basically, it will just provide a quick lookup into the routes, and switch between two CouchApp handlers for certain pages depending on if the user is authenticated (Eg: if you look at profile of user Y, it woudl be good to know if you're logged in as user Y and thus can edit the profile, or are some other user, and thus see only the public info for user Y.) Also, to pull results from a couple lists or shows and compose them into a single page, which has to be done outside of CouchApp... but really isn't very complicated.
The caching bit will simply be checking to see if the etag for a page in couchapp is in redis, if it is, update its TTL to keep it fresh and send it to the user, if it isn't then get the full/new page from CouchApp, push it into redis and send it along. This will be problematic if the APIs for redis and couchapp are sychronous in their node.js drivers. Will have to check on that.
Anyway, like I said, I'd be interested in hearing of a good replacement for node.js.
Just need something I can write a simple caching, routing code in... have looked at webmachine a bit, and it might be better... not sure I can pull erlang out of the couch an run it, though.
Twisted may also be a possibility.