Atjaunināt sīkdatņu piekrišanu

E-grāmata: Svelte and Sapper in Action

3.83/5 (12 ratings by Goodreads)
  • Formāts: 456 pages
  • Izdošanas datums: 01-Sep-2020
  • Izdevniecība: Manning Publications
  • Valoda: eng
  • ISBN-13: 9781638350682
Citas grāmatas par šo tēmu:
  • Formāts - EPUB+DRM
  • Cena: 49,74 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: 456 pages
  • Izdošanas datums: 01-Sep-2020
  • Izdevniecība: Manning Publications
  • Valoda: eng
  • ISBN-13: 9781638350682
Citas grāmatas par šo tēmu:

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

Svelte and Sapper in Action teaches you to design and build fast, elegant web applications. You&;ll start immediately by creating an engaging Travel Packing app as you learn to create Svelte components and develop great UX. You&;ll master Svelte&;s unique state management model, use Sapper for simplified page routing, and take on modern best practices like code splitting, offline support, and server-rendered views.

Summary
Imagine web apps with fast browser load times that also offer amazing developer productivity and require less code to create. That&;s what Svelte and Sapper deliver! Svelte pushes a lot of the work a frontend framework would handle to the compile step, so your app components come out as tight, well-organized JavaScript modules. Sapper is a lightweight web framework that minimizes application size through server-rendering front pages and only loading the JavaScript you need. The end result is more efficient apps with great UX and simplified state management.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Many web frameworks load hundreds of &;just-in-case&; code lines that clutter and slow your apps. Svelte, an innovative, developer-friendly tool, instead compiles applications to very small bundles for lightning-fast load times that do more with less code. Pairing Svelte with the Sapper framework adds features for flexible and simple page routing, server-side rendering, static site development, and more.

About the book
Svelte and Sapper in Action teaches you to design and build fast, elegant web applications. You&;ll start immediately by creating an engaging Travel Packing app as you learn to create Svelte components and develop great UX. You&;ll master Svelte&;s unique state management model, use Sapper for simplified page routing, and take on modern best practices like code splitting, offline support, and server-rendered views.

What's inside

- Creating Svelte components
- Using stores for shared data
- Configuring page routing
- Debugging, testing, and deploying Svelte apps
- Using Sapper for dynamic and static sites

About the reader
For web developers familiar with HTML, CSS, and JavaScript.

About the author
Mark Volkmann is a partner at Object Computing, where he has provided software consulting and training since 1996.

Table of Contents

PART 1 - GETTING STARTED

1 Meet the players

2 Your first Svelte app

PART 2 - DEEPER INTO SVELTE

3 Creating components

4 Block structures

5 Component communication

6 Stores

7 DOM interactions

8 Lifecycle functions

9 Client-side routing

10 Animation

11 Debugging

12 Testing

13 Deploying

14 Advanced Svelte

PART 3 - DEEPER INTO SAPPER

15 Your first Sapper app

16 Sapper applications

17 Sapper server routes

18 Exporting static sties with Sapper

19 Sapper offline support

PART 4 - BEYOND SVELTE AND SAPPER

20 Preprocessors

