SlideShare a Scribd company logo
Expressive
Design
(in 20 minutes)
            phillip calçado
         http://fragmental.tw
javamail usage
I want this CSV
report delivered
  as an e-mail
  attachment
1st Try
public class Mail {

	   public void sendEmailWithCsvFile(String from, String to, String subject,
	   	    	   String body, List<String> csvFileLines) {

	   	    Properties props = new Properties();
	   	    props.put(quot;mail.smtp.hostquot;, quot;localhostquot;);

	   	    Session session = Session.getDefaultInstance(props);

	   	    MimeMessage msg = new MimeMessage(session);

	   	    msg.setFrom(new InternetAddress(from));

    	    InternetAddress[] address = { new InternetAddress(to) };	   	
    	    msg.setRecipients(Message.RecipientType.TO, address);
	   	    msg.setSubject(subject);
	   	    msg.setSentDate(new Date());

	   	    MimeBodyPart part1 = new MimeBodyPart();
	   	    part1.setText(body);

	   	    MimeBodyPart part2 = new MimeBodyPart();
	   	    StringBuffer buffer = new StringBuffer();
	   	    for (String line : csvFileLines)
	   	    	    buffer.append(line + quot;nquot;);
	   	    part2.setContent(buffer.toString(), quot;text/csvquot;);
	   	    part2.setFileName(quot;file.csvquot;);

	   	    Multipart mp = new MimeMultipart();
	   	    mp.addBodyPart(part1);
	   	    mp.addBodyPart(part2);

	   	    msg.setContent(mp);

	   	    Transport.send(msg);	   }
}
Message.RecipientType
I want this CSV
report delivered   InternetAddress      Multipart
  as an e-mail
  attachment
                    MimeMessage      MimeBodyPart


                       Session        Properties
2nd Try
public class Mail {

	   public void sendEmailWithCsvFile(String from, String to, String subject,
	   	    	   String body, List<String> csvFileLines) {

	   	    Properties props = new Properties();
	   	    props.put(quot;mail.smtp.hostquot;, quot;localhostquot;);
	   	    MailService mailService = new MailService(props);
	   	    MailMessage message = mailService.newMessage();
	   	    message.setFrom(from);
	   	    message.setTo(to);
	   	    message.setSubject(subject);
	   	    message.setBody(body);

	   	    StringBuffer buffer = new StringBuffer();
	   	    for (String line : csvFileLines)
	   	    	    buffer.append(line + quot;nquot;);
	   	    Attachment csvFile = new Attachment(quot;file.csvquot;, buffer.toString());
	   	    message.attach(csvFile);

	   	    mailService.send(message);
	   }
}
I want this CSV    MailMessage   Attachment
report delivered
  as an e-mail
                   MailService   Properties
  attachment
3rd Try
public class Mail {

	   public void sendEmailWithCsvFile(String from, String to, String subject,
	   	    	   String body, List<String> csvFileLines) {

	   	    StringBuffer buffer = new StringBuffer();
	   	    for (String line : csvFileLines)
	   	    	    buffer.append(line + quot;nquot;);
	   	
	   	    Properties props = new Properties();
	   	    props.put(quot;mail.smtp.hostquot;, quot;localhostquot;);
	   	
	   	    MailService mailService = new MailService(props);
	   	    mailService.newMessage()
	   	    	    .from(from)
	   	    	    .to(to)
	   	    	    .subject(subject)
	   	    	    .body(body)
	   	    	    .attachTextFile(quot;file3.csvquot;, buffer.toString())
	   	    	    .send();
	   }
}
send_email do
    to 'pcalcado@gmail.com'
    from 'bemaia@fragmental.tw'
    subject 'Testing via Ruby'

      body %{
          Hi,
          Please do not forget the milk.
          Bye!
      }

      attachment('file4.csv') << lines
end
I want this CSV      E-mail
report delivered
  as an e-mail
                   Attachment
  attachment
