SwiftUI makes it easy to create beautiful UIs in no time, but it is just as easy to end up with a giant view that mixes view code and business logic. Fortunately, Apple gave us some tools to keep the bloat in check and write maintainable and reusable code.
In this talk, I am going to show you how to
- refactor an existing SwiftUI view to make it more maintainable,
- turn it into a reusable SwiftUI component,
- add event handling,
- make the view configurable,
- use SwiftUI's styling API to apply different designs,
- add it to the Xcode component library,
- turn it into a shareable component that can be consumed via Swift Package Manager,
- and distribute it via GitHub
Make Porting Custom SwiftUI Elements Easy With Swift PackagesVui Nguyen
Learn to build your own SwiftUI design library as a Swift package! Apply your own custom fonts and colors to multiple projects with the ease of code modularity and reusability.
6 Things You Didn't Know About Firebase AuthPeter Friese
There’s no doubt about it: many apps need some way of authenticating the user, but most developers don’t get overly excited by the prospect of implementing a login/sign-up screen.
In this talk, you will learn what Firebase Auth is, why you should use it, and - if this didn’t get you excited yet - 5 things you probably didn’t know about Firebase Auth before.
In particular, we’re going to look at
- How Firebase Auth works, and why you should use it
- How to let users sign in without even having to come up with a password
- What Anonymous Auth is all about and why you should care
- How to make signing in on iOS more magical
- How to integrate Firebase Auth and Sign in with Apple
SwiftUI makes it easy to create beautiful UIs in no time, but it is just as easy to end up with a giant view that mixes view code and business logic. Fortunately, Apple gave us some tools to keep the bloat in check and write maintainable and reusable code.
In this talk, I am going to show you how to
- refactor an existing SwiftUI view to make it more maintainable,
- turn it into a reusable SwiftUI component,
- add event handling,
- make the view configurable,
- add it to the Xcode component library,
- turn it into a shareable component that can be consumed via Swift Package Manager,
- and distribute it via GitHub
In this workshop, you will learn how to build a SwiftUI application with Firebase. We will cover the following topics:
- Data modeling for Firestore
- Efficiently mapping Firestore data using Swift’s Codable protocol
- Fetching data from Firestore using snapshot listeners
- Connecting SwiftUI’s state management system to Firestore to implement real-time sync
- Securing your user’s data using Firebase Security Rules
- Signing in your users using Firebase Authentication
We will be using the latest versions of Firebase and SwiftUI, making use of Combine and async/await to demonstrate how to call asynchronous APIs using modern Swift technologies. Please bring your laptop, making sure to install the latest stable version of Xcode before the workshop.
A short introduction to the new set of tools offered to Android developers - Android Jetpack. Talk held at Leeds Mobile focusing on the ViewModel and the LiveData compoments availabe in Jetpack.
Make Porting Custom SwiftUI Elements Easy With Swift PackagesVui Nguyen
Learn to build your own SwiftUI design library as a Swift package! Apply your own custom fonts and colors to multiple projects with the ease of code modularity and reusability.
6 Things You Didn't Know About Firebase AuthPeter Friese
There’s no doubt about it: many apps need some way of authenticating the user, but most developers don’t get overly excited by the prospect of implementing a login/sign-up screen.
In this talk, you will learn what Firebase Auth is, why you should use it, and - if this didn’t get you excited yet - 5 things you probably didn’t know about Firebase Auth before.
In particular, we’re going to look at
- How Firebase Auth works, and why you should use it
- How to let users sign in without even having to come up with a password
- What Anonymous Auth is all about and why you should care
- How to make signing in on iOS more magical
- How to integrate Firebase Auth and Sign in with Apple
SwiftUI makes it easy to create beautiful UIs in no time, but it is just as easy to end up with a giant view that mixes view code and business logic. Fortunately, Apple gave us some tools to keep the bloat in check and write maintainable and reusable code.
In this talk, I am going to show you how to
- refactor an existing SwiftUI view to make it more maintainable,
- turn it into a reusable SwiftUI component,
- add event handling,
- make the view configurable,
- add it to the Xcode component library,
- turn it into a shareable component that can be consumed via Swift Package Manager,
- and distribute it via GitHub
In this workshop, you will learn how to build a SwiftUI application with Firebase. We will cover the following topics:
- Data modeling for Firestore
- Efficiently mapping Firestore data using Swift’s Codable protocol
- Fetching data from Firestore using snapshot listeners
- Connecting SwiftUI’s state management system to Firestore to implement real-time sync
- Securing your user’s data using Firebase Security Rules
- Signing in your users using Firebase Authentication
We will be using the latest versions of Firebase and SwiftUI, making use of Combine and async/await to demonstrate how to call asynchronous APIs using modern Swift technologies. Please bring your laptop, making sure to install the latest stable version of Xcode before the workshop.
A short introduction to the new set of tools offered to Android developers - Android Jetpack. Talk held at Leeds Mobile focusing on the ViewModel and the LiveData compoments availabe in Jetpack.
Design for succcess with react and storybook.jsChris Saylor
Too often developers are not involved with front end design descussions and end up struggling to get a sketch design to fit into a website. Many of these tools do not offer good ways of communicating animations or different states of the various components and in the end, there still has to be a translation into something that is functional.
This talk aims to change that. We will be looking at Storybook as a tool that facilitates developers and designers working hand-in-hand to codify designs in React components. We will also cover some strategies of React component building that enabled taking advantage of tools like Storybook.
Jetpack Compose is the new Android UI framework that allows you to create rich user interfaces in a declarative way using Kotlin language. In this presentation, it will be demonstrated how to take the first steps with Compose, learn its main concepts and understand how to be prepared for this change of paradigm on the front-end development of native Android applications.
The Google Maps Javascript API lets you embed Google Maps in your own web pages. Version 3 of this API is especially designed to be faster and more applicable to mobile devices, as well as traditional desktop browser applications.
Download Code samples at: https://app.box.com/s/p48udnd79pkeikcls66v
My React TechTalk with Jordan open source association on Sep 13-2017 @Zinc , KHBP.
Session source code :
https://github.com/ali-sao/Better-web-apps-with-react-redux-.git
Jetpack Compose is a Declarative UI toolkit written in 100% Kotlin. What is Declarative UI? Why should we use it? We will talk about data flow and the benefits of Declarative UI. Then we’ll show the way to setup Jetpack Compose, write some basic samples and let it works with the MVVM architecture.
Android JetPack: easy navigation with the new Navigation ControllerLeonardo Pirro
In the past few years implementing in-app navigation was always a pain. Google wants to change that and with this talk, we'll explore the new architecture component included in Android JetPack: The Navigation Controller.
Android Jetpack compose completely written in Kotlin, Declarative UI, new way of UI designing in Android.
This presentation tells you what it is Jetpack Compose? Why it was introduced? How to implement it? How it works? What happens behind the scenes?
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Daftar Isi
I. Pengenalan ReactJs
II. Instalasi
III. Dasar-dasar ReactJs
1. JSX
2. Component
3. State
4. Props
IV. Component Lifecycle
V. Latihan
1. Todo List
2. React Router
** BatamJS Community**
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшeQAFest
Page Objects, вероятно, самый известный на сегодня паттерн, используемый в автоматизации через UI. И самый простой, скажете вы? Не соглашусь, по моим наблюдением применение данного паттерна таит в себе подводные камни даже для наиболее типичных веб-приложений.
В данном докладе я познакомлю вас с тремя простыми и практичными видами PageObject архитектуры - Static, Void и Fluent, продемонстрирую использование кодом, сравню плюсы и минусы подходов. Также я расскажу о важных недостатках Yandex HTMLElements и о некоторых других неудачных подходах, которые повторяются из одного самодельного фреймворка в другой. Вы увидите на примерах, как простой код решает проблемы лучше, чем слишком умный. Примеры на языке Java/Selenide легко переносимы и на другие языки программирования (.NET, Python и другие).
React入門資料を公開
※ 株式会社GIGでは毎月社内勉強会を実施しています
GIG inc.
Good is good.
We provide opportunities to the SEKAI by fusing technology and ideas.
テクノロジーとクリエイティブでセカイをより良くする。小さなチームからスタートした多くの先人達が、世界をより豊かなモノに変革してきました。通信、UX、デバイス、技術の変化と共に世界はまだまだ加速度的に変わります。
Good is good. いいものはいい。GIGは、関わったユーザーやクライアントが前に進める“きっかけ”をつくりつづけます。
■ お問い合せ
https://giginc.co.jp/contact/
Design for succcess with react and storybook.jsChris Saylor
Too often developers are not involved with front end design descussions and end up struggling to get a sketch design to fit into a website. Many of these tools do not offer good ways of communicating animations or different states of the various components and in the end, there still has to be a translation into something that is functional.
This talk aims to change that. We will be looking at Storybook as a tool that facilitates developers and designers working hand-in-hand to codify designs in React components. We will also cover some strategies of React component building that enabled taking advantage of tools like Storybook.
Jetpack Compose is the new Android UI framework that allows you to create rich user interfaces in a declarative way using Kotlin language. In this presentation, it will be demonstrated how to take the first steps with Compose, learn its main concepts and understand how to be prepared for this change of paradigm on the front-end development of native Android applications.
The Google Maps Javascript API lets you embed Google Maps in your own web pages. Version 3 of this API is especially designed to be faster and more applicable to mobile devices, as well as traditional desktop browser applications.
Download Code samples at: https://app.box.com/s/p48udnd79pkeikcls66v
My React TechTalk with Jordan open source association on Sep 13-2017 @Zinc , KHBP.
Session source code :
https://github.com/ali-sao/Better-web-apps-with-react-redux-.git
Jetpack Compose is a Declarative UI toolkit written in 100% Kotlin. What is Declarative UI? Why should we use it? We will talk about data flow and the benefits of Declarative UI. Then we’ll show the way to setup Jetpack Compose, write some basic samples and let it works with the MVVM architecture.
Android JetPack: easy navigation with the new Navigation ControllerLeonardo Pirro
In the past few years implementing in-app navigation was always a pain. Google wants to change that and with this talk, we'll explore the new architecture component included in Android JetPack: The Navigation Controller.
Android Jetpack compose completely written in Kotlin, Declarative UI, new way of UI designing in Android.
This presentation tells you what it is Jetpack Compose? Why it was introduced? How to implement it? How it works? What happens behind the scenes?
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Daftar Isi
I. Pengenalan ReactJs
II. Instalasi
III. Dasar-dasar ReactJs
1. JSX
2. Component
3. State
4. Props
IV. Component Lifecycle
V. Latihan
1. Todo List
2. React Router
** BatamJS Community**
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшeQAFest
Page Objects, вероятно, самый известный на сегодня паттерн, используемый в автоматизации через UI. И самый простой, скажете вы? Не соглашусь, по моим наблюдением применение данного паттерна таит в себе подводные камни даже для наиболее типичных веб-приложений.
В данном докладе я познакомлю вас с тремя простыми и практичными видами PageObject архитектуры - Static, Void и Fluent, продемонстрирую использование кодом, сравню плюсы и минусы подходов. Также я расскажу о важных недостатках Yandex HTMLElements и о некоторых других неудачных подходах, которые повторяются из одного самодельного фреймворка в другой. Вы увидите на примерах, как простой код решает проблемы лучше, чем слишком умный. Примеры на языке Java/Selenide легко переносимы и на другие языки программирования (.NET, Python и другие).
React入門資料を公開
※ 株式会社GIGでは毎月社内勉強会を実施しています
GIG inc.
Good is good.
We provide opportunities to the SEKAI by fusing technology and ideas.
テクノロジーとクリエイティブでセカイをより良くする。小さなチームからスタートした多くの先人達が、世界をより豊かなモノに変革してきました。通信、UX、デバイス、技術の変化と共に世界はまだまだ加速度的に変わります。
Good is good. いいものはいい。GIGは、関わったユーザーやクライアントが前に進める“きっかけ”をつくりつづけます。
■ お問い合せ
https://giginc.co.jp/contact/
Python Code Camp (Professionals) is a whole day workshop that aims to enable professionals to learn Python Basics and Django.
Visit: http://devcon.ph/events/python-code-camp-professionals-2016
Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
Vaadin is quickly popularizing Java framework for developing rich and interactive server-driven web applications. Vaadin is built around core Servlet and Google Web Toolkit (GWT) technologies and it strives to developer productivity by providing large library of components and ready made functionality that hides the hard parts of web development allowing developers to concentrate to the real business problem at hand. During this session we’ll cover the basics of building Vaadin based web applications: layouting, data binding, application deployment and Vaadin Touckit integration for mobile devices. Attending the speech does not require thorough understanding of web technologies in general, session will include demonstration and live coding.
Every time we generate an Angular app with schematics it contains a set of Angular builders that can be used out of the box. By the time your application grows you will need a set of tasks that can automate processes such as generate the documentation, deploy an image on docker, or deploy the app on a k8s cluster. These tasks can be executed as Angular custom builders. This talk will show you how to create a custom Angular builder step by step with an overview of what is a monorepo and its benefits. At the end of the talk, we will be able to run our custom builder by running the command ng run my-app:custom-builder
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.
A brief wrap up and introduction to SwiftUI and Combine brought by Apple in WWDC 2019, as well as utilizing both to propose a View-Model-ViewModel (MVVM) structure.
Writing HTML5 Web Apps using Backbone.js and GAERon Reiter
A walkthrough of how to write a complete HTML5 web app (both front end and back end) using Google App Engine (Python), Backbone.js, Require.js, underscore.js and jQuery.
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
Using Backbone.js to move state to the client-side and the benefits of using a JavaScript MVC framework.
Delivered at SuperMondays, Newcastle upon Tyne, on 26th September 2011.
Rapid Application Development with SwiftUI and FirebasePeter Friese
Firebase is Google's mobile development platform for Android, iOS, and the web. SwiftUI is Apple's user interface toolkit that lets developers design apps in a declarative way. In this session, we will bring the two together and take a look at how easy it is to develop a new application from scratch.
Slides for my talk at CocoaHeads Berlin (https://www.meetup.com/Cocoaheads-Berlin/events/266764473/)
iOS Developers need a wide variety of skills and knowledge to perform their jobs well. These skills and knowledge have wide applications beyond iOS, especially when sticking within the realms of Mobile Application Development.
This deck of slides shows some common cases where an iOS Developer can with minimal effort use their existing skills to build Android apps.
Presented at iOSDevUK 2015.
Firebase for Apple Developers - SwiftHeroesPeter Friese
In this talk, we are going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Storing images and other large files in Cloud Storage
- Using Firebase in WidgetKit and on watchOS
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so we will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
+ = ❤️ (Firebase for Apple Developers) at Swift LeedsPeter Friese
In this talk, I am going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Using Combine to fetch data from remote APIs and Firebase
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so I will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
Async/await is a new language feature that will ship with Swift 5.5 this year. There’s no doubt it will have a significant impact on how we write asynchronous code.
In this talk, we’re going to look at some use cases for async/await, how we can call existing Swift APIs using this new feature, and why your decision to write your SDK in Objective-C might turn out to have been a very clever move.
We’ll also have a look at the refactoring support Apple is adding to Xcode and how it will help you migrate your existing code base.
In this talk, I am going to walk you through the building blocks for creating modern applications on Apple’s platforms using SwiftUI and Firebase.
We will cover the following topics:
- Setting up an architecture for data-driven applications
- What’s new in SwiftUI’s application life cycle
- Syncing data in realtime across multiple devices with Cloud Firestore
- Mapping Firestore documents in a type-safe way using the Codable protocol
- Using Combine to fetch data from remote APIs and Firebase
- How async/await (new in Swift 5.5) will affect the way we write asynchronous code (plus some surprises in Firebase's code base)
Firebase is always evolving, so I will also talk about how we’re making use of Apple’s latest technologies in our own code base, for example
- Combine
- async/await
- SwiftUI view modifiers
No matter if you’re a seasoned Firebase user or just wondering what it is all about, you should leave this session with a deeper understanding of what Firebase it and how you can use it your apps on Apple’s platforms.
Building Apps with SwiftUI and FirebasePeter Friese
In this talk, I'm going to show how to build data-driven SwiftUI applications that uses Cloud Firestore to store data.
You will learn how to architect your SwiftUI app so both its local and remote state stay in sync in real time
Rapid Application Development with SwiftUI and FirebasePeter Friese
Firebase is Google's mobile development platform for Android, iOS, and the web. SwiftUI is Apple's user interface toolkit that lets developers design apps in a declarative way. In this session, we will bring the two together and take a look at how easy it is to develop a new application from scratch.
Slides for my talk at heise MacDev 2019 (https://heise-macdev.de/lecture.php?id=8509)
Five Things You Didn't Know About Firebase AuthPeter Friese
There’s no doubt about it: many apps need some way of authenticating the user, but most developers don’t get overly excited by the prospect of implementing a login/sign-up screen.
In this talk, you will learn what Firebase Auth is, why you should use it, and - if this didn’t get you excited yet - 5 things you probably didn’t know about Firebase Auth before.
In particular, we’re going to look at
- How Firebase Auth works, and why you should use it
- How to let users sign in without even having to come up with a password
- What Anonymous Auth is all about and why you should care
- How to make signing in on iOS more magical
Building High-Quality Apps for Google AssistantPeter Friese
In this session, I will show you how to build great apps for the assistant using Dialogflow and Actions on Google. Building Actions with Dialogflow is deceptively easy, but building great apps that meet the quality bar requires in-depth knowledge of the design guidelines we defined. In this talk, I'm going to walk you through the best practices for VUI design and will show you how to apply these to your Assistant apps. We’ll cover topics such as handling new and returning users, robust error handling for no-input and no-match situations, and being able to repeat information for the user. We will also look at strategies for implementing multi-lingual apps and how to design for multiple surfaces at the same time.
Building Conversational Experiences with Actions on Google Peter Friese
Since we first started using computers, we have dreamt of interacting with them in a more natural, human-like way using spoken language. Advances in machine learning and artificial intelligence have spiked an interest in natural language processing, and building conversational interfaces no longer is a dream, but a reality every developer can use in their own applications.
The problem of recognising spoken input has been largely solved, and the next challenge is how to build compelling user experiences that are modelled after natural human conversation.
In this talk, I will give an introduction to the Google Assistant and how to use Actions on Google to build conversational interfaces for devices with and without screens. We will take a look at how API.AI makes implementing natural language understanding feasible even for non-linguists, and discuss how you can integrate agents with existing backends. In conversation, it's all about being natural, so we will also look at how to create agents that feel like real characters.
Building Conversational Experiences with Actions on GooglePeter Friese
Since we first started using computers, we have dreamt of interacting with them in a more natural, human-like way using spoken language. Advances in machine learning and artificial intelligence have spiked an interest in natural language processing, and building conversational interfaces no longer is a dream, but a reality every developer can use in their own applications.
The problem of recognising spoken input has been largely solved, and the next challenge is how to build compelling user experiences that are modelled after natural human conversation.
In this talk, I will give an introduction to the Google Assistant and how to use Actions on Google to build conversational interfaces for devices with and without screens. We will take a look at how API.AI makes implementing natural language understanding feasible even for non-linguists, and discuss how you can integrate agents with existing backends. In conversation, it's all about being natural, so we will also look at how to create agents that feel like real characters.
Android Wear 2.0 is a major update and contains a number of significant updates that will make it easier to build delightful experiences for wearables. In this session, I will provide an overview of new features such as Standalone apps, Material Design on Android Wear and some of the new UI components we're making available (such as Navigation Drawers and Action Drawers), as well as complications and complication data providers.
With recent advances in wearable technology, it's now possible to create novel fitness experiences without building custom hardware. In this talk we take you through creating a fitness tracker in C# on Android Wear, covering Google Play Services and watch-faces along the way. If this piques your interest, you can build your own Android Wear-based fitness tracker in our code lab!
This is an introductory session to Android Wear. We will cover Design Principles and how to implement them. In particular, I will show how to enhance your existing notifications to make them shine on Android Wear, how to implement Android Wear apps that make use of the new possibilities Android Wear gives you as a developer such as voice input and GPS. Finally, we will take a look at implementing watch faces.
Google Play Services are a unified SDK that allow you to quickly and easily integrate Google features into your Android apps. Being rolled out to millions of Android devices, they provide easy access to Google services and allow you to innovate quickly.
In this session, I will give you a rundown of the core services available via Google Play Services and give you an overview of the new APIs that ship as a part of Google Play Services. We will also have a look at some of the lesser known features that will enable you to build apps that truly rock.
In this session, I will give an overview of Android Wear and how to integrate it in your product strategy. We will look at the underlying design principles and discuss a number of use cases for apps that connect to wearable devices. After that, we will take a look at some code examples and learn how to use the Android Wear SDK.
Google+ for Mobile Apps on iOS and AndroidPeter Friese
Create a more engaging and personalized experience for your users by incorporating aspects of Google+ into your mobile app. Learn how your users can share pictures, links, and more into Google+ from your app, and how doing so can raise visibility and discoverability of your application.
Cross-Platform Authentication with Google+ Sign-InPeter Friese
This presentations outlines how Google+ Sign-In allows your users to sign in once and then be signed in seamlessly across all of your apps. The session takes a look at Google+ Sign-in authentication models and highlights common pitfalls and best practices.
Java based Cross-Platform Mobile DevelopmentPeter Friese
Studies report there are more than 100 tools and frameworks for cross-platform mobile development. Most of them are JavaScript/HTML5 based, but are there actually any options for "plain old Java developers" that allow you to write mobile apps for multiple platforms in Java?
After a brief overview of the general architectural patterns in cross platform mobile development, we will dig a little deeper and have a look at some Java-based frameworks that claim to make the "write once, run anywhere" promise a reality. In particular, I will demonstrate GWT mobile and Tabris (formerly known as RAP mobile).
The session will consist of a few introductory slides outlining the architectural differences between the various options and a lot of live demos of the tools.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
47. SwiftUI Layout Behaviour
Building layouts with stack views https://apple.co/448CaWL
Created by redemption_art
from the Noun Project
Created by redemption_art
from the Noun Project
Expanding Hugging
50. HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.fullName)
.font(.headline)
Text(user.affiliation)
.font(.subheadline)
}
}
Image is an expanding view
Created by redemption_art
from the Noun Project
… but we explicitly constrained it
53. Move to file
Extract Subview
Extract to local subview (property)
Extract to local subview (function)
54. Extract to local subview (property)
struct AvatarView: View {
var user: User
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.fullName)
.font(.headline)
Text(user.affiliation)
.font(.subheadline)
}
Spacer()
}
}
}
♻ Extract to local subview
55. Extract to local subview (property)
struct AvatarView: View {
var user: User
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.affiliation)
.font(.subheadline)
}
var titleLabel: some View {
}
Text(user.fullName)
.font(.headline)
56. Extract to local subview (property)
struct AvatarView: View {
var user: User
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.affiliation)
.font(.subheadline)
}
var titleLabel: some View {
}
Text(user.fullName)
.font(.headline)
57. Extract to local subview (property)
struct AvatarView: View {
var user: User
var titleLabel: some View {
Text(user.fullName)
.font(.headline)
}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.affiliation)
.font(.subheadline)
}
Spacer()
titleLabel
58. Dear Apple…
Make Extract to Subview work all of the time
Extract to Subview: handle dependent
properties
Add Extract to File
Add Extract to local Subview
59. Move to file
Extract Subview
Extract to local subview (property)
Extract to local subview (function)
60. Extract to local subview (function)
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Image(systemName: "graduationcap")) (user.jobtitle)")
.font(.subheadline)
Text("(Image(systemName: "building.2")) (user.affiliation)")
.font(.subheadline)
}
Spacer()
}
}
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
61. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Image(systemName: "graduationcap")) (user.jobtitle)")
.font(.subheadline)
Text("(Image(systemName: "building.2")) (user.affiliation)")
func detailsLabel(_ text: String, systemName: String) !$ some View {
}
62. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Image(systemName: "building.2")) (user.affiliation)")
func detailsLabel(_ text: String, systemName: String) !$ some View {
}
Text("(Image(systemName: "graduationcap")) (user.jobtitle)")
.font(.subheadline)
63. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Image(systemName: "building.2")) (user.affiliation)")
func detailsLabel(_ text: String, systemName: String) !$ some View {
}
Text("(Image(systemName: "graduationcap")) (user.jobtitle)")
.font(.subheadline)
64. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Im
func detailsLabel(_ text: String, systemName: String) !$ some View {
}
Text("(Image(systemName:
.font(.subheadline)
"graduationcap")) (user.jobtitle)")
"(systemName)")) (text)")
Text("(Image(systemName: "building.2")) (user.affiliation)")
65. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
func detailsLabel(_ text: String, systemName: String) !$ some View {
Text("(Image(systemName: "(systemName)")) (text)")
.font(.subheadline)
}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
Text("(Image(systemName: "building.2")) (user.affiliation)")
.font(.subheadline)
detailsLabel(user.jobtitle, systemName: "graduationcap")
detailsLabel(user.affiliation, systemName: "building.2")
66. Extract to local subview (function)
struct AvatarView: View {
var user: User
var titleLabel: some View {!!#}
func detailsLabel(_ text: String, systemName: String) !$ some View {
Text("(Image(systemName: "(systemName)")) (text)")
.font(.subheadline)
}
var body: some View {
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
titleLabel
detailsLabel(user.jobtitle, systemName: "graduationcap")
detailsLabel(user.affiliation, systemName: "building.2")
}
67. Techniques for composing views
Building a simple component
Configuring views
Styling views
Distributing views
69. View body
import SwiftUI
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
HStack(alignment: .top) {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
VStack(alignment: .leading) {
Text(user.fullName)
.font(.headline)
Text(user.affiliation)
.font(.subheadline)
}
}
}
}
}
70. Local properties
View body
struct AvatarView: View {
var user: User
var titleLabel: some View {
Text(user.fullName)
.font(.headline)
}
var body: some View {
!!#
titleLabel
!!#
}
}
71. Local properties
View body
Local functions
struct AvatarView: View {
var user: User
func detailsLabel(_ text: String,
systemName: String) !$ some View {
Text("(Image(systemName: "(systemName)")) (text)")
.font(.subheadline)
}
var body: some View {
!!#
detailsLabel(user.jobtitle, systemName: "graduationcap")
detailsLabel(user.affiliation, systemName: “building.2")
!!#
}
}
73. View Builders
@ViewBuilder usage explained with code examples (SwiftLee) https://bit.ly/44bp37t
The @ViewBuilder attribute is one of the few result builders
available for you to use in SwiftUI.
You typically use it to create child views for a specific
SwiftUI view in a readable way without having to use any
return keywords.
“
74. View Builders
struct AvatarView: View {
var user: User
var titleLabel: some View {
Text(user.fullName)
.font(.headline)
}
func detailsLabel(_ text: String,
systemName: String) !$ some View {
Text("(Image(systemName: "(systemName)")) (text)")
.font(.subheadline)
}
var body: some View {
!!#
detailsLabel(user.jobtitle, systemName: "graduationcap")
detailsLabel(user.affiliation, systemName: “building.2")
!!#
}
Why no @ViewBuilder?
75. View Builders
struct AvatarView: View {
var user: User
var hero: some View {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
var body: some View {
HStack(alignment: .top) {
hero
VStack(alignment: .leading) {!!# }
}
}
}
76. View Builders
struct AvatarView: View {
var isRound = true
var user: User
var hero: some View {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
var body: some View {
HStack(alignment: .top) {
hero
VStack(alignment: .leading) {!!# }
}
}
}
77. ❌ Branches have mismatching types 'some View'
View Builders
struct AvatarView: View {
var isRound = true
var user: User
var hero: some View {
if isRound {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
else {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
}
var body: some View {
Self.clipShape(_:style:)
Self.frame(width:height:alignment:)
78. View Builders
struct AvatarView: View {
var isRound = true
var user: User
var hero: some View {
if isRound {
AnyView {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
}
else {
AnyView {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
AnyView erases the
view’s type information
79. View Builders
struct AvatarView: View {
var isRound = true
var user: User
var hero: some View {
if isRound {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
else {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
}
@ViewBuilder @ViewBuilder keeps the
type information
80. View Builders
How to avoid using AnyView in SwiftUI (Tanaschita.com)
ViewBuilder vs. AnyView (Alexito's World)
https://bit.ly/45kVOQI
https://bit.ly/3OUbViE
Use @ViewBuilder if you want to return structurally
different views from a property / function.
“
81. Techniques for composing views
Building a simple component
Configuring views
Styling views
Distributing views
83. Configuring views
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(isRound: true, user: user)
}
}
}
Let’s turn this into a view modifier
: properties
84. Enum for the shape
enum AvatarImageShape {
case round
case rectangle
}
85. Environment Key
Enum for the shape struct AvatarImageShapeKey: EnvironmentKey {
static var defaultValue: AvatarImageShape = .round
}
enum AvatarImageShape {
case round
case rectangle
}
86. Environment Key
Enum for the shape
Extend Environment
struct AvatarImageShapeKey: EnvironmentKey {
static var defaultValue: AvatarImageShape = .round
}
enum AvatarImageShape {
case round
case rectangle
}
extension EnvironmentValues {
var avatarImageShape: AvatarImageShape {
get { self[AvatarImageShapeKey.self] }
set { self[AvatarImageShapeKey.self] = newValue }
}
}
87. Environment Key
Enum for the shape
Extend Environment
View modifier
struct AvatarImageShapeKey: EnvironmentKey {
static var defaultValue: AvatarImageShape = .round
}
enum AvatarImageShape {
case round
case rectangle
}
extension EnvironmentValues {
var avatarImageShape: AvatarImageShape {
get { self[AvatarImageShapeKey.self] }
set { self[AvatarImageShapeKey.self] = newValue }
}
}
extension View {
func avatarImageShape(_ imageShape:
AvatarImageShape) !$ some View {
environment(.avatarImageShape, imageShape)
}
}
88. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
struct AvatarView: View {
var isRound = true
var user: User
@ViewBuilder
var hero: some View {
if isRound {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
else {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
}
!!#
}
var isRound = true
89. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
struct AvatarView: View {
var user: User
@ViewBuilder
var hero: some View {
if isRound {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
else {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
}
!!#
}
var isRound = true
@Environment(.avatarImageShape) var imageShape
90. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
struct AvatarView: View {
var user: User
@ViewBuilder
var hero: some View {
if {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
.clipShape(Circle(), style: FillStyle())
}
else {
Image(user.profileImageName)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 75)
}
}
!!#
}
@Environment(.avatarImageShape) var imageShape
imageShape !% .round
91. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
Usage at the call site
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(user: user)
.avatarImageShape(.rectangle)
}
}
}
92. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
Usage at the call site
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(user: user)
.avatarImageShape(.rectangle)
}
}
}
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(user: user)
}
.avatarImageShape(.rectangle)
}
}
93. Environment Key
Enum for the shape
Extend Environment
View modifier
Update view code
Usage at the call site
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(user: user)
}
.avatarImageShape(.rectangle)
}
}
struct ContentView: View {
@State var users = User.samples
var body: some View {
List(users) { user in
AvatarView(user: user)
.avatarImageShape(
user.isTalking
? .round
: .rectangle)
}
.avatarImageShape(.rectangle)
}
}
94. Configuring views
struct ContentView: View {
var body: some View {
AvatarView(user: User.sample)
.onEditProfile {
print("onEditProfile triggered")
}
}
}
Let’s register an action handler
: action handlers
104. Styling views
View styles (Apple docs)
Styling SwiftUI Views (peterfriese.dev)
https://bit.ly/3DYKmyu
https://bit.ly/3qFbJKC
SwiftUI defines built-in styles for certain kinds of views and
automatically selects the appropriate style for a particular
presentation context. […]
You can override the automatic style by using one of the
style view modifiers. These modifiers typically propagate
throughout a container view, so that you can wrap a view
hierarchy in a style modifier to affect all the views of the
given type within the hierarchy.
“
114. Styling views
View styles (Apple docs)
Styling SwiftUI Views (peterfriese.dev)
https://bit.ly/3DYKmyu
https://bit.ly/3qFbJKC
SwiftUI defines built-in styles for certain kinds of views and automatically
selects the appropriate style for a particular presentation context. […]
You can override the automatic style by using one of the style view
modifiers. These modifiers typically propagate throughout a container view,
so that you can wrap a view hierarchy in a style modifier to affect all the
views of the given type within the hierarchy.
“ Context:
* Platform
* Container
* Use case
Propagation:
* Design system
115.
116. Create a configuration
struct AvatarStyleConfiguration {
let title: Title
struct Title: View {
let underlyingTitle: AnyView
init(_ title: some View) {
self.underlyingTitle = AnyView(title)
}
var body: some View {
underlyingTitle
}
}
117. Create a configuration
struct Title: View {
let underlyingTitle: AnyView
init(_ title: some View) {
self.underlyingTitle = AnyView(title)
}
var body: some View {
underlyingTitle
}
}
let subTitle: SubTitle
struct SubTitle: View {
let underlyingSubTitle: AnyView
init(_ subTitle: some View) {
self.underlyingSubTitle = AnyView(subTitle)
}
var body: some View {
underlyingSubTitle
}
}
118. Create a configuration
struct SubTitle: View {
let underlyingSubTitle: AnyView
init(_ subTitle: some View) {
self.underlyingSubTitle = AnyView(subTitle)
}
var body: some View {
underlyingSubTitle
}
}
let image: Image
init(title: Title,
subTitle: SubTitle,
image: Image) {
self.title = title
self.subTitle = subTitle
self.image = image
}
}
119. Define a style protocol
Create a configuration
let image: Image
init(title: Title,
subTitle: SubTitle,
image: Image) {
self.title = title
self.subTitle = subTitle
self.image = image
}
}
protocol AvatarStyle {
associatedtype Body: View
@ViewBuilder
func makeBody(configuration: Configuration)
!$ Body
typealias Configuration = AvatarStyleConfiguration
}
120. Define a style protocol
Create a configuration
Set up environment
protocol AvatarStyle {
associatedtype Body: View
@ViewBuilder
func makeBody(configuration: Configuration)
!$ Body
typealias Configuration = AvatarStyleConfiguration
}
struct AvatarStyleKey: EnvironmentKey {
static var defaultValue:
any AvatarStyle = DefaultAvatarStyle()
}
extension EnvironmentValues {
var avatarStyle: any AvatarStyle {
get { self[AvatarStyleKey.self] }
set { self[AvatarStyleKey.self] = newValue }
}
}
121. Define a style protocol
Create a configuration
Set up environment
struct AvatarStyleKey: EnvironmentKey {
static var defaultValue:
any AvatarStyle = DefaultAvatarStyle()
}
extension EnvironmentValues {
var avatarStyle: any AvatarStyle {
get { self[AvatarStyleKey.self] }
set { self[AvatarStyleKey.self] = newValue }
}
}
extension View {
func avatarStyle(_ style: some AvatarStyle)
!$ some View {
environment(.avatarStyle, style)
}
}
123. Define a style protocol
Create a configuration
Set up environment
Implement style
Update view code
struct AvatarView: View {
@Environment(.avatarImageShape) var imageShape
@Environment(.editProfileHandler)
var editProfileHandler
@Environment(.avatarStyle) var style
var title: String
var subTitle: String
var imageName: String
init(_ title: String, subTitle: String,
image name: String) {
self.title = title
self.subTitle = subTitle
self.imageName = name
}
124. Define a style protocol
Create a configuration
Set up environment
Implement style
Update view code
var title: String
var subTitle: String
var imageName: String
init(_ title: String, subTitle: String,
image name: String) {
self.title = title
self.subTitle = subTitle
self.imageName = name
}
var body: some View {
let configuration = AvatarStyleConfiguration(
title: .init(Text(title)),
subTitle: .init(Text(subTitle)),
image: .init(imageName))
AnyView(
style.makeBody(configuration: configuration)
)
}
}
125. Define a style protocol
Create a configuration
Set up environment
Implement style
Update view code
var title: String
var subTitle: String
var imageName: String
init(_ title: String, subTitle: String,
image name: String) {
self.title = title
self.subTitle = subTitle
self.imageName = name
}
var body: some View {
let configuration = AvatarStyleConfiguration(
title: .init(Text(title)),
subTitle: .init(Text(subTitle)),
image: .init(imageName))
AnyView(
style.makeBody(configuration: configuration)
)
}
}
126. Define a style protocol
Create a configuration
Set up environment
Implement style
Update view code
Usage at the call site
struct ContentView: View {
@State var users = User.samples
@State var isProfileShowing = false
var body: some View {
List(users) { user in
AvatarView(user.fullName,
subTitle: user.affiliation,
image: user.profileImageName)
.avatarStyle(.automatic)
}
}
}
127. struct ContentView: View {
@State var users = User.samples
@State var isProfileShowing = false
var body: some View {
List(users) { user in
AvatarView(user.fullName,
subTitle: user.affiliation,
image: user.profileImageName)
.avatarStyle(.automatic)
}
}
}
138. Dear Apple…
Make Extract to Subview work all of the time
Extract to Subview: handle dependent
properties
Add Extract to File
Add Extract to local Subview
Add Extract to Package
143. Dear Apple…
Make Extract to Subview work all of the time
Extract to Subview: handle dependent
properties
Add Extract to File
Add Extract to local Subview
Add Extract to Package
Rich previews for the Xcode Component Library