SlideShare a Scribd company logo
Mura ORM and EmberJS
• By Matt Levine

Who Am I?
Who Am I?
• CTO of Blue River Interactive Group
Who Am I?
• CTO of Blue River Interactive Group

• Started Mura CMS with Sean Schoeder a long time
ago...
What We’re Talking About
What We’re Talking About
• Mura ORM
What We’re Talking About
• Mura ORM

• EmberJS
What We’re Talking About
• Mura ORM

• EmberJS

• But Mostly Mura ORM
Why Mura ORM?
Why Mura ORM?
• It all started with creating the Mura approval chains.
Why Mura ORM?
• It all started with creating the new Mura approval
chains.

• Needed to create 5 new entities and didn’t want to
write a custom DAO for each one.
Started with 3 Options
Started with 3 Options
• Custom DAOs
Custom DAOs
• Too much work
Custom DAOs
• Too much work

• No code re-use
Started with 3 Options
• Custom DAOs

• Mura Class Extension Module
Mura Class Extension Module
GREAT FOR: 

• Targeting nodes for custom business logic
Mura Class Extension Module
GREAT FOR: 

• Targeting nodes for custom business logic

• Rendering events
Mura Class Extension Module
GREAT FOR: 

• Targeting nodes for custom business logic

• Rendering events

• Data events
Mura Class Extension Module
GREAT FOR: 

• Targeting nodes for custom business logic

• Rendering events

• Data events

• Adding custom values to be used within rendering and
data events
Mura Class Extension Module
NOT AS GOOD FOR: 

• Maintaining relationships between entities
Mura Class Extension Module
NOT AS GOOD FOR: 

• Maintaining relationships between entities

• Really custom business logic
Mura Class Extension Module
NOT AS GOOD FOR: 

• Maintaining relationships between entities

• Really custom business logic

• Directly querying the database
Mura Class Extension Module
RECAP:

• Only handles very simple entities
Mura Class Extension Module
RECAP:

• Only handles very simple entities

• Great for hooking attributes to existing Mura entities, but
bad for complicated logic.
Mura Class Extension Module
RECAP:

• Only handles very simple entities

• Great for hooking attributes to existing Mura entities, but
bad for complicated logic.

• Want the data to be stored in flat tables.
Mura Class Extension Module
RECAP:

• Only handles very simple entities

• Great for hooking attributes to existing Mura entities, but
bad for complicated logic.

• Want the data to be stored in flat tables.

• Not the appropriate choice
Started with 3 Options
• Custom DAOs

• Mura Class Extension Module

• CF based Hibernate ORM
CF Hibernate ORM
GREAT FOR:

•Easily defining entity properties
CF Hibernate ORM
GREAT FOR:

•Easily defining entity properties

•CRUD operations
CF Hibernate ORM
GREAT FOR:

•Easily defining entity properties

•CRUD operations

•Managing relationships to other CF ORM entities
CF Hibernate ORM
GREAT FOR:

•Easily defining entity properties

•CRUD operations

•Managing relationships to other CF ORM entities

•You just describe the entity with properties and start
using it!
CF Hibernate ORM
NOT SO GOOD FOR:

•Creating relationships to Mura core entites
CF Hibernate ORM
NOT SO GOOD FOR:

•Creating relationships to Mura core entites

•Working with DI1
CF Hibernate ORM
NOT SO GOOD FOR:

•Creating relationships to Mura core entites

•Working with DI1

•Don’t want to deal with sharing hibernate sessions with
other application and plugins
CF Hibernate ORM
NOT SO GOOD FOR:

•Creating relationships to Mura core entites

•Working with DI1

•Don’t want to deal with sharing hibernate sessions with
other application and plugins

•It just works, but when it doesn't... Good Luck
CF Hibernate ORM
RECAP:

•Love the concept!
CF Hibernate ORM
RECAP:

•Love the concept!

•Seems like CF ORM would be a walled garden.
CF Hibernate ORM
RECAP:

•Love the concept!

•Seems like CF ORM would be a walled garden.

•Sharing a ORM session with other sub applications
sounds like a nightmare
CF Hibernate ORM
RECAP:

•Love the concept!

•Seems like CF ORM would be a walled garden.

•Sharing a ORM session with other sub applications
sounds like a nightmare

•I would like the relationships to be based on DI1
BeanName or Alias rather than component path.
CF Hibernate ORM
RECAP:

•When things go wrong it really feels like a black box. You
get low level java error that don't neccesarilly easily map
to what you did wrong in your CFML

