Angularjs for large web application [closed] - angularjs

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Would angularjs be suitable to handle large scale web application? Is reliable enough for good performance at scale ?

Its depend on your requirement. As Angular is the best for CRUD application, if your application doesn't have too much complexity then you can surely go with Angular. If you required too much DOM manipulation which usually requires for gaming app then Angular can be painful.
Is Angular slow?
Well, In some cases, you may feel that angular is very slow. Specially when you iterate over the complex JSON then there may be too much data binding so angular gets slow after 2500+ watches.
There are lots of directive to overcome this problem. Also day by day Angular itself updating their library to solve these kind of problems. Some of the directives which is helpful to improve performance of Angular are as below:
Angular Once
Angular InView
Quick ng-repeat Directive (Customized ng-repeat directive)
Karl Seamon's saying about Angular Performance
Points that should be clear in mind while using Angular for Large Application
The best feature of Angular can be painful if you don't implement it in a right way. if you are new to angular and you have worked with jQuery then first of all you need to change your thinking towards problems to Angular way rather than jQuery. Read this
Angular Scope
Angular Directive
Simply, you must be clear about the basic concepts of an Angular to use it properly. Angular also gives amazing feature of unit testing. You should write tests for each smaller chunks of your code.
I'm fan of angular. It's awesome. I would surely recommend you AngularJS.

It really comes down to your definition of a large web application. As Angular is modular by design and integrates seemlessly out of the box with unit testing in that regard its great for large web applications.
Angular is a framework for building applications and once you get it more or less right your benefits pop right out at you. Try doing similar things with jQuery or even Backbone and you will have problems (jQuery might be an unfair comparison, unless we speak of the ability to organize modular code easily).
This is a great article that outlines angular in large applications.
Also from wunderkind Brian Ford this article.

Related

