rainjs/rainjs — pull request #55 by d-werner (2013-02-22 16:22:14+00:00)
Title: Minification preparation

Hi Ciprian!

I'm finally coming back to the JavaScript minification (s. http://wiki.intranet.1and1.com/bin/view/Devhost/RainMinification). Do you remember the implications? ;-)

It only works if RequireJS' define and require.load functions are not overwritten, which is currently done to pass the translator and logger helpers to the client controller.
And the agreed solution is to move both helpers in the controller's context object.

We implemented it today. Though instead of attaching the translator to the context, we attached functions "t" and "tn" directly to the view controller itself.
Due to convenience reasons and as it is normally just used for the controllers' view.

Whereas logging is a platform functionality which we attached to the context.
Also not via a logging object, but directly to the context itself. Convenience again. ;-)

What do you think?

As migration path you could introduce the logging and translation functions in the context and controller and remove the dependencies.js not until the DSSA and PSSA have been adapted.

Regards,
Dave