Readit News logoReadit News
vanderZwan · 5 years ago
> Vippet is a video recording and editing tool for the browser.

Wait, is this thing entirely client-side, in only 17.5 KiB? I know browsers can capture video frames, but how does it export it afterwards?

[0] https://vippet.netlify.app/

pimterry · 5 years ago
I think this is the source: https://github.com/mattorchard/vippet/.

Export code is here: https://github.com/mattorchard/vippet/blob/master/src/helper....

Seems like MediaRecorder (https://developer.mozilla.org/en-US/docs/Web/API/MediaRecord...) is the standard API to record the screen, it takes a video format during setup, and then `recorder.requestData()` will give you the raw bytes for your format of choice when you're done, ready to download and save or do whatever with. Web standards do a lot of heavy lifting for you nowadays!

ricardobeat · 5 years ago
That is the beauty of Svelte. Check out the Timeline component you see at the bottom: https://github.com/mattorchard/vippet/blob/master/src/compon...

The entire app bundle [1] is roughly the size of a library adapter like react-redux [2], which is just glue code.

[1] https://vippet.netlify.app/build/bundle.js

[2] https://unpkg.com/react-redux@7.2.2/dist/react-redux.min.js

vanderZwan · 5 years ago
I don't think your point really applies to my question, which was more about what exactly was doing the heavy lifting of the video exporting.

As a point of reference, just this week I saw someone on Observable experiment with WASM-compiled encoder packages for that exact reason[0][1].

Svelte seems really nice and lean though, I do agree with that

[0] https://www.npmjs.com/package/h264-mp4-encoder

[1] https://observablehq.com/@rreusser/h264-mp4-encoder

longnguyen · 5 years ago
You can use MediaStream Recording API[0] for that

[0] https://developer.mozilla.org/en-US/docs/Web/API/MediaStream...

Keats · 5 years ago
Has anyone used Svelte and https://github.com/ryansolid/solid ?
fuzzythinker · 5 years ago
Currently trying it out on a new project. Haven't dive too deep with it yet, but like it so far.
aabbcc1241 · 5 years ago
Solid is inspired from s-js and react.

(And also ts-liveview is inspired from s-js and Phoenix Liveview)

lprd · 5 years ago
I'm really excited to see further development and use of Svelte. I develop both Vue and React front ends (both have their strengths and weaknesses) and Svelte is a breath of fresh air. I'm not saying Svelte is _better_, but I am enjoying It's approach a bit more.
skellera · 5 years ago
Now that it’s been around for some time, what’s the general thought on it?

Anyone use it then go back to the traditional frameworks? Anyone love it and still think it’s the next big thing?

StevenWaterman · 5 years ago
Definitely still in the camp of thinking it's the next big thing. In my experience, Svelte does a great job of just getting out of the way and letting you start coding.

The ecosystem isn't there yet, and I probably wouldn't try to use it in a work project. For my personal projects though, I use it for everything front-end. More than that - I've stopped making desktop apps and just default to using svelte instead.

Happy to answer any specific questions you've got! Bottom line - given the opportunity, I will use Svelte.

throwaway894345 · 5 years ago
I'm not a frontend developer, but absent svelte, the next easiest thing to develop is a full on desktop application (easier than some other frontend web framework)?

Deleted Comment

dfrsol · 5 years ago
Until they solve https://svelte.dev/faq#how-do-i-test-svelte-apps and the ecosystem matures a little (Sapper -> svelte) I wouldn't recommend using it for any production applications. I do currently use it for PoCs since it's easy to spin up and be productive quickly.
enumjorge · 5 years ago
As someone who’s been recently doing front-end dev work full-time the question below it is also a little triggering. “Is there a router?” Not an official one but they list like 6 alternatives, two of which are apparently “very similar”.

The JS ecosystem’s penchant for giving you small components that you have to choose individually and then glue together can get a little exhausting. Hopefully the library whose approach you prefer has decent documentation, keeps up with changes to svelte, doesn’t get abandoned, etc.

Edit: apparently Sapper is a Next.js like framework that provides all the components you need for svelte in one package. Someone else said on this thread it’s eventually getting deprecated by the svelte team’s own thing called SvelteKit. Not ideal, but at least they’re working on something more integrated.

benmccann · 5 years ago
That FAQ was rather outdated. I've updated it to hopefully be more helpful. Thanks for pointing that out.
Can_Not · 5 years ago
They also don't have an answer for error handling. You can't catch them with Sentry, you can't catch then to handle them, and when they happen your app just freezes.
erokar · 5 years ago
We've switched to Svelte for new projects at work, from React. It feels like a significant improvement, especially regarding unnecessary complexity and verbosity. The UI component libraries for Svelte are still lacking in maturity, that's the one drawback I can think of.
vanderZwan · 5 years ago
> It feels like a significant improvement, especially regarding unnecessary complexity and verbosity.

> The UI component libraries for Svelte are still lacking in maturity

The typical counterargument usually made at this point would be "those two points are related" (to paraphrase Bjarne Stroustrup: "every ship gets barnacles as it ages").

So let's anticipate that: do you have any reasons to believe that Svelte will avoid adding accidental complexity/verbosity to it as it/the surrounding ecosystem matures, and if so, how do you think that will be mitigated?

SubGenius · 5 years ago
I really like it. Replaced Vue with Svelte and things have been great so far. Smaller bundles, and much lighter components. Built-in state management is very handy.

The initial pages are Go templates which are hydrated with Svelte components. It took a bit of trial and error to get the flow right so that I don't have to write double the code.

I don't know if it's the next big thing or not but it works really well for me.

IceWreck · 5 years ago
> The initial pages are Go templates which are hydrated with Svelte components. It took a bit of trial and error to get the flow right so that I don't have to write double the code.

What is the advantage of doing this over using http.FileServer to serve html which imports your svelte generated javascript directly ?

Are you using Svelte in a part of your application instead of the entire application?

nikivi · 5 years ago
Haven't used it personally yet but this recent podcast episode with Rich Harris & Evan You had many interesting thoughts on state of web dev & svelte

https://undefined.fm/radio/vue-vs-svelte-with-evan-you-and-r...

rawoke083600 · 5 years ago
Switched from Angular9 about 6 months ago. Never coding a js-app without Svelte. Sooo much simpler and stupidly fast !
RivieraKid · 5 years ago
I think this is the next leap in web UI development on the same level as jQuery, React and Vue.

I've used React, HyperApp and Flutter and Svelte (with Tailwind for CSS) is in my opinion clearly superior. But I also know someone who thinks Flutter is better.

momento · 5 years ago
I am using Tailwind for the first time and really stuggle with the long class strings. I imagine i'll get used to it with time.
davidwparker · 5 years ago
I used it for my summer "Covid" project: https://www.listenaddict.com/

I love it and will slowly be replacing my React/Vue/(old angularJS) projects with it.

The nice thing is, you can read the entire docs and just follow the interactive tutorial in a few hours and get up to speed incredibly fast.

_jesseb · 5 years ago
I recently gave it a try and it generally feels nice starting out, but I started running into rough edges pretty quickly, enough that I don't think I would want to build a large app using it. Main complaint is how it handles styles, it does not allow you to apply styles to the edge of a component without doing one of several workarounds, all of which have downsides. Means it's very hard to create a set of generic styled components and then apply layout to them using a parent, which makes it a bit of a pain to reuse things, which is kinda the point of component based libraries.

I also get the feeling that the Svelte maintainers do not particularly care what the community wants and are building what they want, which is totally cool, but unfortunately I disagree with a lot of their choices so I guess it's not for me.

andrew-dc · 5 years ago
Still in the next big thing camp myself, also. Of course, there are the noted drawbacks, but for our use case: putting a library of UI components across a handful of app stacks (.NET, asp, Angular, etc) - Svelte is the solution.

We have faced the usual wild west frontier situations where nobody really had an answer for something we wanted to do, but we have worked out solutions without a huge deal of frustration.

And it's important to mention that the development and maintenance experience of Svelte is very pleasant.

yawnxyz · 5 years ago
I've been converting my massive Vue 2 application to smaller "micro front-ends" written in Svelte/Sapper. For some reason I just feel it's faster to write in Svelte than it is in Vue 3, and these are all in production. But we're a tiny startup and I'm the only developer so...
troquerre · 5 years ago
I wouldn’t use it for big commercial projects because the ecosystem isn’t very big (ie I wouldn’t build a b2b saas app with it) but for small projects and side projects it’s great.
jamauro · 5 years ago
Love it. Ported a project to it recently and will be using in all projects going forward.
shallowthought · 5 years ago
Here's my general thought, in a year we will all be singing the praises of something else, and my fellow webdevs will continue to mistake "different" for "better".
madeofpalk · 5 years ago
OP was asking for actual substantive thoughts, not just this one point being regurgitated over and over again.

Svelte has been around for "a while" and seems to be hanging around and people are enjoying it.

I'm still really comfortable with React, and would love to know how people have found the transition between the two and how Svelte compares.

ulisesrmzroche · 5 years ago
Shallow thought indeed.
eecks · 5 years ago
I enjoy writing in Svelte more than using React. I like the concept that the output doesn't contain the actual library. I think testing tools is a must have though otherwise it will just be for my personal projects.

Looking forward to SvelteKit - I don't care for TS though.

arxpoetica · 5 years ago
SvelteKit will not require TS. You'll be able to do with or without.
tda · 5 years ago
Can I use svelte as an alternative to nuxt.js? I want to create a simple website where most of the content is written in markdown, that is rendered to static html (that can be hosted on e.g. netlify).

As it is kind of a hobby project, might as well learn the next hot thingg? Is Svelte suitable for these kind of applications? Some of the features of nuxt.js that i like: content module (put some markdown files in a folder and the routes, write a template and then all the html rendering etc is all taken care of) extensions for image resizing so images are resized to multiple resolutions as part of the build process, hot reloading in development

kasbah · 5 years ago
I believe you are looking for Sapper, which is the Next/Nuxt equivalent for Svelte. https://sapper.svelte.dev
partusman · 5 years ago
Be aware Sapper will never reach 1.0, and instead will be replaced by just using Svelte (with SvelteKit). https://svelte.dev/blog/whats-the-deal-with-sveltekit
Tade0 · 5 years ago
My "blog" (HR bait really) is exactly such a thing(using Sapper), but I had to integrate the markdown->html library by myself, I don't resize images and hit reload doesn't work.

So basically it's possible, put you have to put the thing together by yourself.

Tade0 · 5 years ago
One minor nitpick: "strongly typed" is not very meaningful. "statically typed" (or just "typed") conveys the intended meaning much better, since it has a clear definition.

Anyway adding proper support for TS sealed the deal for me - Svelte itself might never reach mainstream adoption but the idea of having a framework-compiler is something that I hope will, since it retains all the advantages of alternative approaches without introducing any significant disadvantages.

lucideer · 5 years ago
"Strongly typed" and "statically typed" are not synonymous. Yes, SvelteComponentTyped is statically typed, but that's somewhat implicit (and irrelevant) here. What they're referring to in that particular sentence is ease of strong typing. Static typing is a separate thing.
vanderZwan · 5 years ago
That's true, but GP's point about how nobody really agrees on what "strongly typed" means still holds up.

It might be worthwhile to frame it as "static and strongly¹ typed" with a footnote expanding on what "strongly" means to the svelte developers, just to get everyone to agree what we are even talking about in the first place.

malkarouri · 5 years ago
Tade0 · 5 years ago
Funny you should mention it, because that's just one of many definitions.

Off the top of my head there's also "strong", as in "the type system is sound" or "not allowing pointer arithmetic".

It's not that clear cut.

darksaints · 5 years ago
Strongly typed is meaningful and has a real definition, but it is used incorrectly here. Strongly typed means that invalid runtime types result in invalid programs...which can actually be true for both static typed languages (like Rust or OCaml) and dynamic typed languages (like Python, which throws errors on invalid types).

Typescript is statically typed but it is also weakly typed. Types are validated at compile time, but they do not prevent you from using invalid types at runtime.

ehejsbbejsk · 5 years ago
Can someone explain to me why we have so many front-end frameworks?
pogorniy · 5 years ago
To my opinion it's a combination of conditions

1. Open standards. There is no one entity to control what frameworks are "standard". Need for back compatibility of the web standards make them too simple and minimalistic. So you inevitably have a demand for power tools.

2. Many players are trying to capture demand for power tools. Of course their reasoning and approach differ. Often it becomes less about technology, but more about audience perception of the tool. Then we see more blogposts, podcasts, meetings, "see how easy to create and app" posts.

3. Web frontend is hard environment to model UX because too many moving parts. You have inherentedly stateful programm which should communicate asynchronously with at least 2 inputs-outputs: web server and user. Not speaking that it's not enough to have framework with proper building blocks to model your UX, you have bunch of issues with dependencies, debugging and integrations with existing tools.

This makes hard to come up with a solution which can satisfy many people. Some people are infiltrated with ideas which are incompatible with particular framework ideology, and bam, you have 2 camps which "push" against each other.

Now you have demand for tools, but tools shitty in some ways, and it's shitiness is covered with hype, brands and other forms of forming opinion.

This creates a demand for a new thing after people get disillusioned via own experience. And we get yet another framework. Repeat every 4-5 years.

1123581321 · 5 years ago
JS front-end frameworks are born from ad hoc application architecture or from difficulty applying an existing framework to an application. The progenitor applications had different feature and development requirements, which is reflected in the varying frameworks.

While it may seem a plethora of frameworks exist, a few have most of the market share. That is not too far from the situation with other programming languages and framework types.

There are also old frameworks that have essentially been obsoleted but continue to stick around due to project inertia, the needs of legacy code, or marketing needs of the maintaining organizations.

christophilus · 5 years ago
Some people prefer FP. Some prefer OOP. Some need just a sprinkling of interactivity. Some need to build complex UIs. Some need to run on underpowered devices while others don’t. Some dislike too much abstraction. Some prefer it.

In short, we have a plethora of frameworks for the same reason we have a plethora of languages, sodas, beers, coffees, tools, products, novels, etc. Humans are messy.

madeofpalk · 5 years ago
"Can someone explain to me why we have so many programming languages?"

Different strokes for different folks. People are trying to make new things that solve what they think are pain points in previous approaches.

There really isnt "so many" frontend frameworks. React is the clear leader, with Vue and Angular trailing behind. Svelte is a bit more of an experimental/innovative thing.

JonoW · 5 years ago
There is quite a long tail of small/niche frameworks, but for most folks there aren't many major ones, really it's 3; React/Angular/Vue. There's probably another 5-10 in the next cohort, including Svelte

Dead Comment