SlideShare una empresa de Scribd logo
1 de 44
Hierarchy The Next Step in the Java Language Created by
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object]
Today’s talk ,[object Object],[object Object],[object Object],[object Object],[object Object]
Part 1 – Introduction to Hierarchy
What is Hierarchy? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchy is a Meta-Compiler Pure Java file public class MyClass { public void myMethod() { String myVar = MyMatrix:>SomeData; } } Embedded Java file Hierarchy public class MyClass { public void myMethod() { String myVar = MyMatrix.get_FieldSet() .getField_SomeData(); } }
What does Hierarchy Add to Java? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Willie’s Petstore ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WilliesPetstore.matrix  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WilliesPetstore.matrix  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Descriptors Field Sets
News_Schema.schema News_Schema.schema package com.williespetstore; SCHEMA News.Schema { DESCRIPTOR +:%NEWS { FIELD.NAMES: { +:%NewsSectionName }; FIELD.TYPES: { :String }; DESCRIPTOR +:%NEWS.STORY { FIELD.NAMES: { +:%StoryDate, +:%Title, +:%StoryContent }; FIELD.DESC: { "The date of the story", "The title of the story", "The content of the story" }; FIELD.TYPES: { +:"java.util.Date", :String,    :String }; } } }  AVAILABLE ON HANDOUT
News_Schema.schema News_Schema.schema package com.williespetstore; SCHEMA News.Schema { DESCRIPTOR +:%NEWS { FIELD.NAMES: { +:%NewsSectionName }; FIELD.TYPES: { :String }; DESCRIPTOR +:%NEWS.STORY { FIELD.NAMES: { +:%StoryDate, +:%Title, +:%StoryContent }; FIELD.DESC: { "The date of the story", "The title of the story", "The content of the story" }; FIELD.TYPES: { +:"java.util.Date", :String,    :String }; } } }  * Notice Field definitions line up vertically Field Set Definitions Descriptor Definitions
How do Schemas Work? AVAILABLE ON HANDOUT
WilliesPetStoreConsoleApp.mjava ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Output from Willie’s Petstore Console App ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
End of Part 1 – Introduction on How to use Hierarchy  ,[object Object],[object Object],[object Object]
Part 2 – The Benefits of Using Hierarchy in Your Systems …also, techniques to use hierarchical data effectively in system architectures
How is Hierarchy Useful? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Current XML technologies work fine, don’t they? ,[object Object],[object Object],[object Object]
Why use Hierarchy? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Why use Hierarchy? (cont) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchy combines the best of both these technologies ,[object Object],[object Object]
Next usage of Hierarchical Data: Universal Data Definition Questions?
Problems with defining fields ,[object Object],[object Object],. . . Address Last name First name
Fields defined in multiple places DB hibernate.cfg.xml public class MyClass { String firstName; String lastName; } JSF or JSP or HTML page Javascript JSON object
Universal Data Definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Another look at previous slide… DB hibernate.cfg.xml public class MyClass { String firstName; String last Name } JSF or JSP or HTML page Javascript JSON object
Persistence for Hierarchy ,[object Object],[object Object],[object Object]
One Technology for multiple uses ,[object Object],[object Object],[object Object],[object Object]
Future of Hierarchy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Future of Hierarchy (cont) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Please Contribute your Time! change Java
Thank you! Optional Extra Material: N-Dimensional Architecture Before Proceeding,  Any Questions?
New architectures with Hierarchical Data ,[object Object],[object Object],[object Object],[object Object],[object Object]
Real World Results of Collecting Settings into Matrices ,[object Object],[object Object],[object Object]
Past & Current Architectures ,[object Object],[object Object]
Structural-Programming Sample Architecture main() main() { initialize(); run(); cleanup(); } initialize() run() cleanup() getConn() gatherNews() formatNews() News App
Pros & Cons of Structural Programming ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object-Oriented Sample Architecture NewsGatherer initialize(); gatherNews(); NewsCollection initialize(); getData(); NewsFormatter cleanData(); formatData(); NewsDisplay displayNewsData(); NewsFormatter cleanData(); formatData(); Model Objects View Objects
Pros & Cons of Object-Oriented ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
N-Dimensional Architecture Sample Control Layer Execution Layer Services Layer News Settings  – contains settings across entire app Presentation Cross-Section Business Logic Cross-Section NewsGatherer Service  Gathers news from collections HTML Table Renderer  Displays news in tables View-Related Services Data-Related Services NewsView Worker  Displays news as HTML News Scheduler  Schedules news gathering News  – wrapper for entire news service
N-Dimensional Architecture Summary ,[object Object],[object Object],[object Object]
N-Dimensional Architecture Pros & Cons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You  Q & A and Discussion About Taking on your Own Software Ideas Peter Joh [email_address] www.unconventionalthinking.net