what just
happened?
Noise   Reduction
Noise
                   the difference between


I want this CSV                               E-mail
report delivered
  as an e-mail
                                            Attachment
  attachment
Noise
                   the difference between


I want this CSV                               E-mail
report delivered
    This
  as an e-mail
                                            Attachment
  attachment
Noise
                   the difference between


I want this CSV                             E-mail
report delivered
    This                                That
  as an e-mail
                                        Attachment
  attachment
Noise
           the difference between

Business      Analysis      Design                                       Implementation

                                                                            public class Something{
                            Class Name                      Class Name
                         Attribute                       Attribute
                         Attribute                       Attribute
                                                                                private String name;
                         Operation                       Operation
                         Operation                       Operation


                                                                                 public boolean doS(){
                                                                                 }
                                            Class Name
                                         Attribute

                                                                            }
                                         Attribute
                                         Operation
                                         Operation




This                                                                       That
the goal
I want this CSV
report delivered
  as an e-mail
  attachment
I want this CSV
report delivered
  as an e-mail
         E-mail


  attachment
I want this CSV
report delivered
  as an e-mailE-mail


  attachment
     Attachment
the techniques
Noise




Idiomatic”
   Java



        Domain-Driven
            Design
                        Internal DSL

                                  External DSL?
“Idiomatic”: Focus on how to use
              technical tools to solve the
              problem in an efficient way.

              Domain-Driven: Language is only a
              tool to model the domain.


              Internal DSL: Language is only an
:internal {
              extensible tool to model the
    DSL
              domain.
}

              External DSL: Language is created
              based on the domain.
“Idiomatic”: TFocus on how to use
                              DO: a
                            O             e
                               e d r n am
              technical toolsr thato solve the
                            Ne te
                              be t     t
                                fo
              problem in an efficient way.

              Domain-Driven: Language is only a
              tool to model the domain.


              Internal DSL: Language is only an
:internal {
              extensible tool to model the
    DSL
              domain.
}

              External DSL: Language is created
              based on the domain.
Thanks




http://fragmental.tw
pics
•   http://www.flickr.com/photos/bitzi/293673587/


•   http://www.flickr.com/photos/sage/2143086954/

•   http://www.flickr.com/photos/brianmitchell/2113553867/


•   http://www.flickr.com/photos/kamaski/186266747/

•   http://www.flickr.com/photos/tosawyer/43691981/


•   http://www.flickr.com/photos/helderfontenele/2134684620/

•   http://www.flickr.com/photos/sotto1/808195510/

More Related Content

What's hot

Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part IIIntro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
Blue Elephant Consulting
 
Numerical Data And Expression
Numerical Data And ExpressionNumerical Data And Expression
Numerical Data And Expression
PRN USM
 
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To  Classes, Objects, & StringsIntro To C++ - Class 05 - Introduction To  Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Blue Elephant Consulting
 
Kotlin- Basic to Advance
Kotlin- Basic to Advance Kotlin- Basic to Advance
Kotlin- Basic to Advance
Coder Tech
 
Domain specific languages and Scala
Domain specific languages and ScalaDomain specific languages and Scala
Domain specific languages and Scala
Filip Krikava
 
Lecture Notes
Lecture NotesLecture Notes
Lecture Notes
Dwight Sabio
 
01 Java Language And OOP PART I
01 Java Language And OOP PART I01 Java Language And OOP PART I
01 Java Language And OOP PART I
Hari Christian
 
Beamer tutorial
Beamer tutorialBeamer tutorial
Beamer tutorial
muhamad khanif
 
Coveney pig lecture
Coveney pig lectureCoveney pig lecture
Coveney pig lecture
Seven Nguyen
 
Europeana and RDF data validation
Europeana and RDF data validationEuropeana and RDF data validation
Europeana and RDF data validation
Antoine Isaac
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programming
Neelesh Shukla
 

What's hot (11)

Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part IIIntro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
Intro To C++ - Class 06 - Introduction To Classes, Objects, & Strings, Part II
 
