Are you losing your mind trying to convert your Vuex store to Pinia? Here's a step-by-step guide to walk you through this process.
- Brief introduction to Pinia
- Comparison between Vuex and Pinia
- Install and define a Pinia store
- Migrate store module from Vuex to Pinia
- Testing Pinia
- Migrate store usage in components
- Migrate component tests using a mocked store
This document provides an introduction to NodeJS for beginners. It discusses what NodeJS is, how it uses non-blocking I/O and event-driven architecture, and how to set up NodeJS. It also covers global objects, modules, asynchronous vs synchronous code, core NodeJS modules like filesystem and events, and how to create a basic "Hello World" NodeJS application.
This is the slide deck from the popular "Introduction to Node.js" webinar with AMD and DevelopIntelligence, presented by Joshua McNeese. Watch our AMD Developer Central YouTube channel for the replay at https://www.youtube.com/user/AMDDevCentral.
The document outlines the agenda for a presentation on Node.js, which includes defining what Node.js is, how it works, examples of its use, how to learn Node.js, and what problems it is well-suited to solve. Key points are that Node.js is a JavaScript runtime built on Chrome's V8 engine, uses non-blocking I/O, and is well-suited for building microservices and real-time applications that require high throughput and scalability. Recommended resources for learning more include nodeschool.io, codewars.com, and nodeup.com.
Presentation covers the concept of hybrid mobile application development as well the examples, A better way to start developing applications for all platform in amount of just one, The future of application development.
This document provides an overview of the Ionic Framework for developing hybrid mobile applications. It discusses the advantages of hybrid apps over native apps, including using a single codebase across platforms. It introduces Ionic as an HTML5 framework built on Angular and Cordova, containing CSS and JavaScript components for building mobile-optimized apps. It covers getting started with Ionic, the CLI, components, platform access tools, and includes examples. The goal of Ionic is to provide native-like performance for building beautiful, easy-to-maintain hybrid mobile apps.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
React is a JavaScript library for building user interfaces. It was created by Facebook and is best for building dynamic websites like chat applications. React uses a virtual DOM for efficiently updating the view after data changes. Components are the building blocks of React and can contain state and props. The document provides an example of a simple component class and demonstrates how to add state and props. It also includes links to example code and MicroPyramid's social media profiles.
This document provides an introduction to NodeJS for beginners. It discusses what NodeJS is, how it uses non-blocking I/O and event-driven architecture, and how to set up NodeJS. It also covers global objects, modules, asynchronous vs synchronous code, core NodeJS modules like filesystem and events, and how to create a basic "Hello World" NodeJS application.
This is the slide deck from the popular "Introduction to Node.js" webinar with AMD and DevelopIntelligence, presented by Joshua McNeese. Watch our AMD Developer Central YouTube channel for the replay at https://www.youtube.com/user/AMDDevCentral.
The document outlines the agenda for a presentation on Node.js, which includes defining what Node.js is, how it works, examples of its use, how to learn Node.js, and what problems it is well-suited to solve. Key points are that Node.js is a JavaScript runtime built on Chrome's V8 engine, uses non-blocking I/O, and is well-suited for building microservices and real-time applications that require high throughput and scalability. Recommended resources for learning more include nodeschool.io, codewars.com, and nodeup.com.
Presentation covers the concept of hybrid mobile application development as well the examples, A better way to start developing applications for all platform in amount of just one, The future of application development.
This document provides an overview of the Ionic Framework for developing hybrid mobile applications. It discusses the advantages of hybrid apps over native apps, including using a single codebase across platforms. It introduces Ionic as an HTML5 framework built on Angular and Cordova, containing CSS and JavaScript components for building mobile-optimized apps. It covers getting started with Ionic, the CLI, components, platform access tools, and includes examples. The goal of Ionic is to provide native-like performance for building beautiful, easy-to-maintain hybrid mobile apps.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
React is a JavaScript library for building user interfaces. It was created by Facebook and is best for building dynamic websites like chat applications. React uses a virtual DOM for efficiently updating the view after data changes. Components are the building blocks of React and can contain state and props. The document provides an example of a simple component class and demonstrates how to add state and props. It also includes links to example code and MicroPyramid's social media profiles.
Java. Explicit and Implicit Wait. Testing Ajax ApplicationsМарія Русин
This document provides information on explicit and implicit waits in Selenium. It discusses the differences between explicit and implicit waits, provides code examples for each, and covers related topics like WebDriverWait and ExpectedConditions. Key points include:
- Explicit waits are code defined waits for a certain condition, like using Thread.sleep(). Implicit waits set a default wait time for finding elements.
- WebDriverWait can be used with ExpectedConditions to wait for elements to meet a certain condition like being clickable.
- Implicit waits set a default timeout for finding elements across all searches during the WebDriver session.
- There are convenience methods like elementToBeClickable to avoid writing custom ExpectedCondition classes.
- Screenshots can be
Server side rendering design and development. Review of main server side rendering parts and development process. Next.js React framework for SSR review.
Main contents:
What is SSR?
Prerendering
SSR for popular frameworks
Custom SSR with Node.js and React
SSR with Readux and Mobx state managers.
Next.js
Node.js is an open-source server-side JavaScript runtime environment built on Chrome's V8 JavaScript engine. It provides an event-driven, non-blocking asynchronous I/O model to build highly scalable network applications. Node.js uses JavaScript for server-side development and can build various types of applications like web applications, REST APIs, real-time applications etc. It was created by Ryan Dahl in 2009 and has advantages like being open-source, lightweight, asynchronous and cross-platform. Node.js handles requests differently than traditional web servers by using a single thread event loop model. It also includes modules, functions and objects to work with files, streams, network etc.
Learn how to build RESTful API using Node JS with Express Js Framework. Database used is Mongo DB (Mongoose Library). Learn Step by step what is Node JS, Express, API and Mongo DB. Explain and sample code step to build RESTful API
The document discusses React Native and GraphQL. It introduces React Native as a way to build native mobile apps using React and JavaScript. GraphQL is presented as an alternative to REST and OData for mobile backends by allowing clients to specify the data structure needed and supporting relationships between data. The document demonstrates GraphQL queries using an online IDE and AWS AppSync as an option for building GraphQL backends with features like subscriptions and offline support.
What is React-Native?
Why React-Native?
How React-Native works in detail?
- Metro bundler
- Main Thread
- Shadow Thread
- Javascript Thread
Yoga Engine
Threads Communication in React-Native
Comparison with Flutter and Native
React-Native Components
This document provides an overview of ASP.NET Core and Blazor frameworks. It discusses the differences between ASP.NET and ASP.NET Core, benefits of ASP.NET Core like cross-platform support and modern frontend frameworks. It also summarizes Razor Pages, MVC, and Blazor - the different UI frameworks in ASP.NET Core. Blazor allows building client-side web apps using C# and runs on WebAssembly or as server-rendered apps. The document demonstrates how Blazor works and compares client-side versus server-side Blazor. It also includes a demo of building hybrid mobile/desktop apps with Blazor and .NET Multi-platform App UI.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
How to Convert a Component Design into an MUI React CodeWrapPixel
Material UI or MUI library provides you with robust, customizable, accessible, and advanced components, enabling you to build your own design system and develop React applications faster. That includes a huge list of Material icons, foundational components with MUI Core, advanced and powerful components with MUI X, templates, and design kits!
Are you eager to migrate your entire codebase to Vue 3 and composition API? Before starting the long journey away from Vue 2.6 you should consider a few intermediate steps:
- compatibility with your dependencies
- tests
- maintainability
- consider a step-by-step migration passing trough Vue 2.7
- what about the Vite/Vitest ecosystem?
Do you hear of Vue.js everywhere lately? With this presentation, you will be able to create your first app in just 30 minutes. Understand the basics and get yourself a solid knowledge to start your journey with the new progressive JavaScript Framework.
Maven is a build tool that helps manage Java projects and automates common tasks like compiling code, running tests, and managing dependencies. It uses a Project Object Model (POM) XML file to store build configuration which defines project dependencies, plugins, and other metadata. Maven standardizes project layout, builds, documentation, and the release process.
The document describes React, a JavaScript library for building user interfaces. It introduces some key concepts of React including components, props, state, and the virtual DOM. Components are the building blocks of React apps and can be composed together. Props provide immutable data to components, while state provides mutable data. The virtual DOM allows React to efficiently update the real DOM by only changing what needs to be changed. Data flows unidirectionally in React from parent to child components via props, and state updates within a component are handled via setState().
This document is a presentation about JavaScript that covers what JavaScript is, where it came from, and what it can do. It introduces JavaScript as a scripting language that is easy to use and learn and runs in web browsers. The presentation explains that JavaScript is unrelated to Java but borrows some naming conventions. It provides overviews of JavaScript basics like variables, operators, and functions, as well as more advanced topics like objects, events, and DOM manipulation.
This document provides an overview of traditional web approaches, real-time web applications, and SignalR. It discusses how traditional approaches rely on pulling data via HTTP requests, while real-time approaches use pushing via persistent connections. SignalR is introduced as a library that abstracts different transport mechanisms and allows developers to focus on application logic rather than connection handling. Key concepts covered include SignalR transports, connections, hubs for server-client communication, and how to get started with SignalR. The document concludes with a note about an upcoming demo.
This document outlines an agenda to learn Nginx in 90 minutes through a series of exercises. It introduces Nginx as an HTTP and reverse proxy server, discusses setting up the environment using Docker, and provides 5 exercises to learn basic Nginx configurations including setting up a first web page, proxying to an Apache server, load balancing across multiple servers with CDN, adding HTTP basic authentication, and enabling HTTPS with basic authentication.
This document provides an overview and introduction to React Native, including:
- What React Native is and the problems it solves like enabling cross-platform development using a single JavaScript codebase.
- The technologies that comprise React Native like ReactJS and how it binds to native platforms.
- Getting started with a basic React Native app and examples of extending it with custom modules.
- An overview of the React Native component library and APIs.
- Recommendations to get familiar with related technologies like JSX, Flow, and Node.js.
- Thoughts on the benefits and challenges of developing with React Native.
This document provides an overview of building mobile applications using React Native. It discusses React Native's ability to build high-performance, cross-platform apps using a single codebase. Key topics covered include the fundamentals of React Native, advantages like cross-platform compatibility and performance, creating a new project, basic components and styling, using Redux for state management, debugging tools, and deploying to iOS and Android platforms.
Ti sei perso nel caos di “props” ed “emit” della tua web app Vue.js? Usa Vuex!
Vuex è lo state manager di Vue.js per eccellenza, una singola fonte di verità che ottimizza la condivisione di informazioni tra componenti.
Vediamo come introdurre facilmente Vuex in progetti esistenti, con un occhio per il testing
Java. Explicit and Implicit Wait. Testing Ajax ApplicationsМарія Русин
This document provides information on explicit and implicit waits in Selenium. It discusses the differences between explicit and implicit waits, provides code examples for each, and covers related topics like WebDriverWait and ExpectedConditions. Key points include:
- Explicit waits are code defined waits for a certain condition, like using Thread.sleep(). Implicit waits set a default wait time for finding elements.
- WebDriverWait can be used with ExpectedConditions to wait for elements to meet a certain condition like being clickable.
- Implicit waits set a default timeout for finding elements across all searches during the WebDriver session.
- There are convenience methods like elementToBeClickable to avoid writing custom ExpectedCondition classes.
- Screenshots can be
Server side rendering design and development. Review of main server side rendering parts and development process. Next.js React framework for SSR review.
Main contents:
What is SSR?
Prerendering
SSR for popular frameworks
Custom SSR with Node.js and React
SSR with Readux and Mobx state managers.
Next.js
Node.js is an open-source server-side JavaScript runtime environment built on Chrome's V8 JavaScript engine. It provides an event-driven, non-blocking asynchronous I/O model to build highly scalable network applications. Node.js uses JavaScript for server-side development and can build various types of applications like web applications, REST APIs, real-time applications etc. It was created by Ryan Dahl in 2009 and has advantages like being open-source, lightweight, asynchronous and cross-platform. Node.js handles requests differently than traditional web servers by using a single thread event loop model. It also includes modules, functions and objects to work with files, streams, network etc.
Learn how to build RESTful API using Node JS with Express Js Framework. Database used is Mongo DB (Mongoose Library). Learn Step by step what is Node JS, Express, API and Mongo DB. Explain and sample code step to build RESTful API
The document discusses React Native and GraphQL. It introduces React Native as a way to build native mobile apps using React and JavaScript. GraphQL is presented as an alternative to REST and OData for mobile backends by allowing clients to specify the data structure needed and supporting relationships between data. The document demonstrates GraphQL queries using an online IDE and AWS AppSync as an option for building GraphQL backends with features like subscriptions and offline support.
What is React-Native?
Why React-Native?
How React-Native works in detail?
- Metro bundler
- Main Thread
- Shadow Thread
- Javascript Thread
Yoga Engine
Threads Communication in React-Native
Comparison with Flutter and Native
React-Native Components
This document provides an overview of ASP.NET Core and Blazor frameworks. It discusses the differences between ASP.NET and ASP.NET Core, benefits of ASP.NET Core like cross-platform support and modern frontend frameworks. It also summarizes Razor Pages, MVC, and Blazor - the different UI frameworks in ASP.NET Core. Blazor allows building client-side web apps using C# and runs on WebAssembly or as server-rendered apps. The document demonstrates how Blazor works and compares client-side versus server-side Blazor. It also includes a demo of building hybrid mobile/desktop apps with Blazor and .NET Multi-platform App UI.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
How to Convert a Component Design into an MUI React CodeWrapPixel
Material UI or MUI library provides you with robust, customizable, accessible, and advanced components, enabling you to build your own design system and develop React applications faster. That includes a huge list of Material icons, foundational components with MUI Core, advanced and powerful components with MUI X, templates, and design kits!
Are you eager to migrate your entire codebase to Vue 3 and composition API? Before starting the long journey away from Vue 2.6 you should consider a few intermediate steps:
- compatibility with your dependencies
- tests
- maintainability
- consider a step-by-step migration passing trough Vue 2.7
- what about the Vite/Vitest ecosystem?
Do you hear of Vue.js everywhere lately? With this presentation, you will be able to create your first app in just 30 minutes. Understand the basics and get yourself a solid knowledge to start your journey with the new progressive JavaScript Framework.
Maven is a build tool that helps manage Java projects and automates common tasks like compiling code, running tests, and managing dependencies. It uses a Project Object Model (POM) XML file to store build configuration which defines project dependencies, plugins, and other metadata. Maven standardizes project layout, builds, documentation, and the release process.
The document describes React, a JavaScript library for building user interfaces. It introduces some key concepts of React including components, props, state, and the virtual DOM. Components are the building blocks of React apps and can be composed together. Props provide immutable data to components, while state provides mutable data. The virtual DOM allows React to efficiently update the real DOM by only changing what needs to be changed. Data flows unidirectionally in React from parent to child components via props, and state updates within a component are handled via setState().
This document is a presentation about JavaScript that covers what JavaScript is, where it came from, and what it can do. It introduces JavaScript as a scripting language that is easy to use and learn and runs in web browsers. The presentation explains that JavaScript is unrelated to Java but borrows some naming conventions. It provides overviews of JavaScript basics like variables, operators, and functions, as well as more advanced topics like objects, events, and DOM manipulation.
This document provides an overview of traditional web approaches, real-time web applications, and SignalR. It discusses how traditional approaches rely on pulling data via HTTP requests, while real-time approaches use pushing via persistent connections. SignalR is introduced as a library that abstracts different transport mechanisms and allows developers to focus on application logic rather than connection handling. Key concepts covered include SignalR transports, connections, hubs for server-client communication, and how to get started with SignalR. The document concludes with a note about an upcoming demo.
This document outlines an agenda to learn Nginx in 90 minutes through a series of exercises. It introduces Nginx as an HTTP and reverse proxy server, discusses setting up the environment using Docker, and provides 5 exercises to learn basic Nginx configurations including setting up a first web page, proxying to an Apache server, load balancing across multiple servers with CDN, adding HTTP basic authentication, and enabling HTTPS with basic authentication.
This document provides an overview and introduction to React Native, including:
- What React Native is and the problems it solves like enabling cross-platform development using a single JavaScript codebase.
- The technologies that comprise React Native like ReactJS and how it binds to native platforms.
- Getting started with a basic React Native app and examples of extending it with custom modules.
- An overview of the React Native component library and APIs.
- Recommendations to get familiar with related technologies like JSX, Flow, and Node.js.
- Thoughts on the benefits and challenges of developing with React Native.
This document provides an overview of building mobile applications using React Native. It discusses React Native's ability to build high-performance, cross-platform apps using a single codebase. Key topics covered include the fundamentals of React Native, advantages like cross-platform compatibility and performance, creating a new project, basic components and styling, using Redux for state management, debugging tools, and deploying to iOS and Android platforms.
Ti sei perso nel caos di “props” ed “emit” della tua web app Vue.js? Usa Vuex!
Vuex è lo state manager di Vue.js per eccellenza, una singola fonte di verità che ottimizza la condivisione di informazioni tra componenti.
Vediamo come introdurre facilmente Vuex in progetti esistenti, con un occhio per il testing
This document summarizes the key considerations and steps for migrating from Vue.js 2.x to 3.x. It discusses the new features in Vue 3 like the Composition API and <script setup> syntax. It also covers potential breaking changes and recommendations for upgrading dependencies like Vue Router and Vuex. The document provides a detailed migration workflow covering updating package versions, enabling compatibility mode, fixing errors, and updating code related to features like transitions and the app entry point. It emphasizes focusing on fixing warnings from the migration build before fully migrating to Vue 3 mode.
The complexity of frontend applications over the years led to the creation of more robust solutions, where data logic won’t be messed up at scale. A shift took place from the traditional services approach, in which data is tightly coupled to the Views of their Components, towards more composable and shareable solutions. Each of these solutions is what we call a "state-manager".
Goal of this presentation is the comparative analysis between different react frontend state managers such as Redux, MobX, Recoil and React-Query. State Machines will also be presented, showing a completely different perception of how state can be orchestrated. Different mental models of the aforementioned state managers along with their different technical implementations will be presented to the audience. Ultimately, the audience can use this presentation for future reference on faster deciding which state-manager fits their own projects. Before delving into the comparison there will be a description of the main data flow in the browser. Concepts like reactivity, immutability, predictability, concurrency and performance will be detected on the main flow and will act as our comparison metrics among the state-managers.
The document discusses using Redux middleware like redux-thunk and redux-saga to handle asynchronous actions and side effects in Redux applications. Redux-thunk allows returning functions from action creators to support asynchronous logic. Redux-saga uses generator functions to declaratively define asynchronous flows using effects. It provides capabilities like parallelism, cancellation, and composition that are more complex with redux-thunk. Both libraries make it easier to handle asynchronous logic while avoiding complex race conditions and keeping side effects separate from the reducer logic.
The presentation slide for Vue.js meetup
http://abeja-innovation-meetup.connpass.com/event/38214/
That contains mainly about SSR (Server side rendering) + SPA with isomorphic fetch and client hydration
How to build to do app using vue composition api and vuex 4 with typescriptKaty Slemon
In this tutorial, we will build a to-do app using Vue Composition API & Vuex 4 with Typescript. We will learn and explore Composition API & Options API as well
Vuex is a state management pattern for Vue.js applications that serves as a centralized store for component data. It consists of state, getters, mutations, and actions. State contains app data, getters help access state, mutations are the only way to modify state and must be synchronous, and actions allow asynchronous operations and commit mutations.
This document provides an overview of the architecture of Yves & Zed, an e-commerce platform. It discusses the following key points:
1. Yves & Zed uses a layered architecture with bundles and packages to structure code and composer to manage dependencies between packages.
2. It features a state machine powered by events and commands to automatically process orders, with visualizations of the business logic.
3. The platform also includes a data warehouse for big data with an ETL process, job scheduling, and order status mapping to dimensions for analysis and reporting.
React is a JavaScript library for building user interfaces that uses a virtual DOM for efficient updates. Redux is used to handle the state of React applications in a predictable way using stores, actions, and reducers. Together, React and Redux form a powerful combination where React components interact with the Redux store via containers to update the UI based on state changes.
Pablo Magaz | ECMAScript 2018 y más allá | Codemotion Madrid 2018Codemotion
The document summarizes upcoming features in ECMAScript beyond 2018. It discusses proposals that are in stage 0-3 of the standardization process, including array flat and flatMap, dynamic imports, private fields and methods, and observable objects. It also outlines more experimental proposals in earlier stages, like top level await, pipeline operators, and regular expression improvements like named capture groups and lookbehind assertions. The talk provides examples to demonstrate many of these new language features and how they may be used.
It’s trivial today to start writing and debugging some React code, but it’s not 100% clear how to properly deploy the application, manage versions and what implications that has on the build configurations. Especially if you want to allow different versions for different users in order to perform some A/B testing, testing new features in production environment, come up with some UI experiments, or gradually roll out new features for a subset of users.
In this presentation I hopefully covered all that.
This document provides an overview of React and Redux concepts including:
- React basics like components, props, state, and lifecycle methods
- Flux architecture and how data flows through actions, dispatcher, and stores
- Redux as an alternative to Flux that uses a single store updated by reducers in response to actions
- Additional React topics like JSX, propTypes, and using React with ES6 classes are also covered.
В презентации описаны лучшие практики использования библиотеки React в связке с Redux. Быстрое разворачивание SPA без настройки Webpack и Babel с помощью утилиты Create React App, Smart and Dumb, Stateful and Stateless Components, управление рендером с помощью shouldComponentUpdate, Redux модули, мемоизация и middlewares.
More useful info on our:
- website: https://clickky.biz
- blog: https://clickky.biz/blog
Sign up!
Gutenberg sous le capot, modules réutilisablesRiad Benguella
Gutenberg arrive, ça change tout pour ce qui est de la création de contenu dans WordPress. Mais ce que vous ne savez pas c’est que Gutenberg a le potentiel pour changer beaucoup de choses pour les développeurs de plugins et de thèmes WordPress et même à l’extérieur de la communauté WordPress.
De la gestion des données de votre plugin, la gestion des dates, l’internationalisation à l’interface UI, Gutenberg est une mine d’or qui ne demande qu’à être exploitée. Explorons ensemble l’architecture modulaire de Gutenberg et apprenons à réutiliser ses modules pour ses propres projets.
Vue.js is a lightweight, reactive component-based library for building modern web interfaces. It provides simple and flexible APIs for building reactive components and applications using templates and reusable components. Key features include:
- Reactive components using templates and data binding
- Lightweight at only 24kb minified and gzipped
- Flexible options for building full single page applications or enhancing existing projects
- Reusable components using global or local registration
The document discusses integrating ReactJS and Webpack into Ruby on Rails applications. It covers using modules with CommonJS, RequireJS, and ECMAScript 6. It also discusses using Webpack for bundling assets, setting up entry points, loaders, and plugins. Webpack can be configured to work with Rails by defining webpack.config.js and using the assets:webpack task for deployment. This provides a modular approach for JavaScript development while still leveraging Rails.
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Project Management: The Role of Project Dashboards.pdfKarya Keeper
Project management is a crucial aspect of any organization, ensuring that projects are completed efficiently and effectively. One of the key tools used in project management is the project dashboard, which provides a comprehensive view of project progress and performance. In this article, we will explore the role of project dashboards in project management, highlighting their key features and benefits.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemPeter Muessig
Learn about the latest innovations in and around OpenUI5/SAPUI5: UI5 Tooling, UI5 linter, UI5 Web Components, Web Components Integration, UI5 2.x, UI5 GenAI.
Recording:
https://www.youtube.com/live/MSdGLG2zLy8?si=INxBHTqkwHhxV5Ta&t=0
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
How Can Hiring A Mobile App Development Company Help Your Business Grow?
Vuex to Pinia, how to migrate an existing app
1. Vuex to Pinia
How to migrate an existing app from Vuex to Pinia?
- Denny Biasiolli -
1
2. WHO AM I
Denny Biasiolli
Full Stack Developer
(JavaScript, Python, Go)
Front End Developer UX/ UI
Fingerprint Supervision Ltd
Italy, Savigliano (CN)
@dennybiasiolli
denny.biasiolli@gmail.com
www.dennybiasiolli.com
2
3. WHAT IS PINIA?
Vuex 5 Pinia is the officially recognized
state management library for Vue.
Started as an experiment to redesign what a Store for
Vue could look like with the Composition API
https://pinia.vuejs.org/introduction.html
3
4. WHAT IS PINIA?
Started out as an exploration of what the next iteration
of Vuex could look like, incorporating many ideas from
core team discussions for Vuex 5.
Pinia already implemented most of what they wanted
in Vuex 5 and decided to make it the new
recommendation instead.
https://pinia.vuejs.org/introduction.html#comparison-with-vuex
4
6. (SMALL) COMPARISON WITH VUEX
3.X/4.X
Pinia works with Vue 2 and Vue 3
Simpler API than Vuex
Mutations no longer exist, o en perceived as
extremely verbose.
No need to create custom complex wrappers to
support TypeScript
https://pinia.vuejs.org/introduction.html#comparison-with-vuex
6
7. (SMALL) COMPARISON WITH VUEX
3.X/4.X
No more magic strings to inject
Import the functions, call them, enjoy
autocompletion!
No need to dynamically add stores
They are all dynamic by default.
https://pinia.vuejs.org/introduction.html#comparison-with-vuex
7
8. (SMALL) COMPARISON WITH VUEX
3.X/4.X
No more nested structuring of modules.
You can still use a store inside another.
No namespaced modules.
You could say all stores are namespaced.
https://pinia.vuejs.org/introduction.html#comparison-with-vuex
8
9. INSTALL PINIA
Pinia can coexist with Vuex
Vue 3.x and 2.7.x
Vue 2.6.x
npm install -S pinia
npm install -S @vue/composition-api
npm install -S pinia
https://pinia.vuejs.org/getting-started.html#installation
9
10. ROOT STORE (BASIC)
Vue 3.x
Vue 2.x
// src/main.js
import { createPinia } from 'pinia'
app.use(createPinia())
// src/main.js
import { createPinia, PiniaVuePlugin } from 'pinia'
Vue.use(PiniaVuePlugin)
const pinia = createPinia()
new Vue({
// other options (store, render function, etc)...
pinia,
})
10
11. ROOT STORE (ADVANCED)
Vue 3.x
Vue 2.x
// src/stores/index.js
import { createPinia } from 'pinia'
export default createPinia()
// src/stores/index.js
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue from 'vue'
Vue.use(PiniaVuePlugin)
export default createPinia()
11
12. ROOT STORE (ADVANCED)
Vue 3.x
Vue 2.x
// src/main.js
import pinia from './stores'
app.use(pinia)
// src/main.js
import pinia from './stores'
new Vue({
// other options (store, render function, etc)...
pinia,
})
12
13. DEFINING A STORE
Vue 3.x/2.x
// src/stores/main.js
import { defineStore } from 'pinia'
// the first argument is a unique id of the store
export const useStore = defineStore('main', {
state: () => ({
count: 0,
}),
getters: {
isEven: state => state.count % 2 === 0,
isOdd() {
return !this.isEven
},
},
13
28. TEST MIGRATION
state: no changes
getters
use .call on a getter when using this to access
other getters
-expect(getters.isOdd({}, { isEven: false })).toBe(true)
+expect(getters.isOdd.call({ isEven: false })).toBe(true)
28
29. TEST MIGRATION
mutations: → actions
actions
use .call to pass state/getters/actions
-const context = { commit: vi.fn() }
-actions.incrementAsync(context)
+const state = { increment: vi.fn() }
+actions.incrementAsync.call(state)
// ...
-expect(context.commit).toHaveBeenCalled()
+expect(state.increment).toHaveBeenCalled()
29
30. STATE TEST MIGRATION
import { test, expect } from 'vitest'
import { defaultState } from '@/stores/main'
test('defaultState should be as expected', () => {
expect(defaultState).toEqual({
count: 0,
})
})
30
31. GETTERS TEST MIGRATION
import { test, expect } from 'vitest'
import { getters } from '@/stores/main'
test('isEven should work as expected', () => {
expect(getters.isEven({ count: 0 })).toBe(true)
expect(getters.isEven({ count: 1 })).toBe(false)
})
test('isOdd should work as expected', () => {
- expect(getters.isOdd(undefined, { isEven: true }))
+ expect(getters.isOdd.call({ isEven: true }))
.toBe(false)
- expect(getters.isOdd(undefined, { isEven: false }))
+ expect(getters.isOdd.call({ isEven: false }))
.toBe(true)
})
31
32. MUTATIONS TEST MIGRATION
import { test, expect } from 'vitest'
-import { mutations } from '@/store/index'
+import { actions } from '@/stores/main'
test('increment should work as expected', () => {
const state = { count: 0 }
- mutations.increment(state)
+ actions.increment.call(state)
expect(state.count).toBe(1)
- mutations.increment(state)
+ actions.increment.call(state)
expect(state.count).toBe(2)
})
32
33. ACTIONS TEST MIGRATION
import { test, expect, vi } from 'vitest'
-import { actions } from '@/store/index'
+import { actions } from '@/stores/main'
test('incrementAsync should work as expected', () => {
vi.useFakeTimers()
- const context = { commit: vi.fn() }
- actions.incrementAsync(context)
+ const state = { increment: vi.fn() }
+ actions.incrementAsync.call(state)
- expect(context.commit).not.toHaveBeenCalled()
+ expect(state.increment).not.toHaveBeenCalled();
vi.advanceTimersByTime(1000)
- expect(context.commit).toHaveBeenCalledWith('increment')
+ expect(state.increment).toHaveBeenCalled();
vi.useRealTimers()
})
33
39. createTestingPinia
automatically mocks all actions
unit test store and components separately
allows you to overwrite getter values in tests
(not working with Vue 2 and Jest)
39
40. COMPONENT TESTING (VUE 3 + VITEST)
import { createTestingPinia } from '@pinia/testing'
import { shallowMount } from '@vue/test-utils';
import { useStore } from '@/stores/main'
let pinia, store
beforeEach(() => {
pinia = createTestingPinia({
createSpy: vi.fn,
initialState: { main: { count: 0 } },
})
// init store only after creating a testing pinia
store = useStore()
})
// tests
const wrapper = shallowMount(Component, {
global: { plugins: [pinia] }
})
40
41. COMPONENT TESTING (VUE 2 + JEST)
import { PiniaVuePlugin } from 'pinia'
import { createTestingPinia } from '@pinia/testing'
import { shallowMount, createLocalVue } from '@vue/test-utils'
import { useStore } from '@/stores/main'
const localVue = createLocalVue()
localVue.use(PiniaVuePlugin)
let pinia, store
beforeEach(() => {
pinia = createTestingPinia({
initialState: { main: { count: 0 } },
})
// init store only after creating a testing pinia
store = useStore()
})
// tests
const wrapper = shallowMount(Component, { localVue, pinia })
41
42. COMPONENT TESTING (VUE 2 + JEST)
Getters are not writable, you need to set the correct
state in order to make them work as expected.
store.count = 1
// or
store.$patch({
count: 1,
// other properties
})
42
43. COMPONENT TEST MIGRATION (VUE 3 + VITEST)
+import { createTestingPinia } from '@pinia/testing'
import { describe, test, beforeEach, expect, vi } from 'vites
-import { createStore } from 'vuex'
import { shallowMount } from '@vue/test-utils';
import Counter from '@/components/Counter.vue'
+import { useStore } from '@/stores/main'
43
50. MIGRATION PROBLEMS NOTES
Direct $store usage
Use the correct store
$store.state.propertyName
$store.state.moduleName.propertyName
$store.getters.getterName
$store.getters['moduleName/getterName']
const myStore = useMyStore()
myStore.propertyName
myStore.getterName
50
51. MIGRATION PROBLEMS NOTES
Direct $store commit/dispatch
Use store actions
$store.commit.mutationName()
$store.commit.moduleName.mutationName()
$store.dispatch.actionName()
$store.dispatch['moduleName/actionName']()
const myStore = useMyStore()
myStore.actionName()
51
52. MIGRATION PROBLEMS NOTES
What about a global useStore()?
If used outside of <script setup>,
will give you this error
import { useStore } from '@/stores/main'
const store = useStore()
// other stuff
getActivePinia was called with no active Pinia.
Did you forget to install pinia?
52
53. MIGRATION PROBLEMS NOTES
Can Vuex and Pinia coexist?
Yes, but...
make sure to migrate entire modules,
not entire components.
53
54. MIGRATION PROBLEMS NOTES
How to test a real store?
import { setActivePinia, createPinia } from 'pinia'
beforeEach(() => {
setActivePinia(createPinia())
})
test('should work as expected', () => {
const store = useStore()
// ...
})
54
55. MIGRATION PROBLEMS NOTES
What about store persistence?
myStore.$subscribe((mutation, state) => {
localStorage.setItem('myStore', JSON.stringify(state))
})
// restore with
myStore.$state = { /* ... */ }
watch(
pinia.state,
(state) => {
localStorage.setItem('piniaState', JSON.stringify(state))
},
{ deep: true }
)
// restore with
pinia.state.value = { /* ... */ }
https://pinia.vuejs.org/core-concepts/state.html#subscribing-to-the-state
55
56. FINAL TASKS
1. remove Vuex store from main.js
-import store from './store'
// Vue 3
-app.use(store)
// Vue 2
new Vue({
router,
- store,
pinia,
render: h => h(App),
}).$mount('#app')
56
57. FINAL TASKS
2. delete Vuex store and tests
3. uninstall Vuex dependencies
rm -rf src/store
rm -rf tests/unit/store
npm uninstall vuex @vue/cli-plugin-vuex
57