SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund

111 views

Published on

Connecting your JavaScript application to a database is tedious. Back-end developers spend hours modeling the database, securing connections, writing SQL, optimizing queries, deploying to a server, and fixing bugs. In this session, you'll learn how Ext Speeder gives your front-end team a tool to automatically generate a full back-end. In minutes, a REST API between a Sencha Ext JS Grid application and a relational database is created. This will save you a huge amount of time and also minimizes the risk of human error. Application time-to-market has never been shorter.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
111
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Agile Workflow
  • SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emil Forslund

    1. 1. How to Auto-Generate a Back-end in Minutes Per Minborg & Emil Forslund, Speedment, Inc. November 9, 2016
    2. 2. Every Decision a Developer Makes is a Trade-off “The best code is no code at all”
    3. 3. 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”
    4. 4. 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
    5. 5. Ext Speeder Front End Back End One End
    6. 6. Ext Speeder • Existing Relational Database • Graphically Setup REST API Endpoints • Generate Complete Back-End • Deploy Stand-Alone or on a Java EE Application Server • Merge Changes in DB Schema into Application Ext JS Application
    7. 7. API Management • Define Exactly Which Data to Expose • Rename tables, columns, etc. • Create Custom HTTP Paths • Change Data Format • Create Virtual Columns
    8. 8. 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"}, ... ]);
    9. 9. Workflow customers.stream() .filter(…) .filter(…) .map(…) .collect(toList()); Step 1: Connect to DB Step 2: Generate Code Step 3: Deploy Step 4: Iterate
    10. 10. Example: Sales Organization DB
    11. 11. Sales Organization DB – What We Have • Existing Database - Customers - Products - Salespersons - Sales • Millions of Rows RegionCountry Office Customer Salesperson Product Sale Works at Sold by Product sold Sold to Located in Lives in Part of
    12. 12. 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
    13. 13. 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
    14. 14. 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"}, ... ]); SecureConnections using SSL VirtualColumns Make It PossibleTo Include Data from OtherTables ResultsAre ReturnedUsing JSONP
    15. 15. Sales Organization DB – How Fast Is It? • Latency < 10 ms • 1,000 – 10,000 TPS (Transactions Per Second) per node • Implementation Time: 5 minutes
    16. 16. • 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
    17. 17. • 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
    18. 18. How To Use
    19. 19. Graphical Tool Tell Ext Speeder Where To Find Your Database Press ”Connect”
    20. 20. Graphical Tool Database 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
    21. 21. IDE Integration
    22. 22. • No Installation Required • Launch Tool as a Maven Goal • Regenerate Code from Saved Config File IDE Integration Example from NetBeans IDE
    23. 23. Supported Databases
    24. 24. Deployment Scenarios • Stand Alone Java SE 8 • Java EE Application Server - Oracle WebLogic - Tomcat / TomEE - Glassfish / Payara - Wildfly / JBoss - Jetty
    25. 25. Ext JS Compatibility • Ext JS 6 (BufferedStore) • Ext JS 5 (BufferedStore) • Ext JS 4 (Use regular Store with buffered = true)
    26. 26. Live Demo
    27. 27. Extreme Performance
    28. 28. 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
    29. 29. • 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
    30. 30. User Case : Extremely Heavy Industries
    31. 31. Download Free 30-Day Trial
    32. 32. Download Free 30-Day Trial
    33. 33. Want Maintenance & Support? • Up to 5 Developers $ 2,475 / Year • Every Additional Developer $ 495 / Year • Renewal: 50% of regular price
    34. 34. Need Custom Features Tailored for Your Project? Contact Sales sales@extspeeder.com Additional Database Connectors Scale-Out Over Multiple Nodes Aggregating Operators Create, Update, Delete... Connect Several Databases Reactive WebSockets
    35. 35. 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
    36. 36. Ext Speeder http://www.extspeeder.com Ext JS https://www.sencha.com/products/extjs/ More Information
    37. 37. Thank You! minborg@speedment.com emil@speedment.com

    ×