SlideShare a Scribd company logo
Emberjs and ASP.NET
Central Penn .NET Code Camp – November 14, 2015
Michael Melusky @mrjavascript
About the Speaker
 Michael Melusky
 Software Engineer for Audacious Inquiry in Baltimore, MD
 Instructor at Pennsylvania State University, Franklin and Marshall, and ITT Technical
Institute
 Regular speaker at Java and .NET user group meetings and code camps
What is Emberjs?
 Emberjs is a framework for creating ambitious web applications
 Basic knowledge of Node.js, Javascript and CSS 3 is required
Haven’t we heard this before?
 Backbone.js
 Angular.js
 Ruby on Rails
 ASP.NET MVC
 Spring MVC
Creating an Emberjs application
 npm install ember-cli –g
 ember new my-app
 ember server
 ** DEMO **
What makes up an Emberjs application?
 Templates
 Components
 Controllers
 Models
 Routes
Templates
 Templates, written in the Handlebars language, describe the user interface of your
application.
 In addition to plain HTML, templates can contain expressions, like {{title}} or
{{author}}, which take information from a component or controller and put it into
HTML.
 They can also contain helpers, such as {{#if isAdmin}}30 people have viewed your
blog today.{{/if}}.
 Finally, they can contain components such as a template listing blog posts
rendering a component for each post.
Components
 Components are the primary way user interfaces are organized in Ember.
 They consist of two parts: a template, and a source file written in JavaScript that
defines the component's behavior.
 For example, a blog application might have a component for displaying a list of
blog posts called all-posts, and another component for displaying an individual
post called view-post.
 If users can upvote a post, the view-post component might define a behavior like
when the user clicks the upvote button, increase the vote property's value by 1.
Controllers
 Controllers are very much like components, so much so that in future versions of
Ember, controllers will be replaced entirely with components.
 At the moment, components cannot be routed to (see below), but when this
changes, it will be recommended to replace all controllers with components.
Models
 Models represent persistent state.
 For example, a blog application would want to save the content of a blog post
when a user publishes it, and so the blog post would have a model defining it,
perhaps called the Post model.
 A model typically persists information to a server, although models can be
configured to save to anywhere else, such as the browser's Local Storage.
Routes
 Routes load a controller and a template.
 They can also load one or more models to provide data to the controller that can
then be displayed by the template.
 For example, an all-posts route might load all the blog posts from the Post model,
load the all-posts controller, and render the all-posts template.
 Similarly, a view-post route might load the model for the blog post to be shown,
load the view-post controller, and render the view-post template.
The Router
 The router maps a URL to a route.
 For example, when a user visits the /posts URL, the router might load the all-posts
route.
 The router can also load nested routes. For example, if our blogging app had a list
of blog posts on the left of the screen and then showed the current blog post on
the right, we'd say that the view-post route was nested inside the all-posts route.
 Perhaps the most important thing to remember about Ember is that the URL drives
the state of the application. The URL determines what route to load, which in turn
determines what model, controller, and template to load.
Write some more code…
 ** DEMO **
Ember enumerables
Standard Method Observable Equivalent
pop popObject
push pushObject
reverse reverseObjects
shift shiftObject
unshift unshiftObject
More code…
 ** DEMO **
Emberjs Object Model
 JavaScript objects don't support the observation of property value changes.
Consequently, if an object is going to participate in Ember's binding system you may
see an Ember.Object instead of a plain object.
 Ember.Object also provides a class system, supporting features like mixins and
constructor methods. Some features in Ember's object model are not present in
JavaScript classes or common patterns, but all are aligned as much as possible with the
language and proposed additions.
 Ember also extends the JavaScript Array prototype with its Ember.Enumerable interface
to provide change observation for arrays.
 Finally, Ember extends the String prototype with a few formatting and localization
methods.
Emberjs Object Model
Person = Ember.Object.extend({
say(thing) {
alert(thing);
}
});
Why choose Emberjs instead of Angular?
 Angularjs and backwards compatibility…
 In the end it’s your choice…
Roadmap for Emberjs
 Emberjs is moving away from Controllers
 Move everything into Components
Thank you for coming
 Twitter/Github:
 @mrjavascript

More Related Content

What's hot (20)

PPTX
Creating a custom connector in mule
Achyuta Lakshmi
 
PDF
Difference between asp.net web forms and asp.net mvc
Umar Ali
 
PDF
AngularJS - introduction & how it works?
Alexe Bogdan
 
PPTX
Scatter gather in mule
Anirban Sen Chowdhary
 
PPTX
Angular js
ymtech
 
PDF
Spring MVC
Aaron Schram
 
PPTX
Intro to angular
Zach Barnes
 
PPTX
Scatter and gather in mule
Rajkattamuri
 
PPT
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
PPTX
ASP .NET MVC
eldorina
 
PDF
ASP.NET MVC 3
Buu Nguyen
 
PPTX
Java Basics
Khan625
 
PPTX
Scatter gather in mule
Khasim Cise
 
PDF
Difference between jsf, servlet and jsp
Mindfire LLC
 
PPT
Silver Light By Nyros Developer
Nyros Technologies
 
PDF
Spring mvc
Hamid Ghorbani
 
PPTX
Java in Mule
Anand kalla
 
PPTX
J servlets
reddivarihareesh
 
PPT
MVC ppt presentation
Bhavin Shah
 
PPT
Asp.net mvc
Naga Harish M
 
Creating a custom connector in mule
Achyuta Lakshmi
 
Difference between asp.net web forms and asp.net mvc
Umar Ali
 
AngularJS - introduction & how it works?
Alexe Bogdan
 
Scatter gather in mule
Anirban Sen Chowdhary
 
Angular js
ymtech
 
Spring MVC
Aaron Schram
 
Intro to angular
Zach Barnes
 
Scatter and gather in mule
Rajkattamuri
 
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
ASP .NET MVC
eldorina
 
ASP.NET MVC 3
Buu Nguyen
 
Java Basics
Khan625
 
Scatter gather in mule
Khasim Cise
 
Difference between jsf, servlet and jsp
Mindfire LLC
 
Silver Light By Nyros Developer
Nyros Technologies
 
Spring mvc
Hamid Ghorbani
 
Java in Mule
Anand kalla
 
J servlets
reddivarihareesh
 
MVC ppt presentation
Bhavin Shah
 
Asp.net mvc
Naga Harish M
 

Viewers also liked (10)

PPTX
An afternoon with angular 2
Mike Melusky
 
PDF
Reactjs - the good, the bad and the ugly
Krasimir Tsonev
 
PPTX
Ember.js and .NET Integration
Mike Melusky
 
PPTX
Fun with lambda expressions
Mike Melusky
 
PPTX
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
PPTX
Fun with windows services
Mike Melusky
 
PPTX
An evening with querydsl
Mike Melusky
 
PPTX
Securing your azure web app with asp.net core data protection
Mike Melusky
 
PPTX
Fun with lambda expressions
Mike Melusky
 
PPTX
An evening with Angular 2
Mike Melusky
 
An afternoon with angular 2
Mike Melusky
 
Reactjs - the good, the bad and the ugly
Krasimir Tsonev
 
Ember.js and .NET Integration
Mike Melusky
 
Fun with lambda expressions
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Fun with windows services
Mike Melusky
 
An evening with querydsl
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Fun with lambda expressions
Mike Melusky
 
An evening with Angular 2
Mike Melusky
 
Ad

Similar to Emberjs and ASP.NET (20)

PDF
A Beginner's Guide to Ember
Richard Martin
 
PPTX
Introduction to Ember.js
Jeremy Brown
 
PPTX
Ember - introduction
Harikrishnan C
 
PDF
Riding the Edge with Ember.js
aortbals
 
PDF
Ember vs Backbone
Abdriy Mosin
 
PPT
Ember.js: Jump Start
Viacheslav Bukach
 
PDF
Intro to ember.js
Leo Hernandez
 
PDF
Ember presentation
Daniel N
 
PPTX
Introduction to Ember.js
Vinoth Kumar
 
PDF
Workshop 16: EmberJS Parte I
Visual Engineering
 
PDF
Create an application with ember
Chandra Sekar
 
PDF
Ember.js Meetup Brussels 31/10/2013
Hstry
 
PDF
Introduction to Ember.js and how we used it at FlowPro.io
Paul Knittel
 
ODP
Introduction to ember js
Adnan Arshad
 
PPTX
The road to Ember.js 2.0
Codemotion
 
PPTX
Full slidescr16
Lucio Grenzi
 
PDF
Stackup New Languages Talk: Ember is for Everybody
Cory Forsyth
 
PDF
Building Web Apps With Emberjs Jesse Cravens Thomas Q Brady
penictubbyng
 
PDF
Ember.js 101 - JSChannel NCR
Achal Aggarwal
 
PDF
Presentation on Ember.js
Jyaasa Technologies
 
A Beginner's Guide to Ember
Richard Martin
 
Introduction to Ember.js
Jeremy Brown
 
Ember - introduction
Harikrishnan C
 
Riding the Edge with Ember.js
aortbals
 
Ember vs Backbone
Abdriy Mosin
 
Ember.js: Jump Start
Viacheslav Bukach
 
Intro to ember.js
Leo Hernandez
 
Ember presentation
Daniel N
 
Introduction to Ember.js
Vinoth Kumar
 
Workshop 16: EmberJS Parte I
Visual Engineering
 
Create an application with ember
Chandra Sekar
 
Ember.js Meetup Brussels 31/10/2013
Hstry
 
Introduction to Ember.js and how we used it at FlowPro.io
Paul Knittel
 
Introduction to ember js
Adnan Arshad
 
The road to Ember.js 2.0
Codemotion
 
Full slidescr16
Lucio Grenzi
 
Stackup New Languages Talk: Ember is for Everybody
Cory Forsyth
 
Building Web Apps With Emberjs Jesse Cravens Thomas Q Brady
penictubbyng
 
Ember.js 101 - JSChannel NCR
Achal Aggarwal
 
Presentation on Ember.js
Jyaasa Technologies
 
Ad

More from Mike Melusky (13)

PPTX
Container Orchestration for .NET Developers
Mike Melusky
 
PPTX
Containerize all the things!
Mike Melusky
 
PPTX
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
PPTX
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
PPTX
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
PPTX
Reactive Web Development with Spring Boot 2
Mike Melusky
 
PPTX
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
PPTX
Introduction to react native with redux
Mike Melusky
 
PPTX
Xamarin.Forms Bootcamp
Mike Melusky
 
PPTX
An evening with React Native
Mike Melusky
 
PPTX
Progressive Web Apps and React
Mike Melusky
 
PPTX
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
ODP
Philly.NET Code Camp 2014.1
Mike Melusky
 
Container Orchestration for .NET Developers
Mike Melusky
 
Containerize all the things!
Mike Melusky
 
Building a Google Cloud Firestore API with dotnet core
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Reactive Web Development with Spring Boot 2
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Introduction to react native with redux
Mike Melusky
 
Xamarin.Forms Bootcamp
Mike Melusky
 
An evening with React Native
Mike Melusky
 
Progressive Web Apps and React
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
Philly.NET Code Camp 2014.1
Mike Melusky
 

Recently uploaded (20)

PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 

Emberjs and ASP.NET

  • 1. Emberjs and ASP.NET Central Penn .NET Code Camp – November 14, 2015 Michael Melusky @mrjavascript
  • 2. About the Speaker  Michael Melusky  Software Engineer for Audacious Inquiry in Baltimore, MD  Instructor at Pennsylvania State University, Franklin and Marshall, and ITT Technical Institute  Regular speaker at Java and .NET user group meetings and code camps
  • 3. What is Emberjs?  Emberjs is a framework for creating ambitious web applications  Basic knowledge of Node.js, Javascript and CSS 3 is required
  • 4. Haven’t we heard this before?  Backbone.js  Angular.js  Ruby on Rails  ASP.NET MVC  Spring MVC
  • 5. Creating an Emberjs application  npm install ember-cli –g  ember new my-app  ember server  ** DEMO **
  • 6. What makes up an Emberjs application?  Templates  Components  Controllers  Models  Routes
  • 7. Templates  Templates, written in the Handlebars language, describe the user interface of your application.  In addition to plain HTML, templates can contain expressions, like {{title}} or {{author}}, which take information from a component or controller and put it into HTML.  They can also contain helpers, such as {{#if isAdmin}}30 people have viewed your blog today.{{/if}}.  Finally, they can contain components such as a template listing blog posts rendering a component for each post.
  • 8. Components  Components are the primary way user interfaces are organized in Ember.  They consist of two parts: a template, and a source file written in JavaScript that defines the component's behavior.  For example, a blog application might have a component for displaying a list of blog posts called all-posts, and another component for displaying an individual post called view-post.  If users can upvote a post, the view-post component might define a behavior like when the user clicks the upvote button, increase the vote property's value by 1.
  • 9. Controllers  Controllers are very much like components, so much so that in future versions of Ember, controllers will be replaced entirely with components.  At the moment, components cannot be routed to (see below), but when this changes, it will be recommended to replace all controllers with components.
  • 10. Models  Models represent persistent state.  For example, a blog application would want to save the content of a blog post when a user publishes it, and so the blog post would have a model defining it, perhaps called the Post model.  A model typically persists information to a server, although models can be configured to save to anywhere else, such as the browser's Local Storage.
  • 11. Routes  Routes load a controller and a template.  They can also load one or more models to provide data to the controller that can then be displayed by the template.  For example, an all-posts route might load all the blog posts from the Post model, load the all-posts controller, and render the all-posts template.  Similarly, a view-post route might load the model for the blog post to be shown, load the view-post controller, and render the view-post template.
  • 12. The Router  The router maps a URL to a route.  For example, when a user visits the /posts URL, the router might load the all-posts route.  The router can also load nested routes. For example, if our blogging app had a list of blog posts on the left of the screen and then showed the current blog post on the right, we'd say that the view-post route was nested inside the all-posts route.  Perhaps the most important thing to remember about Ember is that the URL drives the state of the application. The URL determines what route to load, which in turn determines what model, controller, and template to load.
  • 13. Write some more code…  ** DEMO **
  • 14. Ember enumerables Standard Method Observable Equivalent pop popObject push pushObject reverse reverseObjects shift shiftObject unshift unshiftObject
  • 16. Emberjs Object Model  JavaScript objects don't support the observation of property value changes. Consequently, if an object is going to participate in Ember's binding system you may see an Ember.Object instead of a plain object.  Ember.Object also provides a class system, supporting features like mixins and constructor methods. Some features in Ember's object model are not present in JavaScript classes or common patterns, but all are aligned as much as possible with the language and proposed additions.  Ember also extends the JavaScript Array prototype with its Ember.Enumerable interface to provide change observation for arrays.  Finally, Ember extends the String prototype with a few formatting and localization methods.
  • 17. Emberjs Object Model Person = Ember.Object.extend({ say(thing) { alert(thing); } });
  • 18. Why choose Emberjs instead of Angular?  Angularjs and backwards compatibility…  In the end it’s your choice…
  • 19. Roadmap for Emberjs  Emberjs is moving away from Controllers  Move everything into Components
  • 20. Thank you for coming  Twitter/Github:  @mrjavascript