Live data from Hacker News

Ask HN: What web framework(s) do you guys use?

news.ycombinator.com

71–80 of 142 posts

Re: Ask HN: What web framework(s) do you guys use?

#72
post #63

Ruby + Sinatra for now. It's great for tiny services that work together. A full web service to implement '/add/1/2' is just require 'sinatra'; get('/add/:a/:b') { params[:a].to_i + params[:b].to_i }

Sinatra is definitely an interesting project. We recently "ported" it to JavaScript:

http://github.com/tlrobinson/jack/blob/030685ef3de4c29c38b4e...

The same webservice would be:

    roundabout.route({ path:"/add/{a}/{b}", get: function(){this.body = this.wildcards["a"] + this.wildcards["b"];} })
or, alternatively:

    roundabout.get("/add/{a}/{b}", function(){ this.body = this.wildcards.a + this.wildcards.b; });
The first syntax is a tad longer, but its much more useful; you can define any method with the name of an HTTP verb for that path, and you can also define a filter parameter that will be queried before the path is matched. The filter lets you do whatever pre-processing you want, so you could filter out requests from a specific user-agent for example, or all URLs that use mixed case, or anything else you can think of.

Re: Ask HN: What web framework(s) do you guys use?

#75
Struts2. Very lightweight and its gets out of your way.

Since it is Java we get to leverage some of the incredible Java libraries out there like Guice.

We've tried a few other frameworks. We build our prototype in web.py. Very simple, but I couldn't get used to not living in IntelliJ.

We tried a previous project in Rails, but it did too much 'magic' for us and the scaffolding seemed a bit too brittle.

To be fair the last time I used Rails in production was in the 1.1 days, so it's been a while.

Re: Ask HN: What web framework(s) do you guys use?

#76
post #72
post #63

Ruby + Sinatra for now. It's great for tiny services that work together. A full web service to implement '/add/1/2' is just require 'sinatra'; get('/add/:a/:b') { params[:a].to_i + params[:b].to_i }

Sinatra is definitely an interesting project. We recently "ported" it to JavaScript: http://github.com/tlrobinson/jack/blob/030685ef3de4c29c38b4e... The same webservice would be: roundabout.route({ path:"/add/{a}/{b}", get: function(){this.body = this.wildcards["a"] + this.wildcards["b"];} }) or, alternatively: roundabout.get("/add/{a}/{b}", function(){ this.body = this.wildcards.a + this.wildcards.b; }); The first s…

That looks really cool; how's that been working out? Is that in production? If Ruby had Gambit Scheme's serializable continuations, that would be pretty interesting times.

Re: Ask HN: What web framework(s) do you guys use?

#77
I wrote my own CMS/framework which I started about 8-9 years ago, so I use that. In my main business I sell a "pro" version of it as well as customization/hosting/etc, and naturally it's also the framework I use for my startup too. For those that are interested:

http://www.sitellite.org/

It's in PHP 4/5, GPL licensed, decently clean code (in 8 years there's obviously some cruft at this point :), but also has a few nice things built-in like a full CMS on top of it, multilingual support, a couple dozen modules that save some time, ORM library, and the ability to setup A/B tests just by editing a page, which is starting to come in handy these days.

Some challenges of rolling your own are that you have to write the documentation, and provide support/training/whatever else since developers aren't likely to be familiar with it (unless it's open and gains popularity). Some things to consider when weighing your options... :)

Re: Ask HN: What web framework(s) do you guys use?

#78
post #76
post #72

Earlier quoted context omitted.

Sinatra is definitely an interesting project. We recently "ported" it to JavaScript: http://github.com/tlrobinson/jack/blob/030685ef3de4c29c38b4e... The same webservice would be: roundabout.route({ path:"/add/{a}/{b}", get: function(){this.body = this.wildcards["a"] + this.wildcards["b"];} }) or, alternatively: roundabout.get("/add/{a}/{b}", function(){ this.body = this.wildcards.a + this.wildcards.b; }); The first s…

That looks really cool; how's that been working out? Is that in production? If Ruby had Gambit Scheme's serializable continuations, that would be pretty interesting times.

We're not yet using it in production, its only a few weeks old, but we will be in some of the things we're working on.

One of the main benefits is letting us run objective-j and cappuccino on the server, letting us share application data models in the client and the server.

Post reply on HN