This document provides an introduction and overview of Phoenix, an web development framework built on top of Elixir. It discusses how Phoenix is similar to and different from Rails, including how models, controllers, routes and generators work. It also covers creating a basic Phoenix project, authentication, changesets and validations. The goal is to help beginners get started with Phoenix by explaining core concepts and providing examples of common tasks.
The document discusses Rails MVC architecture and its key components. It describes how the MVC pattern separates an application into the model, view, and controller components. It then provides examples of how routing, controllers, models, views, and layouts work in Rails applications to implement the MVC pattern.
This document provides a summary of a long story told over multiple scenes. It begins with a young man named Mark Brown winning a contest at a DNA seminar. The story then shifts to a boy named Owen who is worried about his friend Charlie leaving school and not being allowed to see him anymore. Owen's father tells him a confusing metaphor to encourage him to stay in school. That night, Charlie sneaks over to Owen's house, scared about what his parents have said. He warns Owen that a man named Mark Brown is causing problems and people to act strangely. The story then returns to the present with Mark Brown talking to the other contest winner backstage at the seminar before they are called back on stage.
Dokumen tersebut membahas perbandingan peta dan citra hasil penginderaan jauh serta interpretasi citra tersebut untuk menggambarkan bentang alam dan budaya. Peta memiliki kelebihan akurasi data namun proses pembuatannya lama dan mahal, sedangkan citra penginderaan jauh dapat menangkap kondisi sebenarnya dengan cepat meski kurang akurat. Dokumen tersebut juga menjelaskan ciri-ciri yang dapat diident
"Квалификационный тест: хороший, плохой, злой" - выступление В. Алтухова и А. Белорусца на Выставке&Конференции HR&Trainings EXPO 2014 об особенностях тестирования профессиональных знаний в организациях.
The document discusses different types of anxiety disorders:
1) Panic disorder, which involves sudden and unexpected panic attacks along with a persistent fear of additional attacks. Agoraphobia is a complicated form of panic disorder where one fears public places.
2) Generalized anxiety disorder, which is a chronic state of diffuse and excessive worry about life circumstances.
3) Phobic disorders like simple phobias of specific objects and social phobia, which involves avoiding actions in front of others due to fear of embarrassment.
4) Obsessive-compulsive disorder, which involves unwanted intrusive thoughts (obsessions) and feelings of compelled to repeat actions (compulsions) like checking or cleaning rituals.
The document discusses Rails MVC architecture and its key components. It describes how the MVC pattern separates an application into the model, view, and controller components. It then provides examples of how routing, controllers, models, views, and layouts work in Rails applications to implement the MVC pattern.
This document provides a summary of a long story told over multiple scenes. It begins with a young man named Mark Brown winning a contest at a DNA seminar. The story then shifts to a boy named Owen who is worried about his friend Charlie leaving school and not being allowed to see him anymore. Owen's father tells him a confusing metaphor to encourage him to stay in school. That night, Charlie sneaks over to Owen's house, scared about what his parents have said. He warns Owen that a man named Mark Brown is causing problems and people to act strangely. The story then returns to the present with Mark Brown talking to the other contest winner backstage at the seminar before they are called back on stage.
Dokumen tersebut membahas perbandingan peta dan citra hasil penginderaan jauh serta interpretasi citra tersebut untuk menggambarkan bentang alam dan budaya. Peta memiliki kelebihan akurasi data namun proses pembuatannya lama dan mahal, sedangkan citra penginderaan jauh dapat menangkap kondisi sebenarnya dengan cepat meski kurang akurat. Dokumen tersebut juga menjelaskan ciri-ciri yang dapat diident
"Квалификационный тест: хороший, плохой, злой" - выступление В. Алтухова и А. Белорусца на Выставке&Конференции HR&Trainings EXPO 2014 об особенностях тестирования профессиональных знаний в организациях.
The document discusses different types of anxiety disorders:
1) Panic disorder, which involves sudden and unexpected panic attacks along with a persistent fear of additional attacks. Agoraphobia is a complicated form of panic disorder where one fears public places.
2) Generalized anxiety disorder, which is a chronic state of diffuse and excessive worry about life circumstances.
3) Phobic disorders like simple phobias of specific objects and social phobia, which involves avoiding actions in front of others due to fear of embarrassment.
4) Obsessive-compulsive disorder, which involves unwanted intrusive thoughts (obsessions) and feelings of compelled to repeat actions (compulsions) like checking or cleaning rituals.
Cara Mengetahui Ukuran Sepatu Bola yang Pas bagi AndaBola 365
Inilah satu-satunya panduan yang Anda butuhkan untuk mengetahui ukuran sepatu bola yang pas. Dilengkapi dengan instruksi yang mudah dan tabel konversi ukuran berbagai merk sepatu bola
The document provides an overview of adulthood and aging. It discusses the stages of adulthood including young adulthood, middle adulthood, and later adulthood. Key points include:
- Young adulthood is characterized by establishing independence, career choices, and starting families.
- Middle adulthood focuses on competence, responsibility, and planning for children and retirement. This stage also involves generativity.
- Physical and cognitive changes occur with aging, including declines in sensory and cognitive abilities.
- Effective coping strategies during aging include flexibility, social support, and maintaining an active lifestyle.
- Elders provide important cultural transmission and are a source of knowledge for younger generations.
Jack and Thomas owe $10,000 to a drug dealer after losing money they borrowed to sell drugs. They ask their friends for money but none can help. Connor gets them a meeting with Jessica, a high-level drug dealer, who gives them the $10,000 to double in a week. If they succeed, they get to join her crew, but if they fail they owe the money to her boss Roger. Connor comes up with a plan to sell weed disguised as coffee to raise the money.
The document discusses different types of interviews that may be used in the hiring process. It describes screening interviews, phone interviews, one-on-one interviews, panel interviews, serial interviews, lunch interviews, group interviews, and stress interviews. For each type of interview, it provides details on what they involve and tips for candidates. The document also covers common mistakes that interviewers make, such as snap judgments, emphasizing negatives, not knowing the job, feeling pressure to hire quickly, and basing evaluations too much on nonverbal behavior. The overall message is that preparation is key for candidates and interviewers should gather comprehensive information before making decisions.
This document discusses concepts in rectilinear kinematics including position, displacement, velocity, acceleration, and their relationships. It defines these terms and concepts for motion along a straight line. Equations of motion are presented that relate these quantities including expressions for velocity and position as functions of time given constant acceleration. Examples are provided to demonstrate calculating these values for objects in motion. Free fall under constant acceleration due to gravity is also analyzed as a specific example.
Elixir's object-oriented layer is based on message passing between processes like Erlang. It uses GenServer to implement objects as isolated processes that communicate asynchronously via casts or synchronously via calls. GenServer provides callbacks for implementing the object's behavior and encapsulating its state within the process.
Dokumen ini membahas tentang analisis Fourier dan wavelet. Materi kuliah dibagi menjadi dua bagian, yaitu deret dan transformasi Fourier serta penggunaannya, dan wavelet."
This document presents the results of a survey about 3D printing conducted by a group of students. It includes an introduction to 3D printing, the survey questions and methodology, analysis of the 60 responses, and conclusions. Most respondents had heard of 3D printing but lacked detailed knowledge. While many saw benefits, most felt the technology was currently expensive. Respondents believed 3D printing would most help the medical and manufacturing industries. The group concluded more development is needed to improve the technology and reduce costs before its full potential is realized.
Ci sono segnali dall'industria che le API tra programmi stanno per essere affiancate da chatbot che decideranno autonomamente come mettersi in comunicazione tra di loro.
Asking “What?”, Automating the “How?”: The Vision of Declarative Performan...Jürgen Walter
Over the past decades, various methods, techniques, and tools for modeling and evaluating performance properties of software systems have been proposed covering the entire software life cycle. However, the application of performance engineering approaches to solve a given user concern is still rather challenging and requires expert knowledge and experience. There are no recipes on how to select, configure, and execute suitable methods, tools, and techniques allowing to address the user concerns. In this paper, we describe our vision of Declarative Performance Engineering (DPE), which aims to decouple the description of the user concerns to be solved (performance questions and goals) from the task of selecting and applying a specific solution approach. The strict separation of ``what'' versus ``how'' enables the development of different techniques and algorithms to automatically select and apply a suitable approach for a given scenario. The goal is to hide complexity from the user by allowing users to express their concerns and goals without requiring any knowledge about performance engineering techniques. Towards realizing the DPE vision, we discuss the different requirements and propose a reference architecture for implementing and integrating respective methods, algorithms, and tooling.
Este documento describe medicamentos seguros y prohibidos durante el embarazo. Entre los medicamentos seguros se incluyen analgésicos, descongestionantes nasales, pastillas para la tos y antiácidos. Los medicamentos prohibidos son antiinflamatorios no esteroideos, parches de nicotina, antihipertensivos, antidiabéticos secretagogos, estatinas, cortisona, anticonceptivos orales y bicarbonato, debido a sus efectos nocivos potenciales en el feto. El documento enfatiza la importancia de consultar
Programme planning involves deciding what activities need to be done, who will do them, when and where. The key elements are the programme itself and involving children, students, or parents. Planning usually begins by observing interests, strengths, needs, and behaviors. There are two types of planning: long-term planning focuses on fulfilling annual goals while short-term planning emphasizes weekly and daily activities to meet objectives and attain goals. Programme planning is important to consolidate learning, decide timelines, clearly define activity objectives to promote all-round child development, and reduce the chances of programme failure.
Ctools is a suite of tools and APIs that make development easier in Drupal. It includes tools like Exportables for defining reusable configuration presets, the Ajax Responder for handling AJAX requests simply, the Form Wizard for building multi-step forms, the Modal Dialog for creating popup forms, and others. The tools aim to simplify common tasks and provide standardized approaches.
The document provides an overview of the Symfony2 framework from its creator Fabien Potencier. It discusses several key aspects in 3 or less sentences:
- Symfony2 is not yet ready for production but is estimated to reach stable status in March 2011. Some developers are already using pre-release versions.
- The translation component allows translating text and handling pluralization. Template engines like Twig can be used to integrate translations into views.
- Forms can be customized by overriding rendering blocks for different field types in custom templates applied to individual forms or globally.
- Security features like authentication, authorization, and protecting against attacks are integrated. Users can be loaded from different
Cara Mengetahui Ukuran Sepatu Bola yang Pas bagi AndaBola 365
Inilah satu-satunya panduan yang Anda butuhkan untuk mengetahui ukuran sepatu bola yang pas. Dilengkapi dengan instruksi yang mudah dan tabel konversi ukuran berbagai merk sepatu bola
The document provides an overview of adulthood and aging. It discusses the stages of adulthood including young adulthood, middle adulthood, and later adulthood. Key points include:
- Young adulthood is characterized by establishing independence, career choices, and starting families.
- Middle adulthood focuses on competence, responsibility, and planning for children and retirement. This stage also involves generativity.
- Physical and cognitive changes occur with aging, including declines in sensory and cognitive abilities.
- Effective coping strategies during aging include flexibility, social support, and maintaining an active lifestyle.
- Elders provide important cultural transmission and are a source of knowledge for younger generations.
Jack and Thomas owe $10,000 to a drug dealer after losing money they borrowed to sell drugs. They ask their friends for money but none can help. Connor gets them a meeting with Jessica, a high-level drug dealer, who gives them the $10,000 to double in a week. If they succeed, they get to join her crew, but if they fail they owe the money to her boss Roger. Connor comes up with a plan to sell weed disguised as coffee to raise the money.
The document discusses different types of interviews that may be used in the hiring process. It describes screening interviews, phone interviews, one-on-one interviews, panel interviews, serial interviews, lunch interviews, group interviews, and stress interviews. For each type of interview, it provides details on what they involve and tips for candidates. The document also covers common mistakes that interviewers make, such as snap judgments, emphasizing negatives, not knowing the job, feeling pressure to hire quickly, and basing evaluations too much on nonverbal behavior. The overall message is that preparation is key for candidates and interviewers should gather comprehensive information before making decisions.
This document discusses concepts in rectilinear kinematics including position, displacement, velocity, acceleration, and their relationships. It defines these terms and concepts for motion along a straight line. Equations of motion are presented that relate these quantities including expressions for velocity and position as functions of time given constant acceleration. Examples are provided to demonstrate calculating these values for objects in motion. Free fall under constant acceleration due to gravity is also analyzed as a specific example.
Elixir's object-oriented layer is based on message passing between processes like Erlang. It uses GenServer to implement objects as isolated processes that communicate asynchronously via casts or synchronously via calls. GenServer provides callbacks for implementing the object's behavior and encapsulating its state within the process.
Dokumen ini membahas tentang analisis Fourier dan wavelet. Materi kuliah dibagi menjadi dua bagian, yaitu deret dan transformasi Fourier serta penggunaannya, dan wavelet."
This document presents the results of a survey about 3D printing conducted by a group of students. It includes an introduction to 3D printing, the survey questions and methodology, analysis of the 60 responses, and conclusions. Most respondents had heard of 3D printing but lacked detailed knowledge. While many saw benefits, most felt the technology was currently expensive. Respondents believed 3D printing would most help the medical and manufacturing industries. The group concluded more development is needed to improve the technology and reduce costs before its full potential is realized.
Ci sono segnali dall'industria che le API tra programmi stanno per essere affiancate da chatbot che decideranno autonomamente come mettersi in comunicazione tra di loro.
Asking “What?”, Automating the “How?”: The Vision of Declarative Performan...Jürgen Walter
Over the past decades, various methods, techniques, and tools for modeling and evaluating performance properties of software systems have been proposed covering the entire software life cycle. However, the application of performance engineering approaches to solve a given user concern is still rather challenging and requires expert knowledge and experience. There are no recipes on how to select, configure, and execute suitable methods, tools, and techniques allowing to address the user concerns. In this paper, we describe our vision of Declarative Performance Engineering (DPE), which aims to decouple the description of the user concerns to be solved (performance questions and goals) from the task of selecting and applying a specific solution approach. The strict separation of ``what'' versus ``how'' enables the development of different techniques and algorithms to automatically select and apply a suitable approach for a given scenario. The goal is to hide complexity from the user by allowing users to express their concerns and goals without requiring any knowledge about performance engineering techniques. Towards realizing the DPE vision, we discuss the different requirements and propose a reference architecture for implementing and integrating respective methods, algorithms, and tooling.
Este documento describe medicamentos seguros y prohibidos durante el embarazo. Entre los medicamentos seguros se incluyen analgésicos, descongestionantes nasales, pastillas para la tos y antiácidos. Los medicamentos prohibidos son antiinflamatorios no esteroideos, parches de nicotina, antihipertensivos, antidiabéticos secretagogos, estatinas, cortisona, anticonceptivos orales y bicarbonato, debido a sus efectos nocivos potenciales en el feto. El documento enfatiza la importancia de consultar
Programme planning involves deciding what activities need to be done, who will do them, when and where. The key elements are the programme itself and involving children, students, or parents. Planning usually begins by observing interests, strengths, needs, and behaviors. There are two types of planning: long-term planning focuses on fulfilling annual goals while short-term planning emphasizes weekly and daily activities to meet objectives and attain goals. Programme planning is important to consolidate learning, decide timelines, clearly define activity objectives to promote all-round child development, and reduce the chances of programme failure.
Ctools is a suite of tools and APIs that make development easier in Drupal. It includes tools like Exportables for defining reusable configuration presets, the Ajax Responder for handling AJAX requests simply, the Form Wizard for building multi-step forms, the Modal Dialog for creating popup forms, and others. The tools aim to simplify common tasks and provide standardized approaches.
The document provides an overview of the Symfony2 framework from its creator Fabien Potencier. It discusses several key aspects in 3 or less sentences:
- Symfony2 is not yet ready for production but is estimated to reach stable status in March 2011. Some developers are already using pre-release versions.
- The translation component allows translating text and handling pluralization. Template engines like Twig can be used to integrate translations into views.
- Forms can be customized by overriding rendering blocks for different field types in custom templates applied to individual forms or globally.
- Security features like authentication, authorization, and protecting against attacks are integrated. Users can be loaded from different
This document provides instructions for setting up user authentication for a Rails application using Devise and OAuth with Facebook. It includes steps for installing Devise, generating a User model, configuring routes and callbacks, setting up the Facebook application, and connecting a user's Facebook account to authenticate and sign in.
Meteor is a reactive web application framework that uses JavaScript on both the client and server. It provides reactivity through Tracker.autorun, which re-runs functions automatically when reactive data sources change. Meteor uses DDP for client-server communication and Minimongo, a MongoDB implementation, for client-side data caching. The document provides steps for creating a basic Meteor application with user accounts, routing, schemas, forms, and template helpers to display posts data reactively.
Working With The Symfony Admin GeneratorJohn Cleveley
The document provides tips for customizing and extending the symfony admin generator. It discusses using PHP configuration instead of YAML, adding relations between models, translating the admin interface, tidying filters, and displaying timestamp fields as plain text. The key recommendations are to understand requirements before using the generator, customize it to suit workflows, and avoid it becoming a messy catch-all solution.
Slides from my talk on #ruby-mg meeting.
Intro about how we in catars.me are using postgREST to create fast and simple API that can be represented with various mithril.js components.
This document summarizes several common Rails antipatterns including monolithic controllers, fat controllers, voyeuristic models, duplicate code, and messy migrations. It provides examples of each antipattern and recommendations for refactoring code to avoid them, such as extracting logic into modules, using service objects, and avoiding external dependencies in migrations.
The document summarizes various Rails antipatterns including monolithic controllers, fat controllers, voyeuristic models, duplicate code, and messy migrations. It provides examples of each antipattern and recommendations for refactoring code to avoid them, such as extracting logic into modules, using scopes over class methods, and avoiding external dependencies in migrations.
How to disassemble one monster app into an ecosystem of 30fiyuer
This document describes how to disassemble a monolithic web application into an ecosystem of 30 smaller applications while maintaining a consistent user interface and shared functionality. Key points include:
- Breaking the application into independent but interconnected microservices, each with its own database and development cycle.
- Ensuring a consistent user experience across applications through shared CSS, JavaScript, and common helper libraries packaged as gems.
- Enabling applications to access data from each other securely through read-only database connections, background services, or AJAX calls.
- Centralizing user authentication, authorization, file storage and other services to be shared across the ecosystem.
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Joke Puts
This presentation was given at a PHP Antwerp Meetup: https://www.meetup.com/phpantwerp/events/237632633/
Magento 2 is a commerce platform released since November 2015. In this introduction I’ll focus on the open source version, Magento Community and show you how easy it is to start creating modules for this platform. These modules can be used to customize your store or to publish on the Magento Marketplace.
The document discusses Ruby on Rails and RESTful routing. It explains that RESTful routing maps HTTP verbs like GET, POST, PUT, and DELETE to controller actions for basic CRUD operations. This follows conventions like using the GET verb for the index and show actions, POST for create, PUT for update, and DELETE for destroy. It shows how Rails' resource routing generates RESTful routes and named helpers like events_path for simple, intuitive routing.
Wie für viele andere Plattformen, so ist auch für XING die Öffnung der Rechenzentrumsgrenzen mit Hilfe von externen APIs, z.B. zur Partnerintegration, ein wichtiges Thema. In diesem Vortrag werfen wir einen Blick auf die Interna der (API-)Entwicklung bei XING: Architektur der Plattform, Historie der verschiedenen APIs, Entwicklungsprozesse, best practices beim API-Design, enge Zusammenarbeit mit einzelnen Consumern sowie (rechtliche) Herausforderungen bei der Datenweitergabe via API.
Ruby on Rails and ASP.NET MVC are compared for building a conference registration application. Both frameworks support generating models from a database, including validation rules. Both also provide automatic routing and controllers to display data. The main differences are that Rails uses Ruby code and conventions while ASP.NET MVC uses C# and the MVC pattern. Views in Rails use Haml or ERB templates whereas ASP.NET MVC uses Razor syntax.
Projet d'accès aux résultats des étudiant via client mobile Patrick Bashizi
This document describes a student project to create a mobile client application to access exam results from the polytechnic faculty server. It includes modeling the software system with UML diagrams, developing the backend server with a MySQL database and Java web services, and creating the mobile interface with J2ME. The server exposes exam data through a SOAP web service that the mobile client can call to retrieve and display student results.
The document discusses the benefits of using the Model-View-Controller (MVC) architecture for web applications. It introduces Giotto, a new Python framework that enforces MVC patterns. Giotto defines application features that map to a controller, model, and view. Features can be accessed via HTTP, command line, or other interfaces. This ensures separation of concerns and clear assignment of responsibilities in the code. The document provides examples of how Giotto implements common MVC patterns like model views and controllers.
Building Single Page Application (SPA) with Symfony2 and AngularJSAntonio Peric-Mazar
Forget about classic website where UX is not so important. We are living in time where usability is one of the important thing if you are building some business client oriented web service. How to connect Symfony2 as backend and AngularJS as frontend solution? What are best practices? What are disadvantageous? How to take best from both worlds? These are topics I will cover in my talk with real examples.
The document discusses the key changes in Rails 4.0. Some of the major new features include strong parameters for mass assignment protection, streaming responses using ActionController::Live, background job handling via ActiveSupport::Queue, and routing concerns to DRY up routes. Some existing features that have been improved include ActiveRecord::Relation to allow chaining of queries, caching with cache digests to automatically invalidate caches, and various performance improvements. A number of older and deprecated features have also been removed.
With third party clients connecting to your service you may find that the assumptions or opinions of a typical rails application are not robust enough. We'll run through some key considerations when building an API that will be consumed by a mobile app.
Código Saudável => Programador Feliz - Rs on Rails 2010Plataformatec
Palestra do Rs On Rails, na qual demos algumas dicas de boas práticas para manter seu código mais limpo e ter absoluto controle da sua aplicação em produção.
Talk di Claudio Giancaterino, Data Science Enthusiast, a https://community.codemotion.com/milano-chatbots/meetups/come-costruire-chatbot-nel-2020
Un esempio di applicazione Rasa NLU addestra l'agente a comprendere i messaggi e Rasa Core lo allena a rispondere. Rasa X ne migliora le prestazioni e si occupa del deployment.
di Alessandro Frau e Giorgio Sidari. Travelchat è un chatbot per viaggiatori. Vi mostreranno come stanno ripensando il concetto di guida di viaggio, sfruttando le caratteristiche di Messenger.
Costruire chatbot conversazionali ed intelligenti con XeniooPaolo Montrasio
di Gianandrea Terzi e Luca Mauri, entrambi owner di Matelab srl e co-fondatori di Xenioo (https://www.xenioo.com/). È una nuova piattaforma tutta italiana che consente di disegnare e pubblicare chatbot multi-canale. Nello speech saranno spiegate le differenze tra un chatbot pensato per guidare l'utente passo dopo passo ed un chatbot in grado di gestire una conversazione in modo intelligente, e come Xenioo sia in grado di gestire entrambi gli scenari.
di Gianluca Maruzzella, Enrico Bertino, Marija Zdolsek e Mario Beraha (Indigo.ai https://ndg.ai/).
Qual è la magia dietro ai chatbot? Esploriamo i modelli di Deep Learning più avanzati che permettono ai chatbot di facilitare la comunicazione tra aziende e utenti. Sono mostrati alcuni esempi di architetture e le rispettive applicazioni nel mondo chatbot. In particolare si parla di BiLSTM, Seq2Seq with attention, CNN, VAEs e se ne analizzano i pro e i contro.
Presentazione all'evento https://www.meetup.com/Milano-Chatbots-Meetup/events/255234805
Voicebot: i Chatbot crescono e imparano a parlarePaolo Montrasio
di Mirko Puliafito, Eudata http://www.eudata.com
Si mostra come sia possibile dare voce ai chatbot testuali rinnovando la consueta interazione uomo macchina dei canali voce come IVR e call center, degli assistenti virtuali di smartphone e smart home e delle funzionalità di registrazione vocale delle piattaforme di messaging più diffuse.
di Francesco Di Maggio (Mauden). Watson è una soluzione potente per realizzare sistemi conversazionali. In realtà come comunicano tra di loro?
Presentato a https://www.meetup.com/Milano-Chatbots-Meetup/events/246025197/
di Michele Feliciani (InsightSensor). Come superare limiti e problematiche degli attuali framework di sviluppo per ottenere la massima personalizzazione del proprio chatbot.
Presentato a https://www.meetup.com/Milano-Chatbots-Meetup/events/246025197/
Il più intelligente Chatbot Bancario in Italia!Paolo Montrasio
di Alessandro Vitale (Conversate) e Matteo Baido (UBI). La storia dietro il più intelligente Chatbot Bancario in Italia! Qual’era l’idea iniziale? Come è stato messo in produzione, comunicato e gestito? Come migliorato con l'utilizzo? Bonus, scopri l'Artificial Intelligence utilizzata e ascolta le lesson learned da UBI Banca!
Presentato a https://www.meetup.com/Milano-Chatbots-Meetup/events/246025197/
Chatbot, a chi proporli e come ... scegli il giusto targetPaolo Montrasio
di Paola Cassina (Gargano Adv) Le tipologie di clienti che si rivolgono a chi sviluppa chatbot
Presentato all'evento https://www.meetup.com/Milano-Chatbots-Meetup/events/246025197/
Cicerus - una piattaforma per lo sviluppo di chatbotPaolo Montrasio
di Alessandro Re, dgsgroup.it Un framework che permette di creare chatbot con una interfaccia grafica, riducendo il codice alle parti relative ai processi di business. Si può definire il flusso della conversazione ed avere un fallback umano.
Presentato a Milano Chatbots il 14 dicembre https://www.meetup.com/Milano-Chatbots-Meetup/events/245463095/
I'm afraid I don't have enough context to understand your full question. Could you please rephrase or provide some more details?
User: Sorry, let me try again. I'm looking for a recipe for a quick soup I can make with chicken and canned tomatoes. Do you have any suggestions?
"Making chatbots: a day in the life", Ing. Diego Viganò, Lead SW Engineer di Vidiemme Consulting. Cosa vuol dire "fare un chatbot" non solo dal punto di vista del codice, ma anche del processo che parte dalla consulenza, passa dal design, dalle stime, fino alla realizzazione e al testing.
Di Alberto Baccari (namu.io). Un CRM intelligente che monitora la rete vendita, interagisce con i clienti e suggerisce le operazioni commerciali.
Presentazione al meetup di Milano Chatbots https://www.meetup.com/preview/Milano-Chatbots-Meetup/events/243942212
Di Candida Mati. Oliva è un chatbot che permette ai musei di comunicare con i visitatori, di arricchire il modello di CRM con i dati diffusi attraverso i social network e di incentivare il passaparola sui contenuti delle mostre attraverso il web.
Presentazione al meetup di Milano Chatbots https://www.meetup.com/preview/Milano-Chatbots-Meetup/events/243942212
Multicanalità e Chatbot, un binomio sostenibile per una PMI? di Antonio de Nardis, esperto di web marketing, Docente Digital Transformation & Innovation - IULM - Il Sole 24 Ore - Università Cattolica. Dall'analisi degli obiettivi, degli impatti organizzativi alle soluzioni di operation.
O documento discute as etapas de um visitante se tornar um cliente em um site, incluindo atrair a atenção do visitante, fornecer informações úteis, oferecer uma solução para seus problemas e converter em um cliente pagante. Também menciona a jornada do autor com ferramentas de chatbot, tendo escolhido inicialmente Chatfuel mas agora considerando mudar para Manychats.
Innovare la relazione con i clienti nel retailPaolo Montrasio
This document discusses how AI chatbots will change customer experiences. Over 1 billion messages are exchanged between businesses and customers each month on messaging platforms. AI can help businesses automate these conversations to provide immediate, effortless assistance at scale through customized virtual assistants. The document explores how chatbots work using techniques like natural language processing, machine learning and deep learning. It emphasizes the importance of focusing conversations on basic customer needs while using personalized interactions to build emotional connections.
Moose.ai: migliorare la customer experience delle banche con un chatbot B2C &...Paolo Montrasio
Agile Lab has developed Moose.ai, a chatbot that uses artificial intelligence to provide a virtual assistant for banking customers. The chatbot is able to analyze customer spending, have conversational interactions about transactions, and provide forecasts of future expenses. It uses technologies like Microsoft's Bot Framework and Cognitive Services along with machine learning to power these capabilities across channels on a secure platform.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
What is Master Data Management by PiLog Groupaymanquadri279
PiLog Group's Master Data Record Manager (MDRM) is a sophisticated enterprise solution designed to ensure data accuracy, consistency, and governance across various business functions. MDRM integrates advanced data management technologies to cleanse, classify, and standardize master data, thereby enhancing data quality and operational efficiency.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemPeter Muessig
Learn about the latest innovations in and around OpenUI5/SAPUI5: UI5 Tooling, UI5 linter, UI5 Web Components, Web Components Integration, UI5 2.x, UI5 GenAI.
Recording:
https://www.youtube.com/live/MSdGLG2zLy8?si=INxBHTqkwHhxV5Ta&t=0
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Fundamentals of Programming and Language Processors
Phoenix per principianti
1. Phoenix per principianti
di Paolo Montrasio
paolo.montrasio@connettiva.eu
Slide a
connettiva.eu/phoenix-per-principianti.pdf
2. (C) Connettiva www.connettiva.eu 2
Ovvero...
2005: Conoscenza(Ruby) == 0 → Rails
2014: Conoscenza(Elixir) == 0 → Phoenix
Imparare Elixir mentre si impara Phoenix
● Le guide di Phoenix
http://www.phoenixframework.org/docs/overview
● I generatori per i controller
3. (C) Connettiva www.connettiva.eu 3
Per ambientarsi
● Phoenix è MVC
● È giovane ma si innalza sulle spalle dei giganti
● Per chi conosce Rails:
– Models e Controllers → Models e Controllers
– Views → Template
– Helpers → Views (circa)
– Cables (Rails 5) → Channels (da sempre)
– ActiveRecord → Ecto
– Migrations → Migrations
4. (C) Connettiva www.connettiva.eu 4
Differenze
● Ecto
– Lo schema va dichiarato
– Changeset per modifiche e validazioni
● Controller singolari (UserController ma /users)
● app/ → web/
● config/database.yml → config/<env>.exs
● config/routes.rb → web/router.ex
5. (C) Connettiva www.connettiva.eu 5
Creare una web app
http://www.phoenixframework.org/docs/up-and-ru
nning
mix phoenix.new bologna_2015
git add .gitignore config/ lib/ mix.* package.json
priv/ README.md test/ web/
git commit -a -m "Demo for today!"
9. (C) Connettiva www.connettiva.eu 9
web/router.ex
defmodule Bologna_2015.Router do
use Bologna_2015.Web, :router
scope "/", Bologna_2015 do
pipe_through :browser
get "/", PageController, :index
resources "/users", UserController
end
end
10. (C) Connettiva www.connettiva.eu 10
Restful routes
$ mix phoenix.routes
page_path GET / Bologna_2015.PageController :index
user_path GET /users Bologna_2015.UserController :index
user_path GET /users/:id/edit Bologna_2015.UserController :edit
user_path GET /users/new Bologna_2015.UserController :new
user_path GET /users/:id Bologna_2015.UserController :show
user_path POST /users Bologna_2015.UserController :create
user_path PATCH /users/:id Bologna_2015.UserController :update
PUT /users/:id Bologna_2015.UserController :update
user_path DELETE /users/:id Bologna_2015.UserController :delete
22. (C) Connettiva www.connettiva.eu 22
Porting di una app a Phoenix
● Customers analytics per CheckBonus
http://checkbonus.it/
● Web app Rails
● Le pagine fanno richieste
a Rails per mostrare
tabelle e grafici
● Risposte JSON
25. (C) Connettiva www.connettiva.eu 25
Migrazioni con Ecto
$ mix ecto.migrate # up
$ mix ecto.rollback # down di uno
http://hexdocs.pm/ecto/Ecto.html
Adapter per PostgreSQL, MySQL, MariaDB,
MSSQL, MongoDB.
26. (C) Connettiva www.connettiva.eu 26
Il modello generato
defmodule Bologna_2015.Retailer do
use Bologna_2015.Web, :model
schema "retailers" do
field :name, :string
field :internal_id, :integer
timestamps
has_many :shops, Bologna_2015.Shop
has_many :visits, Bologna_2015.Visit
end
@required_fields ~w(name)
@optional_fields ~w(internal_id)
def changeset(model, params :empty) do
model
|> cast(params, @required_fields,
@optional_fields)
end
end
30. (C) Connettiva www.connettiva.eu 30
Registrazione e autenticazione
● L'ostacolo più grande all'adozione di Phoenix
● No framework con copertura di tutto lo use case
– Registrazione
– Invio mail di attivazione
– Non ho ricevuto il link di attivazione
– Ho perso la password
– Faccio login / faccio logout
– Mi autentico con FB / Tw / G+ / OAuth
31. (C) Connettiva www.connettiva.eu 31
Soluzioni
● Addict https://github.com/trenpixster/addict
– POST JSON per registrazione, login, logout, recupero e
reset password: OK per SPA.
– Mail via Mailgun
● Passport https://github.com/opendrops/passport
– No routes, no controllers: un SessionManager da usare
nel proprio codice
● Do it yourself
http://nithinbekal.com/posts/phoenix-authentication/
34. (C) Connettiva www.connettiva.eu 34
Modello e cifratura password
schema "users" do
field :email, :string
field :encrypted_password, :string
end
@required_fields ~w(email encryped_password)
def hash(plaintext) do
Base.encode16(:crypto.hash(:sha256, to_char_list(plaintext)))
end
https://www.djm.org.uk/cryptographic-hash-functions-elixir-gener
ating-hex-digests-md5-sha1-sha2/
35. (C) Connettiva www.connettiva.eu 35
Inserimento utenti / 1
Barando, direttamente nel db (PostgreSQL)
create extension pgcrypto;
insert into users (email, encrypted_password,
inserted_at, updated_at) values
('paolo.montrasio@connettiva.eu',
upper(encode(digest('password', 'sha256'),'hex')),
now(), now());
36. (C) Connettiva www.connettiva.eu 36
Inserimento utenti / 2
Correttamente, in Elixir
$ iex -S mix
alias Bologna_2015.User
changeset = User.changeset(%User{},
%{email: "paolo.montrasio@connettiva.eu",
encrypted_password: User.hash("password")})
alias Bologna_2015.Repo
Repo.insert(changeset)
38. (C) Connettiva www.connettiva.eu 38
Controller per le sessioni
def create(conn, %{ "user" => %{ "email" => email, "password" => password }}) do
case User.find(email, password) do
[user] ->
fetch_session(conn)
|> put_session(:user_id, user.id) # user.id nella sessione per i controller
|> put_flash(:info, "Login successful")
|> redirect(to: page_path(conn, :index))
[ ] ->
fetch_session(conn)
|> put_flash(:error, "Login failed")
|> redirect(to: session_path(conn, :new))
end
end
def find(email, password) do
enc_pwd = hash(password)
query = from user in User,
where: user.email == ^email and
user.encrypted_password == ^enc_pwd,
select: user
Repo.all(query)
end
39. (C) Connettiva www.connettiva.eu 39
Plug di autenticazione
defmodule Bologna_2015.Plugs.Authentication do
import Plug.Conn
alias Bologna_2015.User
alias Bologna_2015.Repo
def init(default), do: default
def call(conn, _default) do
user = nil
user_id = get_session(conn, :user_id)
unless user_id == nil do
user = Repo.get(User, user_id)
end
assign(conn, :current_user, user)
end
end
# conn.assigns[:current_user]
web/router.ex
defmodule Bologna_2015.Router do
use Bologna_2015.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug Bologna_2015.Plugs.Authentication
end
40. (C) Connettiva www.connettiva.eu 40
Plug di autorizzazione
defmodule Bologna_2015.Plugs.MustBeLoggedIn do
import Plug.Conn
import Phoenix.Controller
def init(default), do: default
def call(conn, _default) do
if conn.assigns[:current_user] == nil do
conn
|> put_flash(:info, "You must be logged in")
|> redirect(to: "/") |> halt
else
conn
end
end
end
web/controllers/admin/user_controller.ex
defmodule Bologna_2015.Admin.UserController do
use Bologna_2015.Web, :controller
plug Bologna_2015.Plugs.MustBeLoggedIn
41. (C) Connettiva www.connettiva.eu 41
Funziona? mix test
defmodule Bologna_2015.SessionControllerTest do
use Bologna_2015.ConnCase
alias Bologna_2015.User
@valid_attrs %{"email" => "paolo.montrasio@connettiva.eu", "password" => "password"}
setup do
conn = conn()
{:ok, conn: conn}
end
test "creates session and redirects when data is valid", %{conn: conn} do
changeset = User.changeset(%User{}, %{email: @valid_attrs["email"],
encrypted_password: User.hash(@valid_attrs[“password"])})
{:ok, user } = Repo.insert(changeset)
conn = post conn, session_path(conn, :create), user: @valid_attrs
assert redirected_to(conn) == page_path(conn, :index)
assert get_session(conn, :user_id) == user.id
end
end
42. (C) Connettiva www.connettiva.eu 42
API JSON – di nuovo e meglio
pipeline :api do
plug :accepts, ["json"]
scope "/api", Bologna_2015, as: :api do
resources "/retailers", API.RetailerController,
only: [:index] do
resources "/visits", API.VisitController,
only: [:index]
...
api_retailer_path GET /api/retailers Bologna_2015.API.RetailerController :index
api_retailer_visit_path GET /api/retailers/:retailer_id/visits Bologna_2015.API.VisitController :index
43. (C) Connettiva www.connettiva.eu 43
Visit: migrazione e modello
defmodule Bologna_2015.Repo.Migrations.CreateVisit do
use Ecto.Migration
def change do
create table(:visits) do
add :retailer_id, :integer
add :started_at, :timestamp
add :duration, :integer
end
end
end
defmodule Bologna_2015.Visit do
use Bologna_2015.Web, :model
schema "visits" do
belongs_to :retailer, Bologna_2015.Retailer
field :started_at, Ecto.DateTime
field :duration, :integer
end
@required_fields ~w(retailer_id, started_at,
duration)
@optional_fields ~w()
def changeset(model, params :empty) do
model
|> cast(params, @required_fields,
@optional_fields)
end
end
44. (C) Connettiva www.connettiva.eu 44
Generazione controller
mix phoenix.gen.json API.Visit visits --no-model
* creating web/controllers/api/visit_controller.ex
* creating web/views/api/visit_view.ex
* creating test/controllers/api/visit_controller_test.exs
* creating web/views/changeset_view.ex
Sostituire alias Bologna_2015.API.Visit
Con alias Bologna_2015.Visit
45. (C) Connettiva www.connettiva.eu 45
Il controller
def index(conn, _params) do
retailer_id = conn.assigns[:retailer].id # da dove arriva?
query = from visit in Visit,
where: visit.retailer_id == ^retailer_id,
select: visit
visits = Repo.all(query)
render(conn, "index.json", visits: visits) # dov'è il template?
end
46. (C) Connettiva www.connettiva.eu 46
Assign del modello
plug :assign_retailer
defp assign_retailer(conn, _options) do
retailer = Repo.get!(Bologna_2015.Retailer,
conn.params["retailer_id"])
assign(conn, :retailer, retailer)
end
47. (C) Connettiva www.connettiva.eu 47
Il template / 1
# web/views/api/visit_view.ex
def render("index.json", %{visits: visits}) do
%{data: render_many(visits, Bologna_2015.API.VisitView,
"visit.json")}
end
# render_many? Circa equivalente a
Enum.map(visits, fn user ->
render(Bologna_2015.API.VisitView, "visit.json”, visit: visit)
end)
48. (C) Connettiva www.connettiva.eu 48
Il template / 2
# web/views/api/visit_view.ex
def render("visit.json", %{visit: visit}) do
%{id: visit.id}
end
- %{id: visit.id}
+ %{started_at: visit.started_at, duration: visit.duration}
49. (C) Connettiva www.connettiva.eu 49
La richiesta
GET /retailers/1/visits
{"data":[
{"started_at":"2015-09-29T20:11:00Z","duration":6},
{"started_at":"2015-09-29T20:41:00Z","duration":6},
…
]}
50. (C) Connettiva www.connettiva.eu 50
Benchmark Phoenix
query = from visit in Visit,
where: visit.retailer_id == ^retailer_id,
select: visit
visits = Repo.all(query)
(252), 147, 134, 145, 133, 142 → media 140 ms
per 5000+ visits
54. (C) Connettiva www.connettiva.eu 54
Benchmark Phoenix
query = from visit in Visit,
where: visit.retailer_id == ^retailer_id,
select: [visit.started_at, visit.duration]
visits = Repo.all(query)
(193), 85, 72, 79, 70, 68 → media 74 ms
55. (C) Connettiva www.connettiva.eu 55
Benchmark: riassunto
select * from visits
Phoenix 140 ms
Rails 248 ms x 1.71
select started_at, duration from visits
Phoenix 74 ms
Rails 116 ms x 1.56
56. (C) Connettiva www.connettiva.eu 56
Benchmark: riassunto
select * from visits
Phoenix 140 ms
Rails 248 ms x 1.71
Ruby senza AR 219 ms
PostgreSQL 2.97 ms
select started_at, duration from visits
Phoenix 74 ms
Rails 116 ms x 1.56
Ruby senza AR 88 ms
PostgreSQL 3.47 ms
57. (C) Connettiva www.connettiva.eu 57
Fastidi
● alias / import / require all'inizio di ogni file
● Mancanza di un framework di autenticazione
● Dover chiamare ogni tanto Erlang
● Dover scrivere due volte lo schema, nella
migrazione e nel modello
59. (C) Connettiva www.connettiva.eu 59
Domande e contatti
Paolo Montrasio
paolo.montrasio@connettiva.eu
Slide a
connettiva.eu/phoenix-per-principianti.pdf