-
Notifications
You must be signed in to change notification settings - Fork 671
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
Require all simplecacheable views to have a filename extension #8381
Comments
Lack of an extension also prevents seamless integration with AMD, in the case of JS files. |
This would unfortunately be a major breaking change that would break practically all plugins 1.8-style. :( |
So all simplecache views would basically be:
I suppose we could implement a limited set of aliases so extending |
Wrong button. |
When you say "PHP-less routing" do you mean served by the HTTPd directly? |
If so I don't see that as must-have since the entire cache/ URL space is trivially cacheable via Varnish and other HTTP caches. |
Yes, you have the right idea of what I'm going for. Yes, served by httpd directly. Varnish is a great point, and maybe that's a good enough reason to close this ticket. If we do decide that, then there is no reason to block movement of all static assets including images to the views system. I believe i recall @Srokap having concerns about this. |
Service through PHP also allows auto-minify, and I don't know how we'd direct HTTPds to the "correct" view location among the plugins. |
This is something we need to make a firm decision on for 2.0 |
All views are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
This opens up is the possibility that we'd be able to serve cached files directly off disk instead of via PHP for performance. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: This re-configures view location storage such that full paths are stored, not just paths to view directories. In particular, `elgg_get_view_location` and `elgg_set_view_location` return and expect full paths respectively. Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
All views under these directories are implicitly "hoisted" up one level. They are also given the appropriate extension: * js/view => view.js * css/view => view.css The main benefit this brings is being able to co-locate related assets. So a template (view.php) can have its CSS/JS dependencies right next to it (view.css, view.js). Compare to the current approach which is like so: * Template: page/components/module.php * CSS: css/elements/modules.php * JS: None in this case, but how would you know with any confidence? BREAKING CHANGE: Great care has been taken to make this change as backwards-compatible as possible, so you should not need to update any view references right away. However, you are certainly encouraged to move your JS and CSS views to their new, canonical locations. Certain uses of the `view,$view_name` and `view_vars,$view_name` hooks will not work. See the docs on "View aliases" for more info. Refs Elgg#8381 Fixes Elgg#8382
This opens up is the possibility that we'd be able to serve cached files directly off disk instead of via PHP for performance. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGE: We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to eventually serve assets directly from disk for performance, instead of serving them through PHP. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGE: We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to eventually serve assets directly from disk for performance, instead of serving them through PHP. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGE: We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to eventually serve assets directly from disk for performance, instead of serving them through PHP. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
…formance BREAKING CHANGES: Assets must have valid file extensions We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to serve assets directly from disk for performance, instead of serving them through PHP. Just create a symlink from /cache/ to /dataroot/views_simplecache/ and if your web server supports following symlinks, you'll get this benefit. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGES: Assets must have valid file extensions We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to serve assets directly from disk for performance, instead of serving them through PHP. Just create a symlink from /cache/ to /dataroot/views_simplecache/ and if your web server supports following symlinks, you'll get this benefit. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGES: Assets must have valid file extensions We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possibile for us to serve assets directly from disk for performance, instead of serving them through PHP. Just create a symlink from /cache/ to /dataroot/views_simplecache/ and if your web server supports following symlinks, you'll get this benefit. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
BREAKING CHANGES: Assets must have valid file extensions We now cache assets by `"$viewtype/$view"`, not `md5("$viewtype|$view")` which can result in conflicts between cacheable views that don't have file extensions to disambiguate files from directories. This requirement makes it possible for us to serve assets directly from disk for performance, instead of serving them through PHP. Just create a symlink from /cache/ to /dataroot/views_simplecache/ and if your web server supports following symlinks, you'll get this benefit. This also makes it much easier to explore the available cached resources by navigating to dataroot/views_simplecache and browsing around. Fixes Elgg#8381
The lack of an extension on views like js/elgg and css/elgg seems like the main reason we cannot have PHP-less routing of simplecached views. There is no way to have a filesystem that looks like so:
Note that this transition could be made in a 1.x plugin already, so authors wouldn't have to make this switch and upgrade to elgg 2.0 at the same time.
Can anyone think of a more automatic way to make this happen?
The text was updated successfully, but these errors were encountered: