What is Svelte and what are its top alternatives?
Svelte is a modern web application framework that compiles your code at build time to highly efficient JavaScript that updates the DOM when the state of your application changes. It is known for its simplicity, performance, and minimal footprint. With Svelte, developers write components using HTML, CSS, and JavaScript, resulting in cleaner and more maintainable code. However, Svelte may not be as widely adopted as other frameworks like React or Angular, leading to a smaller community and fewer third-party libraries compared to its competitors.
- React: React is a popular JavaScript library for building user interfaces. It allows developers to create reusable UI components and efficiently update the DOM when data changes. Key features include virtual DOM, JSX syntax, and a large ecosystem of libraries and tools. Pros of React compared to Svelte include a larger community and more extensive documentation. However, React can be more verbose compared to Svelte.
- Vue.js: Vue.js is a progressive JavaScript framework for building user interfaces. It offers a flexible and approachable API, reactive data binding, and single-file components. Pros of Vue.js compared to Svelte include a gentle learning curve and a large set of official plugins. However, Vue.js may not be as performant as Svelte in certain scenarios.
- Angular: Angular is a comprehensive framework for building web applications. It provides a full-featured platform with tools for routing, forms, HTTP client, and more. Key features of Angular include two-way data binding, dependency injection, and TypeScript support. Pros of Angular compared to Svelte include a structured and opinionated approach to application development. However, Angular may have a steeper learning curve and a larger bundle size compared to Svelte.
- Ember.js: Ember.js is a framework for building ambitious web applications. It follows the convention-over-configuration principle and provides tools for routing, data management, and templating. Key features of Ember.js include Ember CLI, Glimmer rendering engine, and Ember Data. Pros of Ember.js compared to Svelte include a strong focus on developer productivity and a rich ecosystem of addons. However, Ember.js may have a higher barrier to entry for beginners.
- Alpine.js: Alpine.js is a minimal JavaScript framework for building JavaScript-driven web applications. It focuses on declarative and reactive programming using simple directives. Key features of Alpine.js include reactivity, interactivity, and lightweight size. Pros of Alpine.js compared to Svelte include a quick setup process and a small footprint. However, Alpine.js may not be as feature-rich or scalable as Svelte in complex applications.
- Solid.js: Solid.js is a declarative JavaScript library for building user interfaces. It emphasizes performance and simplicity with a reactivity model that updates only the necessary parts of the DOM. Key features of Solid.js include fine-grained reactivity, JSX syntax, and a small bundle size. Pros of Solid.js compared to Svelte include optimized rendering performance and TypeScript integration. However, Solid.js may have a smaller community and ecosystem compared to Svelte.
- Inferno: Inferno is a JavaScript library for building high-performance user interfaces. It aims to provide a React-like development experience with a focus on performance optimization and a small footprint. Key features of Inferno include virtual DOM, lifecycle methods, and JSX syntax. Pros of Inferno compared to Svelte include high performance and compatibility with existing React applications. However, Inferno may have a smaller community and fewer resources compared to Svelte.
- Marko: Marko is a JavaScript UI library with a focus on speed and simplicity. It offers a concise syntax for building reusable components and efficient rendering through server-side and client-side optimization. Key features of Marko include asynchronous rendering, hydration, and server-side rendering. Pros of Marko compared to Svelte include fast performance and a lightweight runtime. However, Marko may not have as large of a community or ecosystem as Svelte.
- Mithril: Mithril is a modern JavaScript framework for building single-page applications. It provides a simple API for creating components, routing, and state management. Key features of Mithril include virtual DOM, routing, and XHR utilities. Pros of Mithril compared to Svelte include a small size and a focus on minimalism. However, Mithril may have a less active community and fewer third-party libraries compared to Svelte.
- Preact: Preact is a fast 3kB alternative to React with the same API and features. It aims to be compatible with React but with a smaller bundle size and better performance. Key features of Preact include virtual DOM, component lifecycle methods, and hooks. Pros of Preact compared to Svelte include a familiar API for React developers and a smaller footprint. However, Preact may not have as large of a community or ecosystem as Svelte.
Top Alternatives to Svelte
- React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project. ...
- Elm
Writing HTML apps is super easy with elm-lang/html. Not only does it render extremely fast, it also quietly guides you towards well-architected code. ...
- Imba
Imba is a new programming language for the web that compiles to performant and readable JavaScript. It has language level support for defining, extending, subclassing, instantiating and rendering dom nodes. ...
- Stencil
Stencil combines some of the best features from traditional frameworks, but outputs 100% standards-compliant Custom Elements, part of the Web Component spec. ...
- Preact
Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped). ...
- Sapper
Sapper focuses on easy of use. It is alpha now and only compiled with rust nightly. ...
- jQuery
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML. ...
- AngularJS
AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding. ...
Svelte alternatives & related posts
- Components832
- Virtual dom673
- Performance578
- Simplicity508
- Composable442
- Data flow186
- Declarative166
- Isn't an mvc framework128
- Reactive updates120
- Explicit app state115
- JSX50
- Learn once, write everywhere29
- Easy to Use22
- Uni-directional data flow21
- Works great with Flux Architecture17
- Great perfomance11
- Javascript10
- Built by Facebook9
- TypeScript support8
- Server Side Rendering6
- Speed6
- Feels like the 90s5
- Excellent Documentation5
- Props5
- Functional5
- Easy as Lego5
- Closer to standard JavaScript and HTML than others5
- Cross-platform5
- Easy to start5
- Hooks5
- Awesome5
- Scalable5
- Super easy4
- Allows creating single page applications4
- Server side views4
- Sdfsdfsdf4
- Start simple4
- Strong Community4
- Fancy third party tools4
- Scales super well4
- Has arrow functions3
- Beautiful and Neat Component Management3
- Just the View of MVC3
- Simple, easy to reason about and makes you productive3
- Fast evolving3
- SSR3
- Great migration pathway for older systems3
- Rich ecosystem3
- Simple3
- Has functional components3
- Every decision architecture wise makes sense3
- Very gentle learning curve3
- Split your UI into components with one true state2
- Image upload2
- Permissively-licensed2
- Fragments2
- Sharable2
- Recharts2
- HTML-like2
- React hooks1
- Datatables1
- Requires discipline to keep architecture organized41
- No predefined way to structure your app30
- Need to be familiar with lots of third party packages29
- JSX13
- Not enterprise friendly10
- One-way binding only6
- State consistency with backend neglected3
- Bad Documentation3
- Error boundary is needed2
- Paradigms change too fast2
related React posts
I was building a personal project that I needed to store items in a real time database. I am more comfortable with my Frontend skills than my backend so I didn't want to spend time building out anything in Ruby or Go.
I stumbled on Firebase by #Google, and it was really all I needed. It had realtime data, an area for storing file uploads and best of all for the amount of data I needed it was free!
I built out my application using tools I was familiar with, React for the framework, Redux.js to manage my state across components, and styled-components for the styling.
Now as this was a project I was just working on in my free time for fun I didn't really want to pay for hosting. I did some research and I found Netlify. I had actually seen them at #ReactRally the year before and deployed a Gatsby site to Netlify already.
Netlify was very easy to setup and link to my GitHub account you select a repo and pretty much with very little configuration you have a live site that will deploy every time you push to master.
With the selection of these tools I was able to build out my application, connect it to a realtime database, and deploy to a live environment all with $0 spent.
If you're looking to build out a small app I suggest giving these tools a go as you can get your idea out into the real world for absolutely no cost.
Your tech stack is solid for building a real-time messaging project.
React and React Native are excellent choices for the frontend, especially if you want to have both web and mobile versions of your application share code.
ExpressJS is an unopinionated framework that affords you the flexibility to use it's features at your term, which is a good start. However, I would recommend you explore Sails.js as well. Sails.js is built on top of Express.js and it provides additional features out of the box, especially the Websocket integration that your project requires.
Don't forget to set up Graphql codegen, this would improve your dev experience (Add Typescript, if you can too).
I don't know much about databases but you might want to consider using NO-SQL. I used Firebase real-time db and aws dynamo db on a few of my personal projects and I love they're easy to work with and offer more flexibility for a chat application.
Elm
- Code stays clean45
- Great type system44
- No Runtime Exceptions40
- Fun33
- Easy to understand28
- Type safety23
- Correctness22
- JS fatigue17
- Ecosystem agrees on one Application Architecture12
- Declarative12
- Friendly compiler messages10
- Fast rendering8
- If it compiles, it runs7
- Welcoming community7
- Stable ecosystem5
- 'Batteries included'4
- Package.elm-lang.org2
- No typeclasses -> repitition (i.e. map has 130versions)3
- JS interop can not be async2
- JS interoperability a bit more involved2
- More code is required1
- No JSX/Template1
- Main developer enforces "the correct" style hard1
- No communication with users1
- Backwards compability breaks between releases1
related Elm posts
React is awesome, but is just a view library, when we need to manage state, there is Redux.js. The ecosystem of redux is big, complex and hard to integrate. That's why we choose to create hydux. Hydux is simple, the main idea is from Elm, a pure functional vdom-based framework for front-end. We seperate the whole app with state, actions and views. Which means not only our views are a tree, but also our state and actions. Reuse state and actions are just like reuse react components, no need to consider dependences.
related Imba posts
related Stencil posts
As a #Frontend developer I'm used to using tools like #BootstrapCDN or some APIs/Library like #GoogleMaps to create or have styled elements with cool functionality. But this requires me remembering Bootstrap classes, or trying to get Google Maps to work in #Angular. 😢
And that's just framework agnostic solutions... If you look at framework specific libraries you end up dealing with the fact you are pigeon holed into using framework specific libraries!
Libraries like Polymer or Stencil for #WebComponents are definitely the way to go!
- Lightweight15
- Drop-in replacement for React5
- Performance4
- Props/state passed to render3
- ES6 class components1
related Preact posts
Simple controls over complex technologies, as we put it, wouldn't be possible without neat UIs for our user areas including start page, dashboard, settings, and docs.
Initially, there was Django. Back in 2011, considering our Python-centric approach, that was the best choice. Later, we realized we needed to iterate on our website more quickly. And this led us to detaching Django from our front end. That was when we decided to build an SPA.
For building user interfaces, we're currently using React as it provided the fastest rendering back when we were building our toolkit. It’s worth mentioning Uploadcare is not a front-end-focused SPA: we aren’t running at high levels of complexity. If it were, we’d go with Ember.js.
However, there's a chance we will shift to the faster Preact, with its motto of using as little code as possible, and because it makes more use of browser APIs. One of our future tasks for our front end is to configure our Webpack bundler to split up the code for different site sections. For styles, we use PostCSS along with its plugins such as cssnano which minifies all the code.
All that allows us to provide a great user experience and quickly implement changes where they are needed with as little code as possible.
The first and most important premise is that should be fast.. really fast. This premise was basically because this is an PWA project, and the main goal of this project are be more efficient on restaurant.
So I ended up choosing Preact instead React .
This made the app (PWA) more faster, not only when navigating but improve TTI and data usage.
- Less bundle Size0
related Sapper posts
- Cross-browser1.3K
- Dom manipulation957
- Power809
- Open source660
- Plugins610
- Easy459
- Popular395
- Feature-rich350
- Html5281
- Light weight227
- Simple93
- Great community84
- CSS3 Compliant79
- Mobile friendly69
- Fast67
- Intuitive43
- Swiss Army knife for webdev42
- Huge Community35
- Easy to learn11
- Clean code4
- Because of Ajax request :)3
- Powerful2
- Nice2
- Just awesome2
- Used everywhere2
- Improves productivity1
- Javascript1
- Easy Setup1
- Open Source, Simple, Easy Setup1
- It Just Works1
- Industry acceptance1
- Allows great manipulation of HTML and CSS1
- Widely Used1
- I love jQuery1
- Large size6
- Sometimes inconsistent API5
- Encourages DOM as primary data source5
- Live events is overly complex feature2
related jQuery posts
The client-side stack of Shopify Admin has been a long journey. It started with HTML templates, jQuery and Prototype. We moved to Batman.js, our in-house Single-Page-Application framework (SPA), in 2013. Then, we re-evaluated our approach and moved back to statically rendered HTML and vanilla JavaScript. As the front-end ecosystem matured, we felt that it was time to rethink our approach again. Last year, we started working on moving Shopify Admin to React and TypeScript.
Many things have changed since the days of jQuery and Batman. JavaScript execution is much faster. We can easily render our apps on the server to do less work on the client, and the resources and tooling for developers are substantially better with React than we ever had with Batman.
#FrameworksFullStack #Languages
I'm planning to create a web application and also a mobile application to provide a very good shopping experience to the end customers. Shortly, my application will be aggregate the product details from difference sources and giving a clear picture to the user that when and where to buy that product with best in Quality and cost.
I have planned to develop this in many milestones for adding N number of features and I have picked my first part to complete the core part (aggregate the product details from different sources).
As per my work experience and knowledge, I have chosen the followings stacks to this mission.
UI: I would like to develop this application using React, React Router and React Native since I'm a little bit familiar on this and also most importantly these will help on developing both web and mobile apps. In addition, I'm gonna use the stacks JavaScript, jQuery, jQuery UI, jQuery Mobile, Bootstrap wherever required.
Service: I have planned to use Java as the main business layer language as I have 7+ years of experience on this I believe I can do better work using Java than other languages. In addition, I'm thinking to use the stacks Node.js.
Database and ORM: I'm gonna pick MySQL as DB and Hibernate as ORM since I have a piece of good knowledge and also work experience on this combination.
Search Engine: I need to deal with a large amount of product data and it's in-detailed info to provide enough details to end user at the same time I need to focus on the performance area too. so I have decided to use Solr as a search engine for product search and suggestions. In addition, I'm thinking to replace Solr by Elasticsearch once explored/reviewed enough about Elasticsearch.
Host: As of now, my plan to complete the application with decent features first and deploy it in a free hosting environment like Docker and Heroku and then once it is stable then I have planned to use the AWS products Amazon S3, EC2, Amazon RDS and Amazon Route 53. I'm not sure about Microsoft Azure that what is the specialty in it than Heroku and Amazon EC2 Container Service. Anyhow, I will do explore these once again and pick the best suite one for my requirement once I reached this level.
Build and Repositories: I have decided to choose Apache Maven and Git as these are my favorites and also so popular on respectively build and repositories.
Additional Utilities :) - I would like to choose Codacy for code review as their Startup plan will be very helpful to this application. I'm already experienced with Google CheckStyle and SonarQube even I'm looking something on Codacy.
Happy Coding! Suggestions are welcome! :)
Thanks, Ganesa
- Quick to develop889
- Great mvc589
- Powerful573
- Restful520
- Backed by google505
- Two-way data binding349
- Javascript343
- Open source329
- Dependency injection307
- Readable197
- Fast75
- Directives65
- Great community63
- Free57
- Extend html vocabulary38
- Components29
- Easy to test26
- Easy to learn25
- Easy to templates24
- Great documentation23
- Easy to start21
- Awesome19
- Light weight18
- Angular 2.015
- Efficient14
- Javascript mvw framework14
- Great extensions14
- Easy to prototype with11
- High performance9
- Coffeescript9
- Two-way binding8
- Lots of community modules8
- Mvc8
- Easy to e2e7
- Clean and keeps code readable7
- One of the best frameworks6
- Easy for small applications6
- Works great with jquery5
- Fast development5
- I do not touch DOM4
- The two-way Data Binding is awesome4
- Hierarchical Data Structure3
- Be a developer, not a plumber.3
- Declarative programming3
- Typescript3
- Dart3
- Community3
- Fkin awesome2
- Opinionated in the right areas2
- Supports api , easy development2
- Common Place2
- Very very useful and fast framework for development2
- Linear learning curve2
- Great2
- Amazing community support2
- Readable code2
- Programming fun again2
- The powerful of binding, routing and controlling routes2
- Scopes2
- Consistency with backend architecture if using Nest2
- Fk react, all my homies hate react1
- Complex12
- Event Listener Overload3
- Dependency injection3
- Hard to learn2
- Learning Curve2
related AngularJS posts
Our whole Node.js backend stack consists of the following tools:
- Lerna as a tool for multi package and multi repository management
- npm as package manager
- NestJS as Node.js framework
- TypeScript as programming language
- ExpressJS as web server
- Swagger UI for visualizing and interacting with the API’s resources
- Postman as a tool for API development
- TypeORM as object relational mapping layer
- JSON Web Token for access token management
The main reason we have chosen Node.js over PHP is related to the following artifacts:
- Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
- Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
- A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
- Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:
- Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
- Vue Styleguidist as our style guide and pool of developed Vue.js components
- Vuetify as Material Component Framework (for fast app development)
- TypeScript as programming language
- Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
- ESLint, TSLint and Prettier for coding style and code analyzes
- Jest as testing framework
- Google Fonts and Font Awesome for typography and icon toolkit
- NativeScript-Vue for mobile development
The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:
- Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
- Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
- Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
- Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
- Large scaling. Vue.js can help to develop pretty large reusable templates.
- Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.