Skip to main content

AngularJS

AngularJS is an open-source JavaScript framework, maintained by Google. Its goal is to augment browser-based applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier.

Why AngularJS:

HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets to extend HTML vocabulary for the application. The resulting environment is extraordinarily expressive, readable, and quick to develop. AngularJS is a toolset for building the framework most suited to application development. It is fully extensible and works well with other libraries.

Benefits:
  • Uses primitive JavaScript types instead of function wrappers
  • Don't need to write all the event listening and event triggering, loaded with functionality
  • Decouple the client side of an application from the server side. This allows development work to progress in parallel, and allows for reuse of both sides.
  • Decouple DOM manipulation from application logic. This improves the testability of the code.
  • Fast development and makes testing easy and offers many testing tools
  • Out of the box features: Data binding, Data filtering/sorting, Data templates, Ajax support, Form validation, Routing, History support, Deep linking, Modular and reusable components, Loosely coupled architecture (dependency injection), MVC-style applications, Architected with unit testing in mind
  • AngularJS liberates from having to do the following:
    • Register callbacks, Manipulate the DOM programmatically
    • Move data in and out of the UI manually with code
    • Writing a bunch of initialization code just to get started
Liabilities:
  • Need to invest time to understand the DOM and angular syntax properly.
  • Writing directives is not easy. It’s the most complex part of writing Angular code.
  • Form validation framework of angular is not perfect yet. It still needs some tweaks.
  • Clutters the global namespace with every single controller that we add and JavaScript errors happen if we don’t clutter the window object.
Comparison with Backbone.js: Backbone.js is a very lightweight, which means we have to type more, but might be a good fit for a broader spectrum of apps. Backbone allows to structure the JavaScript code in an MVC fashion. AngularJS is way bigger, provides a much higher level of abstraction and is very opinionated on how we should develop an app. It's a complete solution, with testing environment and philosophy behind it that means, building an app is super-fast, but it doesn't have to fit everyone nor every app.
More on http://angularjs.org/

Popular posts from this blog

WCF Service Exception PlainXmlWriter+MaxSizeExceededException

For a WCF service the exception 'System.ServiceModel.Diagnostics.PlainXmlWriter+MaxSizeExceededException' generally occurs when we switched on logging and tracing.   A message was not logged. Exception: System.InvalidOperationException: There was an error generating the XML document. ---> System.ServiceModel.Diagnostics.PlainXmlWriter+MaxSizeExceededException: Exception of type 'System.ServiceModel.Diagnostics.PlainXmlWriter+MaxSizeExceededException' was thrown.   The reason is that "maxSizeOfMessageToLog" configuration parameter value is set to a value lower than the size of the message to log. < system.serviceModel>   < diagnostics > <!-- log all messages received or sent at the transport or service model levels --> < messageLogging logEntireMessage = " true " logMessagesAtServiceLevel = " true " logMalformedMessages = " true " logMessagesAtTransportLevel = " true "    maxMessa...

Implementing Parallelism With A SearchResultCollection

Implementing Parallel.ForEach with a SearchResultCollection: The below piece of code helps to check the given user is a part of the given active directory group. To implement Parallel.ForEach with a SearchResultCollection, do the casting with the SearchResult object and covert it into a list. //// Directory Searcher var directorySearcher = new DirectorySearcher(string.Format("(CN={0})", groupName)); //// Find group var searchResultCollection = directorySearcher.FindAll().Cast ().ToList(); Parallel.ForEach(searchResultCollection, searchResult => {  // enumerate members  var resultPropColl = searchResult.Properties;  Parallel.ForEach(resultPropColl["member"].Cast ().ToList(), member =>  {    var memberEntry = new DirectoryEntry("LDAP://" + member);    var userProperties = memberEntry.Properties;    if (GetUserNameFromProperties(userProperties, "sAMAccountName") == userName)    {      return true; ...

ISAPI & CGI Restriction configuration missing in IIS

In windows 7 by default ISAPI & CGI Restrictions are not configured. To enable ISAPI & CGI restrictions, GoTo -> Control Panel -> Programs -> Click on "Windows features on or off -> Expand Internet Information Services - >Expand World Wide Web Services ->Select CGI and ISAPI extensions and Click OK. After enabling, Check in IIS, Open your IIS and the feature will be available. What is ISAPI and CGI restrictions : ISAPI and CGI restrictions are request handlers that allow dynamic content to execute on a server. These restrictions are either CGI files (.exe) or ISAPI extensions (.dll). You can add custom ISAPI or CGI restrictions if the IIS configuration system allows this.