-
Notifications
You must be signed in to change notification settings - Fork 21
Frontend
Tom Hickerson edited this page Jun 27, 2021
·
8 revisions
Notes regarding cleanup/speedup of current frontend
Here are some candidates for retirement:
-
WEB-INF/jsp/tags: all files in folder
-
WEB-INF/jsp/include/admin-head-prev.jsp
-
WEB-INF/jsp/include/breadcrumb.jsp
-
WEB-INF/jsp/include/showTerms.jsp
-
WEB-INF/jsp/include/sidebar.jsp
-
WEB-INF/jsp/include/userbox-inactive.jsp
-
WEB-INF/jsp/login-include/header-login.jsp
-
WEB-INF/jsp/login-include/login-sidebar.jsp
Additional things to remove/change (in order of complexity, from minimum to maximum):
- Sitemesh library in pom.xml + its related decorator. This was a project that didn't catch on, but some code was put into production anyway. This can be removed and will not affect the build.
- All of the images which have text on them can be removed from the web\src\main\webapp\images folder, if they haven't been already. Examples include bt_Support and bt_Login.
- A lot of the CSS is outdated, which means you have many DIVs around a line of text to create a textbox. Example: https://gist.github.com/tomhickerson/db22c4afa1d6283c4cfb5ccda308f6e6
- Buttons could stand an update with pure CSS, as they are currently images with HTML text added to them.
- A lot of the global_functions_javascript.js file is specific to the repeating rows, and could be moved into another file which is not loaded for the majority of the JSPs.
- While on the subject of global_functions_javascript.js, I see several functions that were originally generated by Dreamweaver in the early 2000's with the prefix MM, i.e. MM_swapImage, etc. Those can probably go.
- There are a number of javascript functions in navbar.jsp such as confirmExitAction, confirmSubmit, etc which generate basic alerts, these should probably be removed and replaced with a styled popup.
- Prototype.js and Scriptaculous.js/Effects.js are still being used - those need to go, or at least trimmed down to not include everything (looking at effects.js on that point).
- Icons could probably use a fresher look with SVGs. Several free SVG collections exist, such as Font Awesome or Bootstrap Icons.
- jQuery should be updated, but this is a more complex ask as we have a lot of code running on it (esp in CRFs working with this). I'd recommend looking at the Upgrade Guide at https://jquery.com/upgrade-guide/3.0/.
- The javascript which runs the repeating rows in general is a bit of a tar pit and can be reworked/removed/replaced (look at global_functions_javascript.js if you don't believe me). I put this as dead last since it's a crucial piece of code, but if we upgraded jQuery, there is probably a helpful fix there (currently looking at http://jsfiddle.net/jbarreiros/vd7MB/ and it ain't bad).