IncludeCombiner now part of MVCContrib

Dec 12, 2009 at 5:19 AM

A 'competing' project was recently included in MVCContrib.

http://github.com/petemounce/includecombiner

This one lets you put stuff like this in your view:

<% Html.IncludeCss("~/content/css/Stylesheet3.css"); %>

Then through a config setting, you define how that is delivered, etc.

Also, Telerik has released a free version of something very similar

http://telerikaspnetmvc.codeplex.com/

And telerik - although including more than just resource work - does about the same thing.

 

What do you think of those compared to yours?  Just trying to evaluate - do not mean anything by this question.

 

Coordinator
Dec 13, 2009 at 3:21 PM

@waynebrantley: thanks for letting me know about these software.  I'll look into them and share my thoughts in this thread later.  If you already use these and have your opinions, feel free to share.  It's great if there're good things in these 2 that fit Combres' philosophy and could be implemented in Combres.

 

Coordinator
Dec 14, 2009 at 10:02 AM

I've read through the source code of the Combine Include (1.5) and Telerik (Q3.1103) and there are some quick thoughts. 

Include Combiner.  This is a pretty immature implementation.  I don't think it's ready for production use of most web apps due to the lack of features.  Below are some observed pitfalls (in comparison with Combres).

  • Tied to ASP.NET MVC
  • Resources are not organized in set, but instead included individually for each page. 
    • Modification to things like cache, minification etc. must be done per resource
    • Each page basically has its own"virtual" CSS and JS resource sets (or only 1 of them) which are downloaded in 2 requests, so shared scripts & CSS must be redownloaded for each page
  • No server-side caching, resource content is fetched for every request
  • Setting is stored in web.config, thus even a minor modification of 1 single resource forces the whole application restart
  • Can't flexibly control version number
  • Dynamic/remote resources aren't supported - the architecture doesn't seem to be designed to accommodate multiple resource sources
  • No filtering mechanism to enhance resources

Telerik MVC.  This looks pretty robust, although the lack of documentation makes it hard for me to really do a full comparison.  I probably need more time to learn from it, but here are a few initial observations:

  • Dual-licensed under GPL and commercial license
  • Settings are controlled via code or web.config - thus force page/application recompilation per change
  • Minification and filtering are not supported
  • Cache headers/etag are not generated
  • No filtering mechanism supported
  • Can't flexibly control version number of resource set
  • Doesn't seem to support dynamic resources (although does support resources from CDN)
  • The fluent-API object model looks pretty nice

This is just a cursory review, I'm sure there are many nice things in these libraries that might fit the needs of some projects.  It would be great if anyone already used these libraries share their thoughts here.  I'm particular interested in knowing if there's any cool features in these libraries that fit Combres' philosophy & should be added into Combres.

Dec 14, 2009 at 5:41 PM

Thanks.

I agree with what you said mostly and yours looks great.

Couple of points:

1)  "although does support resources from CDN" - this is an absolute requirement.  In your software - I simply will not include the resources from CDN in my 'set' that you output.  I want the CDN resource to go exactly as I specify - to take advantage of CDN caching and user never having to download jquery.  :-)

2)  fluent-api and script combiner.  This is nice and they are actually implementing something like I was describing in my previous post.  This lets them combine up the UNIQUE set of scripts requested by the total page rendering and deliver that!