Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Yet Another Node.js Framework
62 points by donaldpakkies on Nov 27, 2022 | hide | past | favorite | 39 comments
About a year ago, I stumbled upon a new Nodejs language called "Imba", I found this language to be interesting and it seemed like it had a lot of potential. Doing a bit of digging, I realized no one had created a framework for it, so what did a normal dev do? Well, a normal dev went ahead and created another Nodejs Framework, only this time it was meant for Imba.

So what did I create? I created a batteries included Framework heavily inspired by Laravel but it runs on Nodejs, and uses Imba as the default language, but you can actually use TypeScript or JavaScript. In fact, when creating a new project using the Framework, you will be asked if you want to use "Imba" or "TypeScript".

You can scaffold an Imba SPA or MPA, you can even use React or Vue, it all depends on what you are used to.

For more information, you can visit https://formidablejs.org

Keen to hear your thoughts



    export class TaskController extends Controller {

        @use(StoreTaskRequest)

        store(request: StoreTaskRequest): void {

            const description: string = request.get('description')

        }

I've done enough Spring Boot to know I never want to do Spring Boot in my life again.


Yeah, decorators were a mistake. I don't want any in my code or my dependencies.


Why does it need the use if its already a parameter?


It’s a dependency injection pattern. The decorator is telling some other piece of code what to pass in to that method, or to set some hidden context.

I’d check the docs for what it specifically does, but the site is completely unusable on iOS.


It would make more sense if the injected variable was an interface, the decorator telling you what the concencrete type should be. I think? Otherwise, yeah totally pointless.


So this is only meant for DI, and the main benefit is request validation. You could also opt to use the controller's validation helper if you don't want to use the `@use` decorator.


Help me out here, what does that bit of JS have to do with Spring Boot?


Magic decorators is the trigger, I think.


Probably that @use thing?


I share the hate.


Cool! Actually, cool is an understatement, but I'm too foreign to Imba to provide feedback on that front. Pretty sure there is enough to spark a discussion, but few bullet points:

* Imba focused, yet you're greeted by TS example and the Imba demo is too dense to parse quickly

* Not enough short info and too much text to spark my interest for reading

* I still want to read something, so I head to GH repo (I have to search for actual core repo, plus I'm greeted by wall of text again) and when I found it, the README is bare :(

https://github.com/oven-sh/bun and bun.sh are pleasant reads for me. All of this is subjective and might turn be a turn-off for hardcore folks, but that's not really the target audience for Imba anyway :)

And don't fear the direct URL!


Thanks for the feedback


FYI, Formidable is a very popular npm package for forms: https://www.npmjs.com/package/formidable


exactly my thought. "isnt this already a thing?", oh yes its a very famous npm package for forms.


Very awesome to learn about a new language in the Node.js ecosystem

Some feedback:

- I don’t know what Imba is, and likely a lot of other devs don’t either. Your front page should sell me on both Imba and your framework

- When I’m personally considering a new framework. I love example projects so I can see how common usecases might look in code. Consider having a few example projects easily discoverable from the home page for folks to sift through

Good luck!


Thanks for the feedback, will definitely look into example projects. I also have a few tutorials in the pipeline


Looks neat!

Something for next time, you might get faster/more visibility if you put the url in the link field. I had to scour for it in the description (not really, but you know)

https://formidablejs.org


Thanks for the tip


Now waiting for fireship to make a video on it XD


https://scrimba.com/scrim/czvKPPsw

Imba was used to build Scrimba, the interactive platform to learn coding(mostly web related courses.)

It's pretty cool. I tried it out in its nascent stages.


A web framework. You mean a web framework for the NodeJS environment.

You can use JavaScript and node for many things that have little to do with serving web pages, and I was really expecting something different or lower-level since you didn't mention "web".


What's the difference between Imba and JS/TS? Is it anything other than alternative sytax for JS?

The webpage is not very conclusive on this.


I think one of the reasons for imba not having a framework is, it itself is a framework. It has router support, server side rendering strategy and also comes with its own css support. However, I understand here it is using imba language to create a framework which can use other libraries like React and Vue.


You're actually correct, you can also use Imba alongside the Formidable Framework should you wish to


I’m definitely going to try this out on a personal project soon.

I had forgotten about Imba. I recall trying it a few years ago, and I loved it, with the exception that it wasn’t capable of doing something that I considered rather crucial at the time.

I can’t for the life of me remember what it was, and I know there was an issue filed asking for exactly what I wanted, with positive intent to add the feature, but as time went on I kind of dropped and forgot about Imba.

I’m curious to try something in it and see how I fare with however far it’s progressed since then. And I will definitely check this framework out when I do.


This is cool, it's always nice to see inertia.js being used.


Thank you


I would like to be sold on imba first.


Imba is a programming language that feels like ruby.

It has first class support for "the web" which means tags and components are first class citizen and you don't need something like React or Vue.

Imba compared to React has no vdom and no reactivity (it just rerenders on each change ) , has built in CSS that is like but actually more powerful than tailwindcss

It's truly a marvel!


> just rerenders on each change

It is known from experience that this approach does not scale beyond toy examples and very simple websites. UX will begin to suffer from render lag somewhere around the UI complexity of an average webstore.


Yes, I've also had this experience with React. I've created several imba apps with more complex UI than an average webstore and still rerender from root without even being close to spending 16ms on a full rerender. It does work. https://www.freecodecamp.org/news/the-virtual-dom-is-slow-me...


My experience was not with React and I’m taking

> rerender from root under 16ms

with a huge grain of salt.


We use it for both backend and frontend of our site scrimba.com including the custom video format that renders each frame as dom. I think we have a non-toy amount of users. Example of a video: https://scrimba.com/scrim/czvKPPsw

And we are hiring if you want to work with the imba language:)


Everything rerenders there is no partial updates at all?


Everything rerenders from the root of the editor (that is - not the syntax highlighting of the code itself - as that is handled by monaco).


> a programming language that feels like ruby

CoffeeScript. Everything old is new again.


sidebar is blank on mobile


That's cool!


Thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: