The document discusses Mura ORM and EmberJS. It describes how Mura ORM was created to define and work with custom entities in Mura without needing custom DAOs. This allowed maintaining relationships between entities. It also discusses how an adapter was created for Ember Data to work with Mura ORM entities, allowing them to be used in Ember applications and take advantage of Ember's client side MVC framework. Prototyping is underway on an Ember front-end for Mura that would allow it to run as a service.
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.
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
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
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!
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
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
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
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