In Perl 6 fehlen bislang Interfaces, Factories und DI-Container (DI=Dependency Injection). Diese sind aber für Test-Driven Development unverzichtbar.
Mein Vortrag auf dem 14. Deutschen Perlworkshop bietet einerseits Motivation für und eine Einführung in Testdriven Development und zeigt zudem Realisierungsmöglichkeiten für die fehlenden Spracheelemente / globalen Variablen/Subs auf.
The document provides style recommendations and product descriptions for winter fashion. It features 5 sections that highlight popular winter colors and styles: winter grey, red, shine, details, and military. Each section includes photos and descriptions of purse shells and accessories available in those colors and styles. The final sections provide additional purse shell and bag options, emphasizing classic and demi bag styles. The shells and bags are described as interchangeable and customizable to suit different looks.
El documento describe tres maniobras portuarias: la primera involucra el atraque y carga/descarga del buque, la segunda el almacenamiento de la carga en el muelle, y la tercera la inspección y papeleo aduanero antes de que la carga sea transportada a su destino final. También describe una Zona de Actividades Logísticas que opera de forma independiente al puerto para agilizar el movimiento y distribución de la carga mediante la concentración de actividades logísticas.
This document provides seven tips for accelerating sales performance and succeeding in sales. It discusses organizing a sales team around skill sets, thoroughly researching targets to understand their needs, using available information to demonstrate knowledge of targets to make a strong connection, obtaining referrals from calls, making cold calls by phone which are more effective than emails, leveraging tools like Salesforce to boost performance, closely measuring key metrics to identify areas for improvement, and remembering that sales is a numbers game requiring persistence.
LA MADERA Y SUS NO TAN GRATAS CONSECUENCIAS.KINGKONG301
Este documento describe el proceso de obtención de la madera, desde la tala de árboles hasta su transformación y uso final. Explica que la tala de árboles causa daños ambientales como la erosión del suelo, desestabilización de aguas subterráneas y reducción de la biodiversidad. También analiza los impactos ambientales negativos del tratamiento de la madera como las emisiones de formaldehido y pesticidas.
1. O documento descreve uma aula sobre a técnica de modelagem de personas ágeis.
2. A técnica é apresentada como uma forma de criar modelos descritivos de usuários de forma breve e pragmática.
3. Personas ágeis enfatizam levantar informações rapidamente através de etnografia digital, análise métrica ou conversas, em vez de criar personas detalhadas.
Using KeyLines 3.0 to visualize your cyber data at scale
Cyber security analysts face data overload. They work with information on a massive scale, generated at millisecond levels of resolution detailing increasingly complex attacks.
To make sense of this data, analysts need an intuitive and engaging way to explore it: that’s where graph visualization plays a role.
During this session, Corey will show examples of how graph visualization can help users explore, understand and derive insight from real-world cyber security datasets.
You will learn:
• How graph visualization can help you extract insight from cyber data
• How to visualize your cyber security graph data at scale using WebGL
• Why KeyLines 3.0 is the go-to tool for large-scale cyber graph visualization.
This session is suitable for a non-technical audience.
This year’s guide has a particular focus on the United Kingdom, and featured topics include automatic enrolment, pension flexibility and the rise of defined contribution pensions.
The document provides style recommendations and product descriptions for winter fashion. It features 5 sections that highlight popular winter colors and styles: winter grey, red, shine, details, and military. Each section includes photos and descriptions of purse shells and accessories available in those colors and styles. The final sections provide additional purse shell and bag options, emphasizing classic and demi bag styles. The shells and bags are described as interchangeable and customizable to suit different looks.
El documento describe tres maniobras portuarias: la primera involucra el atraque y carga/descarga del buque, la segunda el almacenamiento de la carga en el muelle, y la tercera la inspección y papeleo aduanero antes de que la carga sea transportada a su destino final. También describe una Zona de Actividades Logísticas que opera de forma independiente al puerto para agilizar el movimiento y distribución de la carga mediante la concentración de actividades logísticas.
This document provides seven tips for accelerating sales performance and succeeding in sales. It discusses organizing a sales team around skill sets, thoroughly researching targets to understand their needs, using available information to demonstrate knowledge of targets to make a strong connection, obtaining referrals from calls, making cold calls by phone which are more effective than emails, leveraging tools like Salesforce to boost performance, closely measuring key metrics to identify areas for improvement, and remembering that sales is a numbers game requiring persistence.
LA MADERA Y SUS NO TAN GRATAS CONSECUENCIAS.KINGKONG301
Este documento describe el proceso de obtención de la madera, desde la tala de árboles hasta su transformación y uso final. Explica que la tala de árboles causa daños ambientales como la erosión del suelo, desestabilización de aguas subterráneas y reducción de la biodiversidad. También analiza los impactos ambientales negativos del tratamiento de la madera como las emisiones de formaldehido y pesticidas.
1. O documento descreve uma aula sobre a técnica de modelagem de personas ágeis.
2. A técnica é apresentada como uma forma de criar modelos descritivos de usuários de forma breve e pragmática.
3. Personas ágeis enfatizam levantar informações rapidamente através de etnografia digital, análise métrica ou conversas, em vez de criar personas detalhadas.
Using KeyLines 3.0 to visualize your cyber data at scale
Cyber security analysts face data overload. They work with information on a massive scale, generated at millisecond levels of resolution detailing increasingly complex attacks.
To make sense of this data, analysts need an intuitive and engaging way to explore it: that’s where graph visualization plays a role.
During this session, Corey will show examples of how graph visualization can help users explore, understand and derive insight from real-world cyber security datasets.
You will learn:
• How graph visualization can help you extract insight from cyber data
• How to visualize your cyber security graph data at scale using WebGL
• Why KeyLines 3.0 is the go-to tool for large-scale cyber graph visualization.
This session is suitable for a non-technical audience.
This year’s guide has a particular focus on the United Kingdom, and featured topics include automatic enrolment, pension flexibility and the rise of defined contribution pensions.
El documento presenta un prefacio a la quinta edición de un atlas de fisiología. En él, el autor agradece las contribuciones de varias personas que ayudaron en la elaboración de la nueva edición, incluyendo ilustradores, editores y revisores. También resume los nuevos avances en el conocimiento de la fisiología que se incluyeron en esta edición, particularmente en relación al genoma humano. Finalmente, expresa su deseo de que esta nueva edición continúe siendo útil para estudiantes y profesionales.
Invitación a la feria IMEX Madrid (24 y 25 de abril). País invitado USA. LIFI...Carmen Urbano
Desde LIFI Consultores Internacional os invitamos a acudir a la feria IMEX para la internacionalización. Estaremos presentes con dos stands: LIFI Consultores y Cámara MERCOSUR, junto con un centenar de expositores en el Hotel Auditorium de Madrid.
Inscríbete y ven a conocer nuestras oportunidades y servicios para la internacionalización.
Este artículo analiza la perspectiva desde la cual Max Weber estudia el surgimiento de las religiones universales de salvación, como parte de un proceso histórico-universal de racionalización. Si bien Weber emplea un método histórico-comparativo, su enfoque también implica una filosofía de la historia particular en la que la racionalidad es una fuerza motriz universal. El judaísmo antiguo es visto no solo como antecedente de Occidente, sino también como producto de factores históricos que permitieron un mayor despliegue de la
This document provides an overview and analysis of the global internet TV industry. It includes market statistics, key trends, profiles of major players such as Netflix and Hulu, and predictions for market growth between 2009-2017. The US market for internet TV is analyzed in depth, with statistics on advertising revenues, broadband adoption, and sales of internet-enabled TVs. New internet TV services launched by companies like Microsoft, Sony, and Google are also summarized. The report provides industry professionals with insights into historical performance, current developments, and future outlook for the emerging internet TV sector.
The document discusses flooring solutions provided by Tarkett and Cutting Corners for a hospital project in Northern Ireland. It notes that the client had specific requirements for coved corners and seamless finishes in rooms to meet cleanliness standards. Tarkett vinyl and Cutting Corners' coving systems were used to provide a uniform finish with fully welded and sealed internal corners. The solutions met the client's demanding requirements. The author would specify this system for future projects requiring the same high level of finish.
The document summarizes the services provided by Precision Research and Consulting Private Limited, which operates iData Insights. It conducts primary and secondary marketing research to help companies improve their products and services based on customer desires. It provides actionable recommendations and expertise to help clients succeed now and in the future. The team of research analysts creates reports, newsletters, magazines and databases on trends in the energy sector. Their market intelligence studies provide specific insights to help customers achieve their goals.
Este documento presenta una introducción a OWASP (Open Web Application Security Project), incluyendo su misión de facilitar el desarrollo de aplicaciones seguras, sus herramientas y recursos gratuitos, y su enfoque colaborativo de abordar la seguridad de aplicaciones como un problema que requiere mejoras en personas, procesos y tecnología. También resume la historia y actualizaciones del proyecto OWASP Top 10, el cual identifica los 10 riesgos más críticos de seguridad en aplicaciones.
Este documento proporciona información sobre accesorios para vacío con bridas KF. Describe diferentes tipos de bridas, manguitos, codos, tes, cruces y abrazaderas. Incluye detalles técnicos como tamaños disponibles, materiales, rangos de temperatura y vacío compatibles. El propósito es brindar una guía completa de los componentes estándar disponibles para construir sistemas de vacío.
Tecnología sin zanja para la instalación y rehabilitación de redes de acueduc...Andesco
Luis Guillermo Maldonado, Director ICTIS
Congreso Andesco de Servicios Públicos y TIC 14º Nacional y 5º Internacional, Cartagena Colombia, Junio 27, 28 y 29 de 2012
Este documento presenta una guía didáctica para la enseñanza de la religión católica en 5o año básico. La guía incluye ocho unidades sobre diferentes temas religiosos y ofrece orientaciones para los profesores, incluyendo objetivos, contenidos, actividades y evaluaciones. Además, enfatiza la importancia de usar un texto personal para cada estudiante y un cuaderno complementario para facilitar el aprendizaje y la evaluación del progreso espiritual de cada uno.
Whatsapp para Empresas y WhatsApp en Marketing y atención al clienteJavier Merchán Correa
Seminario de WhatsApp para Empresas, WhatsApp Marketing y Atención al cliente. Introducción sobre SoLoMo, Marketing Mobile y Códigos QR para terminar con la revolución del WhatsApp.
Casos Prácticos, ejemplos de promoción con WhatsApp.
Usos de WhatsApp, los grupos y las listas de difusión.
Permission Marketing.
Configuración de la herramienta en varios dispositivos.
WhatsPro
El documento describe la dinámica empresarial en términos de la cadena de productividad, competitividad y rentabilidad. Explica que la productividad implica mejorar continuamente los procesos de trabajo, la competitividad requiere mantener niveles adecuados de ventas en un nicho de mercado, y la rentabilidad significa generar el máximo ingreso posible en relación con la inversión realizada. La cadena vincula estos tres elementos para lograr el éxito empresarial de manera sostenible.
This document summarizes a presentation on effective tax rates in Ethiopia. It finds that small firms face the highest tax burden due to lower technical capacity and higher compliance costs. Medium sized firms have the lowest tax burden as they benefit from tax minimization strategies. Large firms pay less than small firms but more than medium firms due to greater visibility and enforcement pressure. The results suggest small firms are slightly less compliant with tax payments than larger firms. Overall, the study finds differences in tax burdens across firm sizes and recommends further research and engagement with policymakers to improve tax policy and administration.
El documento describe los diferentes tipos de protecciones eléctricas residenciales, incluyendo interruptores automáticos e interruptores diferenciales. Explica que los interruptores automáticos protegen contra sobrecargas y cortocircuitos, mientras que los interruptores diferenciales protegen contra contactos eléctricos directos e indirectos. Además, destaca la importancia de seleccionar las protecciones adecuadas según el tipo de instalación eléctrica y cumplir con las normas de seguridad eléctrica.
This document summarizes Joyce Travelbee's Human-To-Human Relationship Model of nursing. The model focuses on the central themes of a person finding meaning in illness through suffering and the human-to-human relationship between nurse and patient. Key concepts of the model include suffering, meaning, hope, communication, and the therapeutic use of self. The model also outlines the original encounter between nurse and patient, their emerging identities and empathy, sympathy, and rapport developed in the relationship.
O documento discute os conceitos de acessibilidade e modos de transporte. A acessibilidade às grandes cidades é maior nas regiões mais povoadas e urbanizadas e menor em muitos países em desenvolvimento. A modernização das redes de transporte tem permitido ultrapassar barreiras, melhorar a segurança, reduzir tempos de viagem e custos, e diminuir o consumo de energia. Diferentes modos de transporte como terrestre, aquático e aéreo têm vantagens e desvantagens dependendo da distância e carga transportada.
El documento presenta un prefacio a la quinta edición de un atlas de fisiología. En él, el autor agradece las contribuciones de varias personas que ayudaron en la elaboración de la nueva edición, incluyendo ilustradores, editores y revisores. También resume los nuevos avances en el conocimiento de la fisiología que se incluyeron en esta edición, particularmente en relación al genoma humano. Finalmente, expresa su deseo de que esta nueva edición continúe siendo útil para estudiantes y profesionales.
Invitación a la feria IMEX Madrid (24 y 25 de abril). País invitado USA. LIFI...Carmen Urbano
Desde LIFI Consultores Internacional os invitamos a acudir a la feria IMEX para la internacionalización. Estaremos presentes con dos stands: LIFI Consultores y Cámara MERCOSUR, junto con un centenar de expositores en el Hotel Auditorium de Madrid.
Inscríbete y ven a conocer nuestras oportunidades y servicios para la internacionalización.
Este artículo analiza la perspectiva desde la cual Max Weber estudia el surgimiento de las religiones universales de salvación, como parte de un proceso histórico-universal de racionalización. Si bien Weber emplea un método histórico-comparativo, su enfoque también implica una filosofía de la historia particular en la que la racionalidad es una fuerza motriz universal. El judaísmo antiguo es visto no solo como antecedente de Occidente, sino también como producto de factores históricos que permitieron un mayor despliegue de la
This document provides an overview and analysis of the global internet TV industry. It includes market statistics, key trends, profiles of major players such as Netflix and Hulu, and predictions for market growth between 2009-2017. The US market for internet TV is analyzed in depth, with statistics on advertising revenues, broadband adoption, and sales of internet-enabled TVs. New internet TV services launched by companies like Microsoft, Sony, and Google are also summarized. The report provides industry professionals with insights into historical performance, current developments, and future outlook for the emerging internet TV sector.
The document discusses flooring solutions provided by Tarkett and Cutting Corners for a hospital project in Northern Ireland. It notes that the client had specific requirements for coved corners and seamless finishes in rooms to meet cleanliness standards. Tarkett vinyl and Cutting Corners' coving systems were used to provide a uniform finish with fully welded and sealed internal corners. The solutions met the client's demanding requirements. The author would specify this system for future projects requiring the same high level of finish.
The document summarizes the services provided by Precision Research and Consulting Private Limited, which operates iData Insights. It conducts primary and secondary marketing research to help companies improve their products and services based on customer desires. It provides actionable recommendations and expertise to help clients succeed now and in the future. The team of research analysts creates reports, newsletters, magazines and databases on trends in the energy sector. Their market intelligence studies provide specific insights to help customers achieve their goals.
Este documento presenta una introducción a OWASP (Open Web Application Security Project), incluyendo su misión de facilitar el desarrollo de aplicaciones seguras, sus herramientas y recursos gratuitos, y su enfoque colaborativo de abordar la seguridad de aplicaciones como un problema que requiere mejoras en personas, procesos y tecnología. También resume la historia y actualizaciones del proyecto OWASP Top 10, el cual identifica los 10 riesgos más críticos de seguridad en aplicaciones.
Este documento proporciona información sobre accesorios para vacío con bridas KF. Describe diferentes tipos de bridas, manguitos, codos, tes, cruces y abrazaderas. Incluye detalles técnicos como tamaños disponibles, materiales, rangos de temperatura y vacío compatibles. El propósito es brindar una guía completa de los componentes estándar disponibles para construir sistemas de vacío.
Tecnología sin zanja para la instalación y rehabilitación de redes de acueduc...Andesco
Luis Guillermo Maldonado, Director ICTIS
Congreso Andesco de Servicios Públicos y TIC 14º Nacional y 5º Internacional, Cartagena Colombia, Junio 27, 28 y 29 de 2012
Este documento presenta una guía didáctica para la enseñanza de la religión católica en 5o año básico. La guía incluye ocho unidades sobre diferentes temas religiosos y ofrece orientaciones para los profesores, incluyendo objetivos, contenidos, actividades y evaluaciones. Además, enfatiza la importancia de usar un texto personal para cada estudiante y un cuaderno complementario para facilitar el aprendizaje y la evaluación del progreso espiritual de cada uno.
Whatsapp para Empresas y WhatsApp en Marketing y atención al clienteJavier Merchán Correa
Seminario de WhatsApp para Empresas, WhatsApp Marketing y Atención al cliente. Introducción sobre SoLoMo, Marketing Mobile y Códigos QR para terminar con la revolución del WhatsApp.
Casos Prácticos, ejemplos de promoción con WhatsApp.
Usos de WhatsApp, los grupos y las listas de difusión.
Permission Marketing.
Configuración de la herramienta en varios dispositivos.
WhatsPro
El documento describe la dinámica empresarial en términos de la cadena de productividad, competitividad y rentabilidad. Explica que la productividad implica mejorar continuamente los procesos de trabajo, la competitividad requiere mantener niveles adecuados de ventas en un nicho de mercado, y la rentabilidad significa generar el máximo ingreso posible en relación con la inversión realizada. La cadena vincula estos tres elementos para lograr el éxito empresarial de manera sostenible.
This document summarizes a presentation on effective tax rates in Ethiopia. It finds that small firms face the highest tax burden due to lower technical capacity and higher compliance costs. Medium sized firms have the lowest tax burden as they benefit from tax minimization strategies. Large firms pay less than small firms but more than medium firms due to greater visibility and enforcement pressure. The results suggest small firms are slightly less compliant with tax payments than larger firms. Overall, the study finds differences in tax burdens across firm sizes and recommends further research and engagement with policymakers to improve tax policy and administration.
El documento describe los diferentes tipos de protecciones eléctricas residenciales, incluyendo interruptores automáticos e interruptores diferenciales. Explica que los interruptores automáticos protegen contra sobrecargas y cortocircuitos, mientras que los interruptores diferenciales protegen contra contactos eléctricos directos e indirectos. Además, destaca la importancia de seleccionar las protecciones adecuadas según el tipo de instalación eléctrica y cumplir con las normas de seguridad eléctrica.
This document summarizes Joyce Travelbee's Human-To-Human Relationship Model of nursing. The model focuses on the central themes of a person finding meaning in illness through suffering and the human-to-human relationship between nurse and patient. Key concepts of the model include suffering, meaning, hope, communication, and the therapeutic use of self. The model also outlines the original encounter between nurse and patient, their emerging identities and empathy, sympathy, and rapport developed in the relationship.
O documento discute os conceitos de acessibilidade e modos de transporte. A acessibilidade às grandes cidades é maior nas regiões mais povoadas e urbanizadas e menor em muitos países em desenvolvimento. A modernização das redes de transporte tem permitido ultrapassar barreiras, melhorar a segurança, reduzir tempos de viagem e custos, e diminuir o consumo de energia. Diferentes modos de transporte como terrestre, aquático e aéreo têm vantagens e desvantagens dependendo da distância e carga transportada.
Perl6: Interfaces und Factories für Testdriven Development
1. Interfaces und Factories für
Testdriven Development
Notwendige
Perl6 Erweiterungen
für die Entwicklung großer
Applikationen.
14. Deutscher Perlworkshop
Ralf Peine
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
2. Überblick
Eine reale Fabrik
Vom Code zum testbaren Code
Erweiterungsvorschläge für Perl6
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
3. Ein reale
Fabrik
Gigaset
in Bocholt
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
4. Aufgabe
Verpackung für das neue Supertelefon SL910A
entwickeln und produzieren
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
5. Paketinhalt
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
6. Im Einsatz
Software
▼
Paket
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
7. Herstellung
new Paket();
▼
Paket herstellen
an Gigaset liefern
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
8. Packen
zip(paket);
▼
Paket falten und füllen
Paket auf Palette
Palette in Container auf LKW
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
9. Transport
upload_http(„www/paket.zip“);
▼
Container zu Hafen fahren
Container auf Schiff
Schiff nach Singapur
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
10. Transport (2)
get_http(„www/paket.zip“);
▼
Schiff in Hafen
Container auf LKW
LKW zu Großhändler
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
11. auspacken
unzip(„paket.zip“);
▼
Palette aus Container
Einige Pakete aus Palette nehmen
Pakete an Einzelhändler senden
Pakete in Regal stellen
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
12. Software entwickeln
▼
Paket entwickeln
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
13. Paket-Entwicklung
Paketdesigner ruft bei
Gigaset an:
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
14. Paket-Entwicklung
„Bitte einmal den kompletten
Inhalt des SL910-Pakets!“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
15. Paket-Entwicklung
Gigaset:
„Den gibt es noch nicht!“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
16. Paket-Entwicklung
„Wir entwickeln ja selbst
noch!“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
17. Paket-Entwicklung
Designer:
„Wie soll ich dann das Paket
entwickeln?“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
18. Paket-Entwicklung
Gigaset:
„Wir haben eine
Beschreibung!“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
19. Paket-Entwicklung
„Ihrem Kollegen hat das
ausgereicht!“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
20. Beschreibung ?
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
21. Fabrik Software
▼ ▼
Beschreibung Interface
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
22. Definition SW-Schnittstelle
(Interface)
Wikipedia:
„Eine Schnittstelle gibt an,
welche Methoden vorhanden sind
oder vorhanden sein müssen ...“
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
23. Interfaces
Fabrik Software
Handset IHandset:
{ IGeometrie; IGewicht }
Basis IBasis
Ladeschale ILadeschale
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
25. Gigaset-Fabrik
!!
Produziere Telefon SL910A (INation fuerLand)
()
w
{
IPaket paket = lager.HolePaket(fuerLand).Falten();
ne
bool ok = true;
ok &&= paket.Add(Lager.HoleBasis(fuerLand));
n
ok &&= paket.Add(Lager.HoleHandset(fuerLand));
vo
ok &&= paket.Add(Lager.HoleLadeschale(fuerLand));
ok &&= paket.Add(Lager.HoleNetzteilBasis(fuerLand));
f
ok &&= paket.Add(Lager.HoleNetzteilHS(fuerLand));
# … ru
uf
if (ok) {
A
IGewicht gewicht =
paket.Schließen().Versiegeln().Gewicht;
n
paket = pruefer.Check(paket) if !
ei
IsKorrekt(gewicht);
palette.Add(paket) if paket != null;
K
}
} Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
26. Gigaset unterwegs
VersendeTelefone(IHafen nachHafen)
{
IContainer containerMitTelefonen =
GigasetFactory
.GetContainer(nachHafen); # Nicht etwa
new()
ILkw lkw = Spedition.LkwAnfordern(); # Nicht new()
lkw.aufladen(containerMitTelefonen);
lkw.fahrenZu(nachHafen);
# …
}
# Was sich im Container befindet,
# ist dem Fahrer egal,
# aber nicht dem Empfänger!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
27. Gigaset
Unit-Test
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
28. Implementiert
dieselbe Das Fixture baut
Schnittstelle
wie
Unit-Test die Testumgebung
auf und erzeugt
das Original auch die Testdoubles.
Die Objekte aus der
Wird im System Umgebung des SUT
Folgenden Under werden durch
verwendet Test Testdoubles ersetzt
Eine Einführung in testgetriebene Entwicklung liefert
Martin Fowler:
http://martinfowler.com/bliki/TestDrivenDevelopment.html
http://www.martinfowler.com/bliki/TestDouble.html
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
29. Gigaset Unit-Test (2)
TestFalten()
{
IPaket testObject = testFixture.CreatePaket();
IPaket gefaltetesPaket = testObject.Falten();
testFixture.Validate(gefaltetesPaket.Geometrie);
} # fertig ist der Test!
TestÖffnen() …
TestSchließen() …
TestVersiegeln() …
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
30. Gigaset Unit-Test (3)
Weil Add nur das Interface
TestAdd() # Teil einlegen IBasis als Parameter
{ verlangt, kann hier ein
TestDouble statt einer
# Testvorbereitung Basis übergeben werden!
IPaket testObject
= testFixture.CreatePaket().Falten();
IBasis basisTestDouble
= testFixture.CreateBasisTestDouble();
# Test
testObject.Add(basisTestDouble);
# Validierung
testObject.Schließen(); # Geht zu !!
# Keine Exceptions !!
} # Fertig!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
31. Gigaset Unit-Test (4)
Aber wie
schreibt man
testbaren Code?
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
32. Überleitung
Das wird
im nächsten Teil
des Vortrags erklärt
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
33. 2. Teil
Vom Code
zum
testbaren Code
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
34. Vom Code zum testbaren Code
Aufgabe
Wörter aus einer Webseite zählen und
der Anzahl nach auflisten.
Dazu wird der folgende Code
verwendet, der keinesfalls verändert
werden darf:
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
35. Vom Code zum testbaren Code (2)
my $wordCounter = new WordCounter();
$wordCounter->
CountWordsOfWebFile
($remote_file,
$minimalCount);
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
36. Vom Code zum testbaren Code (3)
Denn dieses Codestück
wird überall verwendet.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
37. Vom Code zum testbaren Code (4)
!!! 27 000 mal !!
!!! Mindestens !!!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
38. Initiale Implementierung
Alles wurde in einer Sub realisiert.
Für ein schnelles Script ist das ok,
aber in einem großen System nicht
testbar.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
39. Initiale Implementierung (2)
Das ist der
kritische Teil
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
40. Initiale Implementierung (3)
Hier ist das Codestück. Selbst aus dem Web lesen,
Aber wo ist das Problem ? das ist schwer zu testen
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
41. 2. Implementierung
Der WordCounter liest selbst aus dem Web
und analysiert in zweiter Methode
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
42. 2. Implementierung (2)
Der kritische Code besteht
nur noch aus 3
Anweisungen
Analyse wurde
in zweite Methode
verschoben
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
43. 3. Implementierung
Der WordCounter liest selbst aus dem Web
mit einer dritten Methode
und analysiert in zweiter Methode
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
44. 3. Implementierung (2)
Web-Datei lesen
wurde in eigene
Methode verschoben
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
45. 3. Implementierung (3) Web-Datei lesen
wurde in eigene
Methode verschoben
Selbst aus dem Web lesen,
das ist immer noch
schwer zu testen
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
46. 4. Implementierung
Der WordCounter lässt
einen WebReader aus dem Web lesen,
den er aber selbst mit new erzeugt.
Die Analyse führt er dann selbst in einer
eigenen Methode durch.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
47. 4. Implementierung (2)
Das „new“ verhindert
Jetzt liest
automatisiertes Testen
der WebReader
ohne Web-Zugriff.
den Inhalt
der Webseite ein
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
48. 5. Implementierung
Der WordCounter lässt
einen WebReader aus dem Web lesen,
den er von einer Factory erzeugen lässt.
Die Factory erzeugt er noch selbst.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
49. 5. Implementierung
Die Factory muss
Das „new“ verhindert
außerhalb
automatisiertes Testen.
erzeugt werden.
Die Factory
erstellt den
WebReader
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
50. 6. Implementierung
Der WordCounter lässt einen WebReader aus
dem Web lesen,
den er von einer Factory erzeugen lässt.
Die Factory erzeugt er nicht mehr selbst, er
verwendet die globale Factory.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
51. 6. Implementierung (3)
Code des
Testrahmens
(außen)
Factory
erstellen und
zuweisen
Normaler
Programmablauf,
kein Testcode!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
52. 6. Implementierung (3)
Code der
Klasse
(innen)
Kein Aufruf
von „new()“
mehr notwendig!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
53. 7. Test-Implementierung
Es muss keine neue Reader-Klasse erstellt werden,
WordCounter ist testbar implementiert.
Im Testrahmen muss nur die Factory angepasst
werden.
Der WordCounter lässt einen Web-Reader aus dem
Web lesen (denkt er !),
den er von einer Factory erzeugen lässt.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
54. 7. Test-Implementierung (2)
Er verwendet die globale Factory, wie in der
vorherigen Implementierung.
Er erhält einen Stub statt der Original-Klasse.
Der Stub liefert nämlich einfach einen
Das ist
festen Text, ohne aus dem Web zu lesen!
der Trick!
Die Analyse führt er dann wie immer selbst in
einer eigenen Methode durch.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
55. 7. Test-Implementierung (3)
Der Test ist jetzt
unabhängig vom Web,
und der Code bleibt
unverändert!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
56. 7. Test-Implementierung (4)
Fertig sind der WebReader oder Test-Stub, Als Klassenvariable
welcher es gerade ist, kann man nie wissen!
Die Factory erzeugt
den WebReader
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
57. 7. Test-Implementierung (5)
Aber jedesmal eine
neue Factory-Klasse
zu schreiben,
ist zu aufwendig...
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
58. 8. Implementierung
Einfacher geht es
mit DI-Containern
statt Factories.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
59. Dependency Injection
Container Aha !
?!? DI-Container ?!?
Etwas ähnliches wie ein Postfach/
Schlüsselboard an der Hotelrezeption
Man fragt einfach nach, ob etwas für
die Instanz/die Klasse hinterlegt
wurde.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
60. Ein DI-Container
Fächer, in denen etwas
Fach mit abgelegt werden kann
WebReaderStub
Fach mit
WebReader
Leeres
Fach
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
61. 8. Implementierung (2)
Der WordCounter muss
für die Verwendung von
DI-Containern
ein letztes Mal
angepasst werden.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
62. 8. Implementierung (3)
Den globalen DiContainer
in Klassenvariablen speichern
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
63. 8. Implementierung (4)
Code der
Klasse Fertig sind der
(innen) WebReader oder Test-Stub,
welcher genau, kann man nie wissen! Statt „new ()“
Schnittstelle des
gesuchten Objekts
Für wen Falls
hinterlegt nichts
hinterlegt
wurde
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
64. 9. Test-Implementierung
Und jetzt einfach über ein Closure etwas
anderes als einen WebReader
hinterlegen
durch
$DiContainer->DepositForCreate(...).
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
65. 9. Test-Implementierung (2)
Für welche
Code des Eine Closure
Instanz /
Testrahmens für die Erzeugung
Klasse
(außen) hinterlegen
hinterlegt
Schnittstelle des
hinterlegten Objekts
Für den Nachfrager Aber nur, falls der
eine Instanz erzeugen WordCounter keinen
WebReader verwenden soll.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
66. 9. Test-Implementierung (3)
Die Implementierung
bleibt unverändert
Diesmal ist es
ein Stub,
der einen
festen Text
liefert und
nicht aus dem
Web liest.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
67. Ziel erreicht!
Der Produktcode
kann unverändert
getestet werden.
Die Änderungen werden
nur im Testrahmen
vorgenommen.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
68. Ziel erreicht (2)!
Es gibt zwei Lösungen:
Diese 2
Beide
Lösungen
Lösungen
decken alle
6. + 7. mit Factories Haben ihre
Einsatzgebiete
Einsatzgebiete
ab.
8. + 9. mit DIContainern
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
69. Überleitung
Aber wann
soll man welche
Lösung wählen ?
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
70. Überleitung
Damit befasst
sich der
letzte Teil
des Vortrags
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
71. Ende Teil 2
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
72. 3. Teil
Erweiterungs-
Vorschläge
für Perl6
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
73. Interfaces
Ein Interface ist
eine abstrakte Role,
in der alle Methoden = undef
gesetzt sind.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
74. Interfaces (2)
Mit einem Unterschied:
In der Role muss
man nachsehen,
ob
noch etwas
implementiert
werden muss.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
75. Interfaces (3)
Ein Interface
muss dagegen
immer
implementiert
werden
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
76. Interfaces (4)
Dieser Teil wird mit
Interfaces überflüssig
role WebReaderRole
{
method ReadWebFile = { … };
}
Huch!
Versehentlich leer definiert!
Damit muss die Methode
in der Ableitung nicht mehr
definiert werden...
role WebReaderRole
{
method ReadWebFile { };
}
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
77. Interfaces (5)
Neues Konvention:
Schlüsselwort: Interfaces beginnen
„interface“ mit „I“
interface IWebReader
{
method ReadWebFile;
}
Keine ungewollte,
leere Implementierung
mehr möglich
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
78. Interfaces (6)
Schlüsselwort Der Name des zu
„impl“ für „implements“, implementierenden
danach folgt ein Interface Interfaces
class WebReader impl IWebReader
{
method ReadWebFile
{ Andere Vorschläge für
das neue KeyWord ?
# … … …
}
}
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
79. Interfaces (7)
Das war schon alles!
Keine weiteren
Syntaxänderungen
notwendig!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
80. Factory oder DI-Container ?
DI-Container
verwendet man immer
dann, wenn man nur
Testdoubles
zum Testen erzeugen muss.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
81. Factory oder DI-Container ? (2)
Eine Factory
verwendet man immer
dann, wenn man
aus mehreren Implementierungs-
Varianten einer Klasse
(zur Laufzeit) eine für den Produktivcode auswählen
möchte.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
82. Factories für UI und GUI
Ein Interface
interface IUiFactory { für eine Factory !
method CreateForm;
method CreateCloseButton;
}
interface IForm impl IWidget {
method Add (IWidget widget);
method Run;
}
interface IButton impl IWidget {
method Push;
}
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
83. Factories für UI und GUI (2)
Diese Variable sollte
zum Hier wird die UiFactory
Standard werden. für alle zentral eingestellt
Sub HelloWorld {
my $uiFactory =
$FactoryService.UiFactory;
my $form = $uiFactory.CreateForm();
my $button
= $uiFactory.CreateCloseButton();
$form.Add($button); Irgendeine UI-Factory
aus der reichhaltigen
$form.Run();
Auswahl
}
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
84. TextUiFactory
AutomaticTestUiFactory
IUiFactory
Ein Gui-Test-
Framework,
?!?
mit dem man
Eingaben und
Ausgaben
aus Dateien lesen IGuiFactory
und schreiben kann.
TkGuiFactory WinForms-
GtkGuiFactory Factory
WxGuiFactory
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
85. Factories für UI und GUI (4)
Damit das möglich ist,
müssten alle diese Guis
dieselben Schnittstellen für
IButton
IForm
...
unterstützen.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
86. Factories für UI und GUI (5)
Vielleicht erleben
wir das ja noch...
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
87. Testdriven Development
Damit sind
in der Perl Syntax
alle Voraussetzungen
für Testdriven-Development
erfüllt.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
88. Testdriven Development (2)
Der Code und der Test
können können
gleichzeitig gleichzeitig
entwickelt entwickelt
werden werden
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
89. Testdriven Development (3)
Zur Entwicklung großer Applikationen
fehlen aber noch
Unit-Test-Frameworks
P-Unit
und (Perl-Unit-Tester)
siehe N-Unit, J-Unit
Mocking-Frameworks
Leichte Erstellung von TestDoubles wie Stubs, Spys und
?!? Mocks,
ohne eigene Klassen schreiben zu müssen
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
90. Zusammenfassung
Beispie Vertrag
Vertrag
l zwischen
zwischen
Code
Vertrag
Entwickler
Entwickler
und Nutzer
und Nutzer
Test-Lib Produkt-Lib
Test 2
Push- TestCode IPushButton
ProductCode
Button-
Test-
Double Optional
ITest-
TestFixture PushButton
Nur
Test- Implementierun PBImpl1 PB2 PB3 Diese
Fixture gs- Klassen
anweisung Sollten
eines new() new() PB.new()
anderen aufrufen
Factory1 F2 F3
Tests
IUIFactory
DIContainer
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
91. Abschluss
Gibt es denn überhaupt
große Perl-Applikationen?
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
92. Abschluss (2)
Ja, und sogar eine,
die hier jeder kennt!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
93. Abschluss (3)
Eine,
die davon sehr
profitieren würde.
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
94. CPAN!!
Interfaces und Factories für Testdriven Development
Ralf Peine 14. Deutscher Perlworkshop 2012
Hinweis der Redaktion
Bevor ich Factories in der SW-Entwicklung vorstelle, möchte ich zunächst in eine reale Fabrik schauen. Denn hier sind die für die SW neuen Komponenten schon länger im Einsatz.
Hier werden Telefone entwickelt, gefertigt und verpackt.
Jetzt drehen wir das Ganze mal um Und Lernen von der Paketentwicklung für die SW-Entwicklung.
Hier noch im SourceCode-Beispiel WordReader durch WordCounter ersetzen.