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
Why does it have so low popularity? #12
Comments
Thank you! Well I never properly tried to promote the project, and to be honest I am still not very sure where to start :] I started to work on this because I moved from PHP (doctrine) and missed proper ORM in node world (was super pissed with typeorm as it lacks references). After few months I managed to start using it in one project, then few months of bug fixes followed (we have QA department where I work, so not just causally found bugs). Early this year I started to refactor stuff to make it more robust (higher code coverage, improved docs, support for various databases, improved API, removed necessity of extending BaseEntity, ...), and I am planning to release v2 very soon (once #11 gets merged basically). Then I would love to try to promote it somehow/somewhere as I believe it is pretty much unique project in typescript/node world (have much better API than typeorm, which is I guess the only proper data mapper in node world currently). I would say it is production ready, it powers 2 medium-sized projects now in production environment and everything works as expected (one of it uses it for about a year). Although, both are using MongoDriver (originally mikro-orm was mongo only ORM), so you could say SQL drivers are still experimental (but their code is fully tested). |
I experienced the same issues when looked through existing ORMs and query builders. I suggest you to start from:
This is a rough list of action items which I did for my own project on github, you can take a look at https://github.com/stalniy/casl I'm interested in this project because I want to build EavORM but don't want to reinvent the wheel. That's why I started searching for keyword "UnitOfWork" and this is how I found your project :) P.S.: don't forget to create JS examples to cover more people (there are some who doesn't like static typing or don't want to complicate things on backend by introducing build tools) |
Also use commitizen commit styles and semantic-release package, it will make generate of CHANGELOG easier |
Thanks for the summary, much appreciated!
I was also thinking about adopting some automatic commit message changelog, never heard of commitizen, looks nice! Will try to adopt that once v2 is released. Do you have some good articles to start with, or should I just go thru the docs? About JS usage -- currently it is not supported, as entity metadata are gathered via TS decorators. When I started the project, I aimed to vanilla JS version only, but migrated to TS before releasing the first version. I have a WIP for parsing annotations from JSDoc comments, that way it could be used with vanilla JS too, but it could be a lot of work to finish that I guess (and test it properly). Or I could simply let users provide the same JSON with metadata that is now generated when caching. Do you think it is worth it to invest some time finishing vanilla JS support before I start to promote the project? |
About Commitizen:
About Metadata generation: Just implement possibility to create a custom Update: |
Thanks again for your suggestions, hope I will have enough time in near future to get things moving :] Regarding the metadata provider, any help will be appreciated :] Will try to add support for that asap, in the end it could be pretty simple. Just finished #11 so will spend some time with that right now. One thing to note - the name is |
Also spent some time with that medium article. I am not much of a writer, so any suggestions are welcome (including for images) :] Its pretty much the same content as in docs, just added some introduction/motivation and wrapped things up. For cover image I was thinking about some meme with text "Yet another ORM? ORLY?" or something like that. Here is a draft link: https://medium.com/@b4nan/introducing-mikro-orm-typescript-data-mapper-orm-with-identity-map-9ba58d049e02 |
Another point which may help. There is a website for searching npm modules. It calculates some quality attributes for every package. Currently for MikroORM (1.2.3) it shows quality 80 (from 100). You can go here to check analyses results. You can find some explanations on About Page but the source code of their analyzer is pretty simple, so also you can read the code :) (this is what I did to understand JSON results). In this file you can find information how quality parameter is calculated |
Closing this now.
|
Hello, Sorry for the delay ("release time" :) ). So,
One more action item:
|
No problem, I had enough time to test v2 in my projects to find some bugs that needed fixing anyway :] I am finalising basic support for generating db schema from entity metadata, I guess I will have that ready this evening, then I will release v2.1 that also includes support for postgres and some other nice features (e.g. uuid primary keys, automatic ts-node detection, 1:M ordering, ... as well as some bug fixes), so will wait till that is ready before publishing the article. Thanks for the question, I tried to make the answer a bit thorough, to highlight some advanced features. Website added. |
So the article is published and submitted to DailyJS (waiting for approval). Thanks again for all the feedback and suggestions! |
I think that you should focus on comparing to TypeORM, showing its flaws and how mikro-orm fixes them. Someone that could convince me and other TypeORM or mongoose/Typegoose users to switch to |
I agree, need to focus on this. I am planning to help my friend with migrating typeorm project to mikroorm, so will definitely write notes on what differs and why its better. I can guarantee its not a copy-paste thing, but yeah, from outside it is really similar, I know what you mean. |
my two cents.
which make it more professional, and lead some tech guys to make decision and want to have a try. |
Thanks for your suggestions, I already moved to I would love to make the documentation better, do you have any concrete suggestions in this manner? It can be very time consuming so currently I am investing more time into features so I can compete with others, but my goal is to have up to date docs as much as possible. Not sure about the website itself, I think I will stick to github pages for now. What content other than docs would you expect there? Maybe something similar to what NestJS has? Simple one pager with highlights of some interesting features? I will also try to plan the development more transparently after v3 release. I have few bigger features I would like to cover soon (composite keys for example). I was planning to use github issues for this, plus link to them in ROADMAP.md. Will be also glad for suggestions on how to do it better. Currently I started developing features in |
Just jumping in to say congrats, this is clean and neat. I'm going to dig deeper in the code but to be faire from what I've seen for now Mikro could have a bright future. Typeorm is dying slowly, sadly and for understandable reasons the team does not have the time to maintain such a huge project without support. Moreover, TypeORM internals are questionnables, and even if it was a stepping stone for Typescript ORMs Mikro could very well be the next step. I would love to the NestJS devs embrace Mikro, I think it would greatly boost the project popularity. |
I’d recommend to add it to https://stackshare.io/ so people can compare it to typeorm Also you can add it here https://www.slant.co/topics/11235/~javascript-orms Search for articles and questions like “which ORM to use?” and try to naturally answer those questions or provide an opinion and proofs that is the best one currently |
Sorry to hijack this thread, just found out about I'm wondering how hard would it be to migrate a project from TypeORM to it, I guess considering there are no huge custom code that relies on TypeORM's API, and considering the mikroorm and TypeORM APIs look similar, it wouldn't be that hard, right? Also, what do you think of an automatic converter/migration* tool? * not SQL migrations, but some kind of converter that takes a set of TypeORM objects (config, migrations, models) and generates mikroorm equivalents). |
While they have similar entity definition, the internals are very different. TypeORM is more of a query builder for me, there is no in memory state management or implicit transactions - unit of work and identity map. In MikroORM you change the state of entities (synchronously) and then flush the changes to database once (inside a transaction). It is not that hard to migrate, but you need to understand the differences, nothing an automation tool can do for you. It could help with the config and entity definitions for sure, but personally I would rather use the entity generator to create new entities and port the missing logic from the old ones manually. You can take a look here to see how a migration from TypeORM to MikroORM may look like: |
Hey @B4nan, thanks a lot for the comprehensive reply! I'll definitely try MikroORM out for my next project, as I'm already a bit invested in TypeORM for the current one. Bad timing. As I mentioned though, I'm really impressed with the work you've been doing. I also like that the community is tight but responsive. It has been very difficult to get feedback on TypeORM as of late, let alone contact the core team/author :( One thing that I really like about TypeORM is the schema auto-sync feature. When developing prototypes or an MVP, it really helps as I don't need to have a strict idea about the schema, and I can just change the entity and TypeORM will update the schema in the RDBMS automatically, for me. I see that TypeGraphQL is also a vital part of my stack, but I see no reason why it wouldn't work the same with Perhaps a migration guide that lists main gotchas about converting a project from TypeORM to MikroORM would be useful, as well. I'd gladly contribute once I get my hands on it, as well. All in all, I'm quite excited about MikroORM and its future. Keep up the great work! |
Hello everyone, I was just looking for a new ORM to replace TypeORM, because many commonplace things turned into butthurt and dances with tambourines ( :rain dance ), performance tests were pleasantly surprised. Since I got here from the first Google request, the recommendations above work. P.S. Please add additional driver benchmarks. Keep up the great work! |
This is fantastic. Good enough to compel me to switch from typeorm halfway through a project. |
Hi @H6LS1S , |
@bkstorm you do not set up any request context so your identity map gets bigger and bigger, making each request slower and slower. This is indeed a misusage. Also for performance testing you should use For simlicity, I would suggest to go for manual forking, so instead of using the global router.post(
'/orders',
async (req: Request, res: Response, next: NextFunction) => {
const em = DI.orm.em.fork(); // <-- make a fresh fork so we dont polluate the identity map
try {
const order = em.create(Order, req.body);
order.items.add(em.create(Item, req.body[0].items));
await em.persistAndFlush(order);
return res.status(200).send({ orders: [order] });
} catch (error) {
return next('Error processing values');
}
},
); |
@B4nan I setup a request context in |
I see, missed that file (and it indeed looks ok), that might be because of the |
Nice. Based on the benchmark result, I decide to migrate my current project from TypeORM to Mikro-ORM. |
Is there any performance bechmark which is based on the most current version of these libraries? I've got dissed by TypeORM fans. It feels bad, please help |
We rewrote our entire codebase, 100k lines in mikro-orm and then went back to typeorm.
Whilst it solved a lot of issues that Typeorm had, we considered these two issues to be pretty major and typeorms issues arent so major. Mikroorm has a lot of nice features but also comes with a lot of its own issues. It's also important to note usecase was with PostgresSQL. |
What do you mean by poor migration manager? What version were you using? Did you report any of your problems? I don't see a single issue created by you... |
Hello there,
First of all, your project looks amazing! But I'm curious why is it not very popular on github? Is it produciton ready?
The text was updated successfully, but these errors were encountered: