This document discusses Ember Data and custom APIs. It provides an overview of adapters and serializers in Ember Data and how they are used to communicate with backend APIs. It then discusses various built-in adapters and serializers and common ways to customize them, such as changing host/namespace settings, customizing URLs, normalizing responses, and handling relationships and embedded records. It also provides tips on testing serializers, adapters, and the overall integration with the Ember Data store.
Slides from my Lonestar Ruby Conf 2011 presentation.
*** Video of presentation: http://confreaks.com/videos/2531-lsrc2011-testing-javascript-with-jasmine ***
Agenda:
- Briefly cover why you should unit test
- Discuss what Jasmine is and isn't
- Show syntax with comparisons to RSpec
- Jasmine with:
- Vanilla JavaScript
- Jasmine with jQuery
- Jasmine with Ruby (not Rails)
- Jasmine with Rails
- Evergreen
- capybara-webkit
- Where does CoffeeScript, node.js, etc. fit in?
- Other helpful libraries/Wrap-up
Slides da palestra sobre py.test apresentada no TDC 2015 na trilha de Python
Slides of my talk about py.test presented at TDC 2015 in the Python track.
http://github.com/erickwilder/pytest-talk
Slides from my Lonestar Ruby Conf 2011 presentation.
*** Video of presentation: http://confreaks.com/videos/2531-lsrc2011-testing-javascript-with-jasmine ***
Agenda:
- Briefly cover why you should unit test
- Discuss what Jasmine is and isn't
- Show syntax with comparisons to RSpec
- Jasmine with:
- Vanilla JavaScript
- Jasmine with jQuery
- Jasmine with Ruby (not Rails)
- Jasmine with Rails
- Evergreen
- capybara-webkit
- Where does CoffeeScript, node.js, etc. fit in?
- Other helpful libraries/Wrap-up
Slides da palestra sobre py.test apresentada no TDC 2015 na trilha de Python
Slides of my talk about py.test presented at TDC 2015 in the Python track.
http://github.com/erickwilder/pytest-talk
Mozilla Web QA - Evolution of our Python WebDriver frameworkdavehunt82
In 2011 Mozilla developed and released a pytest plugin that simplified the task of maintaining functional UI tests for over a dozen web applications. It has served us well, but its uses outside of Mozilla are limited - unless you happen to have exactly the same requirements as us. To address this, the plugin has been shattered into three: pytest-selenium provides a Selenium instance and browser (with some nice new features); pytest-html provides a handy HTML report; and pytest-variables provides a useful way to inject variables into your tests.
Description of the API concept for engineering and how it can be useful. Particularly how it should be used with respect to genomics data. Finally, an analogy of the API concept in synthetic biology and how evolution allows encapsulation.
This is an adaptation of the presentation given at the SpringOne 2008 conference in Hollywood, FL. It contains some updates on project status, and also information about the recently published book "Spring Python 1.1"
This slideshow is licensed under a Creative Commons Attribution 3.0 United States License.
At this talk we will start from the basics and come shortly to DynamicProxies, generated type-save DynamicObjectAdapterBuilder and more. We will have a deep dive to this pattern group , and I am sure you will like it ;-)
This talk is based on the german book "Dynamic Proxies" written from Dr. Heinz Kabutz and me.
As presented at ZendCon, Confoo, LaraconEU, ZgPHP, PFCongres and Fronteers User Group. An overview of some intermediate level HTTP features and how they might be useful in practice.
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
Let's describe the process for upgrading from Puppet 3 to 4, list some common pitfalls and how to avoid them, and be sure to enjoy ourselves in the process!
Why you should be using the shiny new C# 6.0 features now!Eric Phan
C# 6.0 will change the way you write C#. There are many language features that are so much more efficient you’ll wonder why they weren’t there since the beginning.
Introduction to Terraform - presented at the Perth Python & Django meetup on March 1 2018. Demo code repo can be found here: https://github.com/jaymickey/terraform-demo
Mozilla Web QA - Evolution of our Python WebDriver frameworkdavehunt82
In 2011 Mozilla developed and released a pytest plugin that simplified the task of maintaining functional UI tests for over a dozen web applications. It has served us well, but its uses outside of Mozilla are limited - unless you happen to have exactly the same requirements as us. To address this, the plugin has been shattered into three: pytest-selenium provides a Selenium instance and browser (with some nice new features); pytest-html provides a handy HTML report; and pytest-variables provides a useful way to inject variables into your tests.
Description of the API concept for engineering and how it can be useful. Particularly how it should be used with respect to genomics data. Finally, an analogy of the API concept in synthetic biology and how evolution allows encapsulation.
This is an adaptation of the presentation given at the SpringOne 2008 conference in Hollywood, FL. It contains some updates on project status, and also information about the recently published book "Spring Python 1.1"
This slideshow is licensed under a Creative Commons Attribution 3.0 United States License.
At this talk we will start from the basics and come shortly to DynamicProxies, generated type-save DynamicObjectAdapterBuilder and more. We will have a deep dive to this pattern group , and I am sure you will like it ;-)
This talk is based on the german book "Dynamic Proxies" written from Dr. Heinz Kabutz and me.
As presented at ZendCon, Confoo, LaraconEU, ZgPHP, PFCongres and Fronteers User Group. An overview of some intermediate level HTTP features and how they might be useful in practice.
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
Let's describe the process for upgrading from Puppet 3 to 4, list some common pitfalls and how to avoid them, and be sure to enjoy ourselves in the process!
Why you should be using the shiny new C# 6.0 features now!Eric Phan
C# 6.0 will change the way you write C#. There are many language features that are so much more efficient you’ll wonder why they weren’t there since the beginning.
Introduction to Terraform - presented at the Perth Python & Django meetup on March 1 2018. Demo code repo can be found here: https://github.com/jaymickey/terraform-demo
Damien piller : Président de migros Neuchatel FribourgDamien Piller
Le président de Migros Neuchâtel-Fribourg tire un bilan positif de l’année écoulée et met le cap sur 2020. Il livre sa vision des évolutions qui attendent le commerce de détail durant la décennie à venir.
Damien Piller - Changement à la direction de Migros Neuchâtel FribourgDamien Piller
Une page importante de l'histoire de Migros Neuchâtel-Fribourg s'est tourné le 1 septembre 2012. Fabrice Zumbrunnen quitte la direction de l’entreprise et Mme Marcelle Junod reprend le flambeau. En photo : Damien Piller, président de l'administration, en compagnie de Marcelle Junod et son prédéceseur.
Workshop: EmberJS - In Depth
- Ember Data - Adapters & Serializers
- Routing and Navigation
- Templates
- Services
- Components
- Integration with 3rd party libraries
Presentado por ingenieros: Mario García y Marc Torrent
Presentation given at the Belgium Ember.js meetup on the 20th of August 2014 (http://www.meetup.com/Ember-js-Belgium/events/198180452/).
The topics covered are:
- overview of Ember Data
- JSON API initiative (jsonapi.org)
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
Presented at Railsconf 2015 by Daniel Spector, @danielspecs.
Crossing the Bridge explores tools, patterns and best practices to connect your Javascript MVC framework to Rails in the most seamless way possible. The talk progresses from demonstrating the standard API request cycle to preloading data to your client-side framework to rendering your javascript on the server. It explores Isomorphic Javascript and ways of implementing it with Rails.
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
You've heard of Zend's new framework, Expressive, and you've heard it's the new hotness. In this talk, I will introduce the concepts of Expressive, how to bootstrap a simple application with the framework using best practices, and finally how to integrate a third party tool like Doctrine ORM.
DynamicRecord extends the Ruby on Rails’ ActiveRecord
(AR) object-relational mapping (ORM) module, enabling creation of
dynamic attributes that look and behave like standard AR ones without
the need to add tables or columns to the database.
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
You've heard of Zend's new framework, Expressive, and you've heard it's the new hotness. In this talk, I will introduce the concepts of Expressive, how to bootstrap a simple application with the framework using best practices, and finally how to integrate a third party tool like Doctrine ORM.
Kicking off with Zend Expressive and Doctrine ORM (PHP South Africa 2018)James Titcumb
You've heard of Zend's new framework, Expressive, and you've heard it's the new hotness. In this talk, I will introduce the concepts of Expressive, how to bootstrap a simple application with the framework using best practices, and finally how to integrate a third party tool like Doctrine ORM.
Postman is a tool for designing, sharing and testing APIs between a group of collaborators that range from the API developers down to the final clients, be them mobile apps or web apps.
This presentation focuses on using Postman's advanced free features, with a special focus on testing.
I have linked an example collection which I refer to several times during the presentation.
Section 1 - Fundamentals
Environments, variables, collections, and workspaces
Roles, VCS
Section 2 - Scripts & Testing
Pre request scripts and tests
Scopes
Pass data between requests
Section 3 - Integrated testing
Collection runners: read data from files, workflows
Monitors
CD/CI integration with Newman
Section 4 - More!
Documentation
Mock server
Integrations
During this session we will explore the component and the best practices behind a scalable Scala-based microservice architecture. We will see how to build a REST service with Akka and Spray, how to document its API with Swagger, how to package it with Sbt and Docker, how to deploy it with Mesos and Marathon and how to let him interact with other services with Bamboo. The talk with be full of code and practical tips.
Tutorial on developing a Solr search component pluginsearchbox-com
In this set of slides we give a step by step tutorial on how to develop a fully functional solr search component plugin. Additionally we provide links to full source code which can be used as a template to rapidly start creating your own search components.
The next release of the OSGi specifications are planned for publication at EclipseCon 2011. So what is new? This presentation will provide an overview of the new features in the spec including Java 5 generics for the Framework and ServiceTracker, modern replacement for PackageAdmin and StartLevel, generic capabilities and requirements, resolver hooks, bytecode weaving and many more improvements and new features. The presentation assumes the audience has a basic understanding of OSGi and will focus on the changes in 4.3.
Kicking off with Zend Expressive and Doctrine ORM (PHP MiNDS March 2018)James Titcumb
You've heard of Zend's new framework, Expressive, and you've heard it's the new hotness. In this talk, I will introduce the concepts of Expressive, how to bootstrap a simple application with the framework using best practices, and finally how to integrate a third party tool like Doctrine ORM.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
3. OVERVIEW
▸ Adapters vs Serializers
▸ Built-in Adapters
▸ Common Adapter Customizations
▸ Built-in Serializers
▸ Common Serializer Customizations
▸ Testing it all
7. EMBER DATA OVERVIEW
PERSISTENCE LAYER
ADAPTER (ADAPTER PATTERN)
SERIALIZER
STORE
Communicating with
persistence layer
Format data to and
from persistence layer
Data store (models)
Server, localStorage,
Firebase, Parse, etc
8. ADAPTERS
PERSISTENCE LAYER
ADAPTER (ADAPTER PATTERN)
SERIALIZER
STORE
Communicating with
persistence layer
Format data to and
from persistence layer
Data store (models)
Server, localStorage,
Firebase, Parse, etc
11. COMMON ADAPTER CUSTOMIZATIONS
HOST AND NAMESPACE
import ENV from 'mycatapp/config/environment';
// app/adapters/application.js
export default DS.RESTAdapter.extend({
host: ENV.APP.apiEndpoint,
namespace: 'api/v1'
});
12. COMMON ADAPTER CUSTOMIZATIONS
PATH FOR TYPE
export default ApplicationAdapter.extend({
pathForType(modelName) {
return Ember.String.pluralize(modelName);
}
});
POST /api/usersPOST /api/user
GET /api/videoGamesGET /api/video-games
YOUR API EMBER
14. SERIALIZERS
PERSISTENCE LAYER
ADAPTER (ADAPTER PATTERN)
SERIALIZER
STORE
Communicating with
persistence layer
Format data to and
from persistence layer
Data store (models)
Server, localStorage,
Firebase, Parse, etc
34. COMMON SERIALIZER CUSTOMIZATIONS
EMBEDDED RECORDS
// app/serializers/user.js
let Mixin = DS.EmbeddedRecordsMixin;
export default DS.JSONSerializer.extend(Mixin, {
attrs: {
skills: { embedded: 'always' }
}
});
35. COMMON SERIALIZER CUSTOMIZATIONS
SETTING THE PRIMARY KEY
// app/serializers/user.js
export default DS.RESTSerializer.extend({
primaryKey: 'socialSecurityNumber'
});
36. COMMON SERIALIZER CUSTOMIZATIONS
SERIALIZING DATA ON SAVE
// app/serializers/user.js
export default DS.RESTSerializer.extend({
serialize(snapshot) {
return [
{ name: snapshot.attr('name') }
];
}
});
37. COMMON SERIALIZER CUSTOMIZATIONS
DS.SNAPSHOT
// snapshot for a user model
snapshot.id;
snapshot.attr('name')
snapshot.hasMany('interests') // interestsSnapshot
snapshot.belongsTo('company') // companySnapshot
39. TESTING
THE DEFAULT SERIALIZER TEST
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('cat', 'Unit | Serializer | cat', {
needs: ['serializer:cat']
});
test('it serializes records', function(assert) {
var record = this.subject();
var serializedRecord = record.serialize();
assert.ok(serializedRecord);
});
40. TESTING
1. moduleFor() INSTEAD OF moduleForModel()
import { moduleFor, test } from 'ember-qunit';
moduleFor(
'serializer:cat', 'Unit | Serializer | cat', {}
);
test('it serializes records', function(assert) {
let serializer = this.subject();
});
41. TESTING
2. USE THE STORE
Test serializers and
adapters through the
store with an HTTP
mocking library
42. TESTING
TESTING WITH THE STORE - 1. SETUP
moduleForModel('cat', 'Unit | Serializer | cat', {
needs: [ 'serializer:cat', 'adapter:cat' ],
beforeEach() {
// next slide
},
afterEach() {
// next slide
}
});
43. TESTING
TESTING WITH THE STORE - 2. PRETENDER
// beforeEach()
this.server = new Pretender(function() {
this.get('/api/cats', function() {
let response = JSON.stringify(/* data */);
return [ 200, {}, response ];
});
});
this.server.shutdown(); // afterEach()
44. TESTING
TESTING WITH THE STORE - 3. THE TEST
test('array responses', function(assert) {
let store = this.store();
return store.findAll('cat').then((cats) => {
assert.equal(cats.get('length'), 3);
});
});
45. TESTING
TESTING THE DATA YOUR SERVER RECEIVES
// app/serializers/cat.js
export default DS.RESTSerializer.extend({
serialize(snapshot) {
/* implementation */
}
});
46. TESTING
TESTING THE DATA YOUR SERVER RECEIVES
let [ request ] = this.server.handledRequests;
let body = request.requestBody;
let requestPayload = JSON.parse(body);
let expectedJSON = /* JSON */;
assert.deepEqual(requestPayload, expectedJSON);
47. EMBER DATA RESOURCES
▸ Introduction to Ember Data 2.0 by Christoffer Persson
▸ My Blog - thejsguy.com
▸ Ember Data and Custom APIs - 5 Common Serializer
Customizations
▸ Which Ember Data Serializer Should I Use?
▸ Working with Nested Data in Ember Data Models
▸ Handling Errors with Ember Data