JHipster Mini-Book v4.5

所需积分/C币:16 2018-04-12 21:21:12 12.85MB PDF
收藏 收藏

JHipster Mini-Book v4.5 Released 英文版 最新4.5版本
The HIpster Mini-Book o 2018 Matt Raible. All rights reserved. Version 4.5.0 PublishedbyC4media,publisherofinfoq.com No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recoding, scanning or otherwise except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher Production editor, Ana ciobotaru Copy editor: Lawrence Nyveen Cover and Interior Design: Dragos balasoiu Library of Congress Cataloguing-in-Publication Data: ISBN: 978-1-329-63814-3 Table of contents Dedication. Acknowledgements.. eface 单 What is in an InfoQ mini-book? Who this book is for What you need for this book 3344 Conventions Reader feedback Introduction Building an app with Hipster 780 Creating the application Building the ui and business logic Application improvements....... 20 Deploying to heroku .....49 Monitoring and analytics Continuous integration and deployment 58 Source code 63 Upgrading 21-Points Health 63 Summary, 64 JHipster's UI components 65 Angular 66 Bootstrap 77 Internationalization (i18n) ..87 88 webpack 90 WebSockets Browsersync 96 Summary. 98 JHipster's API building blocks 99 Spring boot .100 Maven versus gradle ..112 IDE Support: Running, debugging, and profiling .114 Security................... ,,,,,,,,..,115 JPA versus MongoDB versus Cassandra .,,,,,,,,,,,.......117 Lic quibase Elasticsearch 120 Deployment .121 Summary ,,,,,,,,,..122 Microservices with HIpster 123 History of microservices ...124 Why microservices? 125 Microservices with HIpster ,,...126 Generate an APl gateway............ ,,.,...127 Install Hipster Registry ..,.129 Generate a blog microservice application 130 Generate a store microservice application ,,,,.....132 Run your microservices architecture ,,,,,,.,..,134 Deploy to Heroku .........141 Source code ,.,.146 Summary 146 Action! 148 Additional reading.… 148 about the author 149 Dedication Dedication I dedicate this book to my parents, Joe and Barbara Raible. They raised my sister and me in the backwoods of Montana, with no electricity and no running water. We had fun-loving game nights, lots of walking, plenty of farm animals, an excellent garden, and a unique perspective on life Thanks, Mom and Dad- you rock The Hipster Mini-Book Acknowledgements I'm extremely grateful to my family, for putting up with my late nights and extended screen time while I worked on this book To Rod Johnson and juergen Hoeller, thanks for inventing Spring and changing the lives of java developers forever. To Phil Webb and Dave Syer, thanks for creating Spring Boot and breathing a breath of fresh air into the Spring Framework. Last but not least, thanks to Josh Long for first showing me Spring boot and for being one of the most enthusiastic Spring developers Ive ever met Id like to thank this book's tech editors, Dennis Sharpe and Kile Niklawski. Their real-world experience with J Hipster made the code sections a lot more bulletproof This book's copy editor, Lawrence Nyveen, was a tremendous help in correcting my words and making this book easier to read Thanks laurie! Finally, kudos to Julien Dubois and Deepu K Sasidharan for creating and improving hIpster. They've done a helluva job in turning it into a widely used and successful open-source project P reface Preface Over the last few years, I've consulted at several companies that used Spring and java to develop their back-end systems. On those projects, I introduced Spring boot to simplify development. DevOps teams often admired its external configuration and its starter dependencies made it easy to develop SOAP and RESt aPis I used AngulariS for several years as well. For the first project I used AngularIS on, in early 2013, implemented in 40% of the code that jQuery would've required I helped that company modernize its UI in a project for which we integrated Bootstrap. I was very impressed with both Angularis and Bootstrap and have used them ever since. In 2014, I used Ionic on a project to implement a HTML5 UI in a native iOS application. We used AngularIS, Bootstrap, and Spring Boot in that project and they worked very well for us When I heard about Hipster, I was motivated to use it right away. It combined my most-often-used frameworks into an easy-to-use package For the first several months I knew about Hipster, I used it as a learning tool- generating projects and digging into files to see how it coded features. The HIpster project is a goldmine of information and lessons from several years of developer experience I wanted to write this book because I knew all the tools in Hipster really well. I wanted to further the knowledge of this wonderful project. I wanted java developers to see that they can be hip again by leveraging AngularIS and Bootstrap. I wanted to show them how JavaScript web development isn't scary, it's just another powerful platform that can improve your web-development skills The first version of this book was released in October 2015, the second in December 2016. This version (4.x to match Angular)was released in the fall of 2017 after HIpster migrated to Angular. I spent a lot of time learning Angular and TypeScript in 2016-17 and P'm pleased to bring you this book as an active member of the Hipster Development Team What is in an InfoQ mini-book? InfoQ mini-books are designed to be concise, intending to serve technical architects looking to get a firm conceptual understanding of a new technology or technique in a quick yet in-depth fashion. You can think of these books as covering a topic strategically or essentially. After reading a mini-book, the reader should have a fundamental understanding of a technology, including when and where to apply it, how it relates to other technologies, and an overall feeling that they have assimilated the combined knowledge of other professionals who have already figured out what this technology is about. The reader will then be able to make intelligent decisions about the technology once their projects require it, and can delve into sources of more detailed information(such as larger books or tutorials)at that time Who this book is for This book is aimed specifically at web developers who want a rapid introduction to Angular, Bootstrap The Hipster Mini-Book and Spring Boot by learning Hipster What you need for this book To try code samples in this book, you will need a computer running an up-to-date operating system (Windows, Linux, or Mac Os X/macOS). You will need Node js and Java installed. The book code was tested against Node. js 8 and JDK 8, but newer versions should also work Conventions We use a number of typographical conventions within this book that distinguish between different kinds of information Code in the text, including commands, variables, file names, CSs class names, and property names are shown as follows Spring boot uses a public static void main entry-point that launches an embedded weh server for A block of code is set out as follows. It may be colored, depending on the format in which you're reading this book src/app/search/search component. html <fo「m> <input type=" search" name=query" [(ngMode1)]=query(keyup, enter)=search)> <button type="button(click)=search()"Search</button> </form> P reface src/mainjavademo/DemoApplication java ORestController class blogController t private final BlogRepository repository; Yay! No annotations needed for constructor injection in Spring 4.3+ lbic BlogController(BlogRepository repository)t his repository repository; GRequestMapping( /blogs") Collection<Blog> listof return repository. findAll() When we want to draw your attention to certain lines of code, those lines are annotated using numbers accompanied by brief descriptions export class SearchComponent t constructor(private sear chService: SearchService)io search():void② his, searchService search (this query). subscribe(3 data =>i this searchResults data; j error = console Log(error) ); O To inject SearchService into SearchComponent, add it as a parameter to the constructors's argument 2 search()is a method that's called from the HTML's <button>, wired up using the (click)event handler 3 this query is a variable that's wired to <input> using two-way binding with [ (ngModel)]="query Tips are shown using callouts like this Warnings are shown using callouts like this

试读 127P JHipster Mini-Book v4.5
立即下载 低至0.43元/次 身份认证VIP会员低至7折
关注 私信 TA的资源
JHipster Mini-Book v4.5 16积分/C币 立即下载
JHipster Mini-Book v4.5第1页
JHipster Mini-Book v4.5第2页
JHipster Mini-Book v4.5第3页
JHipster Mini-Book v4.5第4页
JHipster Mini-Book v4.5第5页
JHipster Mini-Book v4.5第6页
JHipster Mini-Book v4.5第7页
JHipster Mini-Book v4.5第8页
JHipster Mini-Book v4.5第9页
JHipster Mini-Book v4.5第10页
JHipster Mini-Book v4.5第11页
JHipster Mini-Book v4.5第12页
JHipster Mini-Book v4.5第13页
JHipster Mini-Book v4.5第14页
JHipster Mini-Book v4.5第15页
JHipster Mini-Book v4.5第16页
JHipster Mini-Book v4.5第17页
JHipster Mini-Book v4.5第18页
JHipster Mini-Book v4.5第19页
JHipster Mini-Book v4.5第20页

试读结束, 可继续阅读

16积分/C币 立即下载 >