Nuget package, Caching Support and more

11 views
Skip to first unread message

Pedro Reys

unread,
Mar 7, 2011, 1:44:23 PM3/7/11
to restfuli...@googlegroups.com
Hey y'all,

This weekend I added Restfulie Server as a package on Nuget gallery.

One can now do: Install-Package restfulie.net to get Restfulie Server using Nuget.

I also started working on caching support for Restfulie.Server.

I'm not pushing anything yet to Mauricio's repo. I've been pushing it to a caching branch on my own fork. When I get it ready I'll push it to master on Mauricio's repo.

So far I added ETag and Last-Modified support on the response.

 I created a separate interface for cacheable resources, IBehaveAsCacheableResource , as I see caching as an explicit, opt-in, feature. 

While working on the caching I felt the need for a automated end-to-end test. What I want is to have the test MVC app running, and execute a request ans inspect the response.

I, one more time, learned the lesson of how valuable end-to-end tests are as while I thought I was done with the ETags, as all my unit testing were passing, when I tried to run the sample MVC and test it and I realized that the
ETag Header was not being included in the response, although it was being set on the Cache Headers. I later realized that the default Cacheability used by ASP.NET is private and, when private,  the ETag Header is suppressed from the response. All I had to do was to set it to be ServerAndPrivate. 

Anyway, I just told y'all that because I'm checking options that we can use to run this kind of end-to-end tests as part of the automated build.

I checked IIS Express but it's not XCopy deployment friendly. I'm checking CassiniDev now and I believe it will be enough for our needs.

It's also on my radar to get our build running on the Teamcity Server of CodeBetter guys. I just want to find a solution to the end-to-end tests and will talk to them to get us a CI server. 

- Pedro Reys

Guilherme Silveira

unread,
Mar 10, 2011, 6:09:24 AM3/10/11
to restfuli...@googlegroups.com
Hi Pedro!

Nice job! Well, integrate sooner than later is always better.
You are right about caching headers. Most frameworks (Rails included)
include 'random' cache headers that guess your desired behavior...

Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Mauricio Aniche

unread,
Mar 10, 2011, 10:15:18 AM3/10/11
to restfuli...@googlegroups.com, Guilherme Silveira
Hi Pedro,

Nice!

I agree with the separate interface. Only one suggestion: can you
rename the "GetEtag()" method to something else? ETag is very
http-specific, and you are coupling it to the protocol. Maybe a
"GetVersion()" or something like that. What do you think?

Also, I agree that we DO need integration tests for restfulie. We are
dealing with infrastructure all the time. I have started a ruby
project that does some requests to the restfulie.net web project
example. You can see it here:
https://github.com/mauricioaniche/restfulie-tests . Maybe we can
evolve it!

If you get us a CI, that would help us a lot! :)

Do you need any help with the implementation? As soon as you finish
it, send me a pull request, please!

Regards,
Mauricio

Reply all
Reply to author
Forward
0 new messages