وبلاگ بلیان

توسعه کاربرد عملی با AppRun: ساخت برنامه‌های وب قابل‌اعتماد و با عملکرد بالا با استفاده از معماری الهام‌گرفته از الم، انتشار رویداد و مؤلفه‌ها

Practical Application Development with AppRun : Building Reliable, High-Performance Web Apps Using Elm-Inspired Architecture, Event Pub-Sub, and Components

معرفی کتاب «توسعه کاربرد عملی با AppRun: ساخت برنامه‌های وب قابل‌اعتماد و با عملکرد بالا با استفاده از معماری الهام‌گرفته از الم، انتشار رویداد و مؤلفه‌ها» (با عنوان لاتین Practical Application Development with AppRun : Building Reliable, High-Performance Web Apps Using Elm-Inspired Architecture, Event Pub-Sub, and Components) نوشتهٔ Yiyi Sun، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2019. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

Explore the concepts, patterns, and architecture behind AppRun applications. With this end-to-end guide, you will be able to build web apps fast to the market with the low learning curve and high development productivity. You will learn how to break down the application logic into three decoupled parts: state, view, and update. You will then see how to connect web page events to the AppRun event life-cycle, route user interactions, access data from the remote servers, compose the user interface using components, and integrate 3rd party libraries. Following examples of various apps, such as the counter app, to-do app, weather app, hacker news reader app, and blog app, you will have all the techniques for developing your AppRun apps including the line of business apps. You will also review wider development concepts such as using strongly typed states practically, unit testing strategies for app state changes, time travel debugging, async web API invocation, server-side virtual DOM, module compilation optimization, the developer tools, and more. What You'll Learn • Use AppRun to develop web apps end-to-end • Understand the technology behind AppRun • Evaluate and compare architecture design • Develop applications using Elm architecture, event publication and subscription, and components. Who This Book Is For Web app developers and architects; useful for beginners learning front-end development and more experienced developers interested in learning about AppRun and modern development concepts and principles more generally Table of Contents 4 About the Author 12 About the Technical Reviewer 13 Acknowledgments 14 Introduction 15 Chapter 1: Getting Started 17 Background 17 Introducing AppRun 21 AppRun Architecture 21 Event Pub-Sub 23 Component 25 A Counter App 27 Event Lifecycle 29 Watch the State 29 Virtual DOM 30 State History 31 Typed Architecture 33 State 34 View 35 Update 35 Summary 38 Chapter 2: AppRun Development Environment 39 The AppRun CLI 39 Project Boilerplate 40 Compiler 41 JSX 42 Class 42 async and await 43 Module Bundler 44 Development Server 44 Visual Studio Code 45 IntelliSense 46 Gradually Adding Types 47 Type Checking 48 Code Snippets 50 Integrated Terminal 53 Debugging 54 Summary 58 Chapter 3: Model the State 60 State Concept 60 Initial State 62 State History 62 Immutable State 65 Immutable Array 65 Immutable Object 68 Persistent State 74 Local State 74 Cloud State 76 Source Code of Examples 81 Summary 82 Chapter 4: View Patterns 83 View Concept 83 The View Function 83 HTML vs. JSX 85 Custom JSX Tag 86 Virtual DOM 87 JSX Patterns 88 Custom JSX Tags 89 JSX Fragments 91 Create a List 91 Create a List Item 92 Filter a List 92 Apply a Class 93 Set the Element Property 93 Set Active Classes 94 Show and Hide Elements 94 Components 95 Component Class 95 Create Components in Code 97 Create Components in JSX 98 Two To-Do Lists 100 Web Components 102 Source Code of Examples 106 Summary 106 Chapter 5: Event Patterns 107 Event Concept 107 DOM Events 108 AppRun Events 108 Connect the Events 109 Global and Local Events 111 User Input 114 Click Events 114 Input Event 117 Keyboard Events 119 Mouse Events 123 Brower History Event 126 Web Workers 129 Source Code and Examples 131 Summary 132 Chapter 6: Asynchronous Events 133 Asynchronous Operations 133 Callbacks 134 Promise 134 async/await 135 AppRun async Event Handlers 136 Server Requests 137 XMLHttpRequest 138 The Fetch API 139 Pulling Data 140 Weather Application 140 The Data API 143 Data Access Architecture 144 Pushing Data 146 Hacker News Reader 146 The Hacker News API 148 The Story List 149 The Story Detail 150 The Application 151 Source Code and Examples 153 Summary 153 Chapter 7: Single-Page Applications 155 SPA Architecture 156 HTML 158 Main Program 158 Components 160 Routing Events 161 Location Hash Change Event 161 Generic Routing Events 162 History API 163 SPA Modules 166 Static Import 166 Dynamic Import 166 Native Modules 170 Source Code and Examples 175 Summary 176 Chapter 8: Third-Party Library Integration 177 Example: An Admin Dashboard 178 Responsive UI 179 Dashboard Widgets 179 Third-Party Libraries 181 Extended Architecture 182 Layout and Styles 183 Sidebar Menu 186 Rows and Columns 187 Notifications and Alerts 189 Cards 190 Components and Widgets 191 Chart 191 D3 Map 196 Data Tables 199 Calendar 201 Source Code and Examples 203 Summary 204 Chapter 9: Server-Side Rendering 205 AppRun SSR 205 SPA Architecture 206 AppRun SSR Architecture 207 An SSR/SPA Example 208 The SSR for SPA 209 Server Application 210 View Engine 212 Site Layout 212 Routing 214 Components 217 Client-Side Script 220 The SPA for SSR 221 ASP.NET MVC 222 Virtual DOM Filter 224 The Controller 227 The Layout 228 Source Code and Examples 231 Summary 231 Chapter 10: A Real-World SPA 232 Single-Page Application 233 Page Header 235 Main Section 236 Components 236 Home Page 236 Sign In Page 237 Sign Up Page 238 Settings Page 239 Profile Page 240 Article Page 241 Editor Page 242 The Main Program 243 Back-End API 244 Core Data Models 244 API Data Models 245 API Layer 247 Authentication 249 Get User 250 Set User 250 Authorization 251 Sign-In 252 Sign-Out 254 Event Decorator 255 Modal Dialog 255 Live Demo and Source Code 259 Summary 259 Chapter 11: Unit Testing 260 Jest Framework 260 Test Suites and Tests 262 Test Coverage 263 Asynchronous Tests 264 Mock API 265 Testing Events 266 Testing Views 272 Debugging the Unit Tests 275 Live App and Source Code 277 Summary 277 Chapter 12: AppRun DevTools 278 Use AppRun DevTools 278 Command Line in the Console 279 Components 280 Events 283 Debug Events 285 Extend the Command Line 287 Register the Command 287 Generate Unit Tests 288 Generate Snapshot Tests 291 Browser DevTools Extension 295 Summary 297 Index 299 Front Matter ....Pages i-xviii Getting Started (Yiyi Sun)....Pages 1-22 AppRun Development Environment (Yiyi Sun)....Pages 23-43 Model the State (Yiyi Sun)....Pages 45-67 View Patterns (Yiyi Sun)....Pages 69-92 Event Patterns (Yiyi Sun)....Pages 93-118 Asynchronous Events (Yiyi Sun)....Pages 119-140 Single-Page Applications (Yiyi Sun)....Pages 141-162 Third-Party Library Integration (Yiyi Sun)....Pages 163-190 Server-Side Rendering (Yiyi Sun)....Pages 191-217 A Real-World SPA (Yiyi Sun)....Pages 219-246 Unit Testing (Yiyi Sun)....Pages 247-264 AppRun DevTools (Yiyi Sun)....Pages 265-285 Back Matter ....Pages 287-293
دانلود کتاب توسعه کاربرد عملی با AppRun: ساخت برنامه‌های وب قابل‌اعتماد و با عملکرد بالا با استفاده از معماری الهام‌گرفته از الم، انتشار رویداد و مؤلفه‌ها