INTRODUCTION TO MARKETING Introduction to Business & Marketing.
Introduction to Srb4j
-
Upload
kent-chen -
Category
Technology
-
view
41 -
download
0
Transcript of Introduction to Srb4j
![Page 1: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/1.jpg)
Introduction to Srb4jKent Chen , 14/July/2016
![Page 2: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/2.jpg)
Contents• What is it ?• Features• Technologies• Links
![Page 3: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/3.jpg)
What is it ?• Srb4j = Simple RESTFul Backend for Java
• Code generation with Maven archetype• Your own maven artifact Id• Your own package name
• Batteries include. • Authentication• Persistence• More…
![Page 4: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/4.jpg)
Features• Proven data structure for RESTFul API• Registration + login • Social account login • Password resetting + random code login• API document • Back office web portal
![Page 5: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/5.jpg)
Feature – API Data Structure• “Response” structure for RESTFul API• Limited usage of Http Status Codes • Error code• Error description for User• Error description facilitating developer’s troubleshooting• Data
![Page 6: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/6.jpg)
Features - Authentication• Registration/login - OAuth2 password flow • Access token• Refresh token
• Social account login• Google• Facebook• Allow for new social site• Support Html , Mobile and Desktop clients at the same time
• Password reset
• Random code login
![Page 7: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/7.jpg)
Swagger Integration• API document generated as a Servlet• Example: https://srb4jdemo.chenjianjx.com/fo-rest-doc
• Client stub generation
![Page 8: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/8.jpg)
Back Office Web Portal• Login/Logout
• Enforce code structure for back office
• Example: https://srb4jdemo.chenjianjx.com/bo/portal
![Page 9: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/9.jpg)
Technologies• Popular J2EE Stack• JAX-RS • Spring • MyBatis • MySQL
• AOP: Bean Validation, user input trimming, timestamp update• Modularized structure design• Application Layer User Oriented• Biz Layer = Neutral Services• Maven artifact as component• Ready for distribution (Microservice)• Be Pragmatic: Not too many components
![Page 10: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/10.jpg)
Webapp
Front-End Web Service Client Back-Office User’s Browser
Web Layer
Front-End Web Services Back-Office Controllers
Biz Layer
Application Layer
Front-End Managers Back-Office Managers
Neutral Services
Internet
![Page 11: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/11.jpg)
Maven Components
![Page 12: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/12.jpg)
Try it now !• Quick Start• https://github.com/chenjianjx/srb4j#quick-start-for-backend-developers
• Demos• A sample backend: https://srb4jdemo.chenjianjx.com/• Demo Html SPA Client: http://srb4jclient.chenjianjx.com:8000/• Demo Android Client: https://github.com/chenjianjx/Srb4jAndroidClient• Demo Desktop Client: https://github.com/chenjianjx/srb4j-desktop-
client
• Documents• All-in-one document: https://github.com/chenjianjx/srb4j• Philosophy of Srb4j’s modularization:
http://www.chenjianjx.com/myblog/entry/layering-in-java-webapps-final
![Page 13: Introduction to Srb4j](https://reader036.fdocuments.in/reader036/viewer/2022082906/58eb278a1a28ab87508b460d/html5/thumbnails/13.jpg)
The End