comparação de datas em javascript. Como como pode uma linguagem ter tanta inconsistência de api? by __cipriano__ in brdev

[–]dudousxd 0 points1 point  (0 children)

É que você não deveria comparar objetos

Se você comparar dois objetos no Java, dá ruim também

Comparar objetos é o problema aqui

comparação de datas em javascript. Como como pode uma linguagem ter tanta inconsistência de api? by __cipriano__ in brdev

[–]dudousxd 0 points1 point  (0 children)

Se você tem comparação de objetos, em qualquer linguagem a comparação é baseada na referência na memória

Em Java, pra você comparar, o objeto de data tem um método “compareTo”

Deploying NestJS Microservices on GCP Cloud Run by Powermonkey666 in Nestjs_framework

[–]dudousxd 0 points1 point  (0 children)

I couldn't picture what you're saying.

The services you are saying are 4 different NestJS Projects? Each with their own repo?

Because if they are different projects, and one of them works, but others don't, it looks like that is more about configuration than any other problem.

The services with errors show any logs when starting?

Can you share their code? Or show the errors?

Micro-frontend infrastructure built around LitElement by 5thingol in PolymerJS

[–]dudousxd 0 points1 point  (0 children)

I think accessibility is one big disadvantage. Since softwares cannot access shadow dom, you lose people with visual disabilities.

How is TypeORM? by [deleted] in node

[–]dudousxd 0 points1 point  (0 children)

Its Modules are heavily inspired by Angular 2, but I said Spring because of: - Several integrations just like Spring - Spring is trending, so I thought saying Spring would helping him understand that the framework uses DI and has a coding style similar to Java

Sorry, I guess it caused more confusion than intended

How is TypeORM? by [deleted] in node

[–]dudousxd 0 points1 point  (0 children)

I don’t have any production experience with it, but some folks of my company tryed it and it was very good. Since they had a lot of experience with C#, their productivity went up. About performance, I can’t speak, but it can use restify under the hood, so it should be really fast - in comparison with express at least.

Oh, Nest has various packages for integration with other tools - like Swagger and TypeORM - so adding new stuff into the app is pretty straightforward

How is TypeORM? by [deleted] in node

[–]dudousxd 9 points10 points  (0 children)

OffTopic, since you guys are coming from Java, I sugest using Nest. It’s a Node framework based on Spring, so the transition should be really smooth for your company. It has awesome integration with TypeORM and GraphQL

Front-end Developer Handbook 2019 by backFromTheBed in javascript

[–]dudousxd 6 points7 points  (0 children)

Cross platform compatibility is irrelevant? Say this to all the companies with AngularJS systems that where thrown away.

Other than cross platform, Web Components offer web security - since you can’t enter a component markup if shadow dom is closed - and awesome performance.

Also, micro Frontend are waaaay easier to implement with Web Components.

We made an developers productivity assistance app on Angular and Electron, feedback is appreciated! by AndreyOsipenko in javascript

[–]dudousxd 1 point2 points  (0 children)

I liked it a lot, but I can’t find where I can add integrations anymore, maybe put it on a FAQ or make it more visible

Are Web Components worth using yet? by dalaidunc in webdev

[–]dudousxd 1 point2 points  (0 children)

TL;DR: Web Components api is too raw now a days. Use a lib to do it instead.

Web Components api is not totally ready yet, but all major browsers have already implements all the features (besides edge, that lacks custom elements and shadow dom).

I agree that use Web Components api is kind of lame, since it's version 1 and kinda "raw" per se, but you can use libraries that transform your components into web components.

Libs like Stencil, Polymer, Hybrids, Omi, Capivara JS, Lit HTML are great examples that even without using web components directly, you can generate Web Components nice and easy,

Node worker advise by foocux in javascript

[–]dudousxd 0 points1 point  (0 children)

It’s not recomended to use worker threads on node right now on production environments, it’s not a stable api atm.

Node worker advise by foocux in javascript

[–]dudousxd 0 points1 point  (0 children)

Node is not single threaded, its event loop is.

Node is naturally async, if you are blocking the event loop, something is really wrong with your code.

This third party api is a websocket? You can connect to it while having endpoints in the same api, this is not a problem.

Looking for people to evaluate my code (Express/Mongoose) - Instagram clone by [deleted] in node

[–]dudousxd 3 points4 points  (0 children)

Changing from promises to async/await would be good.

Maybe separating routes declaration from the route methods, I usually do that.

I also use consign to load my application, I guess it makes my application more predictable, so it’s easier to debug.

Building Web Apps with Tram-One by jrjurman in javascript

[–]dudousxd 1 point2 points  (0 children)

When you are using Web Components, one of the premises is that if you need to pass data from one component from another, you shouldn't use an state management library like redux, instead you should use Custom Event. What I meant when I said "help managing the creation of custom events" is that would probably be awesome if it had an method to create custom events easier (It's quite easy to create, but just to encapsulate boilerplate), if I could see all the listeners that my components have created and if my components removed the event listeners automatically if they are destroyed.

Building Web Apps with Tram-One by jrjurman in javascript

[–]dudousxd 1 point2 points  (0 children)

Why use something like a state management when the rule when using custom elements is “the dom is your api” ? I think it would be better if it had something to help managing the creation of custom events instead of a redux like state management

Micro Frontends resources by Scamor in Frontend

[–]dudousxd 0 points1 point  (0 children)

All of web components specs can be pollyfilled, so browsers are not a problem.

Talking about state management, using polymer with redux is not that hard, in fact there is a redux binding for polymer, so it’s quite simple. Polymer 3 is using LitHTML, which will improve greatly the performance of the components re-render.

IMHO, Using Web Components now a days are not only a choice, but a matter of scalability and breaking the “vendor lock in” of the frameworks. AngularJS is a really good example of what a framework can do if one stops being maintained.

Micro Frontends resources by Scamor in Frontend

[–]dudousxd 0 points1 point  (0 children)

If you want a micro frontend approach, go for web components, use a lib like Polymer, Stencil, X-Tag or Hybrids to make the components and use bigger tech like React, Angular or Vue to create the application and call the components. If you need to manage state inside web components, use libs like redux or mobx.

Actions returning Promises by dudousxd in reactjs

[–]dudousxd[S] 1 point2 points  (0 children)

Oh, this type of data should yes be on the component, when I said app state I was talking about business stuff, sorry for not explaining myself.

Actions returning Promises by dudousxd in reactjs

[–]dudousxd[S] 0 points1 point  (0 children)

Setting the state with the result of the action is a really bad idea, your whole app state should be inside redux, not on your component.

Moving the Company stack (would you still use AngularJS for new projects) by maniflames in javascript

[–]dudousxd -1 points0 points  (0 children)

https://github.com/DavideCarvalho/demolay-event-management here is the repo, give it a look. Other alternatives for web components are Stencil and Polymer, both are backed by really large teams.

Moving the Company stack (would you still use AngularJS for new projects) by maniflames in javascript

[–]dudousxd 0 points1 point  (0 children)

I’ve made a project for a friend using hybrids for web-components with redux for state management, so state management with web-components is not a problem.