This session will give you a thorough introduction into Web Components. We start by explaining the standards that form the foundation of WebComponents: Template tag, custom elements, Shadow DOM, and HTML imports. Next we will do a live coding session showing you how you can rapidly build a web application with existing Web Components from Polymer Elements and other sources and connect the application to a server. In the last section, we are going to explain how you can build your own custom components and integrate them into your application. Also we will share our experience gained while building an application with Web Components and talk about pitfalls that should be avoided when using Web Components in a real world project.
The document discusses improving mobile web performance. It notes that mobile is different than desktop due to limitations in power, memory, battery and connections on mobile devices. Sites are growing larger in size which slows performance, and users strongly prefer faster loading sites. A variety of tools can measure performance, and waterfalls charts show where time is spent loading pages between the server and client. Optimizations discussed include enabling caching, compression, image resizing, lazy loading images, inlining images and scripts where possible, minifying assets, and delivering scripts and styles in a single HTTP request through techniques like application caching.
As browsers explode with new capabilities and migrate onto devices users can be left wondering, “what’s taking so long?” Learn how HTML, CSS, JavaScript, and the web itself conspire against a fast-running application and simple tips to create a snappy interface that delight users instead of frustrating them.
This document discusses new features in HTML5 and CSS3. It provides examples of new HTML5 elements like <header>, <nav>, <article>, and new forms elements. It also covers new CSS3 features like gradients, rounded corners, shadows. Additionally, it mentions new JavaScript APIs in HTML5 for things like geolocation, drag and drop, offline web apps, storage and more. Finally, it encourages developers to use new web standards and provides resources for learning HTML5.
Every URL visited from the Facebook iPhone app is done through a webview. Same with Twitter. Even if you don't have a mobile app, your website gets a lot of traffic from webviews. And yet, testing on webviews is challenging. There are significant performances differences between UIWebView vs WkWebView, and similarly for Android webview vs the new Chromium webview. And what about home screen apps?! In this talk, Steve Souders discusses the differences across webviews and how that affects performance of mobile web apps.
The document discusses how the mobile web is growing rapidly but many web developers are not optimizing their sites for mobile. It provides statistics on the growth of mobile phones and their usage. It then details tests the author conducted on various mobile browsers to analyze support for technologies like gzip compression and parallel HTTP requests. The author provides recommendations for optimizing sites for mobile like using gzip, minimizing files, caching aggressively, and limiting cookies. The document advocates for testing sites across mobile browsers due to variations in support.
The Truth About Your Web App's PerformanceJohn Riviello
The performance of your web app is obviously important. But how do you know your web app is performing well for all of your users? Out of the box tools provide us metrics, but most only provide an overall view. This case study of building the XFINITY X1 single-page web app will demonstrate what frontend performance data you should be gathering, how to gather it, and how to make sense of all that data.
Existing tools provide insight into the performance of our web applications, but there is not a single tool that gives you the full picture. You can fill these gaps by gathering the performance data of your actual users. In this talk, we'll walk through the parts of the W3C Navigation Timing, High Resolution Time & User Timing recommendations that you can easily take advantage of right now to collect important metrics (with the help of Open Source software). We'll determine the "types" of users you need to focus on to understand your web app, as well as what other factors could impact those individual users' experiences. And we'll make sure "Average Response Time" is never the primary focus of your metrics dashboard
The document provides a performance test analysis of the hotels.com website. It identifies several opportunities to improve performance, including: reducing the number of HTTP requests by combining files; using a content delivery network to improve response times; compressing components with gzip; avoiding redirects; using cookie-free domains; minifying JavaScript and CSS; not scaling images in HTML; and reducing cookie size. Implementing these recommendations could help speed up page loading.
Front End Development for Back End Java Developers - Jfokus 2020Matt Raible
The document is a presentation about front end development for back end Java developers. It discusses topics like JavaScript, TypeScript, build tools, CSS frameworks, front end performance, and progressive web apps. It also provides introductions and comparisons of popular JavaScript frameworks like Angular, React, and Vue. The presentation encourages attendees to learn new front end skills and try building something with a front end framework.
The document discusses improving mobile web performance. It notes that mobile is different than desktop due to limitations in power, memory, battery and connections on mobile devices. Sites are growing larger in size which slows performance, and users strongly prefer faster loading sites. A variety of tools can measure performance, and waterfalls charts show where time is spent loading pages between the server and client. Optimizations discussed include enabling caching, compression, image resizing, lazy loading images, inlining images and scripts where possible, minifying assets, and delivering scripts and styles in a single HTTP request through techniques like application caching.
As browsers explode with new capabilities and migrate onto devices users can be left wondering, “what’s taking so long?” Learn how HTML, CSS, JavaScript, and the web itself conspire against a fast-running application and simple tips to create a snappy interface that delight users instead of frustrating them.
This document discusses new features in HTML5 and CSS3. It provides examples of new HTML5 elements like <header>, <nav>, <article>, and new forms elements. It also covers new CSS3 features like gradients, rounded corners, shadows. Additionally, it mentions new JavaScript APIs in HTML5 for things like geolocation, drag and drop, offline web apps, storage and more. Finally, it encourages developers to use new web standards and provides resources for learning HTML5.
Every URL visited from the Facebook iPhone app is done through a webview. Same with Twitter. Even if you don't have a mobile app, your website gets a lot of traffic from webviews. And yet, testing on webviews is challenging. There are significant performances differences between UIWebView vs WkWebView, and similarly for Android webview vs the new Chromium webview. And what about home screen apps?! In this talk, Steve Souders discusses the differences across webviews and how that affects performance of mobile web apps.
The document discusses how the mobile web is growing rapidly but many web developers are not optimizing their sites for mobile. It provides statistics on the growth of mobile phones and their usage. It then details tests the author conducted on various mobile browsers to analyze support for technologies like gzip compression and parallel HTTP requests. The author provides recommendations for optimizing sites for mobile like using gzip, minimizing files, caching aggressively, and limiting cookies. The document advocates for testing sites across mobile browsers due to variations in support.
The Truth About Your Web App's PerformanceJohn Riviello
The performance of your web app is obviously important. But how do you know your web app is performing well for all of your users? Out of the box tools provide us metrics, but most only provide an overall view. This case study of building the XFINITY X1 single-page web app will demonstrate what frontend performance data you should be gathering, how to gather it, and how to make sense of all that data.
Existing tools provide insight into the performance of our web applications, but there is not a single tool that gives you the full picture. You can fill these gaps by gathering the performance data of your actual users. In this talk, we'll walk through the parts of the W3C Navigation Timing, High Resolution Time & User Timing recommendations that you can easily take advantage of right now to collect important metrics (with the help of Open Source software). We'll determine the "types" of users you need to focus on to understand your web app, as well as what other factors could impact those individual users' experiences. And we'll make sure "Average Response Time" is never the primary focus of your metrics dashboard
The document provides a performance test analysis of the hotels.com website. It identifies several opportunities to improve performance, including: reducing the number of HTTP requests by combining files; using a content delivery network to improve response times; compressing components with gzip; avoiding redirects; using cookie-free domains; minifying JavaScript and CSS; not scaling images in HTML; and reducing cookie size. Implementing these recommendations could help speed up page loading.
Front End Development for Back End Java Developers - Jfokus 2020Matt Raible
The document is a presentation about front end development for back end Java developers. It discusses topics like JavaScript, TypeScript, build tools, CSS frameworks, front end performance, and progressive web apps. It also provides introductions and comparisons of popular JavaScript frameworks like Angular, React, and Vue. The presentation encourages attendees to learn new front end skills and try building something with a front end framework.
This document discusses JavaFX and provides tips for working with it. It recommends using JavaFX with any Java IDE or "oldschool" without an IDE. It also recommends creating a class that extends Application and overriding start() to launch the application. The document also discusses project management with JavaFX, including using Maven and providing native builds on different platforms.
1. The document introduces JavaFX as a platform for building rich internet applications with Java and discusses how it can be used to create rich user interfaces for enterprise applications.
2. It describes Flamingo, an open source framework that makes it easy to connect a JavaFX front-end to a Java EE, Seam or Spring backend and supports features like CRUD operations, server-side push, and offline use.
3. Examples are provided of using Flamingo to integrate JavaFX clients with Java EE server components and services for tasks like server calls, conversations, binding, and validation.
This document discusses using JavaFX for enterprise application development. It provides an overview of JavaFX basics and capabilities. It also discusses best practices for enterprise development using Java EE specifications like JAX-RS, JAX-WS, EJB and CDI. Additionally, it presents architectures for JavaFX enterprise applications including MVP and MVVM patterns. Finally, it introduces DataFX, an application framework that supports Java EE standards and middleware for building JavaFX enterprise applications.
The document discusses using JavaFX for enterprise application development. It introduces JavaFX basics and best practices for enterprise development including using background threads to load data from servers. It also discusses client architectures like MVVM and frameworks that support JavaFX and integration with Java EE.
This document provides an overview of DataFX, a JavaFX framework that facilitates interaction between JavaFX applications and enterprise data. It discusses how DataFX handles reading external data sources via protocols like REST, SSE, and WebSockets. It also covers how DataFX integrates with JavaFX concepts like Observables and leverages the concurrency API to avoid blocking the JavaFX application thread. Additionally, it introduces the Flow API for defining navigation between views and linking controller actions. Finally, it mentions related projects in DataFX Labs for validation, EJB support, and feature toggling.
This document discusses JavaFX and how it can be used to create rich desktop applications. It provides an overview of JavaFX 1.0 and 2.0, key APIs like properties, bindings, collections, timelines and transitions. It also covers controls, graphics, layouts, CSS, and the Scene Builder tool. The document discusses how JavaFX can be used with other JVM languages like Scala and Groovy. It lists several JavaFX related projects, books, and Twitter accounts that can provide additional resources.
This document provides an overview and introduction to web components. It discusses the key aspects of web components including custom elements, HTML imports, shadow DOM, and templates. It also shows how web components allow building reusable custom elements that encapsulate their styles and functionality independently of the page they are used in. The document demonstrates how to define and register a custom element for displaying activity cards and use templates and shadow DOM to encapsulate its implementation.
Introduction to Web Components & Polymer Workshop - JS InteractiveJohn Riviello
Web Components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. With libraries such as Polymer that is built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. This workshop is a hands-on introduction to Web Components and the Polymer library. You will learn how to build your own components with both vanilla JavaScript and Polymer using the newly released Polymer 3.0 library, as well as assemble a simple PWA using existing open source Web Components. John & Chris will also cover Custom Properties (CSS Variables), which are supported natively in all of today's modern browsers and polyfill for older browsers by Polymer, to style our custom elements.
This document provides an overview of WebGL capabilities including:
- Code can be written in JavaScript and shader languages
- Data can be loaded from HTTP or bundled in the DOM
- Textures like PNGs and JPEGs can be used
- Networking APIs allow features like Comet and WebSockets
- WebGL runs on the GPU avoiding bottlenecks
It also shares several demos of WebGL and provides resources for learning WebGL.
Introduction to Web Components & Polymer Workshop - U of I WebConJohn Riviello
This document summarizes a workshop on web components and Polymer. The workshop was held at the University of Illinois on April 4, 2018 and presented by John Riviello and Chris Lorenzo. It began with an introduction to web components, including the four specifications that define them: custom elements, HTML imports, templates, and shadow DOM. The document then discussed what Polymer is and its history and versions. It provided an overview of Polymer 2.0 and 3.0. The workshop concluded with coding exercises to build a map using web components and a toast notification, as well as a takeaways section on assembling web components.
Workshop: Introduction to Web Components & Polymer John Riviello
From Little Rock Tech Fest 2017
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
This workshop assumes an understanding of HTML, CSS & JavaScript. No prior experience with Web Components, Polymer, or any library or framework (Web Components or otherwise) is required.
This document discusses various tools for web developers. It covers editors and extensions, style guides, testing strategies, building tools, and performance optimization. Recommendations are provided for prototyping quickly, setting up editors like Atom, creating style guides, implementing testing strategies, using build tools like Webpack, and measuring performance with tools like Chrome DevTools. Slides from the presentation are available at the provided URL.
Nazrul Kamaruddin will give a 30 minute presentation on HTML5 development. The agenda includes a sprint into HTML5, code examples, and references. Browser support for HTML5 is high in modern browsers like Chrome and Opera Mobile but lower in older browsers like IE9. The presentation will cover HTML5 elements, CSS features like rounded corners and shadows, JavaScript tools like Modernizr, and mobile APIs for geolocation and bookmarks. Resources recommended include HTML5 Boilerplate, Dive Into HTML5 book, and sites for HTML5 news and tutorials. The talk concludes by mentioning mobile development frameworks like PhoneGap and next events.
This document provides an overview of AngularJS including reasons to use it, tools for building AngularJS applications, libraries that integrate with AngularJS, testing frameworks, and additional resources. It lists generators, build tools, and libraries for mobile development. It also mentions code playgrounds, testing frameworks like Karma and Protractor, and topics covered in other AngularJS resources.
This document discusses Polymer, a library for building web components. It highlights key Polymer concepts like templates, shadow DOM, custom elements, and HTML imports. It also lists some Polymer elements and frameworks like Material Design and Gold. Finally, it promotes joining the Polymer community on Facebook, Google+, Meetup, and Twitter.
Inextrix Technologies is Indian base Web and Mobile development company and have a team with expertise between three to five years, they accommodates web Developers, web Designers, Graphic Designers, SEO as well as SEM team and Mobile Developers and that we even have separate tester, to supply our clients in IT wants all beneath one roof.
This document provides summaries of various web, mobile, and software projects developed by Inextrix including:
- Websites for companies like Grand Communication and FNMS built using WordPress
- A website for searching call rates between countries called Net2Fonz built using WordPress
- Claim portals for LG, Brightstar, and ZTE built using the YII framework
- An automotive classifieds website called 4Wheels.com built using WordPress and WooCommerce
- Additional websites for Platformity, DRE Homes, and Medicare built using technologies like WordPress, Magento, and Drupal
- Mobile apps like LG Accelerate for Android and an ERP system for construction
This document discusses design and tool flows for VLSI and FPGA development. It provides links to resources on EDA tools, SystemC vs C++ high-level synthesis, C++ concurrency, Verilog design flows, courses on patent law and policies, Freescale processors, sample jobs requiring skills in circuit simulation, layout, and more. Application processors from Intel, Android and iOS development are also covered.
Web Components: The Future of Web Development is HereJohn Riviello
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
This document discusses JavaFX and provides tips for working with it. It recommends using JavaFX with any Java IDE or "oldschool" without an IDE. It also recommends creating a class that extends Application and overriding start() to launch the application. The document also discusses project management with JavaFX, including using Maven and providing native builds on different platforms.
1. The document introduces JavaFX as a platform for building rich internet applications with Java and discusses how it can be used to create rich user interfaces for enterprise applications.
2. It describes Flamingo, an open source framework that makes it easy to connect a JavaFX front-end to a Java EE, Seam or Spring backend and supports features like CRUD operations, server-side push, and offline use.
3. Examples are provided of using Flamingo to integrate JavaFX clients with Java EE server components and services for tasks like server calls, conversations, binding, and validation.
This document discusses using JavaFX for enterprise application development. It provides an overview of JavaFX basics and capabilities. It also discusses best practices for enterprise development using Java EE specifications like JAX-RS, JAX-WS, EJB and CDI. Additionally, it presents architectures for JavaFX enterprise applications including MVP and MVVM patterns. Finally, it introduces DataFX, an application framework that supports Java EE standards and middleware for building JavaFX enterprise applications.
The document discusses using JavaFX for enterprise application development. It introduces JavaFX basics and best practices for enterprise development including using background threads to load data from servers. It also discusses client architectures like MVVM and frameworks that support JavaFX and integration with Java EE.
This document provides an overview of DataFX, a JavaFX framework that facilitates interaction between JavaFX applications and enterprise data. It discusses how DataFX handles reading external data sources via protocols like REST, SSE, and WebSockets. It also covers how DataFX integrates with JavaFX concepts like Observables and leverages the concurrency API to avoid blocking the JavaFX application thread. Additionally, it introduces the Flow API for defining navigation between views and linking controller actions. Finally, it mentions related projects in DataFX Labs for validation, EJB support, and feature toggling.
This document discusses JavaFX and how it can be used to create rich desktop applications. It provides an overview of JavaFX 1.0 and 2.0, key APIs like properties, bindings, collections, timelines and transitions. It also covers controls, graphics, layouts, CSS, and the Scene Builder tool. The document discusses how JavaFX can be used with other JVM languages like Scala and Groovy. It lists several JavaFX related projects, books, and Twitter accounts that can provide additional resources.
This document provides an overview and introduction to web components. It discusses the key aspects of web components including custom elements, HTML imports, shadow DOM, and templates. It also shows how web components allow building reusable custom elements that encapsulate their styles and functionality independently of the page they are used in. The document demonstrates how to define and register a custom element for displaying activity cards and use templates and shadow DOM to encapsulate its implementation.
Introduction to Web Components & Polymer Workshop - JS InteractiveJohn Riviello
Web Components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. With libraries such as Polymer that is built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. This workshop is a hands-on introduction to Web Components and the Polymer library. You will learn how to build your own components with both vanilla JavaScript and Polymer using the newly released Polymer 3.0 library, as well as assemble a simple PWA using existing open source Web Components. John & Chris will also cover Custom Properties (CSS Variables), which are supported natively in all of today's modern browsers and polyfill for older browsers by Polymer, to style our custom elements.
This document provides an overview of WebGL capabilities including:
- Code can be written in JavaScript and shader languages
- Data can be loaded from HTTP or bundled in the DOM
- Textures like PNGs and JPEGs can be used
- Networking APIs allow features like Comet and WebSockets
- WebGL runs on the GPU avoiding bottlenecks
It also shares several demos of WebGL and provides resources for learning WebGL.
Introduction to Web Components & Polymer Workshop - U of I WebConJohn Riviello
This document summarizes a workshop on web components and Polymer. The workshop was held at the University of Illinois on April 4, 2018 and presented by John Riviello and Chris Lorenzo. It began with an introduction to web components, including the four specifications that define them: custom elements, HTML imports, templates, and shadow DOM. The document then discussed what Polymer is and its history and versions. It provided an overview of Polymer 2.0 and 3.0. The workshop concluded with coding exercises to build a map using web components and a toast notification, as well as a takeaways section on assembling web components.
Workshop: Introduction to Web Components & Polymer John Riviello
From Little Rock Tech Fest 2017
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
This workshop assumes an understanding of HTML, CSS & JavaScript. No prior experience with Web Components, Polymer, or any library or framework (Web Components or otherwise) is required.
This document discusses various tools for web developers. It covers editors and extensions, style guides, testing strategies, building tools, and performance optimization. Recommendations are provided for prototyping quickly, setting up editors like Atom, creating style guides, implementing testing strategies, using build tools like Webpack, and measuring performance with tools like Chrome DevTools. Slides from the presentation are available at the provided URL.
Nazrul Kamaruddin will give a 30 minute presentation on HTML5 development. The agenda includes a sprint into HTML5, code examples, and references. Browser support for HTML5 is high in modern browsers like Chrome and Opera Mobile but lower in older browsers like IE9. The presentation will cover HTML5 elements, CSS features like rounded corners and shadows, JavaScript tools like Modernizr, and mobile APIs for geolocation and bookmarks. Resources recommended include HTML5 Boilerplate, Dive Into HTML5 book, and sites for HTML5 news and tutorials. The talk concludes by mentioning mobile development frameworks like PhoneGap and next events.
This document provides an overview of AngularJS including reasons to use it, tools for building AngularJS applications, libraries that integrate with AngularJS, testing frameworks, and additional resources. It lists generators, build tools, and libraries for mobile development. It also mentions code playgrounds, testing frameworks like Karma and Protractor, and topics covered in other AngularJS resources.
This document discusses Polymer, a library for building web components. It highlights key Polymer concepts like templates, shadow DOM, custom elements, and HTML imports. It also lists some Polymer elements and frameworks like Material Design and Gold. Finally, it promotes joining the Polymer community on Facebook, Google+, Meetup, and Twitter.
Inextrix Technologies is Indian base Web and Mobile development company and have a team with expertise between three to five years, they accommodates web Developers, web Designers, Graphic Designers, SEO as well as SEM team and Mobile Developers and that we even have separate tester, to supply our clients in IT wants all beneath one roof.
This document provides summaries of various web, mobile, and software projects developed by Inextrix including:
- Websites for companies like Grand Communication and FNMS built using WordPress
- A website for searching call rates between countries called Net2Fonz built using WordPress
- Claim portals for LG, Brightstar, and ZTE built using the YII framework
- An automotive classifieds website called 4Wheels.com built using WordPress and WooCommerce
- Additional websites for Platformity, DRE Homes, and Medicare built using technologies like WordPress, Magento, and Drupal
- Mobile apps like LG Accelerate for Android and an ERP system for construction
This document discusses design and tool flows for VLSI and FPGA development. It provides links to resources on EDA tools, SystemC vs C++ high-level synthesis, C++ concurrency, Verilog design flows, courses on patent law and policies, Freescale processors, sample jobs requiring skills in circuit simulation, layout, and more. Application processors from Intel, Android and iOS development are also covered.
Web Components: The Future of Web Development is HereJohn Riviello
With the updates to iOS and Android phones released earlier this year, Web Components are now supported natively. With libraries such as Polymer that are built on top of Web Components, it is now possible to easily create fast Progressive Web Apps (PWAs) without the overhead of a framework. In this workshop, we'll begin with a brief introduction to Web Components and Polymer, and then dive into hands-on experiences with the core aspects of Web Components: the <template> tag, Custom Elements, and the Shadow DOM.
Custom Elements with Polymer Web Components #econfpsu16John Riviello
If you haven’t explored Web Components yet, you’re missing out on a powerful tool that can greatly enhance reusability of common web elements throughout your websites and web applications. As Comcast has been updating our web properties to unify under a single UX, using Web Components with Polymer has helped make that process much more efficient. In nearly 2 years while creating hundreds of our own custom elements, we’ve learned a lot about the benefits & drawbacks to Polymer along the way. This case study will introduce Polymer & Web Components, demonstrate when Polymer is useful, when other options should be considered, and what it takes to deploy Polymer components to millions of customers.
Lets look at an example of what a performant website can look like. This discuss what concepts should we be considering when looking at website performance. Next we will go over two areas pertaining to website performance: 1) website performance tweaks that you as a web developer can directly make 2) website performance tweaks that you may have to work with your hosting provider or IT department to achieve
Forge - DevCon 2016: Collaborative VR using Google Cardboard & the View & Dat...Autodesk
Kean Walmsley, Autodesk Research
One of the issues with VR today relates to the largely solitary experience it delivers: the user is by definition immersed and isolated from the people around them. But this doesn’t have to be the case. Web technology allows us to enable collaborative design reviews in VR, where one person guides others through a virtual experience.
Google Expeditions allows teachers to take their students on virtual field trips to the Great Wall of China or to the bottom of the ocean. We’ll be showcasing a comparable solution – using Forge – for the design industry, whereby architects and engineers can lead a group of participants – each using Google Cardboard – through a design review in a virtual space.
This session will demonstrate a prototype, collaborative VR solution created by a cross-divisional Autodesk team as part of the 2015 VR Hackathon in San Francisco.
Web Components & Polymer 1.0 (Webinale Berlin)Hendrik Ebbers
This document discusses web components and Polymer 1.0. It begins with an introduction to web components and the different specifications that make them possible, including custom elements, HTML imports, shadow DOM, and templates. It then demonstrates how web components can be used to build reusable custom elements and templates for activities. Styles are kept encapsulated using shadow DOM. The document concludes by noting browser support for web components.
Similar to BUILDING MODERN WEB UIS WITH WEB COMPONENTS @ Devoxx (20)
Some years ago development of Java Desktop applications was easy: We just downloaded Java 8 from Oracle and got a set of useful tools and framework to develop Java desktop applications:
AWT & Swing
WebStart
JavaFX
JFX Packager
If you now download a Java version from Oracle (or any other vendor) several of the mentioned tools and frameworks are gone. Some JDKs only contain AWT & Swing for desktop development and miss all the newer tools. But even if they include such tools or frameworks you have sometimes no idea about their state.
In this session I will give an overview about the differences between JDKs that you can use today and how frameworks like JavaFX are really supported by the vendors. Next to this we will have a look at all the tools that are important for building and installing desktop development. Since some like WebStart are gone you can find quite good alternatives.
Java APIs- The missing manual (concurrency)Hendrik Ebbers
This isn’t a talk about microservices, NoSQL, container solutions or hip new frameworks. This talk will show some of the standard Java APIs that are part of Java since version 5, 6, 7 or 8. All those features are very helpful to create maintainable and future-proof applications, regardless of whether JavaEE, Spring, JavaFX or any other framework is used. The talk will give an overview of some important standard concepts and APIs of Java like annotations, null values and concurrency.
Once upon a time, there was a poor, innocent language. It was friendly and kind. Everything could have been nice and peaceful, but there was another language that was grumpy and mean. One day they met and started to argue about who the better language was…. This session compares the Java language with TypeScript. It discusses how common problems are solved with these languages. At the end, you’ll see who is the beauty and who is the beast.
This document discusses Java releases and commercial support for Java. It provides an overview of the history of Java releases from Java 1 to Java 11. It describes the new faster release cycle introduced in 2018. It also outlines the commercial support models from various vendors like Oracle, Azul, and Bellsoft, including pricing structures based on the number of servers/processors.
This isn’t a talk about microservices, NO-SQL, Container solutions or hip new frameworks. This talk will show some of the standard Java APIs that are part of Java since version 5, 6, 7 or 8. All this features are very helpful to create maintainable and future-proof applications, regardless of whether JavaEE, Spring, JavaFX or any other framework is used. The talk will give an overview of some important standard concepts and APIs of Java like annotations, null values and concurrency. Based on an overview of this topics and some samples the talk will answer questions like:
- How can I create my own annotations?
- How can I create a plugin structure without using frameworks like OSGI?
- What’s the best way to handle NullPointerExceptions?
- How can I write concurrent code that is still maintainable?
Multidevice Controls: A Different Approach to UXHendrik Ebbers
Everybody knows boring form-based user interfaces. What if you could add mobile devices to improve the UX of desktop or web applications? A research project at the University of Applied Sciences and Arts Northwestern Switzerland has tried to address this topic in a totally different way. Usually you would expect to rework the UI and make it fancier, but here the idea is to enhance controls so they can reside on a mobile device. For example, you can think about a text input field that gets the focus, with the actual data input being done on a mobile phone. This session presents an overview of the concept and shows you some results of the research project in the form of demos based on Swift, JavaFX, and Polymer.
Java WebStart Is Dead: What Should We Do Now?Hendrik Ebbers
Starting with Java 11, WebStart is being removed from Java. Because even today several applications are built on top of this technology, it will be mission-critical for many companies to find a replacement for it. This session presents an overview of the features of WebStart and how they can be replaced. It includes samples of several open source and commercial tools that provide such features and might mean new and cool possibilities for WebStart-based applications.
This isn't a talk about microservices, NO-SQL, Container solutions or hip new frameworks. This talk will show some of the standard Java APIs that are part of Java since version 5, 6, 7 or 8. All this features are very helpful to create maintainable and future-proof applications, regardless of whether JavaEE, Spring, JavaFX or any other framework is used. The talk will give an overview of some important standard concepts and APIs of Java like annotations, SPI or how to handle null values. Based on an overview of this topics and some samples the talk will answer questions like:
- How can I create my own annotations?
- How can I create a plugin structure without using frameworks like OSGI?
- What's the best way to handle NullPointerExceptions?
This document discusses test-driven development with JavaFX. It covers testing JavaFX applications at the unit, integration, and system levels. It also discusses continuous integration/continuous delivery and different tools that can be used for testing JavaFX applications, including TestFX, MarvinFX, JemmyFX, and Automaton. TestFX is highlighted as the recommended tool, with details provided on how to interact with JavaFX applications using its fluent API. The document also discusses using the view object pattern to write more readable tests and testing JavaFX applications that use DataFX or Afterburner.fx frameworks. It provides an example of using CDI to inject mocks when testing.
This document discusses feature-driven development and the use of feature toggles. It notes that concurrent development can lead to merge conflicts and bugs, but that feature branches and toggles can help address these issues. Feature toggles allow features to be independently activated and deactivated, and provide fallback options, helping with incremental development and release. The document recommends using short-lived feature branches, metadata to describe features, and administration interfaces to manage feature states.
This document provides an overview of control styling in JavaFX. It discusses the infrastructure of a control, including the Control, Skin, and Behavior classes. It then covers CSS styling rules like selectors, properties, and values. Specific CSS topics like SVG support and selector types like ID, class, and pseudo-class are explained. The document concludes with an advertisement for a book on mastering JavaFX controls.
How to use Bonjour in Java
The slides show you how to create bonjour based services on server site and use them on client site. All examples are completely written in Java.
The document provides an overview of the DataFX framework, which facilitates data retrieval and rendering in JavaFX applications. It discusses how DataFX allows developers to focus on application logic by abstracting away things like data sources, conversion, and threading. Key aspects covered include DataSources and Readers for retrieving data from various sources; Converters for transforming data formats; DataProviders for populating Observable data in JavaFX; controller APIs for building views; and Flow APIs for linking views and handling user actions. The goal of DataFX is to simplify common tasks in building enterprise JavaFX applications that interact with real-world services and data.
This document discusses using Vagrant and configuration management tools like Puppet and Chef to create lightweight reproducible development environments. It provides an overview of virtualization and tools like Vagrant, Puppet and Chef. It demonstrates how to use these tools to automate the creation of virtual machines and configure them. It also summarizes the Vagrant-Binding Java library that allows managing Vagrant environments programmatically.
Devoxx UK 2013: Sandboxing with the Vagrant-Binding APIHendrik Ebbers
Vagrant-Binding is a Java wrapper for Vagrant that allows configuring and managing virtual machines from Java code. It provides fluent builder APIs to define VM configurations and manage their lifecycle. Vagrant-Binding integrates with Puppet for configuration management and provides JUnit support to start/stop VMs for tests. It can also access the Puppet Forge to install modules during tests. The goal is to manage test environments and software configurations programmatically.
This document discusses using Vagrant and Puppet to create lightweight reproducible development environments using virtual machines. It introduces Vagrant for automating VM creation and management. Puppet is used to configure VMs through scripts. The Vagrant-Binding API allows managing and configuring VMs from Java code. It provides builder APIs, JUnit integration, and access to Puppet modules. The goal is to simplify VM lifecycle management for testing and development.
Lightweight and reproducible environments with vagrant and PuppetHendrik Ebbers
The document discusses using Vagrant and Puppet to create lightweight reproducible development environments. Vagrant allows defining and managing virtual machine configurations through code. Puppet is used to automate configuration of software and services on VMs. The Java Vagrant-Binding API allows managing the lifecycle of Vagrant VMs from Java code, including provisioning VMs with Puppet. It provides builder APIs, JUnit support, and allows running tests against reproducible environments.
This document discusses JGrid, an open source Java Swing component for grid-based visualization of data. JGrid provides an alternative to using JList for non-hierarchical data and shares interfaces with JList. It uses renderers similarly to JList to display raw data in grid cells. The document demonstrates examples of grid views and discusses when grids are preferable to lists or tables for displaying data. It also outlines plans to further develop JGrid with additional features like sorting, filtering and cell editing.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
2. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• Lead of JUG Dortmund
• Speaker, blogger & author
• Java Architect @ Canoo Engineering AG
• JavaOne Rockstar
• JSR Expert Group member www.guigarage.com@hendrikEbbers
Hendrik Ebbers
3. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• UI magician
• Active speaker and writer
• Code Monkey @ Canoo Engineering AG
• http://blog.netopyr.com
@net0pyr
Michael Heinrichs
4. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Questions?
https://app.sli.do/event/xfb1afkm/ask
5. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component
Spec
Polymer A first app Real World
Applications
Content
13. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Spec
• Specified by W3C
• Current state of spec can be found
online:
http://www.w3.org/standards/techs/components#w3c_all
14. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Spec
• Divided in 4 parts:
• HTML Templates
• Shadow DOM
• Custom Elements
• HTML Imports
60. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
<div class="activity">
<a>Michael</a> had fun coding.
</div>
How do we store the icon source and time?
What is a <div> with the class “activity” anyway?
61. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
<div class="activity">
<a>Michael</a> had fun coding.
</div>
62. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
<activity-card iconSrc="img/michael.jpg" time="Seconds ago">
<a>Michael</a> had fun coding.
</activity-card>
<div class="activity">
<a>Michael</a> had fun coding.
</div>
63. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
var activityCardPrototype = Object.create(HTMLElement.prototype);
64. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
var activityCardPrototype = Object.create(HTMLElement.prototype);
Rough translation to Java
class ActivityCard extends HTMLElement {};
Class<ActivityCard> activityCardClass = ActivityCard.class;
65. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
var activityCardPrototype = Object.create(HTMLElement.prototype);
Rough translation to Java
class ActivityCard extends HTMLElement {};
Class<ActivityCard> activityCardClass = ActivityCard.class;
var options = {prototype: activityPrototype}
66. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
var activityCardPrototype = Object.create(HTMLElement.prototype);
Rough translation to Java
class ActivityCard extends HTMLElement {};
Class<ActivityCard> activityCardClass = ActivityCard.class;
ElementRegistrationOptions options =
new ElementRegistrationOptions(activityCardClass);
var options = {prototype: activityPrototype}
67. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
document.registerElement("activity-card", options);
var activityCardPrototype = Object.create(HTMLElement.prototype);
Rough translation to Java
class ActivityCard extends HTMLElement {};
Class<ActivityCard> activityCardClass = ActivityCard.class;
ElementRegistrationOptions options =
new ElementRegistrationOptions(activityCardClass);
var options = {prototype: activityPrototype}
68. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
document.registerElement("activity-card", options);
var activityCardPrototype = Object.create(HTMLElement.prototype);
document.registerElement("activity-card", options);
Rough translation to Java
class ActivityCard extends HTMLElement {};
Class<ActivityCard> activityCardClass = ActivityCard.class;
ElementRegistrationOptions options =
new ElementRegistrationOptions(activityCardClass);
var options = {prototype: activityPrototype}
69. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
document.registerElement("activity-card", options);
var activityCardPrototype = Object.create(HTMLElement.prototype);
var options = {prototype: activityPrototype}
70. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
document.registerElement("activity-card", options);
var activityCardPrototype = Object.create(HTMLElement.prototype);
var options = {prototype: activityPrototype}
<activity-card iconSrc="img/michael.jpg" time="Seconds ago">
<a>Michael</a> had fun coding.
</activity-card>
71. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Elements
create attach detach
change
createdCallback
attachedCallback
detachedCallback
attributeChangedCallback
(attrName, oldVal, newVal)
93. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
webcomponent.js
• Today not all browsers support the new standards
• The community provides a pollyfills to enable web
components in browser that have no native support
$ bower install --save webcomponentsjs
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
install it with bower
use it in your code
94. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
webcomponent.js
• The polyfills are the junction of X-Tag and
Polymer basic libraries
• Mozilla created X-Tag as a polyfill to provide
web components
• Google created Polymer as a polyfill to
provide web components
95. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
webcomponent.js
• X-Tag and Polymer depends on
webcomponents-js
• Both libraries provide additional
features that are not part of the
specification
webcomponents.org
97. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Polymer
• Adds sugar on top of web components
• Easy to use
• Extendable
• Polymer is created & supported by
Google
98. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Polymer
• Separated in several parts:
• Polymer API
• Iron Elements
• Paper Elements
• …
www.polymer-project.org
100. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Iron Elements
• Iron Elements are low level components
• Most Paper UI components base on Iron
• Icons, layouts …
103. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Google Web Components
• Google is building a lot of components
(maps, youtube…)
<google-chart></google-chart>
<google-hangout-button></google-hangout-button>
111. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Bower
• A package manager for the web
• Search for dependencies and install
them as packages
• Created by Twitter
• Open Source
www.bower.io
112. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Bower
requires npm, node.js and git
$ npm install -g bower
$ bower init
$ bower install --save webcomponentsjs
in your project folder
download &
add module
add dependency to
bower file
114. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
How to use Components
• All components are build as web components
• A single component or a set can be added by
using bower
$ bower install --save Polymer/paper-slider
<link rel="import" href="bower_components/paper-slider/paper-slider.html">
import it in HTML
115. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Paper Button
• The default Button
• shows ripple animation on click
<paper-button>flat button</paper-button>
<paper-button raised>raised button</paper-button>
<paper-button noink>No ripple effect</paper-button>
116. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Paper CheckBox
• A styled CheckBox
• State can be defined as attribute
<paper-checkbox></paper-checkbox>
<paper-checkbox checked></paper-checkbox>
117. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Paper Dialog
• A dialog
• Supports title, modality, actions, …
<paper-dialog heading="Title">
<p>Some content</p>
</paper-dialog>
121. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Toolbar
• An application toolbar
• Toolbar content will be aligned
<core-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div>My Application</div>
<span flex></span>
<paper-icon-button icon="event"></paper-icon-button>
</core-toolbar>
122. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
HeaderPanel
• Wrapper around toolbar and content
• Toolbar always on top
• Content scrollable
<core-header-panel flex>
<core-toolbar>Title</core-toolbar>
<div>content</div>
</core-header-panel>
123. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
DrawerPanel
• Adds a responsive menu
• Defines attributes to
open and close the
menu
• Normally wraps 2 core-
header-panel
125. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Scaffold
• Basic skeleton
• Best practice to
create an
application
• Contains all the
shown features
<core-scaffold>
<core-header-panel navigation flex>
<!-- nav drawer -->
</core-header-panel>
<span tool>Title</span>
<div>content</div>
</core-scaffold>
defines the drawer
defines the main
toolbar
142. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Components
• Polymer can be used to create custom
web components
• Defines a nice and modern API to create
components
• Adds several features on top of the spec
143. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
A First Example
<link rel=„import" href="bower_components/polymer/polymer.html">
144. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
A First Example
<link rel=„import" href="bower_components/polymer/polymer.html">
<dom-module id="dom-element">
</dom-module>
145. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
A First Example
<link rel=„import" href="bower_components/polymer/polymer.html">
<dom-module id="dom-element">
<template>
<p>I'm a DOM element. This is my local DOM!</p>
</template>
</dom-module>
146. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
A First Example
<link rel=„import" href="bower_components/polymer/polymer.html">
<dom-module id="dom-element">
<template>
<p>I'm a DOM element. This is my local DOM!</p>
</template>
<script>
Polymer({is: "dom-element"});
</script>
</dom-module>
147. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• Component name must contain a "-"
• Polymer script call must be included
• Template is not needed
• Once it is created it can be used as
custom tag
Custom Components
148. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Lifecycle
• Polymer defines it’s own lifecycle that is
based on the Web Component Spec
lifecycle
• Callbacks can simply be defined in
Polymer
149. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Difference to Spec
• created instead of createdCallback
• attached instead of attachedCallback
• detached instead of detachedCallback
• attributeChanged instead of
attributeChangedCallback
150. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Additional Callback
• Polymer adds an extra callback ready which is
invoked when Polymer has finished creating and
initializing the element’s local DOM.
• The created callback is always called before
ready.
• The ready callback is always called before
attached.
151. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Example<script>
Polymer({
is: „dom-element“,
ready: function () {
console.log('Ready!');
},
detached: function() {
console.log(this.localName + '#' + this.id + ' was detached');
},
attributeChanged: function(name, type) {
console.log('Attribute ' + name + ' was changed');
}
});
</script>
152. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Property
• Properties can be specified for a
Polymer component
• A property can be of the following types:
• Boolean, Date, Number, String,
Array or Object
153. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Property
• Properties can be defined in JavaScript
Polymer({
is: 'my-component',
properties: {
user: String,
isHappy: Boolean
}
});
154. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Property
• Properties can be set in JavaScript
Properties can be set as HTML attribute
ready: function () {
this.set(‘user‘,’unknown‘);
}
<my-component user=‘unknown‘></my-component>
155. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Property
• Default value can be specified
properties: {
user: {
type: String,
value: ‘unknown‘
},
isHappy: Boolean
}
156. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Data Binding
• binds a property to an attribute of an
element
• Use [[prop]] for one-way-binding
• Property defines if {{prop}} is one-way or
bidirectional binding
<child-element name="{{myName}}"></child-element>
162. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Application Basic Layout
• Header with fixed size
• Resizeable main area
• Footer with fixed size
163. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Polymer Layout
• The Polymer layout is based on flexbox
• Use Polymer layout classes to simplify
the usage of flexbox
164. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Flexbox
• New CSS 3 layout
• Flexbox consists of flex containers and
flex items.
box box box
container
165. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Flexbox
• Contents can be laid out in any flow direction (leftwards,
rightwards, downwards, or even upwards!)
• Contents can be laid out linearly along a single (main) axis
or wrapped into multiple lines along a secondary (cross)
axis
• Contents can “flex” their sizes to respond to the available
space
• …
169. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Using Flex Box in Polymer
• Polymer defines several layout classes
• layout: basic class that must be set
• horizontal: layout content in a row
• vertical: layout content in a column
• flex: content will fill space
172. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Application Structure
• A Polymer application is based on web
components
• The components define a hierarchy
• chat-view component contains
several chat-bubble components
178. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Like building futuristic Matrjoschkas with Lego
179. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Application Structure
• The demo will use bower to handle all
dependencies
• Real applications should use a build
script
• like Gulp or Grunt
180. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
index.html
• add web components polyfill script
• Import basic dependencies like Roboto-
Font and Polymer layouts
• body contains only one web
component: the application
182. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
imports
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="bower_components/paper-styles/paper-styles.html">
<link rel="import" href="bower_components/font-roboto/roboto.html">
web components polyfill
font and layouts
183. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
component-xy.html
• Contains the definition of one web
component
• All components that are needed
internally should be imported
186. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble
Sender
This is the chat message. The size of the
bubble should fit to this message. Next to
normal text emojis can be part of a
message: 😊
5 min ago
187. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble
Sender
This is the chat message. The size of the
bubble should fit to this message. Next to
normal text emojis can be part of a
message: 😊
5 min ago
depends on parent width
dependsontextlength
188. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble
Sender
This is the chat message. The size of the
bubble should fit to this message. Next to
normal text emojis can be part of a
message: 😊
5 min ago
dependsontext
length
fix
fix
189. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble
Sender
This is the chat message. The size of the
bubble should fit to this message. Next to
normal text emojis can be part of a
message: 😊
5 min ago
fix
192. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble
Sender
This is the chat message. The size of the
bubble should fit to this message. Next to
normal text emojis can be part of a
message: 😊
5 min ago
195. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
CSS ::after Selector
p::after {
content: " - Remember this";
}
• The ::after selector inserts something after
the content of each selected element(s).
• Use the content property to specify the
content to insert.
198. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat Bubble Attributes
• Sender & message should be dynamic
• Can be defined as attributes of the
component
• Use Polymer properties
properties: {
text: String,
sender: String
}
200. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
configure Bubble with CSS
#bubble {
. . .
}
• We can specify 2 separate CSS classes:
me and you
.me {
. . .
}
.you {
. . .
}
201. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• We can dynamically change the CCS
class in JS code
• Access bubble div in Polymer
• Mutate class list
change Css class
bubbleDiv.classList.remove('me');
bubbleDiv.classList.add('you');
var bubbleDiv = this.$.bubble;
id of the div
202. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• Polymer provides observers for
properties
• Observer will be called whenever
property values changes
Property Observer
me: {
type: Boolean,
observer: ‚_senderChanged'
}
_senderChanged: function (newValue, oldValue) {
this.updateStyleClass(newValue);
}
203. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
• The initial boolean property value
reflects if a HTML attribute is set
use boolean property
<chat-bubble me></chat-bubble>
<chat-bubble></chat-bubble>
„me“ property == true
„me“ property == false
205. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Chat View
• Should contain a list of chat bubbles
• Scrollable
• based on data array (JSON)
206. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Polymer Iron
• List of low level components
• Define behavior
• Don’t define theme / skin
208. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
iron-list
• Defines a list that can be scrolled
• Can contain thousands of elements.
Only visible area is rendered
• Define a template for each cell
210. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
provide dummy data
<iron-ajax url="data.json" last-response="{{messages}}" auto></iron-ajax>
• Polymer provides Iron Element to load
JSON data
212. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Centered Text
• The name should be centered
• Layout should not be effected by
other nodes
.centered {
top: 18px;
left: 0;
position:absolute;
width: 100%;
}
.title {
font-size: 22px;
text-align:center;
}
parent of text text
213. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Rounded Image
• Avatar image should be rounded
.avatar {
width: 64px;
height: 64px;
border-radius: 32px;
border-style: solid;
border-width: 1px;
border-color: lightgrey;
}
214. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Dynamic content
• Add some Polymer properties
• Use them inline
Properties: {
title: String,
state: String
}
<div class="centered vertical layout">
<div class="title">{{title}}</div>
<div class="subtitle">{{state}}</div>
</div>
216. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Textbox
• <input> can be styled with CSS
• Polymer provides a behavior to add
data binding to a normal input
<input is="iron-input" value="{{message::input}}">
217. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Custom Button
• Call a internal web component function
when the button is clicked
<button on-click="sendMyMessage">send</button>
Polymer({
is: "input-view",
sendMyMessage: function (e) {…}
});
218. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Polymer events
• Web Components can fire events
• Observer can be added
• Hint: trigger a resize for iron-list when
content changes:
this.fire('message-send', {message: this.message});
<input-view on-message-send="send"></input-view>
this.$.itemsList.fire('resize');
220. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
About Emojis
• All emojis are defined by a a unicode
character
221. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Emojis in HTML
• Most OS provide a font to render emojis
• As long as the browser supports
unicode and your files are encoded in
unicode you can use them
222. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Parse Emojis
• Cool lib with word - emoji mapping can be
found here:
github.com/muan/emojilib
• A Polymer Emoji selector can be found here:
github.com/notwaldorf/emoji-selector
223. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Emojis in the chat
var converted = '';
var words = input.split(' ');
for (var i = 0; i < words.length; i++) {
var emoji = getMeAnEmoji(words[i]);
if(emoji != '') {
converted = converted + ' ' + emoji;
} else {
converted = converted + ' ' + words[i];
}
}
226. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Dolphin Platform
• Enterprise Framework with
Presentation Model pattern
• Server centric logic
• Spring and JavaEE integration
227. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Dolphin Platform
• JavaFX, AngularJS & Google Polymer
client APIs
… More will come
229. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Model
• Defined in Java
• Hierarchical models are no problem
• Full observable
• Collection support
230. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Model
@DolphinBean
public class MyModel {
private Property<String> name;
public Property<String> nameProperty() {return name;}
}
Dolphin Platform propere can be
used on client and server
This is NOT a JFXProperty
231. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Controller
• Controller is defined on the server
• Will be managed by the container
(Spring, JavaEE, …)
• Full CDI support
232. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Controller
@DolphinController
public class MyController {
@DolphinModel
private MyModel model;
@PostConstruct
public void init() {
model.nameProperty().onChange(e -> System.out.println(„CHANGE“));
}
}
Inject the model
Use containerfeatures
233. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
View
• The smallest part ;)
• Use the complete UI Toolkit power
• Simply bind your view to the model
• Trigger controller actions
239. PolymerWeb Components & by
Sending a message
Client Server
Event
Bus
call DolphinAction
publish
240. PolymerWeb Components & by
Sending a message
Client Server
Event
Bus
call DolphinAction
publish
241. PolymerWeb Components & by
Sending a message
Client Server
Event
Bus
call DolphinAction
publish
notify
242. PolymerWeb Components & by
Sending a message
Client
Presentation
Model
Server
Event
Bus
call DolphinAction
publish
notify
243. PolymerWeb Components & by
Sending a message
Client
Presentation
Model
Server
Event
Bus
call DolphinAction
publish
notifyupdate
244. PolymerWeb Components & by
Sending a message
Client
Presentation
Model
Server
Event
Bus
call DolphinAction
publish
notifyupdate
245. PolymerWeb Components & by
Sending a message
Client
Presentation
Model
Server
Event
Bus
call DolphinAction
publish
notifyupdate
synced
automatically
248. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Additional Topics
• Behaviors
• Animations
• Custom CSS properties
• DOM manipulation
249. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Additional Topics
• Polymer contains more features
• Explorer the Polymer Catalog
• Read the documentation
https://elements.polymer-project.org
https://www.polymer-project.org/1.0/docs/
256. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
npm install -g web-component-tester
wct
Installation
Usage
257. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
• Integrates Mocha, Chai, and Sinon
• Runs with Selenium
• Integration with Sauce Labs provided
• By default runs all tests in test/
• Tasks for grunt and gulp available
(though gulp integration is sub-optimal)
263. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<head>
<meta charset="utf-8">
<script src="../bower_components/webcomponentsjs/webcomponents.min.js">
</script>
<script src="/web-component-tester/browser.js"></script>
<link rel="import" href="../chat-bubble.html">
</head>
component under test
264. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<body>
<test-fixture id="chatBubbleFixture">
<template>
<chat-bubble></chat-bubble>
</template>
</test-fixture>
...
265. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<body>
<test-fixture id="chatBubbleFixture">
<template>
<chat-bubble></chat-bubble>
</template>
</test-fixture>
...
provided by wct
266. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<body>
<test-fixture id="chatBubbleFixture">
<template>
<chat-bubble></chat-bubble>
</template>
</test-fixture>
...
267. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<body>
<test-fixture id="chatBubbleFixture">
<template>
<chat-bubble></chat-bubble>
</template>
</test-fixture>
...
web component under test
268. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
269. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
create component
270. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
271. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester
<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
set property
272. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
273. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
needs to be
asynchronous
274. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
275. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Web Component Tester<script>
describe('<chat-bubble>', function() {
it('should show the sender', function(done) {
var chatBubble = fixture('chatBubbleFixture');
chatBubble.set('sender', 'Test Sender');
setTimeout(function () {
expect(chatBubble.$$('.sender'))
.to.have.property('textContent')
.that.contains('Test Sender');
done();
});
});
});
</script>
DOM-query
279. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Situation
• All components are part of our project
• We can’t reuse them in other projects
• The components are not isolated
• Looks like a bad mixup
281. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
Wish list
• We want reusable components
• A component should be independent and
isolated
• Components can depend on each other /
include other custom components
• Use a component as a bower dependency
282.
283. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
seed-element
• Blueprint for custom component
• Defines demo, test, and main section
• Web component tester and polyserve
integrated
284. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
polyserve
• Polymer offers a special web server to
create reusable components
• serves project files under /components/
{bower-name}/
• other component are served from ./
bower_components/
285. PolymerWeb Components & by
Questions: https://goo.gl/iZI3l0
polyserve
• Your component can refer to external
components like your component is in the
bower_components folder
• Simple to create a github repo for one
specific reusable component
• Polymer Paper is doing the same