senchacon 2016: how to auto generate a back-end in minutes - per minborg, emil forslund
TRANSCRIPT
![Page 1: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/1.jpg)
How to Auto-Generate a Back-end in Minutes
Per Minborg & Emil Forslund, Speedment, Inc.
November 9, 2016
![Page 2: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/2.jpg)
Every Decision a Developer Makes is a Trade-off
“The best code is no code at all”
![Page 3: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/3.jpg)
Using Code Generation• Makes the code efficient and short
• Modifications are done once and applied everywhere
• Minimizes errors
• “DRY” (Don’t Repeat Yourself) vs. ”WET” (We Enjoy Typing)
• “Code your code”
![Page 4: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/4.jpg)
About Us
Per Minborg• Founder of several IT companies
• Lives in Palo Alto
• 20 years of Java experience
• 15+ US patents
• Blog: Minborg’s Java Pot
Emil Forslund• Back-End Developer
• Lives in Palo Alto
• 8 years of Java experience
• Blog: Age of Java
![Page 5: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/5.jpg)
Ext Speeder
Front End
Back EndOne End
![Page 6: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/6.jpg)
Ext Speeder
• Existing Relational Database
• Graphically Setup REST API Endpoints
• Generate Complete Back-End
• Deploy Stand-Alone or on aJava EE Application Server
• Merge Changes in DB Schema into Application
Ext JS Application
![Page 7: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/7.jpg)
API Management
• Define Exactly Which Data to Expose
• Rename tables, columns, etc.
• Create Custom HTTP Paths
• Change Data Format
• Create Virtual Columns
![Page 8: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/8.jpg)
Generated Runtime
• Column Oriented In-Memory Cache
• Automatic Reload From Database
• Multi-Threaded Execution
• JSON Encoding
• Secure Socket Layer (SSL)
curl –X GET https://api.example.com/customers ?start=1000 &limit=25 &callback=cb
cb([ {"id":1, "name":"Speedment, Inc.", "region":"North America"}, {"id":2, "name":"Sencha, Inc.", "region":"North America"}, ... ]);
![Page 9: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/9.jpg)
Workflow
customers.stream() .filter(…) .filter(…) .map(…) .collect(toList());
Step 1: Connect to DB Step 2: Generate Code Step 3: Deploy
Step 4: Iterate
![Page 10: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/10.jpg)
Example: Sales Organization DB
![Page 11: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/11.jpg)
Sales Organization DB – What We Have
• Existing Database- Customers
- Products
- Salespersons
- Sales
• Millions of RowsRegionCountry
Office
Customer
Salesperson
Product
Sale
Works at
Sold by
Product sold Sold to
Located in
Lives in
Part of
![Page 12: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/12.jpg)
Sales Organization DB – What We Want
Regions Are Stored in Separate Table
Users Can Filter and Sort in Real-Time
BufferStore With Millions of Rows
![Page 13: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/13.jpg)
Sales Organization DB – How To Get There
• Launch Ext Speeder
• Connect to the ”Salesinfo” database
• Create API Endpoint for ”Customer” table
• Create Virtual Column ”Region”
• Generate Code
• Run
1. Connect
2. Generate
3. Deploy
![Page 14: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/14.jpg)
Sales Organization DB – The Generated REST API
curl –X GET https://api.example.com/customers ?start=1000 &limit=25 &callback=cb
cb([ {"id":1, "name":"Speedment, Inc.", "region":"North America"}, {"id":2, "name":"Sencha, Inc.", "region":"North America"}, ... ]);
Secure Connections using SSL
Virtual Columns Make It Possible To Include Data from Other Tables
Results Are Returned Using JSONP
![Page 15: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/15.jpg)
Sales Organization DB – How Fast Is It?
• Latency < 10 ms
• 1,000 – 10,000 TPS (Transactions Per Second) per node
• Implementation Time: 5 minutes
![Page 16: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/16.jpg)
• Model the database 5 h
• Secure Connection 1 h
• Parse http command 1 h
• Deserialize parameters 1 h
• Manage database connections 1 h
• Convert into SQL 2 h
• Optimize queries 3 h
• Parse database response 2 h• Format into JSON 1 h• Send back to Client 1 h• Write XML config 1 h• Deploy in Java EE 1 h• Fix bugs 4 h• Run Application <1 h
Traditional Back End Development Process
~24 h
![Page 17: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/17.jpg)
• Connect to database <1 h
• Select tables and columns <1 h
• Press ”Generate” <1 h
• Deploy in Java EE <1 h
• Run application <1 h
Ext Speeder Back End Development Process
~1 h
![Page 18: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/18.jpg)
How To Use
![Page 19: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/19.jpg)
Graphical Tool
Tell Ext Speeder Where To Find Your Database
Press ”Connect”
![Page 20: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/20.jpg)
Graphical ToolDatabase Changes Can Be Merged With the Press of a Button
Press to Generate Complete Back-End
Database Structure Illustrated as a Tree
Control Every Aspect of the Generated Solution
Feedback In the Form of Notifications
![Page 21: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/21.jpg)
IDE Integration
![Page 22: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/22.jpg)
• No Installation Required
• Launch Tool as a Maven Goal
• Regenerate Code from Saved Config File
IDE Integration
Example from NetBeans IDE
![Page 23: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/23.jpg)
Supported Databases
![Page 24: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/24.jpg)
Deployment Scenarios
• Stand Alone Java SE 8
• Java EE Application Server- Oracle WebLogic
- Tomcat / TomEE
- Glassfish / Payara
- Wildfly / JBoss
- Jetty
![Page 25: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/25.jpg)
Ext JS Compatibility
• Ext JS 6 (BufferedStore)
• Ext JS 5 (BufferedStore)
• Ext JS 4 (Use regular Store with buffered = true)
![Page 26: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/26.jpg)
Live Demo
![Page 27: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/27.jpg)
Extreme Performance
![Page 28: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/28.jpg)
How Ext Speeder improves your performance
• Data Database objects are stored in-memory
• Sort A sorted view of every column resides in-memory
• Filter Resolved without querying the database. In-memory filtering lookup.
• Skip In-memory dictionaries improve skip performance
• Total Number of results are cached for each set of parameters
![Page 29: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/29.jpg)
• Open database with US doctors
• 40 million objects
• Comparison with and without Ext Speeder
See full video on www.extspeeder.com
Ext Speeder Back End Development Process
![Page 30: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/30.jpg)
User Case : Extremely Heavy Industries
![Page 31: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/31.jpg)
Download Free 30-Day Trial
![Page 32: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/32.jpg)
Download Free 30-Day Trial
![Page 33: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/33.jpg)
Want Maintenance & Support?
• Up to 5 Developers $ 2,475 / Year
• Every Additional Developer $ 495 / Year
• Renewal: 50% of regular price
![Page 34: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/34.jpg)
Need Custom Features Tailored for Your Project?
Contact [email protected]
Additional Database Connectors
Scale-Out Over Multiple Nodes
Aggregating Operators
Create, Update, Delete...
Connect Several Databases
Reactive WebSockets
![Page 35: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/35.jpg)
Please Take the Survey in the Mobile App
• Navigate to this session in the mobile app
• Click on “Evaluate Session”
• Respondents will be entered into a drawing to win one of five $50 Amazon gift cards
![Page 36: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/36.jpg)
Ext Speederhttp://www.extspeeder.com
Ext JShttps://www.sencha.com/products/extjs/
More Information
![Page 37: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/37.jpg)
Thank You! [email protected] [email protected]
![Page 38: SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund](https://reader035.vdocuments.net/reader035/viewer/2022070515/5876fe7b1a28abf3398b6d03/html5/thumbnails/38.jpg)