Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1 release notes #344

Open
jpmnteiro opened this issue Oct 16, 2017 · 6 comments
Open

V1 release notes #344

jpmnteiro opened this issue Oct 16, 2017 · 6 comments

Comments

@jpmnteiro
Copy link

Hi,

Just noticed that v1 was released on nuget (yay for the project). Are there any release notes for this version and/or any migration path for folks who are upgrading from v0.9.9 (e.g, how can one change the default PathTranslator? what about the cache invalidation strategy?) you can point me to?

@AlexCuse
Copy link
Collaborator

All that I have written so far is in the release notes at https://www.nuget.org/packages/SquishIt (which becomes a legacy package containing only references with this release - in the future installing SquishIt.AspNet will be preferred).

From those release notes:

In SquishIt 1.0 this will become a legacy package. The library has been split into two - one containing the processing logic and the other containing ASP.net specific implementation. This will eliminate dependency on System.Web for users on Nancy and other platforms. In version 1.1 this package will be deprecated. For the ASP.net functionality that SquishIt traditionally provided the package SquishIt.AspNet can be installed - it will bring the framework with it.

There is also a new configuration API coming with the package split. Behavior modification and preprocessor registration can be achieved by calling SquishIt.Framework.Configuration.Apply with an Action that modifies the global configuration. The SquishIt.AspNet library will automatically register itself via PreApplicationStart method, as will all the preprocessors maintained as part of the SquishIt codebase.

I was planning to write something up in the next couple weeks as time allows but maybe we can work it out in this issue. I think the changes are pretty straightforward. That Apply method referenced takes an Action that allows you to override the default configuration at all the points that existed previously. Path translator and cache invalidation strategy can be manipulated in there for sure. See this file from the .AspNet package, which is wired up to execute automatically using WebActivator

https://github.com/jetheredge/SquishIt/blob/master/SquishIt.AspNet/ConfigurationLoader.cs

Hopefully the self registration will make things easier.

You may also want to look at the configuration itself https://github.com/jetheredge/SquishIt/blob/master/SquishIt.Framework/Configuration.cs

Typically stuff in the platform configuration would be changed by packages like SquishIt.AspNet but I can think of reasons you would want to implement your own path translator to deal with virtual directories or similar. If you need to override something like that, my advice is to call that Configuration.Apply method on Application_Start (or in Startup for an OWIN app) to ensure that it is executed AFTER all the referenced assemblies register themselves rather than on loading the assembly.

Thanks and let me know any issues you run into, it will help make whatever "upgrade guide" I put together more useful.

@jpmnteiro
Copy link
Author

Hey @AlexCuse, thanks for the write up, good to know the path the project is taking (and to reiterate, thank you for this, it's been massively helpful).

I'll try to update to v1 (again) soon and I'll let you know which parts of the upgrade cause me trouble so you can add them to the "guide" if they make sense.

@AlexCuse
Copy link
Collaborator

Great let me know how you get on.

Curious why you need to override the path translator - are you using Nancy, or do you have an odd virtual directory setup?

@jpmnteiro
Copy link
Author

@AlexCuse using Nancy on a website that can be hosted on IIS or self hosted (using OWIN/Katana). Due to the way the self host is written, the paths need to be translated to work correctly.

@AlexCuse
Copy link
Collaborator

You might be the perfect person to be guinea pigging this stuff - the main reason for the package split was to dump the System.Web baggage from the main library and make it easier for people using Nancy and similar. I hope to publish a SquishIt.Nancy package eventually but don't really know it well enough at this point (have only used nancy for stuff marginally more complex than hello world).

@jpmnteiro
Copy link
Author

Happy to help, just let me know what you need.

Getting rid of System.Web is a great direction IMHO. It certainly caters to people using Nancy and/or Suave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants