Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What do you like in FoalTS? #490

Open
LoicPoullain opened this issue Jul 24, 2019 · 21 comments
Open

What do you like in FoalTS? #490

LoicPoullain opened this issue Jul 24, 2019 · 21 comments

Comments

@LoicPoullain
Copy link
Member

LoicPoullain commented Jul 24, 2019

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
Copy link
Contributor

squareloop1 commented Jul 25, 2019

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
Copy link

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
Copy link

tristan957 commented Jul 26, 2019

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
Copy link
Member

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
Copy link
Contributor

yaaminu commented Aug 7, 2019

I like foalts because:

  • Simple, flexible and straightforward architecture
  • Great documentation
  • Written in Typescript

@avxkim
Copy link

avxkim commented Sep 2, 2019

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

@yosbelms
Copy link

yosbelms commented Oct 8, 2019

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
Copy link

rust4m commented Nov 5, 2019

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
Copy link
Member Author

yes @rustam013 😉

@morrislaptop
Copy link
Contributor

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

@viert
Copy link

viert commented Jan 14, 2020

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
Copy link

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:

  • Simple DI
  • Flexible way to send responses (i.e. set status code, headers etc. dynamically) without having to work with the raw res object (in Nest one has to work with the res object to set things like that dynamically)
  • Hooks are simple to use, create and combine multiple concepts of NestJS into one. Also makes it easy to create new decorators
  • Scripts are a cool concept
  • The general philosophy/goals of FoalTS

What I don't like:

  • Mocha instead of Jest as default test framework
  • No Parameter / argument decorators (only method and class level decorators)
  • The Context object makes body, request params etc. type-unsafe and it doesn't even have a generic parameter to pass in those types. Similarly script arguments are by default type unsafe.

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
Copy link
Member Author

@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
Copy link
Contributor

jondot commented Feb 27, 2020

@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":

  • Nest mostly hype and marketing. Over-abstraction, pushed by Angular community (which is large), and has too many Angularisms. It's unopinionated and that's bad.
  • Sails 30 commits in the last year or two. Not an option
  • Feathers strange hooks abstractions, counterintuitive
  • Adonis in fact, the best framework so far, I'm waiting for v5.0. If/when it comes out, I may very well move to Adonis completely. For now v4.1 is a no-go.

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
Copy link
Contributor

matt-harvey commented May 3, 2020

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
Copy link

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
Copy link
Member Author

@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: microsoft/mssql-docker#2. The complexity and extra work needed to maintain it pushes me to leave its support aside for now.

@anonimusprogramus
Copy link
Contributor

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 👍

@elycheikhsmail
Copy link

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
Copy link
Contributor

lcnvdl commented Sep 9, 2021

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
Copy link
Contributor

francelwebdev commented Sep 17, 2021

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.

@LoicPoullain LoicPoullain unpinned this issue Jan 21, 2023
@LoicPoullain LoicPoullain pinned this issue Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests