express
express copied to clipboard
deprecate app.render (make private)
First step in isolating the view system away from "app" level and towards something that can be used via middleware later.
Getting rid of these app.*
stuff in 5.x will let us get rid of req.next
as well (horray!)
@dougwilson should we target this for 4.x deprecation?
Tbh I can't even find app.render in the codebase..
Tbh I can't even find app.render in the codebase..
https://github.com/strongloop/express/blob/master/lib/application.js#L477
~~Github search keeps becoming worse and worse. -_-~~
Actually I tried to search this via in-browser find. weird.
Any particular reason why?
On Friday, November 21, 2014, Jeremiah Senkpiel [email protected] wrote:
@dougwilson https://github.com/dougwilson should we target this for 4.x deprecation?
Tbh I can't even find app.render in the codebase..
— Reply to this email directly or view it on GitHub https://github.com/strongloop/express/issues/1942#issuecomment-64063533.
Makes people aware of things that will be removed, and I wouldn't say this is the recommended method to use. (just render it from your template engine imo)
The problem is we cannot easily deprecate this, because res.render
calls this and there is no real good way to make res.render
not yell and yet make app.render
yell while still letting res.render
work with people overriding app.render
(backwards-compatibility).
make app.render a proxy to app._render, call app._render from res.render?
while still letting res.render work with people overriding app.render (backwards-compatibility).
oops, nevermind.
Also, I didn't say there was no way, because it's possible using some Object.defineProperty
tricks, but it's just not really worth the complexity to just show a deprecation.
@dougwilson how will apps work without req.next()
?
@ilanbiala what apps use req.next() ? They should be calling the next() function passed as the argument to the middleware.
Oh I thought deprecating req.next()
was talking about the next
argument. That makes more sense.