Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Multicore Version / Re: puremvc with requirejs and or nodejs. on: June 22, 2012, 11:20:04
Hi,

Thanks for answer,

http://requirejs.org/ is just a loader, i like to user for load external templates html and use with any javascript template engine like: doT, jquery template, etc... Normally requirejs need tha the library export their symbols, like i did on post before. I try do this but not work, because requirejs and puremvc both has a define method and i was making a change inside puremvc namespace, it generate the problem.

1 - But a try load diferente way, i just declare a requirejs module in file puremvc-wrap.js, like this:
:

define([lib/puremvc/puremvc-1.0.1],function(){
      return window.puremvc;
});


2 - And to use new puremvc module in main.js file, i did this:
:
require.config({
    puremvc:'libs/puremvc/puremvc-wrap'
});

3 - To use new puremvc module declaring my application facade in applicationFacade.js file, i did this:
:

define(['puremvc'],function(puremvc){
      return puremvc.define(
            {
                    name: demo.ApplicationFacade
                    parent: puremvc.Facade
             },
            {
                    startup:function(){
                        if(!this.initialized)
                              this.initialized = true;
                    }
             },
            {
                    getInstance:function(multitonKey){
                         var instanceMap = puremvc.Facade.instanceMap;
                         instance = instanceMap[multitonKey];
                           
                          if(instance)
                                 return instance;
                           return instanceMap[multitonKey] = new demo.ApplicationFacade(multitonKey);

                    },
                    NAME:'demo'
             }

      );
});


5 - To use declared facade i back to main.js file, and i did this:
:

define(['applicationFacade'],function(demo){
      demo.ApplicationFacade.getInstance(demo.ApplicationFacade.NAME).startup();
});

All work nicely, thank you for answer, sorry for the misundertanding. keep up with greate work.

2  PureMVC Manifold / Multicore Version / puremvc with requirejs and or nodejs. on: June 21, 2012, 08:43:16
Hi,

I have use Backbone with requirejs to load templates, i was news native port for greate puremvc architecture, and i trying replace Backbone.

I try load with requirejs but i couldn't. There is any way to add something like that:

:
if (typeof module !== 'undefined' && module.exports) {
             module.exports = puremvc;
         } else if (typeof define === 'function' && define.amd) {
             define(function(){return puremvc;});
         }

I think that define from requirejs is coliding with define from puremvc.

Any sugestion?

thank you guys.
3  Announcements and General Discussion / Architecture / Re: PureMVC and active proxys??? on: April 15, 2009, 05:29:23
Hi,

Thanks for help, i will make this way.

4  Announcements and General Discussion / Architecture / Re: PureMVC and active proxys??? on: April 14, 2009, 05:09:09
Hi,

Thank you, for the quick answer, i would like to share my code, after i finish and anderstand this wonderfull framework. Long life to open source software, you already done all hard work...  ;D

About external libraries, they don´t needed to use with basic port, i will use just to create my high level game framework.



Talk about my earlier question, i would like make a PhysicsProxy running all the time. Or may be i could make a PhysicsService with several entry points and PhysicsProxy wil be subscribed. What you think?

thanks,

5  Announcements and General Discussion / Architecture / PureMVC and active proxys??? on: April 14, 2009, 02:43:21
Hi,

I am have look for a good MVC architecture to try use in my C++ games, when i found PureMVC i like very much and i finish a port of standard version to C++, now i thinking how to put the service libraries, like: Ogre3D, Bullet Physics, OpenAL, etc... to work together. Now i think to put all libraries inside of Proxys, but, i need that Proxy stay running all the time, to provide a render loop, physics updates, etc.

I saw in samples, that render and application loop stay out of mvc app, delegating this to Flash.

It´s a good create a external loop and start my mvc game inside?

sorry my english.

thanks in advance, and congratulation for the greate work.
Pages: [1]