Angular 2 Services
I always had a thing for the less traveled roads and it reflects itself in this book, Angular Services, as well. When it is about showing the power of front-end frameworks, there are tons of tutorials and contentsÂ on how to build To-Do list applications, or time trackers, or any other use cases and path ways which has been explored, explained and exhausted excessively.
What I’ve aimed for in this book is slightly different. Yes, the subject still Angular Services and we learn about all Angular framework features along the way, but the vehicle is a Machine Learning flavored application called ‘The Sherlock Project’ which explores:
- Reactive eXtension (rx.js) and observable objects
- The importance of a good Model
- The HTTP requests and how Angular Http module or third party libraries handle it
- The 3Â way data-binding offered by the modern noSQL database: Firebase Realtime Database
- Data visualization provided by VizJS
What makes this book different is the use of Regression algorithm to explore major news agency outlets and other online resources, in order to get some insight about a news item. Basically we are using Angular Services as a host to severalÂ tools and concepts, so they work together and deliver four main tasks:
- collect data
- analyse and organize keywords
- generate reports for items we are interested in
- and finally evaluate the accuracy of the generated reports
Perhaps that is the main reason that unlike other books, we didn’t invest much efforts on how pretty our application looks, rather we focused on what it does and how unique it is. The code is open source and you are most welcome to take it to the next level by adding missing bits and pieces and decorating it with all the pretty bells and whistles that a front-end application deserves.
What this book covers
Chapter 1, Setting Up the Environment, tells you about what you need to get a basic Angular project up and running. The WebStorm IDE (offered by JetBrains) is free for non-commercial use and open source project. The official seed project (offered by Angular team) introduced in this chapter contains all the dependenciesÂ (Angular, TypeScript, WebPack and so on) plus the basic components to render a simple page.
Chapter 2, The Wire-Frames, demonstrates the road map we are going to explore for the rest of the book. It explains the components we are going to implement for this project andÂ briefly introduces the services we are going to create to deliver the task of each remaining chapters.
Chapter 3, The Collector Service – Using Controllers to Collect Data, describesÂ the basic Angular concepts like Components, data-binding, decorators and so on during implementation an HTTP service for hitting on RSS outputs and gathering some news. This is where Firebase Realtime Database will be introduced as well and we will see how to use it to record JSON objects as database entries.
Chapter 4, The Rating Service – Data Management, introduces the pipes for the first time and implements a sorting pipe for ordering data in a particular way. In this chapter, we will see how to use TypeScript classes not only to implement Components and Services, but also for creating business logic for models as well.
Chapter 5, The Notifier Service – Creating Cron Jobs in Angular, createsÂ the logic for automated tasks.Â It will demonstrate a data flow which utilizes theÂ services created in the previous chapters for collecting, rating, and storing qualified news in a list ready to be fetched and notified by the application or later via email. We will seeÂ how to implement the helper functions for calculating dates, finding out dated items, and keeping the database clean on each automatedÂ job cycle, as well.
Chapter 6, The Evidence Tree Builder Service – Implementing the Business Logic, presentsÂ the idea of gathering evidence which supports investigation for theÂ article of our interest. We will study the waysÂ we evaluateÂ an article and how to measure, weigh down, and lift up the value of certain words in any article. We’ll learn how to see an article as a bag of words and how to use this concept to calculate. Thus chapter also introducesÂ two major libraries Google Custom Search Engine (CSE) and VisJS for data visualization.
Chapter 7, The Report Generator Service – Creating Controllers to Set Report Template, exposes the possible ways for implementing parent child interaction mechanisms where the child gets data models provided by the parent and fires back requests to the parent. We will learn how to implement components to read the result of previously saved data objects, parse them, and assemble new objects that can be used as building blocks of a report.
Chapter 8, The Accuracy Manager Service – Putting It All Together, implements theÂ cure and prevention codes inside the application and save the programming resources by halting undesired situations. WeÂ will learn how to use global variables exported from the application module in order to store local variables and analyze their contents on demand.
|Download Ebook||Read Now||File Type||Upload Date|
|PDF, EPub||May 30, 2020|
Do you like this book? Please share with your friends, let's read it !! :)How to Read and Open File Type for PC ?