You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/en-US/articles/what-is-nullstack.md
+53-9
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,67 @@ title: What is Nullstack?
3
3
description: Nullstack is an isomorphic JavaScript framework that allows developers to build Full Stack applications while staying focused on the product features, and solving the user problems, rather than spending a significant amount of their time worrying about layers of abstraction and choosing which tools make them look fancy
4
4
---
5
5
6
-
Nullstack is an isomorphic JavaScript framework that allows developers to build Full Stack applications while staying focused on the product features, and solving the user problems, rather than spending a significant amount of their time worrying about layers of abstraction and choosing which tools make them look fancy.
6
+
Nullstack is a full stack web framework that allows features to be created in a single component, we call it "feature-driven" components. Nullstack's main feature is having functions that run in the server and client within the same file, it uses a compilation step to create multiple bundles.
7
+
Besides that, the framework comes with tons of small conveniences out of the box, but the cool thing is that all of them are usable in the exact same way, they are passed as arguments to every function of your components, and you don't have to learn a bunch of new concepts to be productive. As a rule of thumb, all you need to know ahead of time is that every static async function will run in the server, and every function receives an object with the framework context merged with the application context and the component context.
7
8
8
-
Nullstack can be used to build a variety of projects, such as Blockchain dapps, web applications (SSR, SPA, SSG), Google Chrome extensions, Hybrid Native applications, Electron applications, and anything else you can do with JavaScript at the same time with a single codebase.
9
+
# What is feature-driven?
10
+
It means that every component is a full feature in itself, but it is up to you to decide how to break features down. As an example, you could have a "BlogPost" component or you could have a Blog a Post a Comment, and a Like component and they are nested into each other, heck you could even have an entire e-commerce application be a top-level component imported in another application, that's the beauty of full stack components.
9
11
10
-
## Feature Driven
12
+
In the case of the Like button for instance, you would have the server functions to load the number of likes that item has, a render function to show your likes, and an event that triggers a server function to save your like, all in a single file if you want, the main reasoning for this architecture is that the project manager's tickets, the UX and the code look pretty much the same.
11
13
12
-
A Nullstack feature speaks the same language to the developer, the project manager, and the client.
14
+
*But my bootcamp teacher said I need at least 3 layers of abstraction to be a good developer, can I do that in Nullstack?*
13
15
14
-
Nullstack components are complete features. They connect the application from the backend to the frontend providing a fully functional feature in a single component.
16
+
Yes you can, Nullstack is a big foot-gun you can shoot your own foot in your favorite style, just ask for the permission of an adult first.
15
17
16
-
There're no such thing as big projects in Nullstack, only small features. A feature could be composed of other features, one feature could even be an entire application imported as a component into another application.
18
+
# Is it a react framework?
19
+
Nope, but it uses JSX. Nullstack does not use hooks, instead, it aims to keep JavaScript's natural flow, but makes it reactive. Fun fact tho, Nullstack actually started as a react framework that just aimed to add server functions to the components, but eventually, I found that sticking to that model was limiting our creativity.
17
20
18
-
This might look wrong and go against everything you've ever learned, but it works, it's faster and more flexible. Your code gets much simpler and easier to understand, people can quickly jump in your codebase and start contributing. Developers can make changes in giant projects without any cognitive overhead.
21
+
*But react has the support from all those big companies, why should we use Nullstack?*
19
22
20
-
Nullstack does not need an ecosystem, you probably won't find "nullstack-*" libraries as you can simply use vanilla JavaScript packages. We believe that JavaScript reached a maturity level that creating a piece of code that does exactly what you need is going to often take less lines and lead to less overengineering than configuring a library .
23
+
Well, you shouldn't use it just because its a new tool, use it if you want, I love using it at AE Studio tho, though we are building brain-to-computer interface software here, and we have a few opinions about just letting meta dominate everything.
21
24
22
-
Feature-driven development might not be for everyone, but Nullstack gives you enough freedom to use it however you see fit. You can still use Nullstack with layers and abstractions, we're not here to hold your hand, you're free to shoot your own foot.
25
+
# Why did you build another framework?
26
+
That wasn't the original intention, we were actually trying to build a coffee shop, but we get distracted very easily... you can learn more about the history behind Nullstack in Anny's TDC talk.
27
+
28
+
Initially, we just wanted to put the server code alongside the client code, because the projects we were working on had very similar patterns, and one of those patterns was that the clients would completely change their minds all the time, and your regular clean code kinda thing was not keeping up with the changes.
29
+
30
+
# Does it use a virtual dom or a compiler or signals?
31
+
The answer is yes. Nullstack has what I like to call a "Virtual Pipeline" it optimizes things differently in different scenarios for different environments. However that is just an implementation detail, the main thing is that it **just works** and we may change anything internal at any time. The only condition we have is that anything that works in vanilla JS should work in Nullstack, so we won't adopt any cool new trends if it limits the developer experience, or if the developer now needs to be aware of new edge cases instead of getting stuff done.
32
+
33
+
# Does it uses Classes or Functions?
34
+
It uses whatever JavaScript code you can come up with. By default it follows the same paradigm as vanilla: functions are pure, and classes hold state. I know I will lose a lot of devs after the previous sentence, but keep in mind when people say "classes are bad" they actually mean "classes are bad on the current framework I'm using" . In Nullstack it just feels very natural, give it a try.
35
+
36
+
# Is it blazingly fast?
37
+
Yes. But it is optimized for what I consider the "right type of fast", it's fast for the users. It uses a mix of architectures to optimize for different scenarios, but all of them aim to have the users have very responsive experiences, even when they are offline.
38
+
39
+
You can always benchmark things and be excited about microseconds happy, but that all ends when your user 3g is not feeling like reaching your server that day.
40
+
41
+
That being said, we love spending time micro benchmarking things and its actually pretty fast, if you sneak into our commit history you will notice we went for "what we need to create products" first then we went "optimization happy", as you should if you plan to code professionally and not just watch youtube videos.
42
+
43
+
# What can i build with it? Does it scale?
44
+
You can build anything you can build with regular JavaScript. We've built so far plenty of PWAs, blockchain applications across multiple blockchains (dApps), mobile games, capacitor applications, electron applications, chrome extensions, and even things to visualize brain data that require a lot of performance. Currently, we have a SaaS with hundreds of thousands of hits a day, and it is holding just fine on a "regular JavaScript-priced" server.
45
+
46
+
# How can i use a new framework? it wont have an ecosystem.
47
+
Remember when I mentioned we keep everything vanilla just working? that makes most JavaScript packages for browser and server compatible with Nullstack out of the box, that's a pretty huge ecosystem in my opinion. But also if you are feeling like a mad scientist, you could always just install your favorite framework on top of a Nullstack's application by rendering to an element controlled by it.
48
+
49
+
# Does it have any kind of telemetry?
50
+
No, we do not collect any data. Nullstack was not built as a framework first, it was extracted from real applications we worked on over the years, so the features it has are based on what we needed as opposite of what the data would point would cause better thumbnails.
51
+
52
+
*But how will you guys know what features we want then?*
53
+
54
+
You can always tell us on discord or create an issue on GitHub, we will be happy to talk about it!
55
+
56
+
# Does Nullstack have any social media?
57
+
Of the 6 main contributors of Nullstack 6 of them are autistic, including the person writing this wall of text... so you mostly lost us at the "social" part. We did try tho, and we created a YouYube Channel, a Twitter, and an Instagram, but 4 of us also have ADHD so we ended up procrastinating and not posting on it, oopsie. We are pretty active on discord though, that's the place we are forced to log in anyway to coordinate our raids.
58
+
59
+
# What is Nulla-Chan?
60
+
Nulla-Chan is the avatar of Nullstack, it belongs to a category of avatars called a "Waifu". If you don't know what a waifu is, that probably means that you have your life on the right track. Fun fact, the waifu character was created by the author's IRL waifu.
61
+
62
+
# What was the hardest part creating a framework?
63
+
Definitively it was deciding if we should spell it "full stack", "fullstack", or "full-stack". Seriously please tell us on discord which one to pick.
64
+
65
+
# How can i get started?
66
+
Just go to your favorite terminal and type "npx create-nullstack-app app-name", and if you are feeling fancy you can also pass the flags --typescript and --tailwind.
0 commit comments