apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

[apostrophe-browserify] Port module from 0.5 to 2.0 (but remove Babel due to weight of dependency).

Open jth- opened this issue 11 years ago • 6 comments

While the core of Apostrophe doesn't require browserify, should we bring it in to make front-end development on individual projects easier?

jth- avatar Oct 12 '15 18:10 jth-

Do we really need browserify baked into the core? Thus far, @mcoppola and myself have found pushing assets and using Moog on the frontend to cover most of our use cases. We've noticed browserify to be a pretty heavy dependency lately, should we put it into it's own module and de-prioritize it's implementation?

cc @boutell @mcoppola @colpanik

jth- avatar Apr 07 '16 18:04 jth-

It's a good question. When used properly, Browserify can enable you to use npm modules on the frontend, which is pretty cool. However our general attitude is to let the server render a lot and have much lighter controllers on the frontend. Which suggests we're not going to do a ton of that.

However part of the heaviness of Browserify in Apostrophe right now is because we have Babel switched on there. Actually that's probably the vast majority of the heaviness. And we're not even using Babel on the back end. It's a very large dependency with very little adoption here.

We already have lodash and a policy of using it. And lodash is often faster than the new native stuff (tru fact, look it up). Even if raw array-crunching front end performance was an issue in Apostrophe. Which it ain't.

So the best remaining use case for Babel would be transitioning to the async keyword, which is still experimental even in Babel and is not in scope for A2 1.0.

Reworking our core frontend js to be more browserify-tastic is not in scope at this point; it's too late for blowing stuff up in 1.0. We need to finish stuff, not blow stuff up.

So here's what I think we should do:

  1. No browserify in the core.
  2. Optional apostrophe-browserify module, just like 0.5, when someone feels moved to do the work.
  3. Babel is NOT a dependency in that module. Instead there is an apostrophe-browserify-babel module perhaps. You shouldn't pay for it at npm install time if you don't want that big sucka.

On Thu, Apr 7, 2016 at 2:53 PM, Jimmy Harrison [email protected] wrote:

Do we really need browserify baked into the core? Thus far, @mcoppola https://github.com/mcoppola and myself have found pushing assets and using Moog on the frontend to cover most of our use cases. We've noticed browserify to be a pretty heavy dependency lately, should we put it into it's own module and de-prioritize it's implementation?

cc @boutell https://github.com/boutell @mcoppola https://github.com/mcoppola @colpanik https://github.com/colpanik

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe/issues/364#issuecomment-207048341

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar Apr 07 '16 19:04 boutell

@mcoppola and I both agree with that. We'll move this issue out of the Release milestone and rework it to be porting the old module over to 0.6.

jth- avatar Apr 07 '16 19:04 jth-

Be sure to mention not dragging Babel in uncritically due to its npm install costs in that ticket (:

On Thu, Apr 7, 2016 at 3:21 PM, Jimmy Harrison [email protected] wrote:

@mcoppola https://github.com/mcoppola and I both agree with that. We'll move this issue out of the Release milestone and rework it to be porting the old module over to 0.6.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe/issues/364#issuecomment-207056214

*THOMAS BOUTELL, *DEV & OPS P'UNK AVENUE | (215) 755-1330 | punkave.com

boutell avatar Apr 07 '16 19:04 boutell

We should continue to ask questions about this... does it make more sense to just encourage developers to use gulp at project level, as we are now doing? @austinstarin, what do you think?

boutell avatar Sep 04 '16 13:09 boutell

decided we're not pursuing this road

stuartromanek avatar Jul 28 '17 17:07 stuartromanek