JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...

Popular Tags - Filter using the Funnel

Current selected tags: 'Backbone.js', 'pattern'. Clear
Scoop.it!

Proposing a native Event Emitter in JavaScript

Proposing a native Event Emitter in JavaScript | JavaScript for Line of Business Applications | Scoop.it

JavaScript events are very powerful, they give you the power to capture real world events in real time. For example, when a user moves their mouse in the browser or when they click.

Using JavaScript events to interact with DOM objects defined Web 2.0 and is still widely used (thanks to jQuery and similar libraries) but it has its limitations, the events are predefined and tied to the browser BOM and DOM.

A more powerful implementation of JavaScript Events is in Event Emitters. Most of the popular JavaScript libraries/frameworks have their own implementation of Event Emitters.

My framework of choice is backbone.js and it uses Backbone.Events to implement Event Emitters.

No comment yet.
Scoop.it!

Scaling Isomorphic Javascript Code

Scaling Isomorphic Javascript Code | JavaScript for Line of Business Applications | Scoop.it

Design patterns are the bread and butter of application development. They encapsulate and outline the concerns of the application and the environment of the in which it exists. Between the browser and the server these concerns can vary widely:
* Is the view ephemeral (e.g. on the server) or long-lived (e.g. in the browser)?
* Is the view reusable across different use-cases or scenarios?
* Should the view be annotated with application-specific tags or markup?
* Where should the bulk of the business logic reside? (in the model? in the controller?)
* How is the application state persisted or accessed?
Lets explore some of the existing patterns and how they answer these questions:
* Model-View-Controller
* Model2
* Model-View Presenter and Model-View-ViewModel
* Modern Javascript Implementations
* Real-time Implications
* tl;dr? Introducing Resource-View-Presenter
* Conclusion

No comment yet.
Scoop.it!

Backbone patterns

Here, I try to document the good practices that our team has learned along the way building Backbone applications.

* Model patterns

* View patterns

* General patterns

* Conventions

* Anti-patterns

No comment yet.
Scoop.it!

Structuring jQuery with Backbone.js

One of the difficulties in building large jQuery applications is keeping code organized. It is very easy to get lost in a Christmas tree of doom-a deeply nested list of callback functions that seems to hold every single feature and interaction. The truth is that jQuery does not provide any guidance on organization or structure for code.

The good news is that you don't have to choose exclusively between jQuery and well-structured code that SPA libraries and frameworks help you to write. You can combine the simplicity and interactivity of jQuery-based applications with the building blocks of good structure from Backbone.js to create highly interactive pages that also have good code organization and structure.


 

From jQuery to Backbone.js: A Migration
It's tempting to jump straight in to Backbone.js at this point, but that would be a disservice to most developers. Starting from scratch is easy. The real challenge lies in taking existing code and migrating it to something else.
Taking a migration approach to Backbone.js does two things:
* Shows that Backbone.js can be added to existing projects, without an all-or-nothing re-write
* Shows the similarities and differences between writing jQuery on its own and using Backbone.js to structure jQuery

 

The Add form that was built with plain jQuery code will be migrated to Backbone.js, one step at a time. Before that can happen, though, you'll need to configure Backbone.js in your project.


No comment yet.
Scoop.it!

Refactoring to Backbone.js

Refactoring to Backbone.js | JavaScript for Line of Business Applications | Scoop.it

Deciding mid-stride to adopt a JavaScript application framework exposes many difficult decisions. What should be targeted first? How does one deal with untested, legacy code? It can make transitions a scary, tedious process.

At Viget, we've found Backbone to be a great tool for bolstering existing code with greater structure and functionality. With an active community and a number of superset frameworks (such as Thorax and Marionette), it gives us flexible tools to tackle current problems with an outlet for more elegant solutions down the road.

We've started to trend towards a series of steps that help to translate code over in a safer, more testable way.

* PULL HTML CONSTRUCTION INTO A TEMPLATE
* BREAK OUT DATA PROCESSING
* FINISHING THINGS UP WITH BACKBONE.VIEWS

No comment yet.
Scoop.it!

Want to play with different MVC Frameworks? Try TodoMVC!

Want to play with different MVC Frameworks? Try TodoMVC! | JavaScript for Line of Business Applications | Scoop.it

Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, Spine and many more...

No comment yet.