These are chat archives for ractivejs/ractive

26th
Jul 2018
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 00:00
Joseph
@fskreuz
Jul 26 2018 15:53
Sooo... Ractive is soon getting a v1.0. Now thinking of post-1.0/v2.0 enhancements, random question of the day: What direction would you like Ractive take and why?
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:11
I think technically, Ractive is quite OK as it is. I think the promoting, ecosystem, community needs a boost. It simply lacks exposure IMHO. A component suite would be nice.
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:19
...and making it more "sexy", with more interactive tutorials, etc. To "wow" people if I may say. Currently, it's a bit dry.
Chris Reeves
@evs-chris
Jul 26 2018 16:19
yeah, there's not a whole lot I'd like to change in the library
could stand to lose a little weight, but at this point, I think it'd require a pretty serious refactor/rewrite
I definitely agree with the "needs marketing" standpoint
@ceremcem nice!
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:22
sure, there is always potential for improvement. I just don't think it's the priority to focus on. At the moment, I think a good chunk of people either simply don't know about it or are reluctant to adopt it because of its tiny community.
Which is a pity IMHO...
We should make T-shirts! :p
and stickers ;)
Chris Reeves
@evs-chris
Jul 26 2018 16:24
I have a few stickers left from waaay back when martypdx did community stuff in portland
very green :)
unfortunately, unlike Rich, I have no community growth/marketing skills and I live in a tech desert
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:28
yeah, indeed, it's quite amazing how fast he grew the community at the start
I came to it through a blog post of him comparing the frameworks
And the tutorial was quite catchy at that time
Although ractive improved in the technical aspect, we've kind of stalled in the "making it known" aspect
Chris Reeves
@evs-chris
Jul 26 2018 16:30
the major competition being angular 1 definitely didn't hurt
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:31
especially now that angular / react are so established in the spotlight because of the companies backing them
Chris Reeves
@evs-chris
Jul 26 2018 16:31
react seems to gather mindshare pretty easily, though I'm not sure why because it hurts
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:34
I think many decisions in companies are taken on a very high level, like
  • we need a framework so that our devs make shiny new stuff more quickly
  • yeah, let's pick one!
  • hmmm... the most known ones are angular or react ...and there is vue as runner up. Which one shall we take?
  • dice roll
I said that kind of ironically / humoristically, but I think it's not that far fetched
Chris Reeves
@evs-chris
Jul 26 2018 16:35
that's how I came to ractive
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:35
how exactly?
Chris Reeves
@evs-chris
Jul 26 2018 16:35
"we need a framework" find options "ewww"
"let's look a little harder"
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:36
Yeah, me too, I needed data-binding and after trying knockout and angularjs, I discovered ractive and stick to it since then
but in my company, I'm the only one. For bigger projects, they're reluctant to use it because of the small community and lacking ecosystem
I can't blame them though. It's true that at first sight, both react and angular have massive widget libraries ...it's kind of "batteries included" while ractive is "do it yourself"
Chris Reeves
@evs-chris
Jul 26 2018 16:39
I agree, but at the same time, too many choices for plugins/components/widgets makes it harder to use (for me)
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:41
true too ...always evaluating all alternatives is energy draining
Chris Reeves
@evs-chris
Jul 26 2018 16:42
it's nice that most stuff isn't hard to roll your own with ractive
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:45
yes and no. For basic pages, it's great. But once you need a tree, a datatable and a file drag-drop ...you're kind of "eeeeehhh" ...let me take something where these widgets exist
but for "close-to-html" websites, oh boy, yeah, ractive is great in its simplicity!
in this department, it beats any framework
...hmm ...lunch ...I guess it would be time for me to go home and eat too ;)
Chris Reeves
@evs-chris
Jul 26 2018 16:47
fair
Joseph
@fskreuz
Jul 26 2018 16:47

I think many decisions in companies are taken on a very high level

So true. I've heard articles say "Angular is better for enterprise" but cannot really give a technical justification other than what can be summed as "it looks/acts/feels like Java/Spring" :joy:

