Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
-
Upload
michael-redlich -
Category
Software
-
view
14 -
download
2
Transcript of Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
![Page 1: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/1.jpg)
1
Building Realtime Data Apps with Speedment
TCF IT Professional ConferenceMarch 17, 2017
Michael P. Redlich@mpredli
about.me/mpredli/
![Page 2: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/2.jpg)
Who’s Mike?
• BS in CS from
• “Petrochemical Research Organization”
• Java Queue News Editor, InfoQ
• Ai-Logix, Inc. (now AudioCodes)
• Amateur Computer Group of New Jersey
2
![Page 3: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/3.jpg)
Objectives
• What is Speedment?
• Why Speedment?
• Database Support
• Get Started Building an Application
• Live Demo (yea!)
• Speedment Resources
3
![Page 4: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/4.jpg)
What is Speedment (1)?
“Speedment accelerates your development speed and makes database programming so easy and fun. When you use Speedment Open Source for database querying, you do not have to learn a new API or use complex ORMs. Everything is standard Java 8 and works out of the box.”
Speedment Web Site, http://www.speedment.org/
4
![Page 5: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/5.jpg)
What is Speedment (2)?
• First introduced in June 2015
• A portmanteau of “speed” and “development”
• Abstracts the process of:
• database connectivity
• database operations
5
![Page 6: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/6.jpg)
Speedment Integration
6
“Hello, Java Users Group!”
![Page 7: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/7.jpg)
Speedment 3.0.5
• Codename: “Forest”
• Latest features include:
• declarative Java 8 stream API for databases operations
• improved user interface
7
![Page 8: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/8.jpg)
Why Speedment?
• Full Java 8 support
• lamdas and streams
• Easy query with Smart Streams
• no need for coding SQL
• No NULL pointer exceptions
8
![Page 9: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/9.jpg)
Speedment Open Source
• Speedment Open Source Database Support:
• MySQL
• PostgreSQL
• MariaDB
9
![Page 10: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/10.jpg)
Speedment Enterprise
• Speedment Enterprise Database Support includes Open Source plus:
• Oracle
• DB2
• AS400
• SQL Server
10
![Page 11: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/11.jpg)
Let’s Get Started…
11
![Page 12: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/12.jpg)
Example Database
12
“Hello, Java Users Group!”
![Page 13: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/13.jpg)
Getting Started$ mvn archetype:generate
-DgroupId=org.redlich.publications
-DartifactId=publications
-DarchetypeArtifactId=speedment-archtype-mysql
-DarchetypeGroupId=com.speedment.archetypes
-DinteractiveMode=false
-DarchetypeVersion=3.0.5
&& cd publications && mvn speedment:tool
13
generates a new project
project package
project root
invoke the Speedment tool
the latest version of Speedment
specify desired database
![Page 14: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/14.jpg)
Speedment Tool (1)
14
“Hello, Java Users Group!”
specify desired database
subpackage (user defined)
database name
click…
![Page 15: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/15.jpg)
Speedment Tool (2)
15
“Hello, Java Users Group!”
click…
![Page 16: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/16.jpg)
Let’s Build That App…
16
![Page 17: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/17.jpg)
17
/* * initial setup */
protected final PublicationsApplication app; protected final AuthorsManager authorsManager; protected final PublicationsManager publicationsManager;
app = new PublicationsApplicationBuilder(); authorsManager = app.getOrThrow(AuthorsManager.class); publicationsManager = app.getOrThrow(PublicationsManager.class);
main app
manager representing each database table
![Page 18: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/18.jpg)
18
/* * smart streaming */ publicationsManager.stream() .forEach(System.out::println);
publicationsManager.stream() .filter(Publications.TITLE.startsWith(“”);
long count = publicationsManager.stream() .count()
Optional<Authors> redlich = authorsManager .stream() .filter(Authors.LAST_NAME.equal(“Redlich”)) .findAny();
![Page 19: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/19.jpg)
Partial UML Diagram
19
“Hello, Java Users Group!”
![Page 20: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/20.jpg)
Demo Time…
20
![Page 21: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/21.jpg)
21
Speedment Resources
•speedment.org
•javadoc.io/doc/com.speedment/runtime-deploy/3.0.5
•minborgsjavapot.blogspot.com
•https://www.infoq.com/news/2016/12/speedment-releases-version-3 Per-Åke Minborg, CTO at Speedment
![Page 22: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/22.jpg)
Upcoming Events (1)
• March 17-18, 2017
•tcf-nj.org
• April 18-19, 2017
•phillyemergingtech.com
22
![Page 23: Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0dd451a28ab47238b6995/html5/thumbnails/23.jpg)
Acknowledgements
• Speedment, Inc.
• Per-Åke Minborg, CTO at Speedment
23