Release a JSON-only version

Mar 2, 2013 at 8:51 PM
On production development you know exactly that your services will work optimized for JSON.
Currently you have a lot of crap in the minified 76KB file that you don't need.
For example, would be great if you could release the base file with all the abstractions and then separate the ATOM and JSON handlers to separate files.

When using JSON only you'd probably download & parse & execute just half of the code!
May 6, 2013 at 8:03 AM
First of all, IMO clear and valid point DotNetWise makes. If there is content that will be served in only one of either JSON or ATOM format, this normally leads to a design, where a base module asnchronously loads the format code as needed. Nowadays with all the AMD magic working in the wild, this is bread and butter business. But in 2011 ... I guess not.

So, when looking at the current (1.1.1beta) code, I see a gzip'ed minified monolithic small blob of approx. 28 kilobytes which in many cases is quite ok for the functionality it delivers (in my experience).

Further inspecting by superficially grep'ing through the code it yields 43 lines where the case insensitive term atom is present together with function and 70 for json of 592 function lines (all comments stripped) found.

Digging a bit deeper, there is conditional merging/mixing/parameterizing in/with quite some functions going on in there, which gives me the impression, that the welcome clean split, might be not just a 1-2-3 snip-snip refactoring, but be more a redesign.

And in the latter case, one might also reconsider the current binding to the global window object, and where to bind if used as node.js module (somehow global, process or module.exports)?

After all, the HTTP header split code enhancement suggestions didn't make it into the code base until now, so I think currently there might be a developing resource problem, rendering a redesign request - at the moment - unrealistic (as seen from the outside).