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

deprecate app.render (make private) #1942

Closed
defunctzombie opened this issue Mar 1, 2014 · 12 comments
Closed

deprecate app.render (make private) #1942

defunctzombie opened this issue Mar 1, 2014 · 12 comments

Comments

@defunctzombie
Copy link
Contributor

First step in isolating the view system away from "app" level and towards something that can be used via middleware later.

@dougwilson dougwilson modified the milestone: 4.2.0 May 8, 2014
@dougwilson dougwilson added 4x and removed 4.x labels May 10, 2014
@dougwilson
Copy link
Contributor

Getting rid of these app.* stuff in 5.x will let us get rid of req.next as well (horray!)

@Fishrock123
Copy link
Contributor

@dougwilson should we target this for 4.x deprecation?

Tbh I can't even find app.render in the codebase..

@dougwilson
Copy link
Contributor

Tbh I can't even find app.render in the codebase..

https://github.com/strongloop/express/blob/master/lib/application.js#L477

@Fishrock123
Copy link
Contributor

Github search keeps becoming worse and worse. -_-

Actually I tried to search this via in-browser find. weird.

@defunctzombie
Copy link
Contributor Author

Any particular reason why?

On Friday, November 21, 2014, Jeremiah Senkpiel notifications@github.com
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
#1942 (comment).

@Fishrock123
Copy link
Contributor

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)

@dougwilson
Copy link
Contributor

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).

@Fishrock123
Copy link
Contributor

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.

@dougwilson
Copy link
Contributor

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.

@ilanbiala
Copy link

@dougwilson how will apps work without req.next()?

@dougwilson
Copy link
Contributor

@ilanbiala what apps use req.next() ? They should be calling the next() function passed as the argument to the middleware.

@ilanbiala
Copy link

Oh I thought deprecating req.next() was talking about the next argument. That makes more sense.

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

No branches or pull requests

5 participants