[buddypress-trac] [BuddyPress Trac] #5735: Modernise JS
buddypress-trac
noreply at wordpress.org
Sat Jul 5 10:47:14 UTC 2014
#5735: Modernise JS
----------------------------+-----------------
Reporter: DJPaul | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.2
Component: All Components | Version:
Severity: normal | Keywords:
----------------------------+-----------------
BP's JS is overdue to be updated and re-written to modern standards. Most
of what we have now (even inside the templates, which was copied from BP-
Default) has remaining untouched for a few years. The biggest problems
with the current JS that I'd like to see addressed are:
* Code quality is inconsistent (some is OK, most is bad).
* Which makes it unnecessarily challenging when we want to update existing
JS.
* It's spread across many files throughout core packages (i.e. the widget
JS) and the template directory. There might be opportunities for
consolidation to reduce the number of requests a web browser needs to
make.
* Some of this complexity is because of JS dependencies, which we
can/should use a modern approach to resolve, such as Browserify
(browserify.org). This will also help us better structure our JS into
modules (imagine if our PHP was all in one or two files!).
After this, we'll be in a position that empowers us to be able to
seriously consider using complex JS for any future UI elements, without
being worried about all these legacy JS problems. I'm also hopeful this
will encourage contributions to the project from JS developers, for who we
don't really make it easy to contribute (yet).
Other than personally preferring Browserify over RequireJS, all the
specific details of any JS rewrite are not decided, and when we start 2.2
development, that would be a good time for all BP contributors to help
plan how we decide to approach this.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5735>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list