cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <purplecabb...@gmail.com>
Subject Re: PROPOSAL: node.js all the script things
Date Mon, 12 Aug 2013 19:26:47 GMT
The question is not _are_ there benefit, but what value do that they bring,
versus the effort to do it?
In my opinion rewriting it presents a greater risk than (for example)
having a Log utility function duplicated across files, as it will _never_
change.
To me this is a case of knowing what and when to optimize.

We've already talked about this too much, so I will go with whatever the
consensus is.




@purplecabbage
risingj.com


On Mon, Aug 12, 2013 at 11:58 AM, Filip Maj <fil@adobe.com> wrote:

> One thing about the windows sets of scripts (Jscript-based) is that it is
> a primitive scripting language. From what I can tell (please correct me if
> I'm wrong) there's no concept of modules, so code re-use is a problem,
> which leads us to roll with copy-paste jobs such as the Log function [1]
> [2] [3] and the exec function [4] [5].
>
> I agree forging ahead and rewriting a bunch of stuff just for the sake of
> consistency is make-work, but there _are_ benefits that would come out of
> these efforts.
>
> [1]
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordova/lib/
> deploy.js#L72
> [2]
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordova/lib/
> clean.js#L39
> [3]
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordova/lib/
> build.js#L44
> [4]
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordova/lib/
> deploy.js#L94
> [5]
> https://github.com/apache/cordova-wp8/blob/master/wp8/template/cordova/lib/
> build.js#L54
>
> On 8/12/13 10:18 AM, "Benn Mapes" <benn.mapes@gmail.com> wrote:
>
> >+1 to this thread.
> >
> >I say we work on BB/Android first but it would be nice to have all the
> >tooling eventually in node (for consistency/maintainability). For the
> >windows tooling, it's mostly in JScript at the moment anyways so the code
> >could pretty much stay the same by just updating a few of the basic
> >functions such as logging, exec, and read/write.
> >
> >
> >On Mon, Aug 12, 2013 at 9:11 AM, Lorin Beer
> ><lorin.beer.dev@gmail.com>wrote:
> >
> >> this conversation has been continuing on and offline around the
> >> watercooler.
> >>
> >> +1 for Jesse's concern.
> >>
> >> There is absolutely no value in throwing out working bat scripts and
> >> rewriting them in node. It's makework.
> >>
> >> For BB10, the scripts were written in node in the first place, and
> >>bash/bat
> >> scripts invoke the node scripts. The inverse would be fine for WP7/8.
> >>Node
> >> alias invokes bat script.
> >>
> >>
> >> On Wed, Aug 7, 2013 at 12:51 PM, Jesse <purplecabbage@gmail.com> wrote:
> >>
> >> > No, I have not yet seen it, sounds sweet, and I applaud your
> >>commitment.
> >> > The comment was based on historical data; I am still optimistic for
> >>the
> >> > future.
> >> > You will of course need to upgrade/downgrade to Windows 8 to
> >>develop/test
> >> > for Windows 8, or Windows Phone 8.
> >> >
> >> > @purplecabbage
> >> > risingj.com
> >> >
> >> >
> >> > On Wed, Aug 7, 2013 at 12:14 PM, Filip Maj <fil@adobe.com> wrote:
> >> >
> >> > > I resent that comment about lack of Windows testing! Have you seen
> >>my
> >> > > sweet swivel-monitor laptop that I have Windows 7 on?
> >> > >
> >> > > On 8/7/13 12:11 PM, "Jesse" <purplecabbage@gmail.com> wrote:
> >> > >
> >> > > >Well, given that only Benn, and myself have contributed to the
> >>windows
> >> > 8,
> >> > > >and windows phone platform scripts, and no one else even seems
> >>willing
> >> > to
> >> > > >test the windows phone platform, it seems unfair to suggest we
> >>throw
> >> > away
> >> > > >working code, and rewrite it just for fun.
> >> > > >
> >> > > >Having a dependency on node is not a big deal, it is the 30+ other
> >>npm
> >> > > >libraries that always seem to come along, each with varying support
> >> for
> >> > > >windows, that I have issues with.
> >> > > >
> >> > > >I will consider writing you a node callable facade, that still
> >>calls
> >> the
> >> > > >.bat and wsh files behind the scenes.
> >> > > >
> >> > > >
> >> > > >
> >> > > >@purplecabbage
> >> > > >risingj.com
> >> > > >
> >> > > >
> >> > > >On Wed, Aug 7, 2013 at 11:40 AM, Steven Gill
> >><stevengill97@gmail.com>
> >> > > >wrote:
> >> > > >
> >> > > >> To install any plugins you at least need plugman which requires
> >> node.
> >> > > >>Our
> >> > > >> users are most likely going to have to install node as a
> >>dependency
> >> at
> >> > > >>some
> >> > > >> point. I don't see why having it as a dependency for platform
> >> > libraries
> >> > > >>is
> >> > > >> such a big deal.
> >> > > >>
> >> > > >>
> >> > > >> On Wed, Aug 7, 2013 at 11:34 AM, M. Lantz <mattlantz@gmail.com>
> >> > wrote:
> >> > > >>
> >> > > >> > +1
> >> > > >> >
> >> > > >> > Agreed I pretty much only use Cordova cli at this stage
to make
> >> apps
> >> > > >>and
> >> > > >> > as such don't have any issues keeping my node up to
date or
> >> relying
> >> > > >>on is
> >> > > >> > as a dependency.
> >> > > >> >
> >> > > >> > M. Lantz
> >> > > >> >
> >> > > >> > On 2013-08-07, at 1:07 PM, Frank Hennig <
> >> fhe.development@gmail.com>
> >> > > >> wrote:
> >> > > >> >
> >> > > >> > > +1 for all platforms
> >> > > >> > >
> >> > > >> > > I think it's not really an completely new dependency.
Some
> >> > > >>components
> >> > > >> > actually depends on node.js like cordova-cli and plugman.
Many
> >> > > >>developers
> >> > > >> > of cordova app's actually using grunt or bower and other
node
> >> > related
> >> > > >> stuff
> >> > > >> > to lint or to test their html and js code.
> >> > > >> > >
> >> > > >> > > A consistent tool and script language it's easier
to
> >>maintain an
> >> > to
> >> > > >> > debug.
> >> > > >> > >
> >> > > >> > >
> >> > > >> > > On Aug 7, 2013, at 12:14 AM, Filip Maj wrote:
> >> > > >> > >
> >> > > >> > >> I would like to introduce node.js as a dependency
for the
> >> > platform
> >> > > >> > >> libraries, so that the platform scripts (bin/create,
> >> cordova/run,
> >> > > >>etc)
> >> > > >> > are
> >> > > >> > >> written in node.
> >> > > >> > >>
> >> > > >> > >> Pros:
> >> > > >> > >> - For multi-OS platforms (Android, BlackBerry),
this reduces
> >> > > >>committer
> >> > > >> > >> cognitive load as the scripts do not need to
be authored in
> >>two
> >> > > >> > different
> >> > > >> > >> script languages (I.e. Shell for unix-y Oses,
Wscript for
> >> > Windows)
> >> > > >> > >> - consistency in tool/script language. Cordova-js,
coho, cli
> >> and
> >> > > >> plugman
> >> > > >> > >> are all written on top of node.js.
> >> > > >> > >>
> >> > > >> > >> Cons:
> >> > > >> > >> - Introducing a new dependency
> >> > > >> > >>
> >> > > >> > >> NB: This is separate from platform-spec; I
would like to see
> >> > > >> > platform-spec
> >> > > >> > >> created/used regardless of the outcome of this
thread.
> >> > > >> > >
> >> > > >> >
> >> > > >>
> >> > >
> >> > >
> >> >
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message