The document describes the Observer design pattern used in a weather monitoring application.
The weather data object acts as the subject and updates three display objects (current conditions, statistics, and forecast displays) as observers when its measurements change. Initially, the displays were updated directly in the measurementChanged() method, violating encapsulation.
The Observer pattern was implemented with the weather data as the subject and display classes implementing the observer interface. Now when a measurement changes, the subject notifies all observer displays to update independently according to the new data.
This is Class 5 on a 6 week course I taught on Software Design Patterns.
This course discusses the Observer and Decorator patterns.
Class based on "Head First Design Patterns."
in these slides i have explained the Observer design pattern. slides includes the complete definition, explanation and then implementation with code examples.
This is Class 5 on a 6 week course I taught on Software Design Patterns.
This course discusses the Observer and Decorator patterns.
Class based on "Head First Design Patterns."
in these slides i have explained the Observer design pattern. slides includes the complete definition, explanation and then implementation with code examples.
in these slides i have explained the difference between MVC, MVP and MVVM design patterns. slides includes definition, explanation and then implementation with code examples. it is a comparison oriented presentation.
Designing the foundations of an iOS application is important to reduce the cost of maintenance and evolution. In this session we will see some best practices on how to organize iOS apps both from the point of view of the Xcode project and the source code. Based on the typical iOS client/server application, we will see how to structure the layers ranging from the user interface to the netwrok layer.
“Program to an interface, not an implementation” they[1] say …
But when IMyInterface foo = new IMyInterface() is not valid code … how are you supposed to achieve that ? The answer is Dependency Injection.
In this talk, we’ll talk about Dependency injection, what it is and what it is not. We’ll see how it is a valuable set of practices and patterns that help design maintainable software built on top of the SOLID object-oriented principles.
We’ll see how, when used properly, it delivers many benefits such as extensibility and testability … We’ll also cover some anti-patterns, ways of using Dependency Injection that can lead to code that is painful to understand and maintain
This talk is not about DI/IOC containers per se, but focuses on the core concepts of Dependency Injection. Those concepts are essential to understand how to use those “magic-looking” tools (if they are needed at all …)
This talk is not only for .NET developers. It will contain code examples written in C#, but should be understandable by developers with knowledge in other statically-typed object-oriented languages such as Java, Vb.NET, C++ …
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
in these slides i have explained the difference between MVC, MVP and MVVM design patterns. slides includes definition, explanation and then implementation with code examples. it is a comparison oriented presentation.
Designing the foundations of an iOS application is important to reduce the cost of maintenance and evolution. In this session we will see some best practices on how to organize iOS apps both from the point of view of the Xcode project and the source code. Based on the typical iOS client/server application, we will see how to structure the layers ranging from the user interface to the netwrok layer.
“Program to an interface, not an implementation” they[1] say …
But when IMyInterface foo = new IMyInterface() is not valid code … how are you supposed to achieve that ? The answer is Dependency Injection.
In this talk, we’ll talk about Dependency injection, what it is and what it is not. We’ll see how it is a valuable set of practices and patterns that help design maintainable software built on top of the SOLID object-oriented principles.
We’ll see how, when used properly, it delivers many benefits such as extensibility and testability … We’ll also cover some anti-patterns, ways of using Dependency Injection that can lead to code that is painful to understand and maintain
This talk is not about DI/IOC containers per se, but focuses on the core concepts of Dependency Injection. Those concepts are essential to understand how to use those “magic-looking” tools (if they are needed at all …)
This talk is not only for .NET developers. It will contain code examples written in C#, but should be understandable by developers with knowledge in other statically-typed object-oriented languages such as Java, Vb.NET, C++ …
Je vous partage l'un des présentations que j'ai réalisé lorsque j'étais élève ingénieur pour le module 'Anglais Business ' , utile pour les étudiants souhaitant préparer une présentation en anglais sur les Design Pattern - ou les patrons de conception .
This presentation provide information to understand observer design pattern, it’s structure and it’s implementation.
I have tried my best to explain the concept in very simple language.
The programming language used for implementation is c#. But any one from different programming background can easily understand the implementation.
The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.
Pointer Events Working Group update / TPAC 2023 / Patrick H. LaukePatrick Lauke
Update about Pointer Events Level 3 work for the upcoming W3C Technical Plenary and Advisory Committee (TPAC) 2023 in Seville
https://www.youtube.com/watch?v=r0spZl1qaa0
https://w3c.github.io/pointerevents/
https://www.w3.org/TR/pointerevents/
https://www.w3.org/2023/09/TPAC/
https://patrickhlauke.github.io/touch/w3c_tpac2023_pewg/
Cross-posted from https://www.w3.org/2023/09/TPAC/group-updates.html#pointer-events
Building Scalable Stateless Applications with RxJavaRick Warren
RxJava is a lightweight open-source library, originally from Netflix, that makes it easy to compose asynchronous data sources and operations. This presentation is a high-level intro to this library and how it can fit into your application.
Presented at YOW! Connected 2015 (Melbourne) by Jeames Bone & Mark Corbyn:
"There are many great resources for getting started with Functional Reactive Programming and ReactiveCocoa, but what’s the next step? ReactiveCocoa is not just a nice wrapper for KVO, Signals can be used to model many common problems in Cocoa including managing the state of your UI, notifications and even business logic. Adopting ReactiveCocoa can make for more modular, self-documenting code — while still integrating easily with other APIs and your existing code. We would like to share with you some interesting, practical examples where we’ve used ReactiveCocoa to solve problems in our app. Our goal is to inspire you to consider how ReactiveCocoa can be applied in your own apps."
Reactive programming has been touted as one of the most important new programming paradigms in recent history. The idea of designing software as asynchronous streams of data is compelling, as evidenced by the growing popularity of reactive programming and the frameworks based on it. In this session we’ll explore what it is, where it came from, and look at its implementation in the Reactive Extensions API.
Sergiy Grytsenko, Senior Software Engineer
“Reactive Extensions: classic Observer in .NET”
• Why should we use Rx when we have events?
• Key types & methods
• Lifetime management, flow control
• Combining several streams
• Tests, I need unit tests!
Android Lab Test : Using the sensor gyroscope (english)Bruno Delb
Android Lab Test : Using the sensor gyroscope (english)
Video of tutorial on : https://www.youtube.com/playlist?list=PLL2Z3bzdO25yHwIV3XdMzKs61At0Ldh6L
Visit http://www.AndroidLabTest.com
How to become an Android dev starting from iOS (and vice versa)Giuseppe Filograno
Starting from my working experience I want to describe the similarities between Android and iOS platforms, demonstrating that these worlds are not so far!
This slides was presented for the first time at the Google DevFest Milano 2018
Data binding in AngularJS, from model to viewThomas Roch
A short presentation about angular data binding, from model to view. A quick view of precesses involved and their limitations.
See https://github.com/troch/angular-data-binding for more information.
We all know, or should know, about SOLID. The question is, do we write C++ according to the SOLID principles?
https://platis.solutions/blog/2020/06/22/how-to-write-solid-cpp/
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
2. Weather Monitoring Application
Weather Data Object
Weather Station Guy that tracks the data
Device that receives the coming from weather
weather data station and updates the
display
Display
Shows the current
weather conditions.
3. Job description
Create an application that uses the weather data
Object to update the three displays for weather
conditions.
The three displays are current conditions, weather
stats and forecast
4. Weather Data Class
• getTemprature()
• getPressure()
• getHumidity()
• measurementChanged()
Weather
Data Class
5. Our Task
Implement
measurementchanged()
function so that it
updates the displays
accordingly
7. Problems with the previous approach
We are coding to concrete implementation rather then to
an interface.
We have not encapsulated the part that changes from the
part that remains constant. (Display Changes)
We have no way to add or remove the weather displays at
run time.
If we want to add new display we have to alter code.
8. The Observer Pattern
Similar to Newspaper subscription.
Publishers publish and subscribers read.
Once subscribers unsubscribe publishers wont get anything to read.
Once subscribers subscribe again they get to read.
Publishers are Subject and subscribers are Observer.
“The Observer pattern defines a one to many relationship between a set of
objects. When the state of one changes it is notified to all the others.”
10. Implementation (Subject)
public class WeatherData implements Subject{
private ArrayList Observers;
private float temp,press,hum;
public WeatherData()
{ Observers = new ArrayList();}
Publc void removeObserver(Observer o)
{
int index = Observers.indexOf(o);
Observers.remove(i);
}
Public void notifyObservers()
{
for(I =0;i<Observers.length();i++) {
Observer o = (Observer)Observers.get(i);
o.update(temp,hum,press);
}
}
Public void measurementChanged()
{
notifyObservers();
}
public void addObserver(Observer o)
{Observers.add(o);}
11. Implementation (Observer)
public class CurrentConditionsDisplay implements Observer,Display {
private float temp,hum,press;
private Subject weatherData;
public CurrentConditionsDisplay (Subject s){
this.weatherData = s;
weatherData.addObserver(this);
}
Public void update(float temp, float press, float hum)
{
this.temp= temp; this. Press = press;
display();
}
public void display()
{
System.out.println(“ The current conditions of temperature are good : “+temp);
}
12. Java has built in support for Observer
• You don’t have to implement the addObserver,
removeObserver etc since these are already
implemented in Observable class (not an
interface).
• Both are present in the java.util package.
• You can also implement either pull or push style
to your observers.
• For an object to become Observer:
– Implement the Observer Interface and call
addObserver() on any Observable Object.
13. Cont…
• For the Observable to send notifications:
– You must first call the protected setChanged() method
to signify that the state has changed.
– Then call one of the two notifyObservers() methos
• notifyObservers()
• notifyObservers(Object arg)
– The argument passed is the data Obect.
– For an Observer
• Update(Observable o, Object arg)
– Implements the update method. If you want the push model you
can put the data in the dataObject else in case of pull method the
Observer can get the data when ever it wants.
14. Dark Side of Observer Java Built in Pattern
• The Observable is a class not an interface. Any already
defined class which has already extended a class can not
subclass it.
• You cant create your own implementation that plays well
with Java Built in Observer API.
• Observable protects the setChanged() method hence any
class has to subclass It if they want to use Observable. This
hampers the design principle “favor composite over
inheritance”
• Swing uses the Observer Pattern. Since every button has a
number of listeners. Listeners are observers which wait for
any change in the state of the button and respond
accordingly.