Chris Reeves
@evs-chris
Jul 26 2018 16:48
ouch
AbstractButtonFactoryFactory?
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:49
IMHO, java/spring is actually quite OK and productive ;)
Chris Reeves
@evs-chris
Jul 26 2018 16:49
it can be with a team that knows how to use it :smile:
can also turn into an unmitigated disaster
evs-chris @evs-chris has seen some stuff
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:51
perhaps ...compared to other java frameworks, I found it quite nice. In a couple of lines, you've a running web app, swagger documented endpoints, etc. Of course, nothing is perfect, but I've seen far worse
yeah, I believe every technology can be corrupted in a project, transforming it into ultimate complexity
Chris Reeves
@evs-chris
Jul 26 2018 16:53
to be fair, I haven't looked at anything java in like 7 years... hopefully things haven't just been stagnating there
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:54
lol, I've seen a project where there was a "main.cpp" of so many many thousands of lines. I don't remember exactly how many, but it was soooooooo huge ...I think it had 15 level of indentation or so.
Joseph
@fskreuz
Jul 26 2018 16:54
:scream:
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:56
Well, actually, that's kind of my main complain about Java ...it's kind of stuck in the past
There are great things (like Spring IMHO), but so many things suck badly too. Just logging a line can transform in a headache.
I think it's also a Java-dev disease to over-engineer stuff. Dunno why.
Joseph
@fskreuz
Jul 26 2018 16:58
Yep, that.
I love how Ractive, Vue and Svelte put things together: describe what you want, instead of writing plumbing.
Arnaud Dagnelies
@dagnelies
Jul 26 2018 16:59
Indeed
Joseph
@fskreuz
Jul 26 2018 17:01
Angular involves lotsa plumbing. Endless connections and messaging between service classes and to some extent, in the UI. 😤
On a different note, I wonder if we could make Ractive take the leap and be ESM-first 🤔
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:03
Perhaps we can even add a few pages Ractive vs X, where we show some snippets in both frameworks
What's ESM?
Joseph
@fskreuz
Jul 26 2018 17:03
ES modules :grin:
i.e. ship with just ES modules, up to you if you want to drop in Rollup/Webpack.
examples be like <script type="module" src="app.js"></script>
if only bare imports worked 🤔
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:04
dunno, I must confess I'm not familiar with modules
it's on my "to learn list", but since we've to support IE 11 here and that my apps are relatively lightweight thanks to ractive, I have delayed that learning
Joseph
@fskreuz
Jul 26 2018 17:05
IE11 :scream:
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:06
well, yeah, that's how real life works. As long as Microsoft supports it, so do we. We already opened the champaign when Microsoft dropped support for IE <= 10 last year! :p
Joseph
@fskreuz
Jul 26 2018 17:07
:tada:
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:08
Hey, Joseph, what do you think about Iframing the https://dagnelies.github.io/ractive-examples/ as a menu item in https://ractive.js.org/ ?
(I can of course adapt the style so that it fits better visually if needed)
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:11
We need the TODO mvc revamped for new version of reactivejs :smile:
Autocorrect is not great with ractive
Joseph
@fskreuz
Jul 26 2018 17:11
@dagnelies How about we fork the repo into the Ractive github org, serve it from there, and we'll link the docs to it? :grin: That way, Github automagically serves it under ractive.js.org/ractive-examples.
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:12
sure
Joseph
@fskreuz
Jul 26 2018 17:13
That way, the repo becomes part of https://github.com/ractivejs and no iframing is required, and it becomes "official". :grin:
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:14
So I built a one page of an app using ractive we needed two way data binding and this felt the most intuitive framework for a JavaScript newbie. I have done years of backend but hardly any substantial JavaScript work and this community here helped me a lot. Now at our work we use cough cough Java and .net with spring and asp.net core and telelrik kendo ui
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:14
yeah, you can gladly do that. I'll also mark that the fork is the "official" one
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:15
Everybody that saw ractive code was wowed
We have devs that write lot of angular and react they hate it
I think my horror to not learn them made me find this
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:15
didn't you had to write lots of wrappers around the telelrik kendo ui stuff?
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:16
Yeah
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:16
btw, kendo "core" or the "premium" widgets too?
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:16
Premium
:D
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:17
If I may, I think adding the wrapped kendo components would be a great addition to the community! ;)
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:18
I guess
The wrappers have some custom business directives too
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:20
We got a really big app here made in ExtJS. At the time, it was clearly the best choice, and it still is to some extend. But due to their pricing politics having harshly changed, it kind of bitten us back. So, now, the "chief" became a bit wary of commercial frameworks.
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:20
Here there are similar thoughts but this is a financial organization with deep pockets :D
Kendo ui premium with support ain't cheap
It's darn good though
Joseph
@fskreuz
Jul 26 2018 17:21
The idea of "paid must be better" :grin: (you get support tho so... tradeoffs :grin:)
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:22
Mostly, yes. If it ain't clearly better ...you usually don't bother buying it
We have software that partners can customize with add ons and such. However, we couldn't allow the partners to use ExtJS directly for the add ons because it would have implied an additional license cost of 6000$+ for a partner, which would be prohibitive for most of them. Five years before, it would have been a few hundred bucks.
Arnaud Dagnelies
@dagnelies
Jul 26 2018 17:27
well, it's late, I should go
bybye!
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 17:35
hi
@evs-chris thanks! (it was only possible with your time travelled helps (introducting macros), of course :))
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 17:40
regarding to @fskreuz 's question... mmm... I'm not sure, but I think Ractive needs an extensive example ecosystem
we should be able to create great examples and recipes quickly. it's not that easy at this point
Joseph
@fskreuz
Jul 26 2018 17:48
Yep, considering adopting in @dagnelies 's examples repo into the org so that it sits under the ractive.js.org domain.
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 17:48
that would be awesome!
question: what is the useful aspects of Playground over jsFiddle?
Shakeel Osmani
@shakeelosmani
Jul 26 2018 17:51
I found playground less intuitive
Specially the example to go through while reading the documents, the playground doesn't help much and feels less intuitive
Chris Reeves
@evs-chris
Jul 26 2018 17:54
the playground needs some work, but the barrier to entry is basically nil, especially for adding examples to docs
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 17:56
I also have some improvement plans for Playground, which specifically waits for ractivejs/ractivejs.github.io#105 to be resolved
Joseph
@fskreuz
Jul 26 2018 17:56
It has Ractive out of the box in various versions, it's shareable via a url (and without saving anything anywhere), we have control of how it looks.
I initially wanted to integrate RunKit for examples (similar to Lodash) but that has its own problems (slow to load, content on a separate server/system, extra external JS). It's nice to have all examples in-repo.
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 18:00
oh man! RunKit seems awesome!
the missing part of Playground is, IMHO, 1. a full screen output, 2. lack of forking (like github's forks), 3. we have hard times when we need to require any helper modules
  1. the long url's... really, it doesn't have to be that long (I know, it includes all data, but a url shouldn't be that long)
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 18:05
(it's 4, not 1)
Joseph
@fskreuz
Jul 26 2018 18:06
The tradeoff would be saving content somewhere. That's an extra system to maintain, credentials to manage, pass on to other contributors, etc.
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 18:06
moreover, I think we may implement some kind of simple magic comment to easily generate "highlighted version" of the code (ie. we'll not show some unrelated parts in the front page)
I know, but I think github might be used here
Paul Maly
@PaulMaly_twitter
Jul 26 2018 18:21
Awesome thing is Svelte’s REPL))
Chris Reeves
@evs-chris
Jul 26 2018 18:21
my next step plan for the playground is to implement external module loading either via embedded rollup or something similar, and to make the UI more easily configurable so that it scales better
using svelte repl as a kind of template 😁
Paul Maly
@PaulMaly_twitter
Jul 26 2018 18:22
The biggest thing of REPL is npm packages support
That’s really awesome
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 18:25
really?
Chris Reeves
@evs-chris
Jul 26 2018 18:27
also update the build, as I've figured out a lot about how to handle all of that
the playground was the pilot project for the ractive bin compiler
Joseph
@fskreuz
Jul 26 2018 18:28
Also, the playground is, well... a playground - getting stuff up and out fast (for bug repro, examples, etc.). It wasn't meant to be a full IDE. :grin:
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 18:28
I think we deserve a full ide :D
Joseph
@fskreuz
Jul 26 2018 18:29
(shameless plug) VS Code :wink:
Shakeel Osmani
@shakeelosmani
Jul 26 2018 18:29
I also think many developers like me with less experience in JS and node world find it easy If pieces of functionality are available as node packages and documented in the npm pages. I think it makes a low barrier of entry
We use vs code with a plug-in that highlights mustache, I requested the plug-in maintainer to add code to recognize text/ractive as mustache
Shakeel Osmani
@shakeelosmani
Jul 26 2018 18:36
But I think that's like a chicken and egg problem having modules and extended functionality libraries. You only get them when you have more people adapt your product. And more people adapt when you have widgets and libraries available :worried:
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 19:17
I remember there was a discussion about this. some people was saying that we need some ready-to-include widgets, like jQuery-UI in Ractive, but the winner idea was "to make the framework without some ready-to-go widgets, but ready to quickly build something when needed"
currently I'm happy to use @kouts ' modal, no doubt with that, but I think Ractive really shines when we need to build something from scratch
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 19:36
by the way, I've a little question: how can I use rollup to create 1 big bundle that requires modules from node_modules?
rollup doesn't seem to include from node_modules
kouts
@kouts
Jul 26 2018 19:45
wow lot's of conversation here, I was away for a few days, nice to see movement!
kouts
@kouts
Jul 26 2018 19:56
Question: Can I use Ractive CLI inside npm scripts?
Joseph
@fskreuz
Jul 26 2018 20:07
any module exposing a bin is executable in npm scripts. npm puts the node_modules/.bin in front of $PATH when doing npm run
so in theory... yes you could.
alternatively, there's npx bundled in recent versions of npm, which allows you to run module bins via CLI without going through scripts (i.e. npx ractive --help)
kouts
@kouts
Jul 26 2018 20:12
What I would like to do is use npm as task runner, will this help?
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:13
@kouts are you trying to do what Gulp does?
kouts
@kouts
Jul 26 2018 20:15
yes, but without gulp
I like webpack, but for the project that I want to transform it will not do (I'm using webpack in other projects though)
Joseph
@fskreuz
Jul 26 2018 20:16
Something like:
"scripts": {
  "something": "ractive doSomething"
}
kouts
@kouts
Jul 26 2018 20:18
yes, @fskreuz so that I can have lets say one npm task for compiling ractive components
one for sass
and one for eg minification
Joseph
@fskreuz
Jul 26 2018 20:18
I personally haven't used the CLI. But for npm scripts as a task runner, you'll be doing lotsa scripts. :grin: I usually have a script for buble, for rollup, for uglify, for test. One script each, then one script that runs all of them in a sequence.
kouts
@kouts
Jul 26 2018 20:19
yes that's the plan
many scripts and one to run them all in sequence
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:20
@kouts how do you plan handling the incremental builds?
kouts
@kouts
Jul 26 2018 20:20
meaning?
Joseph
@fskreuz
Jul 26 2018 20:20
That's where you get off npm scripts and into webpack. :smile:
kouts
@kouts
Jul 26 2018 20:21
Problem is I want to retain the "inividual component files"
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:21
when your application gets huge, building (I don't know rollup, but I can say for browserify) building the bundle for a single line change can take 20 seconds
kouts
@kouts
Jul 26 2018 20:22
It will never be a bundle
that's why I'm not using webpack
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:22
do you want everything split up?
kouts
@kouts
Jul 26 2018 20:22
yes
there is a libraries file, let's say this is a vendor.js
a "general components" file, in which they will be many Ractive components needed for the app
Chris Reeves
@evs-chris
Jul 26 2018 20:24
yep, I use npm scripts for most of my newer projects
kouts
@kouts
Jul 26 2018 20:24
and then they will be views files (which they are essentially an options object for creating Ractive instances)
and component files that comprise these views
Chris Reeves
@evs-chris
Jul 26 2018 20:24
recently added a dir mode that will recursively find templates, process them, and dump them in another dir maintaining path structure
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:24
@kouts it's getting complex already
kouts
@kouts
Jul 26 2018 20:25
it is really simple
Chris Reeves
@evs-chris
Jul 26 2018 20:25
so I can import just the template and use typescript for the rest of the component
kouts
@kouts
Jul 26 2018 20:25
@evs-chris you mean -id ?
Chris Reeves
@evs-chris
Jul 26 2018 20:25
yep
Joseph
@fskreuz
Jul 26 2018 20:26
Here's a good example of what seems to be huge, but is powered by npm script, a bunch of cli deps and builds small, independent things https://github.com/fskreuz/ractive-monorepo :D
kouts
@kouts
Jul 26 2018 20:26
thank you @fskreuz
@ceremcem I'm already using this structure in this particular app
but not with precompiled templates
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:27
I meant, it's getting complex to me to understand
but I would like to get your workflow
kouts
@kouts
Jul 26 2018 20:28
Ahhh maybe it's because of me not conveying it right
@evs-chris do you have such an example?
Joseph
@fskreuz
Jul 26 2018 20:31
I think @ceremcem is thinking of the app as a whole (which is why incremental builds was mentioned), while @kouts is thinking of pre-building each component separately (where all you ever need is transpile + bundle + minify, which a bunch of npm scripts in sequence does just fine). Is that right?
me trying to do some mind reading :crystal_ball:
Chris Reeves
@evs-chris
Jul 26 2018 20:32
just started using it on a client's project that I can't share, but the gist is, top level dir has (client,server,views) dirs where the server builds to build/server and client builds to build/client
there's an npm script that ractive component -id views -oe .ts -o build/client/views -ae and the client code references views/* when imported which is aliased to build/client/views/*
it's a little convoluted, but I get good compiler feedback from typescript
kouts
@kouts
Jul 26 2018 20:33
@fskreuz that's right
Chris Reeves
@evs-chris
Jul 26 2018 20:34
I typically do stuff like that with a good ol' bash script that starts with export PATH=$PATH:./node_modules/.bin and is added as a package script
kouts
@kouts
Jul 26 2018 20:35
Can I pull this off just using npm tasks chained one after another as @fskreuz said?
something like this maybe: http://paulcpederson.com/articles/npm-run/
Chris Reeves
@evs-chris
Jul 26 2018 20:36
yes, but it tends to get funky in the package.json after a while
I have more than one script that is something like build: "ractive ...; buble ...; rollup ..."
kouts
@kouts
Jul 26 2018 20:37
ok
I will try this too and see how it goes
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:39
@fskreuz that's right for me too (did you watch Mentalist?)
Cerem Cem ASLAN
@ceremcem
Jul 26 2018 20:52
(I summed up my question here: ceremcem/rollup-test#1)