•CF ORM really seems to want you to forget about sql
and just go through it's black box. I like sql. I think is it's
pretty darn cool
What if?
What if?
• I roll my own that works exactly how Mura works!
I Could Make Them
Accesible via $.getBean(entityName); 
and
application.serviceFactory(entityName);

Takes advantage of DI1 dependency injection
Have the Same Interactions
• entity.loadBy()

• entity.get{relateEntity}Iterator();

• entity.get{relateEntity}Query();

• entity.get{relateEntity}();

• entity.getFeed();

• entity.validate();

• entity.getError();
Have the Same Interactions
• entityFeed.addParam();

• entityFeed.getQuery();

• entityFeed.getIterator();
Have the Same Interactions
feed=$.getBean(entityName).getFeed();

feed.addParam(column=’mycolumn’,criteria=‘test’);

iterator=feed.getIterator();

!
<cfloop condition=”iterator.hasNext()”>

<cfoutput>#iterator.next().getMyColumn()#</cfoutput>

</cfloop>
Be Targetable By Mura Events
component extends=”mura.cfobject”{

onBeforeMyEntitySave($){

var bean=$.event(‘bean’);

....

}

}
They Could Also
• Know how to bundle themselves

• Play well with Mura content versioning

• Have a more simple implementation than CF ORM
It could use the same
component attributes
• entityName

• table

• datasource

• discriminatorColumn

• discriminatorValue

• orderby

• readonly
With some new ones
• bundleable

• cacheName

• dbtype

• manageSchema

• useTrash
It could use the same property
attributes
• name

• persistent

• fieldtype

• cfc

• fkcolumn

• type

• cascade

• singularName

• orderby

• length
• default

• ormType

!
!
With some new ones
• dataType

• nullable

• required

• validate

• message

• regex

• comparable
And a bunch attributes for
validation
• minValue

• maxValue

• minLength

• maxLength

• minCollection

• maxCollection

• minList

• maxList

• inList

• method

• lte

• lt

• gte

• gt

• eq

• neq
It could also support CF ORM
• preLoad();

• postLoad();

• preUpdate();

• postUpdate();

• preCreate();
• postCreate();

• postInsert();

• preDelete();

• postDelete();
So that’s what we did
So that’s what we did
• Now let’s actually see some code
EmberJS
EmberJS
• A Framework for Creating 



Ambitious Web Applications
EmberJS
• A Framework for Creating 



Ambitious Web Applications

• A Client Side MVC Framework
EmberJS
• A Framework for Creating 



Ambitious Web Applications

• A Client Side MVC Framework

• That’s opinionated in a good way
EmberJS
• A Framework for Creating 



Ambitious Web Applications

• A Client Side MVC Framework

• That’s opinionated in a good way

• So that your application is developed in a consistent
way which enables easier scalability
EmberJS
• A Framework for Creating 



Ambitious Web Applications

• A Client Side MVC Framework

• That’s opinionated in a good way

• So that your application is developed in a consistent
way which enables easier scalability

• Utilizes Handlebars.js for easy templating
Handlebar.JS
<div>

<label>Name:</label>

