The document discusses decorators, exhibits, and presenters design patterns. Decorators allow adding new functionality to objects dynamically without subclassing. Exhibits connect a model object to a context for rendering, wrapping the model and encapsulating rendering decisions. Presenters deal with views and models, moving view logic out of the view layer and into presenter classes to clean the view layer. Exhibits differ from presenters in that exhibits don't know about view languages while presenters speak the language of the view.
Resistance is futile: Start writing accessible websites now!Vegard Haugstvedt
Accessible websites are crucial for those unlucky enough to have some form of disability or limited sight, hearing or movement. Unfortunately it is extremely "easy" to accidentally preventing websites from working with accessibility tools. It is our responsibility as developers to make sure the systems we develop can be used by anyone, and to achieve that we need the right "tools".
In this talk I not only explain how to write proper, accessible HTML, but I also show you what happens if you do not. We look at how HTML5 and WAI-ARIA can improve navigation, understanding and perception, and how to make screen readers react to changes made by JavaScript code.
By watching this talk you will learn the most common pitfalls and the best techniques when it comes to accessibility.
How to Become a Thought Leader in Your NicheLeslie Samuel
Are bloggers thought leaders? Here are some tips on how you can become one. Provide great value, put awesome content out there on a regular basis, and help others.
Resistance is futile: Start writing accessible websites now!Vegard Haugstvedt
Accessible websites are crucial for those unlucky enough to have some form of disability or limited sight, hearing or movement. Unfortunately it is extremely "easy" to accidentally preventing websites from working with accessibility tools. It is our responsibility as developers to make sure the systems we develop can be used by anyone, and to achieve that we need the right "tools".
In this talk I not only explain how to write proper, accessible HTML, but I also show you what happens if you do not. We look at how HTML5 and WAI-ARIA can improve navigation, understanding and perception, and how to make screen readers react to changes made by JavaScript code.
By watching this talk you will learn the most common pitfalls and the best techniques when it comes to accessibility.
How to Become a Thought Leader in Your NicheLeslie Samuel
Are bloggers thought leaders? Here are some tips on how you can become one. Provide great value, put awesome content out there on a regular basis, and help others.
Describes the philosophical, programming, methodology, and business standards needed to keep technical communication current in an increasingly technical era.
Slides for a presentation I gave at the PDX CMS meetup group.
The original event description:
Craft CMS is an incredibly flexible content platform. But with so much flexibility, the possibilities can get quickly become confusing. More options make it less clear if you're doing things the "right" way. And the documentation only gives basic advice on using individual features, not how the pieces fit together in a real site build.
Lucky for us, the fine folks at Pixel and Tonic have created the Happy Lager demo as a showcase of Craft's best features (https://github.com/pixelandtonic/HappyLager). Alex will walk us through what we can learn from Happy Lager's template code and how the site's content is modeled. We'll also see what tips and tricks are hidden inside and hopefully find some new ways to think about your next site build.
Accessible UIs with jQuery and Infusioncolinbdclark
Overview of accessible Web development techniques with jQuery and Fluid's Infusion application framework. This talk gives developers a primer in DHTML accessibility techniques such as keyboard navigation and ARIA, while teaching them the strengths of Infusion for building large applications in JavaScript.
Presented at 2009 Ajax Experience, Boston.
Java EE changes design pattern implementation: JavaDays Kiev 2015Alex Theedom
The implementation of traditional design patterns have changed in Java EE 7. By taking advantage of Java EE features such as CDI and the smart use of annotations, traditional design patterns can be implemented in a much cleaner and quicker way. With the use of code examples I will demonstrate how to implement some of the most commonly use design patterns in Java EE. Among the design patterns discuss there will be Factory, Singleton, Observer and Decorator.
A quick introduction to same aspects of the Zend Framework, including installation and setup using Zend_Tool, ZF's MVC architecture, database models, controllers, view scripts, layouts and forms. Delivered at the April meeting of phpNE.
Introduction
Require JS
Handlebars
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
YouTube Link: https://youtu.be/C_oPLDaSy-8
**Java, J2EE & SOA Certification Training - https://www.edureka.co/java-j2ee-training-course **
This Edureka PPT on "design patterns in java" will provide you with detailed knowledge about Java Design Patterns and along with it, This PPT will also cover some real-time examples of some important Design Patterns in Java, in order to provide you with a deep understanding about their functionality. This PPT will cover the following topics:
Why do we need Design Patterns?
What are Design Patterns?
Structure of a Design Pattern
Types of Design Patterns
Creational Design Pattern
Structural Design Pattern
Behavioural Design Pattern
JEE Design Pattern
Overview of design patterns
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Introduction to Revit MEP Detailing/Annotation & TaggingNI BT
Expert in Detailing Sheets and Drawings? Want to learn and build your career in Annotation/Detailing in Revit MEP? The article will help to explore the concept of Annotation and tagging in Revit MEP where Tags or Tagging is a detailing which recognizes the elements in the drawings and set a name to an object
Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...IXIASOFT
Join Keith Schengili-Roberts, IXIASOFT DITA Specialist, and the LavaCon crew, for a free webinar on Thursday, September 8, 2016 to learn more about optimizing content reuse with DITA. Just click on the gotowebinar link above to register - it's free!
Optimizing Content Reuse with DITA
DITA was designed around the idea of content reuse. Maps, topics, conrefs and keys all provide the means for sharing and reusing content effectively within a documentation team using the standard. But what are the optimal ways of doing this, and what are the common mistakes first-time DITA users make when it comes to content reuse? Did you know that DITA 1.3 offers up additional means for reusing content via using such things as scoped keys? And what good is content reuse if you can’t find the content you are looking for?
In this presentation IXIASOFT’s DITA Specialist Keith Schengili-Roberts will examine content reuse best practices, and look at how the idea of content reuse has evolved, changed and been refined since DITA first debuted over ten years ago.
Webinar hosted by LavaCon, Sponsored by IXIASOFT.
Describes the philosophical, programming, methodology, and business standards needed to keep technical communication current in an increasingly technical era.
Slides for a presentation I gave at the PDX CMS meetup group.
The original event description:
Craft CMS is an incredibly flexible content platform. But with so much flexibility, the possibilities can get quickly become confusing. More options make it less clear if you're doing things the "right" way. And the documentation only gives basic advice on using individual features, not how the pieces fit together in a real site build.
Lucky for us, the fine folks at Pixel and Tonic have created the Happy Lager demo as a showcase of Craft's best features (https://github.com/pixelandtonic/HappyLager). Alex will walk us through what we can learn from Happy Lager's template code and how the site's content is modeled. We'll also see what tips and tricks are hidden inside and hopefully find some new ways to think about your next site build.
Accessible UIs with jQuery and Infusioncolinbdclark
Overview of accessible Web development techniques with jQuery and Fluid's Infusion application framework. This talk gives developers a primer in DHTML accessibility techniques such as keyboard navigation and ARIA, while teaching them the strengths of Infusion for building large applications in JavaScript.
Presented at 2009 Ajax Experience, Boston.
Java EE changes design pattern implementation: JavaDays Kiev 2015Alex Theedom
The implementation of traditional design patterns have changed in Java EE 7. By taking advantage of Java EE features such as CDI and the smart use of annotations, traditional design patterns can be implemented in a much cleaner and quicker way. With the use of code examples I will demonstrate how to implement some of the most commonly use design patterns in Java EE. Among the design patterns discuss there will be Factory, Singleton, Observer and Decorator.
A quick introduction to same aspects of the Zend Framework, including installation and setup using Zend_Tool, ZF's MVC architecture, database models, controllers, view scripts, layouts and forms. Delivered at the April meeting of phpNE.
Introduction
Require JS
Handlebars
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
YouTube Link: https://youtu.be/C_oPLDaSy-8
**Java, J2EE & SOA Certification Training - https://www.edureka.co/java-j2ee-training-course **
This Edureka PPT on "design patterns in java" will provide you with detailed knowledge about Java Design Patterns and along with it, This PPT will also cover some real-time examples of some important Design Patterns in Java, in order to provide you with a deep understanding about their functionality. This PPT will cover the following topics:
Why do we need Design Patterns?
What are Design Patterns?
Structure of a Design Pattern
Types of Design Patterns
Creational Design Pattern
Structural Design Pattern
Behavioural Design Pattern
JEE Design Pattern
Overview of design patterns
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Introduction to Revit MEP Detailing/Annotation & TaggingNI BT
Expert in Detailing Sheets and Drawings? Want to learn and build your career in Annotation/Detailing in Revit MEP? The article will help to explore the concept of Annotation and tagging in Revit MEP where Tags or Tagging is a detailing which recognizes the elements in the drawings and set a name to an object
Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...IXIASOFT
Join Keith Schengili-Roberts, IXIASOFT DITA Specialist, and the LavaCon crew, for a free webinar on Thursday, September 8, 2016 to learn more about optimizing content reuse with DITA. Just click on the gotowebinar link above to register - it's free!
Optimizing Content Reuse with DITA
DITA was designed around the idea of content reuse. Maps, topics, conrefs and keys all provide the means for sharing and reusing content effectively within a documentation team using the standard. But what are the optimal ways of doing this, and what are the common mistakes first-time DITA users make when it comes to content reuse? Did you know that DITA 1.3 offers up additional means for reusing content via using such things as scoped keys? And what good is content reuse if you can’t find the content you are looking for?
In this presentation IXIASOFT’s DITA Specialist Keith Schengili-Roberts will examine content reuse best practices, and look at how the idea of content reuse has evolved, changed and been refined since DITA first debuted over ten years ago.
Webinar hosted by LavaCon, Sponsored by IXIASOFT.
Book Formatting: Quality Control Checks for DesignersConfidence Ago
This presentation was made to help designers who work in publishing houses or format books for printing ensure quality.
Quality control is vital to every industry. This is why every department in a company need create a method they use in ensuring quality. This, perhaps, will not only improve the quality of products and bring errors to the barest minimum, but take it to a near perfect finish.
It is beyond a moot point that a good book will somewhat be judged by its cover, but the content of the book remains king. No matter how beautiful the cover, if the quality of writing or presentation is off, that will be a reason for readers not to come back to the book or recommend it.
So, this presentation points designers to some important things that may be missed by an editor that they could eventually discover and call the attention of the editor.
Transforming Brand Perception and Boosting Profitabilityaaryangarg12
In today's digital era, the dynamics of brand perception, consumer behavior, and profitability have been profoundly reshaped by the synergy of branding, social media, and website design. This research paper investigates the transformative power of these elements in influencing how individuals perceive brands and products and how this transformation can be harnessed to drive sales and profitability for businesses.
Through an exploration of brand psychology and consumer behavior, this study sheds light on the intricate ways in which effective branding strategies, strategic social media engagement, and user-centric website design contribute to altering consumers' perceptions. We delve into the principles that underlie successful brand transformations, examining how visual identity, messaging, and storytelling can captivate and resonate with target audiences.
Methodologically, this research employs a comprehensive approach, combining qualitative and quantitative analyses. Real-world case studies illustrate the impact of branding, social media campaigns, and website redesigns on consumer perception, sales figures, and profitability. We assess the various metrics, including brand awareness, customer engagement, conversion rates, and revenue growth, to measure the effectiveness of these strategies.
The results underscore the pivotal role of cohesive branding, social media influence, and website usability in shaping positive brand perceptions, influencing consumer decisions, and ultimately bolstering sales and profitability. This paper provides actionable insights and strategic recommendations for businesses seeking to leverage branding, social media, and website design as potent tools to enhance their market position and financial success.
Can AI do good? at 'offtheCanvas' India HCI preludeAlan Dix
Invited talk at 'offtheCanvas' IndiaHCI prelude, 29th June 2024.
https://www.alandix.com/academic/talks/offtheCanvas-IndiaHCI2024/
The world is being changed fundamentally by AI and we are constantly faced with newspaper headlines about its harmful effects. However, there is also the potential to both ameliorate theses harms and use the new abilities of AI to transform society for the good. Can you make the difference?
White wonder, Work developed by Eva TschoppMansi Shah
White Wonder by Eva Tschopp
A tale about our culture around the use of fertilizers and pesticides visiting small farms around Ahmedabad in Matar and Shilaj.
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Mansi Shah
This study examines cattle rearing in urban and rural settings, focusing on milk production and consumption. By exploring a case in Ahmedabad, it highlights the challenges and processes in dairy farming across different environments, emphasising the need for sustainable practices and the essential role of milk in daily consumption.
4. @AtifTweets
Decorators
“Decorators attach additional responsibilities to an object dynamically. They provide a
flexible alternative to subclassing for extending functionality.” - Design Patterns:
Elements of Reusable Object-Oriented Software - GoF
5. @AtifTweets
Decorators
• Decorators: The Cure for Ugly Code
• Can easily add responsibility for any object
• Delegate any unknown method to object it
decorates
• Decorators only copy the type of the
component class not the behaviour
• Follow open and close philosophy = Open to
Extend … Close for Modifications
8. @AtifTweets
Why do we need this?
• Only thing constant is the CHANGE
• Inheritance Powerful but NOT Flexible or
Maintainable design pattern
• So we prefer Composition and Delegation
10. @AtifTweets
Coffeessimo
• A big coffee chain
• They have some basic coffee drink types
• And also customers can customize there
coffee by adding different condiments on
offer
• They have coffee types: HouseBlend,
DarkRoast, Espresso, Decaf
• Condiment types: Milk, Mocha, Soy, Whip
19. @AtifTweets
Exhibits
• Flavor of Decorators
• The primary goal of exhibits is to connect a
model object with a context for which it's
rendered
• Very often you'll likely want to add some
additional functionality. Such is the case with
exhibits. The additional functionality added
will extend (but not disrupt) the delegate
object.
20. @AtifTweets
Exhibits
• Wraps a single model instance.
• Is a true Decorator.
• Brings together a model and a context. Exhibits need
a reference to a "context" object—either a controller
or a view context—in order to be able to render
templates as well as construct URLs for the object or
related resources.
• Encapsulates decisions about how to render an
object. The tell-tale of an Exhibit is telling an object
"render yourself", rather than explicitly rendering a
template and passing the object in as an argument.
21. @AtifTweets
Example
class CarExhibit < Decorator
def initialize(car, context)
@context = context
super(car) # Set up delegation
end
def additional_info
"Some cars with 2 doors have a back seat, some
don't. Brilliant."
end
def render
@context.render(self)
end
end
class TextRenderer
def render(car)
"A shiny car!
#{car.additional_info}"
end
end
class HtmlRenderer
def render(car)
"A <strong>shiny</strong> car!
<em>#{car.additional_info}</em>"
end
end
class Car
def price
1_000_000
end
end
example courtesy mikepackdev.com
22. @AtifTweets
car = CarExhibit.new(Car.new, TextRenderer.new)
car.render #=> "A shiny car! Some cars with 2 doors have a back seat, some don't.
Brilliant.“
car.price #=> 1000000
car2 = CarExhibit.new(Car.new, HtmlRenderer.new)
car2.render #=> "A <strong>shiny</strong> car! <em>Some cars with 2 doors have a
back seat, some don't. Brilliant.</em>"
26. @AtifTweets
Presenters
• Presenters were originally formed as a more
composite-oreinted object, but modern day
presenters are more like decorators.
• Presenter deals with view and model
• Clean the view by moving the logic to the
presenter class
29. @AtifTweets
Difference b/w Exhibit and Presenters
• A key differentiator between exhibits and
presenters is the language they speak. Exhibits
shouldn't know about the language of the view
(eg HTML). Exhibits speak the language of the
decorated object. Presenters speak the language
of the view.
• Presenters and exhibits differ in their proximity
to the view. Presenters live very close to the view
layer. In fact, they are meant to be a
representation of the delegate object within the
view.
33. @AtifTweets
<%= link_to_if @user.url.present?, image_tag("avatars/#{avatar_name(@user)}", class:
"avatar"), @user.url %>
Helper Method
module UsersHelper
def avatar_name(user)
if user.avatar_image_name.present?
user.avatar_image_name
else
"default.png"
end
end
end
Condition
34. @AtifTweets
/app/presenters/user_presenter.rb
class UserPresenter
def initialize(user, template)
@user = user
@template = template
end
def avatar
@template.link_to_if @user.url.present?, @template.image_tag("avatars/#{avatar_name}", class:
"avatar"), @user.url
end
private
def avatar_name
if @user.avatar_image_name.present?
@user.avatar_image_name
else
"default.png"
end
end
end
35. @AtifTweets
/app/views/users/show.html.erb
<% present @user do |user_presenter|
%>
<div id="profile">
<%= user_presenter.avatar %>
<!-- Rest of view code omitted -->
</div>
<% end %>
module ApplicationHelper
def present(object, klass = nil)
klass ||= "{object.class}Presenter".constantize
presenter = klass.new(object, self)
yield presenter if block_given?
presenter
end
end
36. @AtifTweets
Further learning
• Head First Design Patterns di Eric Freeman,
Elisabeth Freeman, Kathy Sierra e Bert Bates
• Design Patterns in Ruby di Russ Olsen
• Design Patterns for Dummies
• Objects on Rails by Avdi Grimm
• http://mikepackdev.com/blog_posts/31-exhibit-vs
• http://railscasts.com/episodes/287-presenters-fro