Numerical Data And Expression
Numerical Data And ExpressionNumerical Data And Expression
Numerical Data And Expression
 
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To  Classes, Objects, & StringsIntro To C++ - Class 05 - Introduction To  Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
 
Kotlin- Basic to Advance
Kotlin- Basic to Advance Kotlin- Basic to Advance
Kotlin- Basic to Advance
 
Domain specific languages and Scala
Domain specific languages and ScalaDomain specific languages and Scala
Domain specific languages and Scala
 
Lecture Notes
Lecture NotesLecture Notes
Lecture Notes
 
01 Java Language And OOP PART I
01 Java Language And OOP PART I01 Java Language And OOP PART I
01 Java Language And OOP PART I
 
Beamer tutorial
Beamer tutorialBeamer tutorial
Beamer tutorial
 
Coveney pig lecture
Coveney pig lectureCoveney pig lecture
Coveney pig lecture
 
Europeana and RDF data validation
Europeana and RDF data validationEuropeana and RDF data validation
Europeana and RDF data validation
 
Object-oriented programming
Object-oriented programmingObject-oriented programming
Object-oriented programming
 

Similar to Expressive Design (in 20 minutes)

Xbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for JavaXbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for Java
meysholdt
 
Intake 37 ef2
Intake 37 ef2Intake 37 ef2
Intake 37 ef2
Mahmoud Ouf
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
Tomas Petricek
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the Web
Eelco Visser
 
Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyas
rsnarayanan
 
Intake 38 data access 5
Intake 38 data access 5Intake 38 data access 5
Intake 38 data access 5
Mahmoud Ouf
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
James Johnson
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
salonityagi
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
ukdpe
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
intelliyole
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
Sven Efftinge
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
bwullems
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax Definition
Eelco Visser
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
Satish Verma
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
Bastian Feder
 
iOS Application Development
iOS Application DevelopmentiOS Application Development
iOS Application Development
Compare Infobase Limited
 
Angular Schematics
Angular SchematicsAngular Schematics
Angular Schematics
Christoffer Noring
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
fganora
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
Matt Todd
 
Tech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective IntelligenceTech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective Intelligence
Robert Pickering
 

Similar to Expressive Design (in 20 minutes) (20)

Xbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for JavaXbase - Implementing Domain-Specific Languages for Java
Xbase - Implementing Domain-Specific Languages for Java
 
Intake 37 ef2
Intake 37 ef2Intake 37 ef2
Intake 37 ef2
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
 
Linguistic Abstraction for the Web
Linguistic Abstraction for the WebLinguistic Abstraction for the Web
Linguistic Abstraction for the Web
 
Overview Of .Net 4.0 Sanjay Vyas
Overview Of .Net 4.0   Sanjay VyasOverview Of .Net 4.0   Sanjay Vyas
Overview Of .Net 4.0 Sanjay Vyas
 
Intake 38 data access 5
Intake 38 data access 5Intake 38 data access 5
Intake 38 data access 5
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)Mike Taulty OData (NxtGen User Group UK)
Mike Taulty OData (NxtGen User Group UK)
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax Definition
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
iOS Application Development
iOS Application DevelopmentiOS Application Development
iOS Application Development
 
Angular Schematics
Angular SchematicsAngular Schematics
Angular Schematics
 
MuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation languageMuleSoft DataWeave data transformation language
MuleSoft DataWeave data transformation language
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
 
Tech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective IntelligenceTech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective Intelligence
 

More from Phil Calçado

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
Phil Calçado
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
Phil Calçado
 
The Economics of Microservices (redux)
The Economics of Microservices (redux)The Economics of Microservices (redux)
The Economics of Microservices (redux)
Phil Calçado
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
Phil Calçado
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
Phil Calçado
 
Ten Years of Failing Microservices
Ten Years of Failing MicroservicesTen Years of Failing Microservices
Ten Years of Failing Microservices
Phil Calçado
 
