Most Javascript is written to glue code and UI together without any thought to design patterns. Over time this leads to piles of Javascript that look nothing like code you’d be proud of writing. In this talk we’ll look at the rise of software libraries (like Knockout) that can help add structure to your JS. We’ll talk about when they help your project, and when they get in the way. We’ll also look into how you can easily use the Mediator pattern in JavaScript to really clean up your code with or without other libraries.
Building Rich User Experiences Without JavaScript SpaghettiJared Faris
The document discusses how JavaScript code can become messy and difficult to maintain over time as new features are added in a rushed manner without proper architecture. It advocates applying object-oriented principles like decoupling components, making components testable, and pushing events rather than state changes. Specific patterns like mediator, observer and service bus are presented as ways to better structure JavaScript code and avoid spaghetti code as an application evolves.
The document discusses monitoring and measuring systems by observing behaviors and metrics over time. It notes that every observation distills down to two elements - the circumstances or context being measured, and the value or result. Context includes dimensions like what is being measured, location, time, etc. Values can be numeric metrics or text outcomes. The document advocates for capturing both passive data reflecting real events as well as active tests to better understand system performance in low traffic environments. It also stresses that averaging or sampling can hide variability, so capturing additional statistical details beyond just the average value provides more useful insights.
In this session we’ll leave the need for performance a foregone conclusion and take a whirlwind tour through the complexity of modern Internet architectures. The complexities lead to evil optimization problems and significant challenges troubleshooting production issues to a speedy and successful end.
Starting with the simple facts that you can’t fix what you can’t see and you can’t improve what you can’t measure, we’ll discuss what needs monitoring and why. We’ll talk about unlikely allies in the fight for time and budget to instrument systems, applications and processes for observability.
You’ll leave the session with a better understanding of what it looks like to troubleshoot the storm of a malfunctioning large architecture and some tools and techniques you can use to not be swallowed by the Kraken.
Personal leadership 2 "Interdependent" Karim Fathy
Seek First to Understand, Then to Be Understood. The document discusses the importance of understanding others' perspectives before trying to be understood through interpersonal relationships and communication. It emphasizes thinking win-win, understanding needs and principles, and creating interdependence where all members rely on each other for the best long-term outcomes.
This document provides a summary of a quantitative survey conducted in Romania on users of online social networks:
- The survey included 528 interviews with men and women aged 15-55 from urban areas with over 50,000 inhabitants.
- On average, Romanian social network users have accounts on 4 networks but actively use around 3. The average time spent per session is 1 hour and 19 minutes.
- Facebook and Hi5 are the most widely used and have the highest average number of contacts, while awareness and usage is lower for other networks like LinkedIn, Twitter and BestJobs.
- Most users connect from home and accept invitations only from people they know personally.
Building Rich User Experiences Without JavaScript SpaghettiJared Faris
The document discusses how JavaScript code can become messy and difficult to maintain over time as new features are added in a rushed manner without proper architecture. It advocates applying object-oriented principles like decoupling components, making components testable, and pushing events rather than state changes. Specific patterns like mediator, observer and service bus are presented as ways to better structure JavaScript code and avoid spaghetti code as an application evolves.
The document discusses monitoring and measuring systems by observing behaviors and metrics over time. It notes that every observation distills down to two elements - the circumstances or context being measured, and the value or result. Context includes dimensions like what is being measured, location, time, etc. Values can be numeric metrics or text outcomes. The document advocates for capturing both passive data reflecting real events as well as active tests to better understand system performance in low traffic environments. It also stresses that averaging or sampling can hide variability, so capturing additional statistical details beyond just the average value provides more useful insights.
In this session we’ll leave the need for performance a foregone conclusion and take a whirlwind tour through the complexity of modern Internet architectures. The complexities lead to evil optimization problems and significant challenges troubleshooting production issues to a speedy and successful end.
Starting with the simple facts that you can’t fix what you can’t see and you can’t improve what you can’t measure, we’ll discuss what needs monitoring and why. We’ll talk about unlikely allies in the fight for time and budget to instrument systems, applications and processes for observability.
You’ll leave the session with a better understanding of what it looks like to troubleshoot the storm of a malfunctioning large architecture and some tools and techniques you can use to not be swallowed by the Kraken.
Personal leadership 2 "Interdependent" Karim Fathy
Seek First to Understand, Then to Be Understood. The document discusses the importance of understanding others' perspectives before trying to be understood through interpersonal relationships and communication. It emphasizes thinking win-win, understanding needs and principles, and creating interdependence where all members rely on each other for the best long-term outcomes.
This document provides a summary of a quantitative survey conducted in Romania on users of online social networks:
- The survey included 528 interviews with men and women aged 15-55 from urban areas with over 50,000 inhabitants.
- On average, Romanian social network users have accounts on 4 networks but actively use around 3. The average time spent per session is 1 hour and 19 minutes.
- Facebook and Hi5 are the most widely used and have the highest average number of contacts, while awareness and usage is lower for other networks like LinkedIn, Twitter and BestJobs.
- Most users connect from home and accept invitations only from people they know personally.
Innovative HR Solution is a human resource consulting firm based in Gujarat, India that provides recruitment and staffing services across multiple industries. They specialize in executive search, permanent placement, and reference checks. They aim to build long-term relationships with both clients and candidates by thoroughly vetting candidates and understanding clients' needs to find the best fit. They have a presence across India through their network of recruiters.
Being a gentlemen with girls "the definitive way to express yourself and trea...Karim Fathy
for every gentleman who express to the world who we are.
for every princess in the world that really feel her beauty and appreciate the others well.
for my friends and family.
for my princess in this world.
thank you for being that way you are
The slide-deck covers some basic do's and don'ts in pitching by comparing standup art with startups. However it goes over the support process of the Tehnopol Business Incubator developed by the author as well and talks about the acceleration process of growth companies.
This presentation is a traditional update to the regions technology investors and entrepreneurs I do every 6 months or so with the aim to bring out the current status of the ecosystem and bring out the main challenge ahead to take us further.
This presentation is mostly in my native language Estonian. The topic is around the bigger and longer challenges of civilization. This presentation also explains how technological revolutions work and what could be the opportunities when knowing both
This document discusses using Backbone.js over Ruby on Rails for building web applications. It describes how the author built out different levels of an application, starting with a basic Rails app and then enhancing it with additional JavaScript frameworks like Backbone and CoffeeScript, as well as switching the database to MongoDB and adding a JSON API. The document also provides recommendations for development resources and environments for Ruby, Rails, JavaScript, and Backbone development.
The Spork / Platypus Average: Content strategy at Red Gate SoftwareRoger Hart
The document discusses content strategy at Red Gate Software. It explains that content strategy plans for the creation, publication, and governance of useful content to ensure a website does not suck and continues not to suck. It provides examples of the large amount of content in Red Gate's SQL Tools division and for its main SQL Compare product. Recommendations are made to delete 60-70% of existing content after analyzing the content inventory and feedback from various sources. The challenges of content strategy are discussed as well as next steps for content design around a new flagship product.
Friends are important for well-being and happiness. If you lose friends, it can be emotionally painful but talking to others may help. True friends show they care through compliments and saying "I love you," so those expressions should be believed. However, if a friend's words seem different than their actions, it's best to ask for clarification before making assumptions. Maintain friendships with those who treat you well, and communicate with others to try and improve strained relationships. Apologies and expressing love are important for reconciliation.
This document discusses how to build rich user experiences with JavaScript without creating "spaghetti code". It advocates for pushing events rather than state between components, writing small discrete bits of code, and fully decoupling components. Specific techniques mentioned include using design patterns like mediator and observer, frameworks like Knockout and Backbone, namespacing, inheritance, and testing isolated layers. The goal is to structure JavaScript applications similarly to server-side code by treating the client-side seriously and applying best practices around modularity and loose coupling.
This document discusses how Etsy enables rapid experimentation through continuous deployment and metrics-driven development. Key points include deploying small code changes frequently using feature flags and ramp-ups, measuring everything with tools like StatsD, optimizing for learning by running many experiments, and gaining confidence to change through quantitative metrics. The goal is to make failures cheap and iterate quickly to find product-market fit.
The document discusses techniques for structuring Haskell programs using monads and monad transformers in a way that is clear and focuses on essential ideas. It presents an example of refactoring a program to use type classes to represent dependencies instead of passing explicit configuration everywhere. This improves readability and hides implementation details. The approach demonstrated is called "MTL-style" or "finally tagless" and provides a clean separation of interfaces and implementations.
Innovative HR Solution is a human resource consulting firm based in Gujarat, India that provides recruitment and staffing services across multiple industries. They specialize in executive search, permanent placement, and reference checks. They aim to build long-term relationships with both clients and candidates by thoroughly vetting candidates and understanding clients' needs to find the best fit. They have a presence across India through their network of recruiters.
Being a gentlemen with girls "the definitive way to express yourself and trea...Karim Fathy
for every gentleman who express to the world who we are.
for every princess in the world that really feel her beauty and appreciate the others well.
for my friends and family.
for my princess in this world.
thank you for being that way you are
The slide-deck covers some basic do's and don'ts in pitching by comparing standup art with startups. However it goes over the support process of the Tehnopol Business Incubator developed by the author as well and talks about the acceleration process of growth companies.
This presentation is a traditional update to the regions technology investors and entrepreneurs I do every 6 months or so with the aim to bring out the current status of the ecosystem and bring out the main challenge ahead to take us further.
This presentation is mostly in my native language Estonian. The topic is around the bigger and longer challenges of civilization. This presentation also explains how technological revolutions work and what could be the opportunities when knowing both
This document discusses using Backbone.js over Ruby on Rails for building web applications. It describes how the author built out different levels of an application, starting with a basic Rails app and then enhancing it with additional JavaScript frameworks like Backbone and CoffeeScript, as well as switching the database to MongoDB and adding a JSON API. The document also provides recommendations for development resources and environments for Ruby, Rails, JavaScript, and Backbone development.
The Spork / Platypus Average: Content strategy at Red Gate SoftwareRoger Hart
The document discusses content strategy at Red Gate Software. It explains that content strategy plans for the creation, publication, and governance of useful content to ensure a website does not suck and continues not to suck. It provides examples of the large amount of content in Red Gate's SQL Tools division and for its main SQL Compare product. Recommendations are made to delete 60-70% of existing content after analyzing the content inventory and feedback from various sources. The challenges of content strategy are discussed as well as next steps for content design around a new flagship product.
Friends are important for well-being and happiness. If you lose friends, it can be emotionally painful but talking to others may help. True friends show they care through compliments and saying "I love you," so those expressions should be believed. However, if a friend's words seem different than their actions, it's best to ask for clarification before making assumptions. Maintain friendships with those who treat you well, and communicate with others to try and improve strained relationships. Apologies and expressing love are important for reconciliation.
This document discusses how to build rich user experiences with JavaScript without creating "spaghetti code". It advocates for pushing events rather than state between components, writing small discrete bits of code, and fully decoupling components. Specific techniques mentioned include using design patterns like mediator and observer, frameworks like Knockout and Backbone, namespacing, inheritance, and testing isolated layers. The goal is to structure JavaScript applications similarly to server-side code by treating the client-side seriously and applying best practices around modularity and loose coupling.
This document discusses how Etsy enables rapid experimentation through continuous deployment and metrics-driven development. Key points include deploying small code changes frequently using feature flags and ramp-ups, measuring everything with tools like StatsD, optimizing for learning by running many experiments, and gaining confidence to change through quantitative metrics. The goal is to make failures cheap and iterate quickly to find product-market fit.
The document discusses techniques for structuring Haskell programs using monads and monad transformers in a way that is clear and focuses on essential ideas. It presents an example of refactoring a program to use type classes to represent dependencies instead of passing explicit configuration everywhere. This improves readability and hides implementation details. The approach demonstrated is called "MTL-style" or "finally tagless" and provides a clean separation of interfaces and implementations.
This document discusses how paper prototyping can help founders improve their product's user experience early in the development process. It recommends creating low-fidelity paper prototypes to test with users, identifying issues, and iteratively refining designs based on feedback before implementing interfaces in code. The process of rapid prototyping and testing allows founders to learn what users need through direct observation and make the user experience a priority from the start.
The document discusses modeling a complex enterprise system by sketching it on a large sheet of paper. It focuses on capturing the system's behavior through events, commands, and invariants rather than data structures. Domain experts participate in collaboratively sketching the model, which helps reveal areas to explore further. The model shows the system at a high level without implementation details, representing an ideal design that existing legacy systems may not align with perfectly.
This document discusses building mobile web applications with Sencha Touch 2. It provides an overview of Sencha Touch, including its model-view-controller (MVC) paradigm and device profiles. It also demonstrates how to set up a Sencha Touch project using Sencha Command, create views and controllers, manage data with models and stores, and configure themes using Sass and Compass. The document concludes with some tips, such as keeping views clean and leveraging controllers, and points to additional Sencha Touch resources.
The document discusses building mobile web applications with Sencha Touch 2. It provides an overview of Sencha Touch, including how to get started, create user interfaces and views, handle events and data, implement device profiles and themes, and offers some tips. The presentation was given by Martin de Keijzer on building mobile apps with the Sencha Touch JavaScript framework.
The document summarizes Kellan Elliott-McCrea's presentation on the architecture and engineering practices at Etsy. It discusses how Etsy optimizes its systems for continuous change and deployment through principles like not betting against the future, favoring global over local optimizations, and making failures cheap. Key practices include continuous deployment with feature flags, metrics-driven development, blameless post-mortems, and optimizing for mean time to recovery over mean time between failures.
Geeks see code as art and content as stuff. Journalists see code as stuff and content as the art. Geeks may say "provide me content" while journalists are like "build this site." With that kind of attitudes, it's hard to get buy-in from the other side and why the web is plagued by low-quality aggregators or clunky news sites. What coders and journalists should understand: they have more in common than not. Both sides are motivated by their craft and a desire to feel that an audience is experiencing their work, whether though prose or programming. Coders and writers are not interchangeable, that great talent can be an order of magnitude more effective than mediocre talent. Though discussions of case studies and mistakes, this panel will explain from both the journalists' and the programmers' perspectives how to speak a language they will understand. Successful projects form partnerships with advice and consultation from the earliest stages, rather than as an afterthought.
This talk is about how NoSQL databases fit into a continuous delivery world. It discusses keeping business logic out of databases to avoid schema migrations, which are challenging. By using a schema-less database, there is no need for schema migrations when the code changes, reducing coupling between code and data. This allows for easier continuous delivery of changes since the database schema does not need to be changed.
This document discusses using MySQL Sandbox, a tool that allows quickly installing and configuring multiple MySQL database servers for testing purposes using a simple command line interface. Key points:
- MySQL Sandbox can install MySQL servers in seconds using a single command, much faster than manual installation.
- It supports configurations like replication between multiple servers for testing replication scenarios.
- Pre-packaged scripts are provided to easily start, stop, and manage sandboxes. Custom scripts can also be created to automate testing workflows.
- Various options allow customizing server configurations like ports, data directories, and replication topologies in a reproducible manner.
This document outlines James Smith's involvement in the Cleanweb UK organization and movement. It discusses Cleanweb UK's mission to mobilize developers to build applications that address sustainability issues rather than just creating pointless apps. It encourages developers to consider the environmental impacts of the infrastructure and clients their applications utilize in order to help drive sustainability in various sectors through coding.
PyCon talk: Deploy Python apps in 5 min with a PaaSAppsembler
How can you avoid servers and get back to coding? Platform-as-a-service (PaaS) makes deployment easy. But which PaaS do you choose and how do you get started? This talk will examine several of the leading PaaS providers and discuss their pros/cons. We'll also give examples for how to deploy the same app to each of them to see the differences.
This document provides an overview of using the Twitter Bootstrap framework to build responsive web interfaces. It discusses common frontend design challenges and how Bootstrap addresses them through pre-built components like navigation bars, buttons, grids and alerts. It demonstrates examples of websites built with Bootstrap and explores key Bootstrap elements. It also covers responsive design principles enabled by Bootstrap like automatic column wrapping and adjusting to different screen sizes.
This document summarizes a presentation about improving mobile site performance. The presentation covered why front-end performance is important, especially for mobile sites where front-end loading time accounts for a higher percentage of total loading time compared to desktop sites. It discussed ways to improve performance such as minimizing assets through techniques like image compression, JavaScript minification, and responsive images. The presentation also covered topics like round trip time, parallel connections, and ways to reduce loading time through techniques like gzip compression and bundling assets.
With new technology, new frameworks, new models, and new best practices coming at us every day, how can anyone become an expert in everything? This presentation talks about the danger of shiny new web methodologies and how to grow your expertise in a manageable way. Avoid yak shaving and solve real problems!
Pundit is a semantic web annotation tool developed by NetSeven that allows multiple users to create fine-grained annotations on web content. It uses open standards and technologies to link annotations to external data sources and enrich the web of data. Pundit allows users to create semantic annotations using predefined or customized items that unambiguously express relationships between annotated content and relevant concepts.
Pinterest arch summit august 2012 - scaling pinterestdrewz lin
This document summarizes a presentation on scaling Pinterest. It discusses how Pinterest scaled from using a single small web server and database in 2010 to using Amazon EC2, S3, multiple databases, caches and task queues with over 100 servers and 25 engineers by 2012. It also covers lessons learned around keeping infrastructure simple initially and the challenges of clustering versus sharding databases.
How to be a Lean Product Developer? @Agile Riga Day 2012Marko Taipale
The document provides guidance for lean product development. It recommends:
1. Validating business ideas through customer development and getting feedback to turn ideas into a series of testable hypotheses rather than guesses.
2. Building software faster using techniques like acceptance test-driven development (ATDD) and just-in-time architecture to minimize waste and inventory in the development process.
3. Measuring key metrics to understand customer needs and prioritize features, determine when requirements are met, and track progress over time.
Similar to Building Rich User Experiences w/o JavaScript Spaghetti (20)
ScyllaDB is making a major architecture shift. We’re moving from vNode replication to tablets – fragments of tables that are distributed independently, enabling dynamic data distribution and extreme elasticity. In this keynote, ScyllaDB co-founder and CTO Avi Kivity explains the reason for this shift, provides a look at the implementation and roadmap, and shares how this shift benefits ScyllaDB users.
"NATO Hackathon Winner: AI-Powered Drug Search", Taras KlobaFwdays
This is a session that details how PostgreSQL's features and Azure AI Services can be effectively used to significantly enhance the search functionality in any application.
In this session, we'll share insights on how we used PostgreSQL to facilitate precise searches across multiple fields in our mobile application. The techniques include using LIKE and ILIKE operators and integrating a trigram-based search to handle potential misspellings, thereby increasing the search accuracy.
We'll also discuss how the azure_ai extension on PostgreSQL databases in Azure and Azure AI Services were utilized to create vectors from user input, a feature beneficial when users wish to find specific items based on text prompts. While our application's case study involves a drug search, the techniques and principles shared in this session can be adapted to improve search functionality in a wide range of applications. Join us to learn how PostgreSQL and Azure AI can be harnessed to enhance your application's search capability.
From Natural Language to Structured Solr Queries using LLMsSease
This talk draws on experimentation to enable AI applications with Solr. One important use case is to use AI for better accessibility and discoverability of the data: while User eXperience techniques, lexical search improvements, and data harmonization can take organizations to a good level of accessibility, a structural (or “cognitive” gap) remains between the data user needs and the data producer constraints.
That is where AI – and most importantly, Natural Language Processing and Large Language Model techniques – could make a difference. This natural language, conversational engine could facilitate access and usage of the data leveraging the semantics of any data source.
The objective of the presentation is to propose a technical approach and a way forward to achieve this goal.
The key concept is to enable users to express their search queries in natural language, which the LLM then enriches, interprets, and translates into structured queries based on the Solr index’s metadata.
This approach leverages the LLM’s ability to understand the nuances of natural language and the structure of documents within Apache Solr.
The LLM acts as an intermediary agent, offering a transparent experience to users automatically and potentially uncovering relevant documents that conventional search methods might overlook. The presentation will include the results of this experimental work, lessons learned, best practices, and the scope of future work that should improve the approach and make it production-ready.
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Keywords: AI, Containeres, Kubernetes, Cloud Native
Event Link: https://meine.doag.org/events/cloudland/2024/agenda/#agendaId.4211
MySQL InnoDB Storage Engine: Deep Dive - MydbopsMydbops
This presentation, titled "MySQL - InnoDB" and delivered by Mayank Prasad at the Mydbops Open Source Database Meetup 16 on June 8th, 2024, covers dynamic configuration of REDO logs and instant ADD/DROP columns in InnoDB.
This presentation dives deep into the world of InnoDB, exploring two ground-breaking features introduced in MySQL 8.0:
• Dynamic Configuration of REDO Logs: Enhance your database's performance and flexibility with on-the-fly adjustments to REDO log capacity. Unleash the power of the snake metaphor to visualize how InnoDB manages REDO log files.
• Instant ADD/DROP Columns: Say goodbye to costly table rebuilds! This presentation unveils how InnoDB now enables seamless addition and removal of columns without compromising data integrity or incurring downtime.
Key Learnings:
• Grasp the concept of REDO logs and their significance in InnoDB's transaction management.
• Discover the advantages of dynamic REDO log configuration and how to leverage it for optimal performance.
• Understand the inner workings of instant ADD/DROP columns and their impact on database operations.
• Gain valuable insights into the row versioning mechanism that empowers instant column modifications.
QA or the Highway - Component Testing: Bridging the gap between frontend appl...zjhamm304
These are the slides for the presentation, "Component Testing: Bridging the gap between frontend applications" that was presented at QA or the Highway 2024 in Columbus, OH by Zachary Hamm.
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving
What began over 115 years ago as a supplier of precision gauges to the automotive industry has evolved into being an industry leader in the manufacture of product branding, automotive cockpit trim and decorative appliance trim. Value-added services include in-house Design, Engineering, Program Management, Test Lab and Tool Shops.
In our second session, we shall learn all about the main features and fundamentals of UiPath Studio that enable us to use the building blocks for any automation project.
📕 Detailed agenda:
Variables and Datatypes
Workflow Layouts
Arguments
Control Flows and Loops
Conditional Statements
💻 Extra training through UiPath Academy:
Variables, Constants, and Arguments in Studio
Control Flow in Studio
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxSunil Jagani
Discover how AI is transforming the workplace and learn strategies for reskilling and upskilling employees to stay ahead. This comprehensive guide covers the impact of AI on jobs, essential skills for the future, and successful case studies from industry leaders. Embrace AI-driven changes, foster continuous learning, and build a future-ready workforce.
Read More - https://bit.ly/3VKly70
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...Jason Yip
The typical problem in product engineering is not bad strategy, so much as “no strategy”. This leads to confusion, lack of motivation, and incoherent action. The next time you look for a strategy and find an empty space, instead of waiting for it to be filled, I will show you how to fill it in yourself. If you’re wrong, it forces a correction. If you’re right, it helps create focus. I’ll share how I’ve approached this in the past, both what works and lessons for what didn’t work so well.
6. The Problem
Designers tend to think in terms of appearance. Good
ones think about usability.
Only the very best ones think about programmability.
Developers make it worse by not thinking about design
Saturday, March 17, 12
7. A Typical Product Lifecycle
Somewhat dramatized...
Saturday, March 17, 12
22. Some time passes
‘Some time’ is defined as:
Just long enough that the developer doesn’t remember
exactly how his original code works.
Saturday, March 17, 12
34. No developers were harmed in the making
of this dramatic reenactment.
Saturday, March 17, 12
35. Additional Features + Short Sighted Architecting
= Horrible JavaScript Spaghetti
Saturday, March 17, 12
36. Why does this happen?
This is where you earn audience participation points.
Saturday, March 17, 12
37. Some Reasons
• JavaScript isn’t real code
• We don’t treat client side things as real features
• We can’t easily test it
Saturday, March 17, 12
38. This really all boils down to one thing.
We developers suck.
Saturday, March 17, 12
39. Bonus second lesson
We developers suck at interacting with designers
(or stakeholders).
Saturday, March 17, 12
40. Three JavaScript Principles
• Decouple everything
• Make it testable
• Push events, not state
Saturday, March 17, 12
41. Decouple Everything
Start thinking about UI pieces as individual JS objects.
Remove dependencies between objects.
Apply your OO best practices here too.
Saturday, March 17, 12
42. Make It Testable
Separate DOM dependent stuff into a single layer.
Put the rest of the stuff in classes that you can test.
Saturday, March 17, 12
43. Push Events, Not State
Know about the Law of Demeter.
Let controls worry about their own state.
Inform other controls that “X happened to Y”, not “Y is
in X state”
Saturday, March 17, 12
45. Mediator Pattern
"The essence of the Mediator Pattern is to "Define an
object that encapsulates how a set of objects interact.
Mediator promotes loose coupling by keeping objects
from referring to each other explicitly, and it lets you
vary their interaction independently."
-Design Patterns: Elements of Reusable Object-Oriented Software
Saturday, March 17, 12
46. NavControlMediator
itemSelected()
unselectAll()
Events from some
other object
Saturday, March 17, 12
47. Observer Pattern
"Define a one-to-many dependency between objects so
that when one object changes state, all its dependents
are notified and updated automatically."
-Design Patterns: Elements of Reusable Object-Oriented Software
Think jQuery $(‘.something’).click()
Saturday, March 17, 12
48. NavControlMediator
itemSelected()
viewModel
unselectAll()
Events from some
other object
Saturday, March 17, 12
50. Pub/Sub + Fairy Dust = Service Bus
Pub/Sub is great to make sure events propagate.
It stats to get brittle with lots of different controls.
Saturday, March 17, 12
51. Way Too Much Pubbing and Subbing
Saturday, March 17, 12
52. Service Bus
A service bus is another layer that sits outside controls.
Controls that want to communicate speak through it.
Your controls are then only coupled to a single thing.
Saturday, March 17, 12
54. Service Bus + Mediator
• Controls no longer need to know about others.
• We can remove/replace controls individually.
• We can add controls that listen to the same events
without modifying the publisher.
• We can re-use pieces more easily because they work
in a standard way.
Saturday, March 17, 12
55. NavControlMediator
itemSelected()
viewModel
Service Bus
unselectAll()
Events from some
other object
ReportMediator
itemChanged()
viewModel
unselectAll()
Saturday, March 17, 12
56. HistoryControl
NavControlMediator
itemSelected()
viewModel
Service Bus
unselectAll()
Events from some
other object
ReportMediator
itemChanged()
viewModel
unselectAll()
Saturday, March 17, 12