Prerequisite for learning Angular [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I need to learn Angular for working on a project.
I am a backend Java/Spring developer
I have knowledge of HTML and Javascript. I have also worked on basic Knockout.js.
What are the prerequisite for learning Angular ?
Moderate knowledge of HTML, CSS, and JavaScript.
Basic Model-View-Controller (MVC) concepts.
The Document Object Model (DOM).
JavaScript functions, events, and error handling.
HTML : Most of the templates we create in angularJS is in the form of handcrafted htmls. i.e. So you must know that what are forms in html and what are tags ng-form etc.
CSS : While hand crafting template you should require css to make more attractive UI design.
DOM : Document object model and how document is created. If you have good jquery background you can easily pick up this part.
Object Oriented JavaScript: Global name space: AngularJS heavily uses javascript name space. i.e.
Object Oriented JavaScript: Inheritance: Inheritance is very important concept in JavaScript. Inheritance is heavily used in all the frameworks in JavaScript. i.e.
var Employee = function(fname) {
this.fname =fname;
console.log("Your first name is "+fname);
}
var fistEmployee = new Employee("John");
var secondEmployee = new Employee("Jim");
fistEmployee.prototype.lastname = function(lname) {
this.lname=lname;
console.log("Your last name is "+lname);
}
So using prototype you can easily add properties on the fly.
Model View Whatever(MVW): This term is used heavily by all AngularJS developers. It is coined by Google. It is simple MVC concept.
Separation of Concern(SOC): SOC concept is heavily used in AngularJS. In angularJS all the controllers, directive, services and factories are made for SOC. It provide more lean and cleaner code. Also re usability automatically increases if you use SOC concept.
Promises : Promises are nothing but callbacks. When you call any AngularJS service it will be called asynchronously. When response is send from service callback hold the response and do the needful.
Test Driven Development : Best thing about AngularJS is you can easily write test script so that when you go home, you can easily have sound sleep.
You see this 1 hour Angular 7 tutorial video which explains everything what you need to start with Angular. If you can watch you will have a better understanding of things.
So in all you need five important pre-requisites for Angular :-
You need to know JavaScript in depth.You should have crystal clear concepts on Javascript closures , Javascript IIFE , prototyping and so on.
A good understanding of NodeJs is must and especially how to use NPM ( Node package manager).
You need to know typescript.
A good understanding of module loaders , binders , commonjs , AMD , UMD , ES5 and so on.
This point is not compulsory its optional. If you know VS code you can learn lot of internals of Angular. As every developer has his own favorite IDE and Editor this step is optional. I would still suggest do your first couple of practicals using VS code and then proceed with your favorite IDE.
Below is the road-map of the pre-requisites and how to learn Angular. You can start learning Angular pre-requisites from this Learn Angular Step by Step article which covers around 11 labs in depth.
And yes if you are preparing for Angular interview jobs you can check video 50 Angular Interview Questions with Answers.
The most prerequisite for learning latest Angularjs (version 5.x right now - https://angular.io/tutorial) is:
TYPESCRIPT AND SOME OOPS LIKE INHERITENCE!
Everyone knows that the basics of HTML/CSS/JS is the prerequisite of everything in web development.
Today, Many people are diving into learning angularjs without knowing or just a bit about typescript. This will make learning angular a hell of a trouble, so i thought to put my 2 cents here.
Also the top most selected answer does not emphasize on the importance of learning Typescript, it's weird.
Typescript is not known to many beginners in web development. Even it's declaration is confusing if you do not study it first.
So please start from here if you wanna learn AngularJS:
https://www.typescriptlang.org/docs/handbook/2/everyday-types.html
I think you should know about patterns of desing like MVC on angular. that's the common.
And how to use properly some parts of angular, i'll share you a guide that i've found of good practics coding in angular.
Hope this help you to start coding on Angular
Angular Style Guide

How is Angular JS better than Knockout JS OR Should I prefer Angular JS or Knockout JS? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Which one is easy to use?
What are the features of preference in both?
What is the percent of usage of both?
What should we know before using both or anyone?
That is based on your need.
For data driven app. Choose Angular. With it's nice data binding
The fundamental difference between the two solutions is that AngularJS
manages the whole application and defines guidelines on how the
application code should be structured, whereas with KnockoutJS the
application structure is entirely up to you.
Knockout has a low barrier of entry, but is also harder to manage when
code base and complexity grows. It is not easy to build the necessary
infrastructure correctly, and poor decisions made in structuring code
may cost a lot to fix in the future.
Angular’s ability to bind directly to plain objects, modular
structure, and strict development guidelines prevent many issues right
from the start, and provide a strong architectural foundation for the
application.
Knockout is primarily used to control UI representation in lower
complexity applications, whereas Angular is a JavaScript framework
that is much better suited for large, complex enterprise applications.
It provides not only UI binding, but also best practices for
application structure, development and testing.
Few more added to this:
Knockout is like light weight Angular
Knockout doesn't have routing, Angular have it. But if you want to
use routing in Knockout you may use Sammy.js / A Small Web Framework
with Class / RESTFul Evented JavaScript
Knockout and Angular have automatic data binding
Knockout is popular in .net development, while Angular is backed up
by Google Angular has service, directives, Knockout doesn't have
References :
https://www.devbridge.com/articles/angular-vs-knockout-similarities-and-fundamental-differences/
https://www.codementor.io/reactjs/tutorial/reactjs-vs-angular-js-performance-comparison-knockout
Angular.js vs Knockout.js vs Backbone.js
https://www.quora.com/How-do-Angular-js-and-Knockout-compare

Can Angular JS be the replacement for template engines like EJS or Jade? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am new to MEAN stack. I have seen Template engines being used while developing node JS apps and realized it can be used to make static documents dynamic by integrating values from server.
However, I see Angular JS facilitates same stuff. Then why use template engines ? Is it absolutely necessary to use them? Can angular completely replace them ?
I think you're on the right track simi. When starting with Angular it is tempting to do "double templating" - templating on the server side and on the client side. Unless you absolutely need the server to render HTML your server should just be an API, the usual REST services serving JSON. Expose an API and treat your Angular application like any other client (Android, iOS). To see an example of this approach in action check out the Angular Fullstack Yeoman generator.
There are valid reasons to want the server to render full HTML responses, SEO probably being the most common. Whether or not it is worth the extra effort is a design decision.
As with all questions that are "this" or "that" the answer is "it depends".
First of all they aren't exclusive, so there isn't a reason to choose between them, but you should try to use them in a predictable way in your code base
Server side templates are good because it's generally less complex and it reduces client compute costs. If a part of your page doesn't need to be dynamic on the client side, it's a good candidate for EJS. An example might be a dynamic menu in a CRM application where you'll only change the content with config updates.
Angular (and other client-side MVW frameworks) offer lots of great things really. The first immediate benefit is that you can easily load dynamic content on the client side, which can result in better responsiveness and reduce the complexity of the backend (assuming you already needed an API layer, you can get a lot of stuff for free). A good example would be an auto-refreshing homepage feed which reloading the whole page is a waste. But most of that we've had for a long time with AJAX. Angular also makes it easy to generate the template so you can, once again, write less code and (if done right) more readable, testable code.
I think the right answer is to use both as you see fit.
NO. Angularjs cannot be the replacement for template engine like EJS or Jade. You need to use any one of the template engine. If you like ejs templating engine then you may use your angularjs code inside that template. Just suppose this is your regular html and you're including angularjs in it.

Ionic framework + Google material design, which framework to use? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I really want to use Ionic Material Design into my app. I am currently using Ionic Material: http://ionicmaterial.com/
It is really easy to use and it work great sometime but not the others. It is little bit buggy on the actual devices and it is NOT PRODUCTION ready (and I am using it on a production app...)
I heard someone has success with Ionic Material - http://materializecss.com/
But is this play well with Ionic? I heard it need jQuery. Does jQuery play well with Ionic? (never combine these 2 together...since jQuery is evil and why we use Ioinc + AngularJS the first place...correct me if I am wrong of this opinion...)
And there is other option out there. And I heard a lots of painful stories Angular Material with Ionic...anyone agree?
I just want to find the best framework before I dive myself into modification. I will start a poll if I can!
I haven't used the Ionic Material tool much, but agree it is primarily a fun dev tool and not ready for production (not that it might be eventually, but its certainly not as field tested as Ionic itself).
Can Ionic and jQuery work together? Sure. Its really can Angular and jQuery work together, since Ionic leverages Angular. Its common to use jQuery with Angular (Angular itself uses a subset of jQuery already, and will use the entire jQuery version if it is found on the page.) jQuery is not evil, the prolific use of jQuery for simple things that can be done without jQuery is what people often refer to as 'evil'. Think of it like loading jQuery just to use it for 5 lines of JavaScript that could have been written without jQuery to begin with.
You can also look at Angular Material (https://material.angularjs.org) for a Google backed project that was actually built with help from the Ionic team. However, it is not Ionic and not finished either. I use it in my projects though haven't used it much on mobile yet (it is designed to meet Material Design spec, which is designed for all platforms).
Lastly, you could just use Ionic. There are some customizations you can make, and I don't know what your vision is exactly, but I think it is the most robust option for hybrid apps today.
I'm using materializecss without any problems. jQuery is mandatory but I did not have any problems with it. I also tried muicss but I had some issues on the iPhone 6 with the button animation.

Bootstrap versus AngularUI [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am looking for a pro/con argument for using either Bootstrap or AngularUI with Angular. From what I understand, AngularUI is a set of directives that have Bootstrap so I can use Bootstrap responsive aspects. Can I also use straight Bootstrap and Angular instead of AngularUI? What are the benefits of either approach?
Hopefully this will help.
Angular UI, but more specifically UI-Bootstrap is bootstrap written natively for AngularJS. The reason being is some features in bootstrap use jQuery, which when used with angular, can produce adverse results than what is expected.
This can become very opinionated. But seriously, use Angular-UI. You'll potentially run into more problems if you try to mix the two (Bootstrap 3 + Angular).
Quote from "Thinking in AngularJS" if I have a jQuery background?
Don't even use jQuery. Don't even include it. It will hold you back. And when you come to a problem that you think you know how to solve in jQuery already, before you reach for the $, try to think about how to do it within the confines the AngularJS. If you don't know, ask! 19 times out of 20, the best way to do it doesn't need jQuery and to try to solve it with jQuery results in more work for you.
Please see Stop using jQuery as a crutch in angular for a general idea of the issues.
EDIT: Changed language
Although some people are marking this as opinion there is an answer here that can help the OP.
AngularUI and Bootstrap really aren't a either/or type of choice. They can happily, and probably should live, side by side.
Bootstrap is mainly a CSS library with some javascript UI bits on the side. The AngularUI library is just more UI bits coded up to work better with angular. There is a lot of overlap between the two but each project is a little different so use each where it makes sense.
I'd assume that your app will benefit from using both. I have 3-4 apps right now with both libraries included and happily working together.
Angular UI A lot of helpful utilites for Angular
Bootstrap CSS Framework
UI Bootstrap Angular UI utilities focused on making Bootstrap work awesome with Angular
;)

Resources