Book Image

Data Oriented Development with Angularjs

Book Image

Data Oriented Development with Angularjs

Overview of this book

Table of Contents (17 chapters)
Data-oriented Development with AngularJS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Appendix A. Yeoman

Today Node.js (available at http://nodejs.org/) needs no introduction, but for the benefit of those who haven't crossed paths with it yet, here's an introduction—Node.js lets developers write server-side code in JavaScript. Yes, it's the same JavaScript, which used to run only in browsers until a few years ago. The same JavaScript, which was confined to the frontend, was suddenly unleashed on the world of backend which was previously accessible to server-side languages such as Java, C#, Ruby, Python, and the like.

Note

Consequently, you can access the filesystem, write data-intensive applications which access relational DBs or NoSQL DBs, write a web server with Node.js, and so on.

Previously, for doing anything with the Web, developers were supposed to learn and write code in at least two different languages—a server-side language and JavaScript. Node.js changed this and made our lives easier because the frontend and the backend code can be written in the same language now.

It is said that for a programming language to gain mass adoption, it needs a successful and famous library/framework. For example, Rails did it for Ruby. Node.js is doing the favors for JavaScript—so much so that this survey (available at http://adambard.com/blog/top-github-languages-for-2013-so-far/) pegs JavaScript as the top language for 2013, based on the number of repositories created on GitHub.

Now when we start coding in any language, we typically use an IDE-like Visual Studio for .NET and maybe Eclipse for Java, or we might use powerful text editors such as Sublime Text or Emacs. The extra work these IDEs do for us is to generate a project skeleton when we create a new project. However, the text editors lack this support because they are not programming language-specific. So what do we do when we are starting a new Angular project? Surely, we can create a project structure manually, but it wouldn't be too productive, right? Then we would have to do this cumbersome activity again for any new project we create. Also realize that typically, there are three activities required in a project of reasonable complexity, irrespective of the programming language, where automation could help developers:

  • Scaffolding: The dictionary meaning of a scaffold is a temporary structure for holding workers and materials during the erection, repair, or decoration of a building. So, scaffolding in programming terms means generating an agreed upon (based on the best practices for that language or framework) folder structure for us.

  • Dependency management: Any sufficiently complex project has to use external libraries/frameworks, and in this day and age, we can't be expected to manually download the DLLs, JAR files, or JavaScript/CSS files and manually include them in the correct path.

  • Build management: Once we are done with the development, we need to build the source code and possibly package it as an EXE, JAR file, or a minified JavaScript file.

This is where the tools, which we are going to discuss in the next section, such as NPM or Yeoman come handy.