Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

Advantages over different libraries #28

Closed gmrchk closed 6 years ago

gmrchk commented 6 years ago

Nice work on this tool, love how it's all based on modern syntax!

However, I fail to see the primary difference of highway compared to Barba.js. Apart from having "more 2018" syntax and excluding (in some cases useful) features, to keep highway minimal by design, is there any other relevant difference that I'm missing?

I'm all up for the new things, but except for the smaller size, I'm not sure what are the advantages over Barba.js (or swup / swupjs for that matter). On the contrary, I see some essentials that mentioned tools have "figured out" and Highway hasn't.

Cheers!

Anthodpnt commented 6 years ago

Hi @gmrchk,

I understand the problem here... What we wanted to achieve was not to create a revolutionary transitions manager because in the end the way it works is the same BUT we had the need to have something flexible, modern and lightweight and Barba didn't fit to our needs. That's why we started to develop our own library for our daily routine at Dogstudio but we found that it was interesting to share it with you guys as well.

The objective was not to create a concurrent to Barba but to share our vision of a transition manager and provide an alternative to developers like many tools are doing. We never said that Highway was better than Barba or Swup so feel free to use the one that better fits your needs.

We understand we maybe didn't come with breakthrough features for now but the flexibility of Highway and its modernity let us easily and quickly maintain it and add the features our community needs and asks for without impacting the weight too much.

Finally concerning the tools we seem to miss, we didn't wanted to build a monster able to do bunch of stuffs that the community didn't need all the time. We wanted a 100% useful foundation on top of which we could add new tools but without forcing users to download everything. We are thinking about something like plugins and extensions.

For example, we didn't implement any prefetching tool so far because we need a solid and smart solution to do it correctly better than prefetching a page because the user hovers a link. We don't consider it as a required features but more as a good use case for plugins or extensions.

We would really appreciate if you could help us and give us a list of the features you think we are missing. We would be happy to check them and try to implement them as soon as possible.

Thanks for your feedback, Anthodpnt

gmrchk commented 6 years ago

Hi @Anthodpnt,

Don't get me wrong, I'm not saying one is better than the other, every solution has some advantages and diversity of solutions to choose from is always good for everyone. The reason for my question is rather a curiosity.

To rephrase your answer to fit the question (if I got it right), so there is no difference in the way Barba and Highway work when it comes to the process of animation, but its advantage lies in a cleaner, more modular solution. I'm guessing that's what keyword flexible applies to in your description, rather than a flexibility in the animation process, and that's great! There's a bunch of reasons why Barba works as it does, so there is nothing wrong with building on same concepts.

I like the idea of pluggable modules, I went that way myself some time ago actually, even tho for swup it's rather an additional feature than one of the main concepts its build upon.

In my experience prefetch is extremely helpful whether on hover, or automatically triggered, but I understand that people can have a different view of this. I was rather referring to some try-and-fail lessons learned over time in other libraries. While I get that starting with new clean repo over building on Barba is way more comfortable, I think much more attention should be given to Barba source code for example. Two things I have noticed for your docs site (I'm assuming it's using Highway):

  1. Changing the URL (doing the pushState) at the moment of switching the content seem logical. However, other libraries do it before starting the animation for a good reason, because some browsers (mobile/safari) make a screenshot of the page at the moment of changing URL. With Highway this screenshot is made when the page is "hidden".

  2. People have a lot of different workflows when it comes to browsing a webpage, and many people open some pages into a new tab with Ctrl/Cmd+Click. Highway breaks this browser native behavior and can turn an improved experience into a terrible one for many users simply by breaking normal behaviour.

Hope this helps. If you have some tips/ideas for a more plug-and-play solution like swup, any input would be appreciated.

Cheers

Anthodpnt commented 6 years ago

Hi @gmrchk,

FYI about the 2 points you raised we just pushed the v2.0.8 that fixes them.

Best regards, Anthodpnt