Más contenido relacionado

La actualidad más candente

Semantic Technologies: Representing Semantic Data
Semantic Technologies: Representing Semantic DataSemantic Technologies: Representing Semantic Data
Semantic Technologies: Representing Semantic Data
Matthew Rowe
 

La actualidad más candente (19)

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
A Semantic Data Model for Web Applications
A Semantic Data Model for Web ApplicationsA Semantic Data Model for Web Applications
A Semantic Data Model for Web Applications
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 
State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
Semantic Technologies: Representing Semantic Data
Semantic Technologies: Representing Semantic DataSemantic Technologies: Representing Semantic Data
Semantic Technologies: Representing Semantic Data
 
(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages
 
It's 2017, and I still want to sell you a graph database
It's 2017, and I still want to sell you a graph databaseIt's 2017, and I still want to sell you a graph database
It's 2017, and I still want to sell you a graph database
 
Working with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache SolrWorking with deeply nested documents in Apache Solr
Working with deeply nested documents in Apache Solr
 
Working with Deeply Nested Documents in Apache Solr: Presented by Anshum Gupt...
Working with Deeply Nested Documents in Apache Solr: Presented by Anshum Gupt...Working with Deeply Nested Documents in Apache Solr: Presented by Anshum Gupt...
Working with Deeply Nested Documents in Apache Solr: Presented by Anshum Gupt...
 
From SQL to SPARQL
From SQL to SPARQLFrom SQL to SPARQL
From SQL to SPARQL
 
Intro to Neo4j - Nicole White
Intro to Neo4j - Nicole WhiteIntro to Neo4j - Nicole White
Intro to Neo4j - Nicole White
 
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
What/How to do with GraphQL? - Valentyn Ostakh (ENG) | Ruby Meditation 27
 
The design, architecture, and tradeoffs of FluidDB
The design, architecture, and tradeoffs of FluidDBThe design, architecture, and tradeoffs of FluidDB
The design, architecture, and tradeoffs of FluidDB
 
Fire-fighting java big data problems
Fire-fighting java big data problemsFire-fighting java big data problems
Fire-fighting java big data problems
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010Consuming Linked Data SemTech2010
Consuming Linked Data SemTech2010
 

Similar a Why Java Needs Hierarchical Data

Ajax Fundamentals Web Applications
Ajax Fundamentals Web ApplicationsAjax Fundamentals Web Applications
Ajax Fundamentals Web Applications
dominion
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
Jay Luker
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudies
Hellen Gakuruh
 
CIS407AWk2iLabDefault.aspx Greetings and Salutations.docx
CIS407AWk2iLabDefault.aspx        Greetings and Salutations.docxCIS407AWk2iLabDefault.aspx        Greetings and Salutations.docx
CIS407AWk2iLabDefault.aspx Greetings and Salutations.docx
clarebernice
 
computer notes - Data Structures - 1
computer notes - Data Structures - 1computer notes - Data Structures - 1
computer notes - Data Structures - 1
ecomputernotes
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScript
dominion
 

Similar a Why Java Needs Hierarchical Data (20)

Itemscript, a specification for RESTful JSON integration
Itemscript, a specification for RESTful JSON integrationItemscript, a specification for RESTful JSON integration
Itemscript, a specification for RESTful JSON integration
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
REST dojo Comet
REST dojo CometREST dojo Comet
REST dojo Comet
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and Dashboards
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
 
IBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileIBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for Mobile
 
Cool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearchCool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearch
 
Ajax Fundamentals Web Applications
Ajax Fundamentals Web ApplicationsAjax Fundamentals Web Applications
Ajax Fundamentals Web Applications
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
 
Ext Js
Ext JsExt Js
Ext Js
 
Mashups in the Information Technology Classroom
Mashups in the Information Technology ClassroomMashups in the Information Technology Classroom
Mashups in the Information Technology Classroom
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4
 
SessionTen_CaseStudies
SessionTen_CaseStudiesSessionTen_CaseStudies
SessionTen_CaseStudies
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Computer notes - data structures
Computer notes - data structuresComputer notes - data structures
Computer notes - data structures
 
CIS407AWk2iLabDefault.aspx Greetings and Salutations.docx
CIS407AWk2iLabDefault.aspx        Greetings and Salutations.docxCIS407AWk2iLabDefault.aspx        Greetings and Salutations.docx
CIS407AWk2iLabDefault.aspx Greetings and Salutations.docx
 
computer notes - Data Structures - 1
computer notes - Data Structures - 1computer notes - Data Structures - 1
computer notes - Data Structures - 1
 
WPF and Databases
WPF and DatabasesWPF and Databases
WPF and Databases
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScript
 

Más de Marakana Inc.

Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Marakana Inc.
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Marakana Inc.
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
Marakana Inc.
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
Marakana Inc.
 

Más de Marakana Inc. (20)

Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
JRuby at Square
JRuby at SquareJRuby at Square
JRuby at Square
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Martin Odersky: What's next for Scala
Martin Odersky: What's next for ScalaMartin Odersky: What's next for Scala
Martin Odersky: What's next for Scala
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Securing Android
Securing AndroidSecuring Android
Securing Android
 
Pictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User GroupPictures from "Learn about RenderScript" meetup at SF Android User Group
Pictures from "Learn about RenderScript" meetup at SF Android User Group
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
 
2010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-62010 07-18.wa.rails tdd-6
2010 07-18.wa.rails tdd-6
 
Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
 
What's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovationWhat's this jQuery? Where it came from, and how it will drive innovation
What's this jQuery? Where it came from, and how it will drive innovation
 
jQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda KatzjQuery State of the Union - Yehuda Katz
jQuery State of the Union - Yehuda Katz
 
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
Pics from: "James Gosling on Apple, Apache, Google, Oracle and the Future of ...
 
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram ArnoldEfficient Rails Test Driven Development (class 4) by Wolfram Arnold
Efficient Rails Test Driven Development (class 4) by Wolfram Arnold
 
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram ArnoldEfficient Rails Test Driven Development (class 3) by Wolfram Arnold
Efficient Rails Test Driven Development (class 3) by Wolfram Arnold
 
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas EneboLearn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
Learn about JRuby Internals from one of the JRuby Lead Developers, Thomas Enebo
 
Replacing Java Incrementally
Replacing Java IncrementallyReplacing Java Incrementally
Replacing Java Incrementally
 
Learn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache BuildrLearn to Build like you Code with Apache Buildr
Learn to Build like you Code with Apache Buildr
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Why Java Needs Hierarchical Data

  • 1. Hierarchy The Next Step in the Java Language Created by
  • 2.
  • 3.
  • 4. Part 1 – Introduction to Hierarchy
  • 5.
  • 6. Hierarchy is a Meta-Compiler Pure Java file public class MyClass { public void myMethod() { String myVar = MyMatrix:>SomeData; } } Embedded Java file Hierarchy public class MyClass { public void myMethod() { String myVar = MyMatrix.get_FieldSet() .getField_SomeData(); } }
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. News_Schema.schema News_Schema.schema package com.williespetstore; SCHEMA News.Schema { DESCRIPTOR +:%NEWS { FIELD.NAMES: { +:%NewsSectionName }; FIELD.TYPES: { :String }; DESCRIPTOR +:%NEWS.STORY { FIELD.NAMES: { +:%StoryDate, +:%Title, +:%StoryContent }; FIELD.DESC: { "The date of the story", "The title of the story", "The content of the story" }; FIELD.TYPES: { +:"java.util.Date", :String, :String }; } } } AVAILABLE ON HANDOUT
  • 12. News_Schema.schema News_Schema.schema package com.williespetstore; SCHEMA News.Schema { DESCRIPTOR +:%NEWS { FIELD.NAMES: { +:%NewsSectionName }; FIELD.TYPES: { :String }; DESCRIPTOR +:%NEWS.STORY { FIELD.NAMES: { +:%StoryDate, +:%Title, +:%StoryContent }; FIELD.DESC: { "The date of the story", "The title of the story", "The content of the story" }; FIELD.TYPES: { +:"java.util.Date", :String, :String }; } } } * Notice Field definitions line up vertically Field Set Definitions Descriptor Definitions
  • 13. How do Schemas Work? AVAILABLE ON HANDOUT
  • 14.
  • 15.
  • 16.
  • 17. Part 2 – The Benefits of Using Hierarchy in Your Systems …also, techniques to use hierarchical data effectively in system architectures
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Next usage of Hierarchical Data: Universal Data Definition Questions?
  • 24.
  • 25. Fields defined in multiple places DB hibernate.cfg.xml public class MyClass { String firstName; String lastName; } JSF or JSP or HTML page Javascript JSON object
  • 26.
  • 27. Another look at previous slide… DB hibernate.cfg.xml public class MyClass { String firstName; String last Name } JSF or JSP or HTML page Javascript JSON object
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Please Contribute your Time! change Java
  • 33. Thank you! Optional Extra Material: N-Dimensional Architecture Before Proceeding, Any Questions?
  • 34.
  • 35.
  • 36.
  • 37. Structural-Programming Sample Architecture main() main() { initialize(); run(); cleanup(); } initialize() run() cleanup() getConn() gatherNews() formatNews() News App
  • 38.
  • 39. Object-Oriented Sample Architecture NewsGatherer initialize(); gatherNews(); NewsCollection initialize(); getData(); NewsFormatter cleanData(); formatData(); NewsDisplay displayNewsData(); NewsFormatter cleanData(); formatData(); Model Objects View Objects
  • 40.
  • 41. N-Dimensional Architecture Sample Control Layer Execution Layer Services Layer News Settings – contains settings across entire app Presentation Cross-Section Business Logic Cross-Section NewsGatherer Service Gathers news from collections HTML Table Renderer Displays news in tables View-Related Services Data-Related Services NewsView Worker Displays news as HTML News Scheduler Schedules news gathering News – wrapper for entire news service
  • 42.
  • 43.
  • 44. Thank You Q & A and Discussion About Taking on your Own Software Ideas Peter Joh [email_address] www.unconventionalthinking.net

Notas del editor

  1. Relax, Breath, Smile Briefly introduce yourself, what you’re going to talk about, and when it’s appropriate to ask questions. Talk about your dev background
  2. FIRST summarize your talk: Created extensions to Java for hierarchical data Even though we’re talking about specific tool today that you may never use, you should still find value in this talk: Also talk about how to better use Hierarchical Data in your apps. Even if you never use Hierarchy, these are concepts you can still use in your own development.
  3. (don’t advance text yet) Hierarchy is a compiler that extends Java. Hierarchy compiles code written in the extended Java syntax we created. (show code) This is an embedded Java file with a special extension. Mjava Simple way to think of it is we’ve the Java language much bigger Hierarchy is not really a compiler It’s translator similar to Perl Actually, more like CoffeeScript and actually does the same thing that Eclipse Xtend does…
  4. And, not to confuse you, but even though Hierarchy is a translator, we call it a metacompiler Explain why We’ll refer to Hierarchy as a Metacompiler from now on.
  5. Hierarchical Data – is very similar to XML In fact, most XML file types have Hierarchy equivalents XML file types (QUESTIONS?) (NEXT SLIDE INTRO) At this point, the easiest way to show you how hierarchy works is to go through a simple example Willie’s Petstore, running example from website.
  6. Go over the home page NEXT SLIDE Next, let’s create a matrix file with the news events stored in it.
  7. Point out how the web page news items correspond to the elements in the matrix. (LET PEOPLE LOOK OVER CODE AND HANDOUT)
  8. Identify parts! Besides small syntax changes, can anyone see any differences between .matrix file and .xml files? Describe differences between .matrix and xml. NO ATTRIBUTE FIELD NAMES Can use Java So how do we know which field a value is in? Using Hierarchy, you Must have a schema defined! Schema defines what field each value has in a field set. Done by position
  9. Describe the schema Point out how the position of the field definitions define what field it is in the matrix. So, since StoryDate is the first field defined for the fieldset in the schema, that means it is the first field in the fieldset in the matrix. (Take a look at your hand out of the mapping of fields) Notice is the position of a Descriptor Definition determines the descriptor’s position when used in a matrix. Also notice that field types are Strongly Typed. Allow primitives, so fieldsets are very small and high performance. They could just take the Java Object (QUESTIONS?) (NEXT SLIDE) Nearly done with the first part of this quick tutorial on how hierarchy works. The last thing to look at is how we use the matrix we created in a special Java file. We’ll print out print out the news items to the console
  10. Describe the schema Point out how the position of the field definitions define what field it is in the matrix. So, since StoryDate is the first field defined for the fieldset in the schema, that means it is the first field in the fieldset in the matrix. (Take a look at your hand out of the mapping of fields) Notice is the position of a Descriptor Definition determines the descriptor’s position when used in a matrix. Also notice that field types are Strongly Typed. Allow primitives, so fieldsets are very small and high performance. They could just take the Java Object (QUESTIONS?) (NEXT SLIDE) Nearly done with the first part of this quick tutorial on how hierarchy works. The last thing to look at is how we use the matrix we created in a special Java file. We’ll print out print out the news items to the console
  11. Has .mjava extension This embedded Java file looks like a regular Java file except for it has extra instructions for accessing matrices Go over them Note, even though called “embedded” file, it’s not like the old SQL pre-processors that did simple text replacement…
  12. (QUESTIONS?)
  13. Takes much less time to create Hierarchical Data in Hierarchy compared to JAXB (explain) Metacompiler catches your mistakes! Start using Hierarchical Data in ways you never would have before
  14. JSON is: Provides extension to Javascript for creation of Simple Data structures For those that are unfamiliar, it’s an xml-like technology for Javascript JS programmers not just use it for exchanging data, but use it to organize their entire code, putting all the major settings and content for code in JSON objects
  15. LINQ is: adds native data querying capabilities to .NET languages Based on SQL Really centered around querying
  16. [Technology with lots of Potential] Same, simple, flexible data structure as JSON But, also makes it easy to work with Database data and other datasources. We’ll talk about more of the benefits later, but I hope you see, this technology has hit somewhat of a sweet spot, combining the best of both and has the potential to have even a greater impact than either of these two.
  17. Describe the parts of this matrix Describe benefits of UDD Much easier to maintain. You don’t have to search the sys to find all the different usages. Becomes a map to all the different usages of the field in the system. Tends to promote automation Could do something similar with Java Annotations, but this doesn’t tend towards automation, and more towards hard coding
  18. I said that we could define each field in only one spot, but even with matrices, there is actually still one spot where you’d have to define the fields again. Anybody see where?
  19. One technology for multiple uses, For instance, you start with static fields… (NEXT SLIDE) This leads us into the future of hierarchy
  20. *** Between the primitive types and classes, there’s a middle ground that seems to have been missing for years. Javascript found it with JSON, MS found it with LINQ. Hierarchy combines the best of these two into something that is in my opinion has more possibilities than either of these two.
  21. This is a simplified version of the website – talk about the website
  22. (NEXT SLIDE) What is this type of architecture called?
  23. In the past, when we programmed in procedural languages like C and Cobol: Organized by abstraction – elements of your software that were closer to the underlying system lower, top level conceptual elements higher up Now a days, we organize using Object Oriented, general more by behavior Explain how MVC is more by behavioral characteristics. PETER, CREATE HANDOUT OF Procedural, OO and N-Dim version of the architecture Describe benefits of both types of architecture
  24. Procedural systems had a tendency to be very well organized in a top-down fashion, making them in certain ways easier to learn and navigate. But tend not to be as well organized with larger systems. Not as natural to group the functions into modules compared to OO.
  25. In the past, when we programmed in procedural languages like C and Cobol: Organized by abstraction – elements of your software that were closer to the underlying system lower, top level conceptual elements higher up Now a days, we organize using Object Oriented, general more by behavior Explain how MVC is more by behavioral characteristics. PETER, CREATE HANDOUT OF Procedural, OO and N-Dim version of the architecture Describe benefits of both types of architecture
  26. Explain how it works Pros: Visually, it’s easier to understand. Because the different parts of the system are “things,” we can easily see what something is and based on its name, have a good sense of what it does without looking at the code. Objects tend to better define what their responsibilities are then just using methods and modules – so things naturally to group together forming components and subsystems, which means better with larger systems. Because of encapsulation, maintenance is usually easier: easier to find where you need to make changes, and less “ripple-effect” when you do make a change Cons It’s easy to get lost – OO systems can sometimes feel like there’s no overall order for the system. When you follow use case through system, can feel like a lot of bouncing around between objects and components. It’s hard to know what happened before, what happened now, and what’ll happen later Ripple Effect still happens, where you sometimes have to make changes up and down the system to make simple changes.
  27. (NEXT SLIDE) What if we had an architecture that combined the benefits of both? Structural - Conceptually well-organized OO – Benefits of real world objects N-Dimensional Architecture does this Uses matrices as its overall control panel into the entire system
  28. Actually, one of the original motivations for creating the Hierarchy metacompiler was to be used in N-Dimensional architectures. (NEXT SLIDE) Another technique that’s used in N-Dimensional Architecture is something called, “Universal Data Definition”
  29. Actually, one of the original motivations for creating the Hierarchy metacompiler was to be used in N-Dimensional architectures. (NEXT SLIDE) Another technique that’s used in N-Dimensional Architecture is something called, “Universal Data Definition”