Back to list
Views:   7.3K
Replies:  2

What is the correct\easiest way to use breeze.js in PIA v4.5 and\or Spark?

I'm trying to use breeze.js in a SPA but already have a fairly significant time investment in my project which is based around the layered architecture in PIA v4.5 (having recently converted it from v4.0).

The documentation on breeze is excellent but I don't really want to re-write my controllers to support the breeze Web Api or map directly to the EF. Given this, what would be the best way to use breeze.js with an architecture similar to PIA?

Conversely, I have control over the DB design. Although it would take a large refactoring exercise, in your opinion, is it worth refactoring the whole project around Spark (although I would probably retain EF as the ORM)? Again, how would breeze.js fit into an architecture like Spark?

Any advice would be greatly appreciated.
Mark Pow, Aug 18, 2013
Reply 1
Hello Mark: 

The Patterns in Action application is a very flexible system in which we show, well, Patterns in Action.

The Patterns and Architecture provide a lot of flexibility allowing you to run 4 different UI platforms (WebForms, MVC, WinForms, and WPF) against the same architecture. In addition you can use one of three data layers: ADO.NET, LINQ-to-SQL, or Entity Framework, simply by changing a setting in the web.config file. 

The Spark platform is highly optimized for simplicity and performance. For data access it uses ADO.NET only. And patterns used include Repository, Unit of Work, CQRS, and Active Record.  In many situations Spark is the better choice (we think). 

Hope this helps. 

Jack Poorte, Aug 26, 2013
Reply 2
Having thought about this I realise my mistake.

One of the important things for setting up a Breeze Web API is the Metadata so I created a Breeze Dao in the Data Layer and bubbled this up through to the Service Layer and the wrapped it in the Web API Controller, but, of course, I still have to write a new controller which is probably worth it.

The next question is to evaluate switching from a PIA structure or Spark design...

Do you have stress testing results comparing PIA and Spark...? If not it may be worth creating them.

[PS is posting to yoursefl the same as talking to yourself? lol]

Mark Pow, Aug 20, 2013
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.