The Next Generation of Microservices
The Next Generation of MicroservicesThe Next Generation of Microservices
The Next Generation of Microservices
Phil Calçado
 
The Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 BrisbaneThe Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 Brisbane
Phil Calçado
 
The Economics of Microservices (2017 CraftConf)
The Economics of Microservices  (2017 CraftConf)The Economics of Microservices  (2017 CraftConf)
The Economics of Microservices (2017 CraftConf)
Phil Calçado
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Phil Calçado
 
Finagle @ SoundCloud
Finagle @ SoundCloudFinagle @ SoundCloud
Finagle @ SoundCloud
Phil Calçado
 
A Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing OrganisationsA Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing Organisations
Phil Calçado
 
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Phil Calçado
 
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionRhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Phil Calçado
 
ScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a FunctionScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a Function
Phil Calçado
 
Finagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloudFinagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloud
Phil Calçado
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real app
Phil Calçado
 
APIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog FoodAPIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog Food
Phil Calçado
 
Evolutionary Architecture at Work
Evolutionary  Architecture at WorkEvolutionary  Architecture at Work
Evolutionary Architecture at Work
Phil Calçado
 
Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in Scala
Phil Calçado
 

More from Phil Calçado (20)

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
 
The Economics of Microservices (redux)
The Economics of Microservices (redux)The Economics of Microservices (redux)
The Economics of Microservices (redux)
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
 
Ten Years of Failing Microservices
Ten Years of Failing MicroservicesTen Years of Failing Microservices
Ten Years of Failing Microservices
 
The Next Generation of Microservices
The Next Generation of MicroservicesThe Next Generation of Microservices
The Next Generation of Microservices
 
The Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 BrisbaneThe Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 Brisbane
 
The Economics of Microservices (2017 CraftConf)
The Economics of Microservices  (2017 CraftConf)The Economics of Microservices  (2017 CraftConf)
The Economics of Microservices (2017 CraftConf)
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
 
Finagle @ SoundCloud
Finagle @ SoundCloudFinagle @ SoundCloud
Finagle @ SoundCloud
 
A Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing OrganisationsA Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing Organisations
 
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
 
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionRhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a Function
 
ScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a FunctionScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a Function
 
Finagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloudFinagle-Based Microservices at SoundCloud
Finagle-Based Microservices at SoundCloud
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real app
 
APIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog FoodAPIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog Food
 
Evolutionary Architecture at Work
Evolutionary  Architecture at WorkEvolutionary  Architecture at Work
Evolutionary Architecture at Work
 
Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in Scala
 

Recently uploaded

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
Toru Wonyoung Choi
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
Axel Rennoch
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
bellared2
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
Safe Software
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 

Recently uploaded (20)

Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
 
Data Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining DataData Integration Basics: Merging & Joining Data
Data Integration Basics: Merging & Joining Data
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 

