FoalTS / foal

Full-featured Node.js framework 🚀
https://foalts.org/
MIT License
1.9k stars 142 forks source link

What do you like in FoalTS? #490

Open LoicPoullain opened 5 years ago

LoicPoullain commented 5 years ago

Hello, everyone!

Version 1 is finally out and so I will be able to do more communication on the framework!

To do this, I'd like to know what you like/love about FoalTS. Are there any key features, design or concepts that are important to you? Did you try other frameworks before using Foal and why did you choose this one over another? And finally, how did you hear about FoalTS?

It will really help me to talk about the framework in the future and make it better known. Any feedback, whether long or short, is appreciated! 👍

squareloop1 commented 5 years ago

Hey Loic, first of: You are doing an absolute fantastic work on this. Keep it up 👍

I am using Node.js mainly to create a REST or GraphQL API as the backend for a Vue / React SPA/PWA. I used different frameworks before (express, nest, feathers) and now I am all in on FoalTS.

In my eyes a framework needs to make me as productive as I can possibly be and let me build clean, maintainable and scalable applications fast without the need for alot of boilerplate or alot of configuration. FoalTS just lets me do this.

It doesn't have a steep learning curve where you spend more time reading the docs than you are actually coding on your project. You don't need to learn the reasoning behind some exotic architecture or coding patterns. Everything just feels natural. The architecture is traditional and it makes everything very straightforward.

I love the hooks and how you can do routing, validation, sanitization, authentication and error handling almost all at once just with a few lines of code with it. It makes the controllers very precise and leaves your business logic nicely seperated in the services. I also love the utility functions like password hashing, generating tokens, the groups / permission system, the scheduling. Its something you need in most web application anyways and don't need to build from scratch.

I think FoalTS is the framework that was still missing from the node.js (typescript) ecosystem all along. Although there are alot of frameworks out there already, its definitely filling a gap and makes things as simple like no other framework does out there.

For the future of FoalTS I would love to see it make building backend applications even more productive while still keeping the easy and natural coding style it currently has and not overbloat it.

I heard about FoalTS on some reddit thread while looking for a TypeScript alternative to Nest.JS because I just felt not as productive with it and did not really became friends with the architecture.

c0ncentus commented 5 years ago

Hi, I didnt practice yet Foalts but i have newsletter about git activities ...

So I would love make with FoalTS my API and my frontend app keep the app more freedom as possible please 👍 .

Lisibility in foalTs is what I loooooooooovvvvve.

Do not please make like angular, it's suck 👎

tristan957 commented 5 years ago

I just stumbled across this framework after being about 3 months into a NestJS application. I am very tempted to give this a try and use it in production to replace my NestJS app. I am probably gonna do it because honestly I am tired of the dependency injection errors in NestJS. This just looks absolutely amazing. I do have one suggestion. NestJS has a ValidatorPipe which performs the same function as your Validator hook. NestJS makes use of class-validator, maybe the Validator hook should also make use of class-validator instead of having to type out all the boilerplate. I'm probably going to write my own Validator hook that does this. I am kind of excited to try this framework out. I was getting burnt out pretty badly using NestJS, but maybe with this I'll be refreshed.

Edit: Oh wait I am an idiot I just found the ValidateBodyFromClassHook

kingdun3284 commented 5 years ago

I love foalts due to its simplicity and the philosophy behind it. Although the framework isn't mature enough(still not enough built in functions) for rapid prototyping and development, the simplicity of its architecture makes it really easy to customize and merge with some already powerful framework and libraries.

yaaminu commented 5 years ago

I like foalts because:

avxkim commented 5 years ago

Would like to see more maintainers, because @LoicPoullain can't do everything alone.

yosbelms commented 5 years ago

I like it because, it is simple, TypeScript, TypeORM, documentation is great, makes me productive.

@webcoderkz I can be a maintainer if the community agree. I'm planning to use this framework in my next big project, so I have enough reason to help polishing.

cc @LoicPoullain.

rust4m commented 5 years ago

Hello, I like Foalts very much ,i want to use it in my project and have one question,will it be supported in future? thank you!

LoicPoullain commented 5 years ago

yes @rustam013 😉

morrislaptop commented 4 years ago

I would like to see a Cache module with an API like Laravel's - just redis for the moment

viert commented 4 years ago

I came across FoalTS recently and, the following two days just couldn't help exploring it.

5 years ago I came up with a simple python web framework and created 4 projects of different sizes with it. Recently I was researching Typescript/Nodejs "battlefield" and what I absolutely love in FoalTS is that it surprisingly follows the same rules and implements almost the same architecture I came up with and got used to.

geekflyer commented 4 years ago

I was recently researching modern TS first frameworks for node and came across FoalTS. Comparing it mostly to NestJS. Haven't really made a decision yet what to use but here are some thoughts: What I like:

What I don't like:

Imo the last point is kind of a dealbreaker for me. It's great to have a TypeScript first framework, but it should provide and encourage to use fully type safe constructs throughout the app. Generally speaking it seems to me this wasn't a priority in FoalTS' design. NestJS isn't super type safe everywhere either, but I think a little more at least. I also wish FoalTS would use something like io-ts for the scripts or API body validation or at least provide an out-of-the-box opinionated way to generate TS types from the AJV schemas.

LoicPoullain commented 4 years ago

@geekflyer I opened an issue on Mocha vs Jest (#629). Could you give us more details on why you prefer jest to mocha?

Regarding the type issue, maybe class-transformer and class-validator could solve your problem. They can be used to serialize, deserialize and validate plain objects with classes. FoalTS has a hook to use them for request bodies. It does not work for shell scripts though.

jondot commented 4 years ago

@LoicPoullain I'll try to give my 2c. I'm a long-time Rails and Ruby developer, and I still look at all other frameworks with the same "goggles" of being a Rails dev.

As a guideline -- the reason I'm more attracted to FoalTS than other frameworks (including Nest, Sails, Feathers, etc.) is that it's the closest to Rails + Simplicity + unneeded fluff as possible.

First here's a breakdown of the "competition":

And now for FoalTS feedback. I'll make it completely direct in order to be the most helpful (not trying to beat around the bush here):

Code

  1. The name -- you might want to think about it again, but in fact, the thing that made me evaluate FoalTS last, is its name. Naming is hard, and I bet changing a name is harder, but maybe try thinking about something close but different and more familiar? (Foal is hard to pronounce, not sure it means anything and it sounds like foul or fool, and maybe try to drop the 'TS')
  2. No need for verboseness in filenames (I personally use 'user.ts' and drop the 'entity' suffix), if it's in an entities folder it's an entity. Let's go harder on conventions, I doubt people really want to change the folder structure. If you can make a sound folder structure for everyone that would be a huge advantage. I can read anyone's Rails apps code today, after more than 3 years of not writing Rails code. I know exactly where to look for and where, and it doesn't matter what company wrote the app or whom or what their personal style is.
  3. Make the default generated app a fully-blown todo app (the one you build in the tutorial), or make the tutorial be the first page you see. One of Rails' main selling points is that when you started using Rails you knew exactly what the next step is (a new Rails app starts with a welcome screen that tells you where you should edit code)
  4. User management. Again, one of Rails' strongest point (maybe the strongest) is that devise (the authentication gem) was fully-integrated and a no-brainer. No one wants to hand-code authentication logic again and again. There's really not much different opinions there and there's very little need to be "creative" or "select" some kind of different auth logic.
  5. Keep using everything that exists the way you do. No one likes the fact that someone builds an ORM from scratch when there's TypeORM (that's Adonis, Sails)

Focus

  1. As with every big framework, what you focus on first is what will be the framework's DNA. dont focus on dependency injection (like Nest).
  2. Focus on the same things Rails focused on: Models, models, models. And then, controllers. And then, testing and testability
  3. No one cares about strange pub/sub, hooks, injection, module-service-provider-factory abstractions.
  4. What does "focus on models" mean? well, have Foal give you a best-in-class User model that's ready with everything -- authentication, permissions, details (name,email,etc), social auth.
  5. What's another focus on models? an auto-generated admin (like Rails Admin). If you do that, that would be your killer feature.

