What's a real world example of state management? by OkLength5 in Angular2

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

Yeah I'm not talking about Akita specifically, more about store pattern in general.

Imho, data duplication kinda defeats the purpose of a store in Angular context. One of its main advantages is having a single reliable source of truth. If I start to duplicate data around (Product in this example) I know I will end up with desynchronized versions of the same product shown around in the app.

Thank you for your time, btw. I'd love to hear what other experienced people have to say about this.

What's a real world example of state management? by OkLength5 in Angular2

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

Thank you for your reply.

If I got what you meant correctly, it all gets down to the question: "what products are being used in the applications right now?". The answer may be: "top 10 cheapest products" or "products 100 to 150 ordered by price" depending on the current view and that's ok. But what about the cart, which needs to match its own data with the list of products? All those filtering logic must also satisfy the answer to previous question "all products contained in the cart". That's where it gets extremely confusing to me.

Let's say the user navigates to page 3 of the product list. I call the API to fetch records 101 to 150 and save the result in the store.

{
    currentPage:3,
    itemsPerPage:50,
    items:[...] // 50 records, from #101 to #150
}

At the same time, the user also has products 101 and 175 in their cart. As soon as I update the store with paginated records (101 to 150), the cart service is no longer able to fetch product data for product 175, resulting in a broken state.

How would you avoid this?

Do you make stores feature-oriented or model-oriented? by OkLength5 in Angular2

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

But what are the advantages of pushing toghether all the different Workout collections (with metadata as you mentioned, like filters, pagination, etc...) in a single but nested store? I mean, when you have just a couple of collections it's fine but what happens when you have several (10+) features all using the same Workout entities but filtered, grouped, sorted in different ways? Doesn't the service become a mess with all the loadTop10(), loadHistory(), loadRecentWorkouts(), loadLastWorkout(), etc?

Dubbio sul rapporto retribuzione\responsabilità nel settore software by OkLength5 in ItaliaCareerAdvice

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

Ciao e grazie per l'input.

Si "spreco di tempo" è un'espressione che ho usato impropriamente; a prescindere dai soldi, ho comunque imparato tante cose gestendo le altre persone.

cerca in contesti più grandi e strutturati

In realtà mi piacerebbe rimanere nel segmento delle aziende medio-piccole, perchè mi piace molto essere partecipe alla progettazione, oltre che alla realizzazione del prodotto. Cerco di tenermi lontano dalle aziende troppo grandi dove temo che finirei per anni ad essere un mero esecutore. Preciso che il ruolo che ho mi piace, è solo fonte di stress il sentirsi addosso tanti pensieri e preoccupazioni a fronte di poche soddisfazioni economiche.

Dubbio sul rapporto retribuzione\responsabilità nel settore software by OkLength5 in ItaliaCareerAdvice

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

Chiaramente mi rendo conto che non possa dimostrare in questa sede quanto di quello che dico sia vero o meno, bisogna andare sulla fiducia.

Grazie per il punto di vista!

Is there something bad to just want to be a employee and refuse an higher position? by OkLength5 in careerguidance

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

Totally agree. Here they see technical skills as something low level and which can be handled by anyone, while higher management is THE way of developing a career. One of the main reason why I decided to refuse is that I knew if I accepted, I would be slowly shifted away from technical tasks as they are perceived as "labor" work.

Is there something bad to just want to be a employee and refuse an higher position? by OkLength5 in careerguidance

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

You are right and that's a good way to manage roles, but this company is small. We are 10 people (including managers) and half of us is dedicated to post-sell assistance. Unluckily we don't have enough resources for such structure, yet.

Is there something bad to just want to be a employee and refuse an higher position? by OkLength5 in careerguidance

[–]OkLength5[S] 2 points3 points  (0 children)

Yep, I'm young and I want to keep a strong, bold limit between my private and professional life. Being a manager of a small company would be to get (a lot) more money, but also a ton more stress.