{{input type="text" value=name placeholder="Enter your
name"}}

</div>

<div class="text">

<h1>My name is {{name}} and I want to learn Ember!</h1>

</div>
Ember-Data
•A Data Persistence Library for Ember.js
Ember-Data
•A Data Persistence Library for Ember.js

•We’ve created a Mura ORM Adapter for Ember-Data
Ember-Data
•A Data Persistence Library for Ember.js

•We’ve created a Mura ORM Adapter for Ember-Data

•Sooo…
Ember-Data
component extends="mura.bean.beanORM" 

entityName="widget" table="widgets" {

property name="widgetid" fieldtype=“id";

property name="name" type=“string"

length="100"
required=true message="The name attribute is required an
must be.";

property name="options" singularname="option"
fieldtype="one-to-many" cfc="option" cascade="delete"; 

}
Ember-Data
App.Widget = DS.Model.extend({

primaryKey: 'widgetid',

widgetid: DS.attr(),

siteid: DS.attr(),

name: DS.attr(),

options: DS.hasMany('Option',{async:true})

});
Ember-Data
component extends="mura.bean.beanORM"
entityName="option" table="widgetoptions" {

property name="optionid" fieldtype="id";

property name="name" type="string" length="100"
required=true message="The name attribute is required
an must be.";

property name="widget" fieldtype="many-to-one"
cfc="widget" fkcolumn="widgetid";

}
Ember-Data
App.Option = DS.Model.extend({

primaryKey: 'optionid',

optionid: DS.attr(),

siteid: DS.attr(),

name: DS.attr(),

widgetid: DS.attr(),

widget: DS.belongsTo('Widget',{async:true})

});
Ember-Data
App.WidgetRoute = Ember.Route.extend({

model: function(params) {

return this.store.find(‘Widget’,params.widgetid);

}

});
Ember-Data
<script type="text/x-handlebars" id=“widget">

<h3>{{name}} ({{options.length}})</h3>

{{#if options.length}}

<ul>

{{#each option in options}}

	 	 <li>{{option.name}}</li>

{{/each}}

</ul>

{{/if}}

</script>
Ember.js
•We’re currently prototyping an Ember.js based front
for Mura
Ember.js
•We’re currently prototyping an Ember.js based front
for Mura

•It will allow Mura to run as a service
Ember.js
•We’re currently prototyping an Ember.js based front
for Mura

•It will allow Mura to run as a service

•This will allow Mura sites to be served locally on any
web server without needing a servlet container.
Ember.js
•We’re currently prototyping an Ember.js based front
for Mura

•It will allow Mura to run as a service

•This will allow Mura sites to be served locally on any
web server without needing a servlet container.

•We feel at this point it’s a perfect fit

More Related Content

Similar to Mura ORM & Ember JS

Orm loveandhate
Orm loveandhateOrm loveandhate
Orm loveandhate
Wil de Bruin
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
Metosin Oy
 
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
Ortus Solutions, Corp
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06jimbojsb
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014
Charles Nutter
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
Richard Schneeman
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
J V
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
ColdFusionConference
 
ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
Ortus Solutions, Corp
 
Customising civicrm
Customising civicrmCustomising civicrm
Customising civicrm
Chris Ward
 
Intelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDBIntelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDBMihnea Giurgea
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
Harikrishnan C
 
Rapid Application Development using Ruby on Rails
Rapid Application Development using Ruby on RailsRapid Application Development using Ruby on Rails
Rapid Application Development using Ruby on Rails
Simobo
 
FP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleFP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleChristophe Grand
 
Terraform: Infrastructure as Code
Terraform: Infrastructure as CodeTerraform: Infrastructure as Code
Terraform: Infrastructure as Code
Pradeep Bhadani
 
flickr's architecture & php
flickr's architecture & php flickr's architecture & php
flickr's architecture & php
coolpics
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
Anshum Gupta
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
Jonas Bonér
 
URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5
jakemallory
 

Similar to Mura ORM & Ember JS (20)

Orm loveandhate
Orm loveandhateOrm loveandhate
Orm loveandhate
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
 
Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06Austin NoSQL 2011-07-06
Austin NoSQL 2011-07-06
 
Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014Bringing Concurrency to Ruby - RubyConf India 2014
Bringing Concurrency to Ruby - RubyConf India 2014
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
ORM Pink Unicorns
ORM Pink UnicornsORM Pink Unicorns
ORM Pink Unicorns
 
Customising civicrm
Customising civicrmCustomising civicrm
Customising civicrm
 
Intelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDBIntelligent Stream Filtering Using MongoDB
Intelligent Stream Filtering Using MongoDB
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Testing gone-right
Testing gone-rightTesting gone-right
Testing gone-right
 
Rapid Application Development using Ruby on Rails
Rapid Application Development using Ruby on RailsRapid Application Development using Ruby on Rails
Rapid Application Development using Ruby on Rails
 
FP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleFP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit Hole
 
Terraform: Infrastructure as Code
Terraform: Infrastructure as CodeTerraform: Infrastructure as Code
Terraform: Infrastructure as Code
 
flickr's architecture & php
flickr's architecture & php flickr's architecture & php
flickr's architecture & php
 
Best practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloudBest practices for highly available and large scale SolrCloud
Best practices for highly available and large scale SolrCloud
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5URUG Ruby on Rails Workshop - Sesssion 5
URUG Ruby on Rails Workshop - Sesssion 5
 

More from Mura CMS

Mura CMS 6.1 Overview
Mura CMS 6.1 OverviewMura CMS 6.1 Overview
Mura CMS 6.1 Overview
Mura CMS
 
Community its easier than you think
Community its easier than you thinkCommunity its easier than you think
Community its easier than you think
Mura CMS
 
Interacting with the Mura CMS Core
Interacting with the Mura CMS CoreInteracting with the Mura CMS Core
Interacting with the Mura CMS Core
Mura CMS
 
Faceted Search In Mura CMS Using Elasticsearch
Faceted Search In Mura CMS Using ElasticsearchFaceted Search In Mura CMS Using Elasticsearch
Faceted Search In Mura CMS Using Elasticsearch
Mura CMS
 
Mura CMS Publishing Workflow
Mura CMS Publishing WorkflowMura CMS Publishing Workflow
Mura CMS Publishing Workflow
Mura CMS
 
How To Plan A Successful Multi-Site Deployment In Mura CMS
How To Plan A Successful Multi-Site Deployment In Mura CMSHow To Plan A Successful Multi-Site Deployment In Mura CMS
How To Plan A Successful Multi-Site Deployment In Mura CMS
Mura CMS
 
Mura CMS & Moodle LMS
Mura CMS & Moodle LMSMura CMS & Moodle LMS
Mura CMS & Moodle LMS
Mura CMS
 
Effective Intranet Planning
Effective Intranet PlanningEffective Intranet Planning
Effective Intranet Planning
Mura CMS
 
Railo 4.0 - MuraCon Presentations
Railo 4.0 - MuraCon PresentationsRailo 4.0 - MuraCon Presentations
Railo 4.0 - MuraCon Presentations
Mura CMS
 
Integrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMSIntegrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMS
Mura CMS
 

More from Mura CMS (10)

Mura CMS 6.1 Overview
Mura CMS 6.1 OverviewMura CMS 6.1 Overview
Mura CMS 6.1 Overview
 
Community its easier than you think
Community its easier than you thinkCommunity its easier than you think
Community its easier than you think
 
Interacting with the Mura CMS Core
Interacting with the Mura CMS CoreInteracting with the Mura CMS Core
Interacting with the Mura CMS Core
 
Faceted Search In Mura CMS Using Elasticsearch
Faceted Search In Mura CMS Using ElasticsearchFaceted Search In Mura CMS Using Elasticsearch
Faceted Search In Mura CMS Using Elasticsearch
 
Mura CMS Publishing Workflow
Mura CMS Publishing WorkflowMura CMS Publishing Workflow
Mura CMS Publishing Workflow
 
How To Plan A Successful Multi-Site Deployment In Mura CMS
How To Plan A Successful Multi-Site Deployment In Mura CMSHow To Plan A Successful Multi-Site Deployment In Mura CMS
How To Plan A Successful Multi-Site Deployment In Mura CMS
 
Mura CMS & Moodle LMS
Mura CMS & Moodle LMSMura CMS & Moodle LMS
Mura CMS & Moodle LMS
 
Effective Intranet Planning
Effective Intranet PlanningEffective Intranet Planning
Effective Intranet Planning
 
Railo 4.0 - MuraCon Presentations
Railo 4.0 - MuraCon PresentationsRailo 4.0 - MuraCon Presentations
Railo 4.0 - MuraCon Presentations
 
Integrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMSIntegrating Google Search Appliance with Mura CMS
Integrating Google Search Appliance with Mura CMS
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 

Mura ORM & Ember JS

  • 1. Mura ORM and EmberJS • By Matt Levine

  • 3. Who Am I? • CTO of Blue River Interactive Group
  • 4. Who Am I? • CTO of Blue River Interactive Group • Started Mura CMS with Sean Schoeder a long time ago...
  • 6. What We’re Talking About • Mura ORM
  • 7. What We’re Talking About • Mura ORM • EmberJS
  • 8. What We’re Talking About • Mura ORM • EmberJS • But Mostly Mura ORM
  • 10. Why Mura ORM? • It all started with creating the Mura approval chains.
  • 11. Why Mura ORM? • It all started with creating the new Mura approval chains. • Needed to create 5 new entities and didn’t want to write a custom DAO for each one.
  • 12. Started with 3 Options
  • 13. Started with 3 Options • Custom DAOs
  • 14. Custom DAOs • Too much work
  • 15. Custom DAOs • Too much work • No code re-use
  • 16. Started with 3 Options • Custom DAOs • Mura Class Extension Module
  • 17. Mura Class Extension Module GREAT FOR: • Targeting nodes for custom business logic
  • 18. Mura Class Extension Module GREAT FOR: • Targeting nodes for custom business logic • Rendering events
  • 19. Mura Class Extension Module GREAT FOR: • Targeting nodes for custom business logic • Rendering events • Data events
  • 20. Mura Class Extension Module GREAT FOR: • Targeting nodes for custom business logic • Rendering events • Data events • Adding custom values to be used within rendering and data events
  • 21. Mura Class Extension Module NOT AS GOOD FOR: • Maintaining relationships between entities
  • 22. Mura Class Extension Module NOT AS GOOD FOR: • Maintaining relationships between entities • Really custom business logic
  • 23. Mura Class Extension Module NOT AS GOOD FOR: • Maintaining relationships between entities • Really custom business logic • Directly querying the database
  • 24. Mura Class Extension Module RECAP: • Only handles very simple entities
  • 25. Mura Class Extension Module RECAP: • Only handles very simple entities • Great for hooking attributes to existing Mura entities, but bad for complicated logic.
  • 26. Mura Class Extension Module RECAP: • Only handles very simple entities • Great for hooking attributes to existing Mura entities, but bad for complicated logic. • Want the data to be stored in flat tables.
  • 27. Mura Class Extension Module RECAP: • Only handles very simple entities • Great for hooking attributes to existing Mura entities, but bad for complicated logic. • Want the data to be stored in flat tables. • Not the appropriate choice
  • 28. Started with 3 Options • Custom DAOs • Mura Class Extension Module • CF based Hibernate ORM
  • 29. CF Hibernate ORM GREAT FOR: •Easily defining entity properties
  • 30. CF Hibernate ORM GREAT FOR: •Easily defining entity properties •CRUD operations
  • 31. CF Hibernate ORM GREAT FOR: •Easily defining entity properties •CRUD operations •Managing relationships to other CF ORM entities
  • 32. CF Hibernate ORM GREAT FOR: •Easily defining entity properties •CRUD operations •Managing relationships to other CF ORM entities •You just describe the entity with properties and start using it!
  • 33. CF Hibernate ORM NOT SO GOOD FOR: •Creating relationships to Mura core entites
  • 34. CF Hibernate ORM NOT SO GOOD FOR: •Creating relationships to Mura core entites •Working with DI1
  • 35. CF Hibernate ORM NOT SO GOOD FOR: •Creating relationships to Mura core entites •Working with DI1 •Don’t want to deal with sharing hibernate sessions with other application and plugins
  • 36. CF Hibernate ORM NOT SO GOOD FOR: •Creating relationships to Mura core entites •Working with DI1 •Don’t want to deal with sharing hibernate sessions with other application and plugins •It just works, but when it doesn't... Good Luck
  • 38. CF Hibernate ORM RECAP: •Love the concept! •Seems like CF ORM would be a walled garden.
  • 39. CF Hibernate ORM RECAP: •Love the concept! •Seems like CF ORM would be a walled garden. •Sharing a ORM session with other sub applications sounds like a nightmare
  • 40. CF Hibernate ORM RECAP: •Love the concept! •Seems like CF ORM would be a walled garden. •Sharing a ORM session with other sub applications sounds like a nightmare •I would like the relationships to be based on DI1 BeanName or Alias rather than component path.
  • 41. CF Hibernate ORM RECAP: •When things go wrong it really feels like a black box. You get low level java error that don't neccesarilly easily map to what you did wrong in your CFML •CF ORM really seems to want you to forget about sql and just go through it's black box. I like sql. I think is it's pretty darn cool
  • 43. What if? • I roll my own that works exactly how Mura works!
  • 44. I Could Make Them Accesible via $.getBean(entityName); 
and application.serviceFactory(entityName); Takes advantage of DI1 dependency injection
  • 45. Have the Same Interactions • entity.loadBy() • entity.get{relateEntity}Iterator(); • entity.get{relateEntity}Query(); • entity.get{relateEntity}(); • entity.getFeed(); • entity.validate(); • entity.getError();
  • 46. Have the Same Interactions • entityFeed.addParam(); • entityFeed.getQuery(); • entityFeed.getIterator();
  • 47. Have the Same Interactions feed=$.getBean(entityName).getFeed(); feed.addParam(column=’mycolumn’,criteria=‘test’); iterator=feed.getIterator(); ! <cfloop condition=”iterator.hasNext()”> <cfoutput>#iterator.next().getMyColumn()#</cfoutput> </cfloop>
  • 48. Be Targetable By Mura Events component extends=”mura.cfobject”{ onBeforeMyEntitySave($){ var bean=$.event(‘bean’); .... } }
  • 49. They Could Also • Know how to bundle themselves • Play well with Mura content versioning • Have a more simple implementation than CF ORM
  • 50. It could use the same component attributes • entityName • table • datasource • discriminatorColumn • discriminatorValue
 • orderby • readonly
  • 51. With some new ones • bundleable • cacheName • dbtype • manageSchema • useTrash
  • 52. It could use the same property attributes • name • persistent • fieldtype • cfc • fkcolumn
 • type • cascade • singularName • orderby • length • default • ormType ! !
  • 53. With some new ones • dataType • nullable • required • validate • message
 • regex • comparable
  • 54. And a bunch attributes for validation • minValue • maxValue • minLength • maxLength • minCollection
 • maxCollection • minList • maxList • inList • method • lte • lt • gte • gt • eq • neq
  • 55. It could also support CF ORM • preLoad(); • postLoad(); • preUpdate(); • postUpdate(); • preCreate(); • postCreate(); • postInsert(); • preDelete(); • postDelete();
  • 57. So that’s what we did • Now let’s actually see some code
  • 59. EmberJS • A Framework for Creating 



Ambitious Web Applications
  • 60. EmberJS • A Framework for Creating 



Ambitious Web Applications • A Client Side MVC Framework
  • 61. EmberJS • A Framework for Creating 



Ambitious Web Applications • A Client Side MVC Framework • That’s opinionated in a good way
  • 62. EmberJS • A Framework for Creating 



Ambitious Web Applications • A Client Side MVC Framework • That’s opinionated in a good way • So that your application is developed in a consistent way which enables easier scalability
  • 63. EmberJS • A Framework for Creating 



Ambitious Web Applications • A Client Side MVC Framework • That’s opinionated in a good way • So that your application is developed in a consistent way which enables easier scalability • Utilizes Handlebars.js for easy templating
  • 64. Handlebar.JS <div> <label>Name:</label> {{input type="text" value=name placeholder="Enter your name"}} </div> <div class="text"> <h1>My name is {{name}} and I want to learn Ember!</h1> </div>
  • 65. Ember-Data •A Data Persistence Library for Ember.js
  • 66. Ember-Data •A Data Persistence Library for Ember.js •We’ve created a Mura ORM Adapter for Ember-Data
  • 67. Ember-Data •A Data Persistence Library for Ember.js •We’ve created a Mura ORM Adapter for Ember-Data •Sooo…
  • 68. Ember-Data component extends="mura.bean.beanORM" 
 entityName="widget" table="widgets" { property name="widgetid" fieldtype=“id"; property name="name" type=“string"

length="100" required=true message="The name attribute is required an must be.";
 property name="options" singularname="option" fieldtype="one-to-many" cfc="option" cascade="delete"; }
  • 69. Ember-Data App.Widget = DS.Model.extend({ primaryKey: 'widgetid', widgetid: DS.attr(), siteid: DS.attr(), name: DS.attr(), options: DS.hasMany('Option',{async:true}) });
  • 70. Ember-Data component extends="mura.bean.beanORM" entityName="option" table="widgetoptions" { property name="optionid" fieldtype="id"; property name="name" type="string" length="100" required=true message="The name attribute is required an must be."; property name="widget" fieldtype="many-to-one" cfc="widget" fkcolumn="widgetid"; }
  • 71. Ember-Data App.Option = DS.Model.extend({ primaryKey: 'optionid', optionid: DS.attr(), siteid: DS.attr(), name: DS.attr(), widgetid: DS.attr(), widget: DS.belongsTo('Widget',{async:true}) });
  • 72. Ember-Data App.WidgetRoute = Ember.Route.extend({ model: function(params) { return this.store.find(‘Widget’,params.widgetid); } });
  • 73. Ember-Data <script type="text/x-handlebars" id=“widget"> <h3>{{name}} ({{options.length}})</h3> {{#if options.length}} <ul> {{#each option in options}} <li>{{option.name}}</li> {{/each}} </ul> {{/if}} </script>
  • 74. Ember.js •We’re currently prototyping an Ember.js based front for Mura
  • 75. Ember.js •We’re currently prototyping an Ember.js based front for Mura •It will allow Mura to run as a service
  • 76. Ember.js •We’re currently prototyping an Ember.js based front for Mura •It will allow Mura to run as a service •This will allow Mura sites to be served locally on any web server without needing a servlet container.
  • 77. Ember.js •We’re currently prototyping an Ember.js based front for Mura •It will allow Mura to run as a service •This will allow Mura sites to be served locally on any web server without needing a servlet container. •We feel at this point it’s a perfect fit