21 Svelte Native
Preface xv
Acknowledgments xvi
About This Book xviii
About The Author xxiii
About The Cover Illustration xxiv
PART 1 GETTING STARTED
1(40)
1 Meet the players
3(16)
1.1 Introducing Svelte
4(9)
Why Svelte?
4(5)
Rethinking reactivity
9(2)
Current issues in Svelte
11(1)
How does Svelte work?
11(2)
Does Svelte disappear?
13(1)
1.2 Introducing Sapper
13(3)
Why consider Sapper?
14(1)
How does Sapper work?
15(1)
When should Sapper be used?
16(1)
When should Sapper not be used?
16(1)
1.3 Introducing Svelte Native
16(1)
1.4 How does Svelte compare with other web frameworks?
17(1)
Angular
17(1)
React
17(1)
Vue
17(1)
1.5 What tools are needed to get started?
18(1)
2 Your first Svelte app
19(22)
2.1 The Svelte REPL
20(11)
Using the Svelte REPL
20(2)
Your first REPL app
22(4)
Saving REPL apps
26(2)
Sharing REPL apps
28(1)
REPL URLs
28(1)
Exporting REPL apps
29(1)
Using npm packages
29(1)
REPL limitations
30(1)
CodeSandbox
30(1)
2.2 Working outside the REPL
31(6)
Starting with npx degit
31(2)
Provided package.json
33(1)
Important files
33(2)
Your first non-REPL app
35(2)
2.3 Bonus app
37(4)
PART 2 DEEPER INTO SVELTE
41(220)
3 Creating components
43(21)
3.1 Content of svelte files
44(1)
3.2 Component markup
45(2)
3.3 Component names
47(1)
3.4 Component styles
48(1)
3.5 CSS specificity
49(1)
3.6 Scoped vs. global styles
50(3)
3.7 Using CSS preprocessors
53(1)
3.8 Component logic
53(1)
3.9 Component state
54(1)
3.10 Reactive statements
55(2)
3.11 Module context
57(2)
3.12 Building a custom component
59(1)
3.13 Building the Travel Packing app
60(4)
4 Block structures
64(18)
4.1 Conditional logic with {#if}
65(1)
4.2 Iteration with (#each)
66(1)
4.3 Promises with {#await}
67(3)
4.4 Building the Travel Packing app
70(12)
Item component
71(2)
Utility functions
73(1)
Category component
73(3)
Checklist component
76(3)
App component
79(1)
Try it
80(2)
5 Component communication
82(24)
5.1 Component communication options
83(1)
5.2 Props
83(13)
Props go in with export
84(2)
Reacting to prop changes
86(1)
Prop types
86(1)
Directives
87(1)
The bind directive on form elements
88(2)
bind: this
90(2)
Props go out with bind
92(4)
5.3 Slots
96(1)
5.4 Events
97(3)
Event dispatching
97(2)
Event forwarding
99(1)
Event modifiers
99(1)
5.5 Context
100(1)
5.6 Building the Travel Packing app
101(5)
6 Stores
106(18)
6.1 Writable stores
107(1)
6.2 Readable stores
108(1)
6.3 Where to define stores
109(1)
6.4 Using stores
109(7)
6.5 Derived stores
116(1)
6.6 Custom stores
117(1)
6.7 Using stores with classes
118(4)
6.8 Persisting stores
122(1)
6.9 Building the Travel Packing app
123(1)
7 DOM interactions
124(17)
7.1 Inserting HTML
125(3)
7.2 Actions
128(1)
7.3 The tick function
129(3)
7.4 Implementing a dialog component
132(3)
7.5 Drag and drop
135(2)
7.6 Building the Travel Packing app
137(4)
8 Lifecycle junctions
141(11)
8.1 Setup
142(1)
8.2 The onMount lifecycle function
143(2)
Moving focus
143(1)
Retrieving data from an API service
144(1)
8.3 The onDestroy lifecycle function
145(1)
8.4 The beforeUpdate lifecycle function
146(1)
8.5 The afterUpdate lifecycle function
147(1)
8.6 Using helper functions
148(2)
8.7 Building the Travel Packing app
150(2)
9 Client-side routing
152(18)
9.1 Manual routing
153(7)
9.2 Hash routing
160(2)
9.3 Using the page.js library
162(2)
9.4 Using path and query parameters with page.js
164(3)
9.5 Building the Travel Packing app
167(3)
10 Animation
170(20)
10.1 Easing functions
171(1)
10.2 The svelte/animate package
172(2)
10.3 The svelte/motion package
174(3)
10.4 The svelte/transition package
177(2)
10.5 The fade transition and flip animation
179(2)
10.6 The crossfade transition
181(2)
10.7 The draw transition
183(1)
10.8 Custom transitions
184(2)
10.9 The transition vs. in and out props
186(1)
10.10 Transition events
186(1)
10.11 Building the Travel Packing app
187(3)
11 Debugging
190(8)
11.1 The @debug tag
191(2)
11.2 Reactive statements
193(1)
11.3 Svelte Devtools
194(4)
12 Testing
198(37)
12.1 Unit tests with Jest
199(9)
Unit tests for the Todo app
201(2)
Unit tests for the Travel Packing app
203(5)
12.2 End-to-end tests with Cypress
208(8)
End-to-end tests for the Todo app
210(1)
End-to-end tests for the Travel Packing app
211(5)
12.3 Accessibility tests
216(9)
Svelte compiler
217(1)
Lighthouse
217(3)
axe
220(3)
WAVE
223(2)
12.4 Component demos and debugging with Storybook
225(10)
Storybook for Travel Packing app
227(8)
13 Deploying
235(7)
13.1 Deploying to any HTTP server
236(1)
13.2 Using Nedify
236(3)
Netlify from the website
237(1)
Netlify from the command line
238(1)
Netlify plans
239(1)
13.3 Using Vercel
239(2)
Vercel from the website
240(1)
Vercel from the command line
240(1)
Vercel tiers
241(1)
13.4 Using Docker
241(1)
14 Advanced Svelte
242(19)
14.1 Form validation
243(4)
14.2 Using CSS libraries
247(3)
14.3 Special elements
250(4)
14.4 Importing JSON files
254(1)
14.5 Creating component libraries
254(2)
14.6 Web components
256(5)
PART 3 DEEPER INTO SAPPER
261(80)
15 Your first Sapper app
263(8)
15.1 Creating a new Sapper app
265(1)
15.2 Recreating the shopping app with Sapper
266(5)
16 Sapper applications
271(18)
16.1 Sapper file structure
272(3)
16.2 Page routes
275(1)
16.3 Page layouts
276(3)
16.4 Handling errors
279(1)
16.5 Running on both server and client
279(1)
16.6 Fetch API wrapper
280(1)
16.7 Preloading
280(2)
16.8 Prefetching
282(2)
16.9 Code splitting
284(1)
16.10 Building the Travel Packing app
285(4)
17 Sapper server routes
289(18)
17.1 Server route source files
290(1)
17.2 Server route functions
291(1)
17.3 A create/retrieve/update/delete (CRUD) example
292(7)
17.4 Switching to Express
299(1)
17.5 Building the Travel Packing app
300(7)
18 Exporting static sites with Sapper
307(14)
18.1 Sapper details
308(1)
18.2 When to export
308(1)
18.3 Example app
309(12)
19 Sapper offline support
321(20)
19.1 Service worker overview
322(1)
19.2 Caching strategies
323(3)
19.3 Sapper service worker configuration
326(1)
19.4 Service worker events
327(1)
19.5 Managing service workers in Chrome
328(4)
19.6 Enabling the use of HTTPS in the Sapper server
332(2)
19.7 Verifying offline behavior
334(1)
19.8 Building the Travel Packing app
335(6)
PART 4 BEYOND SVELTE AND SAPPER
341(50)
20 PreProcessors
343(13)
20.1 Custom preprocessing
344(2)
Using Webpack
345(1)
20.2 The svelte-preprocess package
346(6)
Auto-preprocessing mode
347(1)
External files
347(2)
Global styles
349(1)
Using Sass
349(1)
Using TypeScript
350(2)
A VS Code tip
352(1)
20.3 Using Markdown
352(2)
20.4 Using multiple preprocessors
354(1)
20.5 Image compression
354(2)
21 Svelte Native
356(35)
21.1 Provided components
357(6)
Display components
357(1)
Form components
358(1)
Action components
358(1)
Dialog components
359(1)
Layout components
359(4)
Navigation components
363(1)
21.2 Getting started with Svelte Native
363(1)
21.3 Developing Svelte Native apps locally
364(1)
21.4 NativeScript styling
365(1)
21.5 Predefined NativeScript CSS classes
366(2)
21.6 NativeScript themes
368(1)
21.7 Comprehensive example
368(17)
21.8 NativeScript UI component library
385(5)
21.9 Svelte Native issues
390(1)
Appendix A Resources 391(6)
Appendix B Calling REST services 397(3)
Appendix C MongoDB 400(7)
Appendix D ESLint for Svelte 407(2)
Appendix E Prettier for Svelte 409(2)
Appendix F VS Code 411(4)
Appendix G Snowpack 415(4)
Index 419
Mark Volkmann is a partner at Object Computing, Inc. (OCI) in St. Louis where he has provided software consulting and training since 1996. As a consultant, Mark has assisted many companies with JavaScript, Node.js, React, Vue, Angular, and more.