stretchr / goweb

A lightweight RESTful web framework for Go
632 stars 61 forks source link

Design views in Goweb #15

Closed matryer closed 11 years ago

matryer commented 11 years ago

Views are a key part of web development, and if you're not building a data API you will likely be managing views in some way within Goweb.

We would like to implement a solution for new projects that will make managing views as easy as it is in Ruby on Rails.

Initial thinking:

jkoreska commented 11 years ago

Please, NO!

I've been scouring for a framework like this! After hitting your dead Google Code links a few times, I looked at the source of, I think, every other framework around - none of which met my requirements. I starting writing my own, exactly like this, until I found you by searching Github.

This is exactly the lean framework I want to build my API backends on (with rich front-ends). I don't want Views with all the Template and Helper baggage, just fast data serialization!

Just my 2 bits. I look forward to building with, and maybe even contributing to, this framework. Thanks!

tylerstillwater commented 11 years ago

Perhaps it would be best to make the view stuff part of another package and have it capable of tying strongly to goweb?

Sent from my iPhone

On Jun 3, 2013, at 6:09 PM, jkoreska notifications@github.com wrote:

Please, NO!

I've been scouring for a framework like this! After hitting your dead Google Code links a few times, I looked at the source of, I think, every other framework around - none of which met my requirements. I starting writing my own, exactly like this, until I found you by searching Github.

This is exactly the lean framework I want to build my API backends on (with rich front-ends). I don't want Views with all the Template and Helper baggage, just fast data serialization!

Just my 2 bits. I look forward to building with, and maybe even contributing to, this framework. Thanks!

— Reply to this email directly or view it on GitHub.

matryer commented 11 years ago

Great feedback, thanks.

I wonder if you'd be open to View stuff being added in a different repo that integrates with Goweb?

I appreciate you wouldn't use it, and in this case, you wouldn't need to.

Mat

On 3 Jun 2013, at 18:09, jkoreska notifications@github.com wrote:

Please, NO!

I've been scouring for a framework like this! After hitting your dead Google Code links a few times, I looked at the source of, I think, every other framework around - none of which met my requirements. I starting writing my own, exactly like this, until I found you by searching Github.

This is exactly the lean framework I want to build my API backends on (with rich front-ends). I don't want Views with all the Template and Helper baggage, just fast data serialization!

Just my 2 bits. I look forward to building with, and maybe even contributing to, this framework. Thanks!

— Reply to this email directly or view it on GitHub.

jkoreska commented 11 years ago

Admittedly, the NO was a bit harsh. I just feel like Views belong entirely client-side, these days.

Adding this may well add value to the framework. Factoring it out as a package would be ideal for someone like me though potentially messier to integrate.

matryer commented 11 years ago

We always write code split up by packages anyway - see the new Goweb structure for an example of what I mean.

I like client side views too - could Goweb help there?

On Jun 3, 2013, at 7:45 PM, jkoreska notifications@github.com wrote:

Admittedly, the NO was a bit harsh. I just feel like Views belong entirely client-side, these days.

Adding this may well add value to the framework. Factoring it out as a package would be ideal for someone like me though potentially messier to integrate.

— Reply to this email directly or view it on GitHub.

jkoreska commented 11 years ago

see the new Goweb structure for an example

I didn't know it was new but it looks good to me!

client side views - could Goweb help there?

Not sure, other than serving static templates but those would likely come from a cdn or nginx. I'm currently in love with AngularJS and I build native apps too so I'm thinking goweb for the backend API will be awesome.

matryer commented 11 years ago

Thanks.

You should also look at the goweb.API.SetStandardResponseObjectTransformer method, it gives you more control over what the standard response objects look like.

matryer commented 11 years ago

I guess views aren't a popular concept then.