Team

  1. Establish a way to get feedback (maybe an RFCs repo?)
  2. Label tasks as "good first task"
  3. Have a dedicated documentation site for people who contribute to FoalTS and give them first-class developer experience (again, this is what Rails did well)
  4. Ask for people's help and form a team (a diverse team is something only Sails has I believe)

Great stuff

  1. Looks like you managed to take care of a lot of details: secure headers, limits, connecting frontend, wirings, testing first class and more -- kudos!
  2. Looks like you're putting testing Foal itself in a very high priority -- great!
  3. Typing is extensive -- awesome!
  4. It looks like most of the stuff that's written is experience (as opposed to overengineerng) -- amazing!

Overall keep up the good work, and please do let us know where you need help.

matt-harvey commented 4 years ago

I agree with what @jondot said above.

I would add that one of the other things that is encouraging for me about FoalTS is that there are only 3 open PRs, and that the two PRs I submitted recently (albeit very small ones) were merged quickly. This is a sign the project is responsive to contributors—a very big positive for me.

One of the things that most puts me off using or contributing to a project are when there are hundreds of ancient, open PRs; or when the maintainers don't respond to Issues reasonably quickly. (Even if they don't immediately fix an Issue, a reasonably timely comment by maintainers to acknowledge an Issue goes a long way.) I think it's also important that when maintainers don't want to engage on an Issue or PR—when they don't want to implement a requested feature or don't think a certain fix is worth doing—that they say this explicitly and are unafraid to close open tickets rather than letting them sit for months or years unresponded to.

Making sure FoalTS continues to be responsive to potential contributors, is going to be one of the best ways of ensuring its long term viability, in addition to the points raised by @jondot above under "Team".

chaostheory commented 4 years ago

Hey Loic,

As everyone has already said, Great work!

What I would like is MS SQL support since TypeORM already supports it, and FoalTS uses TypeORM. I know it sucks to have to deal with Windows (I have no choice at work), but MS SQL Server now has a developer edition that's free to download.

Thanks!

LoicPoullain commented 4 years ago

@chaostheory I tried to add its support one year ago and, this afternoon, I tried again to see how it goes but I couldn’t succeed. Setting up just a simple MS SQL database in a CI with docker is challenging and it does not seem to become easier in the future: https://github.com/microsoft/mssql-docker/issues/2. The complexity and extra work needed to maintain it pushes me to leave its support aside for now.

anonimusprogramus commented 4 years ago

Meanwhile waiting for the Cryos arriving, I did a quick googling and revisiting other "nodejs typescript framework". Google shows FoalTS ranks high in first page (ymmv), with already known NestJS. And there's Ts.ED and (new, I think) Typetron. They're fairly similar with Cryos and may have good ideas for Cryos.

But so far, Cryos' simple and progressive philosophy feels right and promising.

Thanks and keep it up your good work @LoicPoullain & team :+1:

elycheikhsmail commented 3 years ago

foalts great project, the first time see when I searche for django equivalent writen in ts. use beautful orm typeorm cli for create proj and run it data validation use ts decorator to write readable code swagger api ... the only pb is the node pb node_modules ... if we can run foalts with deno it will great dev experience

lcnvdl commented 3 years ago

He usado otros frameworks, como Adonis. Lo que me gusta de FoalTS es que en primer lugar, usa Typescript. Además, me gusta el hecho de que te mantenga la estructura de las carpetas ordenada, similar a Angular. El hecho de que tenga templates para generar servicios, entidades, etc. es espectacular.

Me gusta que pueden hacerse aplicaciones tanto simples como complejas. Es escalable. No "reinventa la rueda", permitiéndote usar excelentes librerías, tal como "Typeorm". Ojalá no se detenga nunca el desarrollo de FoalTS.

francelwebdev commented 3 years ago

Hi Loïc, First: you are doing an absolutely fantastic job. Before, i'm using Ruby on Rails and due to the slowness of Ruby on Rails, i'm actualy all in into FoalTS. I like FoalTS because, it's simple, TypeScript for static typing, TypeORM (a good ORM), the documentation is great, makes me productive like Ruby on Rails.