Expressive Design (in 20 minutes)

  • 1. Expressive Design (in 20 minutes) phillip calçado http://fragmental.tw
  • 3. I want this CSV report delivered as an e-mail attachment
  • 5. public class Mail { public void sendEmailWithCsvFile(String from, String to, String subject, String body, List<String> csvFileLines) { Properties props = new Properties(); props.put(quot;mail.smtp.hostquot;, quot;localhostquot;); Session session = Session.getDefaultInstance(props); MimeMessage msg = new MimeMessage(session); msg.setFrom(new InternetAddress(from)); InternetAddress[] address = { new InternetAddress(to) }; msg.setRecipients(Message.RecipientType.TO, address); msg.setSubject(subject); msg.setSentDate(new Date()); MimeBodyPart part1 = new MimeBodyPart(); part1.setText(body); MimeBodyPart part2 = new MimeBodyPart(); StringBuffer buffer = new StringBuffer(); for (String line : csvFileLines) buffer.append(line + quot;nquot;); part2.setContent(buffer.toString(), quot;text/csvquot;); part2.setFileName(quot;file.csvquot;); Multipart mp = new MimeMultipart(); mp.addBodyPart(part1); mp.addBodyPart(part2); msg.setContent(mp); Transport.send(msg); } }
  • 6. Message.RecipientType I want this CSV report delivered InternetAddress Multipart as an e-mail attachment MimeMessage MimeBodyPart Session Properties
  • 8. public class Mail { public void sendEmailWithCsvFile(String from, String to, String subject, String body, List<String> csvFileLines) { Properties props = new Properties(); props.put(quot;mail.smtp.hostquot;, quot;localhostquot;); MailService mailService = new MailService(props); MailMessage message = mailService.newMessage(); message.setFrom(from); message.setTo(to); message.setSubject(subject); message.setBody(body); StringBuffer buffer = new StringBuffer(); for (String line : csvFileLines) buffer.append(line + quot;nquot;); Attachment csvFile = new Attachment(quot;file.csvquot;, buffer.toString()); message.attach(csvFile); mailService.send(message); } }
  • 9. I want this CSV MailMessage Attachment report delivered as an e-mail MailService Properties attachment
  • 11. public class Mail { public void sendEmailWithCsvFile(String from, String to, String subject, String body, List<String> csvFileLines) { StringBuffer buffer = new StringBuffer(); for (String line : csvFileLines) buffer.append(line + quot;nquot;); Properties props = new Properties(); props.put(quot;mail.smtp.hostquot;, quot;localhostquot;); MailService mailService = new MailService(props); mailService.newMessage() .from(from) .to(to) .subject(subject) .body(body) .attachTextFile(quot;file3.csvquot;, buffer.toString()) .send(); } }
  • 12. send_email do to 'pcalcado@gmail.com' from 'bemaia@fragmental.tw' subject 'Testing via Ruby' body %{ Hi, Please do not forget the milk. Bye! } attachment('file4.csv') << lines end
  • 13. I want this CSV E-mail report delivered as an e-mail Attachment attachment
  • 15. Noise Reduction
  • 16. Noise the difference between I want this CSV E-mail report delivered as an e-mail Attachment attachment
  • 17. Noise the difference between I want this CSV E-mail report delivered This as an e-mail Attachment attachment
  • 18. Noise the difference between I want this CSV E-mail report delivered This That as an e-mail Attachment attachment
  • 19. Noise the difference between Business Analysis Design Implementation public class Something{ Class Name Class Name Attribute Attribute Attribute Attribute private String name; Operation Operation Operation Operation public boolean doS(){ } Class Name Attribute } Attribute Operation Operation This That
  • 21. I want this CSV report delivered as an e-mail attachment
  • 22. I want this CSV report delivered as an e-mail E-mail attachment
  • 23. I want this CSV report delivered as an e-mailE-mail attachment Attachment
  • 25. Noise Idiomatic” Java Domain-Driven Design Internal DSL External DSL?
  • 26. “Idiomatic”: Focus on how to use technical tools to solve the problem in an efficient way. Domain-Driven: Language is only a tool to model the domain. Internal DSL: Language is only an :internal { extensible tool to model the DSL domain. } External DSL: Language is created based on the domain.
  • 27. “Idiomatic”: TFocus on how to use DO: a O e e d r n am technical toolsr thato solve the Ne te be t t fo problem in an efficient way. Domain-Driven: Language is only a tool to model the domain. Internal DSL: Language is only an :internal { extensible tool to model the DSL domain. } External DSL: Language is created based on the domain.
  • 29. pics • http://www.flickr.com/photos/bitzi/293673587/ • http://www.flickr.com/photos/sage/2143086954/ • http://www.flickr.com/photos/brianmitchell/2113553867/ • http://www.flickr.com/photos/kamaski/186266747/ • http://www.flickr.com/photos/tosawyer/43691981/ • http://www.flickr.com/photos/helderfontenele/2134684620/ • http://www.flickr.com/photos/sotto1/808195510/