0

So I'm using Node and ExtJS server-side/client-side respectfully. By using ExtJS, I'm moving a lot of the presentation logic client-side. Thus, something like MVC wouldn't make sense server-side since the view-logic is all client-side.

At this point, my Node server's responsibilities are essentially:

  • Act as proxy to persistent storage (MongoDB) for ExtJS stores
  • User validation/sessioning with Windows Active Directory
  • Hooking-in with existing Enterprise infrastructure (databases, Salesforce.com, etc).

Well I know design patterns aren't the end-all-be-all, and conforming to a design pattern can in some cases impede progress, but I'm relatively new to web-programming in general. I'd like to use a pattern to start just so I don't make any major architectural decisions that will haunt me for the rest of the project.

Is there a pattern will suited for my needs that I could lean-on?

2

1 Answer 1

1

Not sure what the pattern should really be called, "AJAXing" perhaps.

What you are (should be?) doing is shipping the "model" to the client, then implementing the Controller in JavaScript on the client to produce a view in the browser.

So it is essentially still MVC.

But this oversimplifies the pattern as you are unlikely to be shipping the entire database to the client so you still need to implement a data access/model building layer on the server, control however should still reside in the JavaScript client.

3
  • Ya that's more or less whats going on. The problem(?) is that since there is so little going on server-side, I can't find a pattern to emulate Aug 21, 2013 at 6:36
  • @ColinMartell -- just think of the server side as a pure data access layer. -- this split between model and data access is quite common in the J2EE world (where complexity++ was invented) so you have database -> data access class -> data model -> controler -> view. Often with each component running on a separate server. Aug 21, 2013 at 6:40
  • OK thanks James. I was looking to split model and data access for sure. Thanks for you time! Aug 21, 2013 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.