Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Initial commit to return /client to the URL include paths #758

Merged
merged 1 commit into from
Aug 14, 2015

Conversation

trainerbill
Copy link
Contributor

Not ready to merge yet. Need to collaborate on someone more familiar with the inner Node workings. @lirantal @ilanbiala @rhutchison

@lirantal
Copy link
Member

lirantal commented Aug 5, 2015

@trainerbill I think it would be cleaner if we we don't /public or /client in the URL. I thought the whole point was to remove it, not add it.

@trainerbill
Copy link
Contributor Author

@lirantal The issue is the /client was being removed from the URL. So when you are making custom modules you have to include views etc using /modules/whatever/views and not the real path /modules/whatever/client/views. According the the linked issue people thought that was awkward and wanted client in the URL.

@codydaig
Copy link
Member

codydaig commented Aug 5, 2015

I'd prefer to have /client in the url. It's so unintuitive to not have it in the URL. For the Favicon for example, if referencing it on the server side you use /modules/core/client/img/brand/favicon.ico but to reference the same file on the client side you use /modules/core/img/brand/favicon.ico

@lirantal
Copy link
Member

lirantal commented Aug 5, 2015

I see what you're saying, it's just very odd to me that we refer to the '/client/' as part of the URL because it seems something semantic.

If it makes sense to you and others then I won't be the one to deny the change.

@trainerbill
Copy link
Contributor Author

@lirantal Honestly I say that we add the /client back so that development is easy. It should reference the absolute path for clarity. Then we use this:

https://www.npmjs.com/package/gulp-ng-templates

which will minify the html and put them all the views in a JS file so that they are loaded directly. This would significantly improve performance as well.

@rhutchison thoughts?

@lirantal
Copy link
Member

lirantal commented Aug 5, 2015

I don't want to depend on the templating solution though because others may
not choose to use it either.

Let's hear what others have to say...
On Aug 5, 2015 7:43 PM, "trainerbill" [email protected] wrote:

@lirantal https://github.com/lirantal Honestly I say that we add the
/client back so that development is easy. It should reference the absolute
path for clarity. Then we use this:

https://www.npmjs.com/package/gulp-ng-templates

which will minify the html and put them all the views in a JS file so that
they are loaded directly. This would significantly improve performance as
well.

@rhutchison https://github.com/rhutchison thoughts?


Reply to this email directly or view it on GitHub
#758 (comment).

@codydaig
Copy link
Member

codydaig commented Aug 7, 2015

@rhutchison Didn't you have another solution somewhere about caching the templates on load?

@trainerbill
Copy link
Contributor Author

I think we should merge this to keep consistency throughout the app. The sooner the better since it touches so many files.

@lirantal
Copy link
Member

@trainerbill with reagrds to your comment on /public folder

/public is still being removed. Should we take this out as well? I kinda like /public not being there and looking directly for /lib
what does it mean that /public is being removed? I actually say that if we are going for explicitness then just like we made sure that /client/ is part of the part then so should be /public

WDYT?

@trainerbill
Copy link
Contributor Author

@lirantal My initial thought is to leave the /public being removed as that is how most other frameworks work I think. It is usually assumed that /public is the root of the pubically available resources and that you don't have to include /public when using them. IMO.

Honestly would like some others to weigh in on this.

@lirantal
Copy link
Member

@trainerbill I'm voting for making /public/ as part of the path because /client/ is also part of it, so it makes sense to keep it consistent.

But I agree, we need more eyes.

@codydaig
Copy link
Member

IMO, I like the /public.

@trainerbill
Copy link
Contributor Author

@codydaig You want the /public in the url or you want to remove it like it is currently doing?

@codydaig
Copy link
Member

@trainerbill I would like to see it in the URL, not how it's been removed for a while.

@lirantal
Copy link
Member

then me and @codydaig are on the same page.

@lirantal lirantal added this to the 0.4.x milestone Aug 12, 2015
Conflict Resolve

Fixed Karma testing

Added back cacheIDFromPath as I am not sure what that does.  Just removed the replaceing of /client
@trainerbill
Copy link
Contributor Author

@lirantal @codydaig I have this PR up to date and ready. I honestly think that /public can be removed as that is how most frameworks handle it... The root of the server is /public from express.js:

// Setting the app router and static folder
  app.use('/', express.static(path.resolve('./public')));

Can we merge this PR and have a separate discussion on /public?

@lirantal
Copy link
Member

OK with me.

@codydaig
Copy link
Member

Sounds good to me.

@lirantal
Copy link
Member

Good then.

lirantal added a commit that referenced this pull request Aug 14, 2015
Initial commit to return /client to the URL include paths
@lirantal lirantal merged commit 86b16c9 into meanjs:master Aug 14, 2015
@codydaig
Copy link
Member

@trainerbill Do you want to do the PR for /public, or do you want me too?

@trainerbill
Copy link
Contributor Author

@codydaig Honestly I don't think we should remove the /public as the root of the client side server is defined there. Most frameworks do the same thing and definitely don't include the /public in client side includes. I will leave it up to you guys. @lirantal

@lirantal
Copy link
Member

I don't have a stronger argument than my previous one which is to be consistent in the URLs, meaning we either "remove the magic" and make all URLs explicit, or we don't. At the moment /client/ is explicitly there but /public/ is not.

Maybe someone else will have more to contribute, but anyway if we want to pursue this then this requires a new issue, let's not hijack this PR too much.

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

Successfully merging this pull request may close these issues.

3 participants