Hi,
We are looking to separate out a module of our application to a
subdirectory ( because of environment ).
Any thoughts on a good approach?
Thanks
Kevin
Hi,
We are looking to separate out a module of our application to a
subdirectory ( because of environment ).
Any thoughts on a good approach?
Thanks
Kevin
are you separating handlers? views? model? What?
Also, to where?
Luis,
I'll be more specific.
We have a main application, portal if you will. Under this main
application there are several modules. Currently the Portal and the
first module reside within a normal coldbox application structure.
With the new modules we want to physically separate the files from the
rest of the application. Now doing sub-directories in the model and
view folders is not a problem. What we really wanted to do is keep the
handlers,models,views for the new module in a separate folder off the
website root. So it would look like this
/
/coldbox
/handlers
/model
/views
/newModule
/handlers
/model
/views
What I am wondering is there a way to deal with that second handlers
directory. The reason here is that the newModule also will need to
reference files in the main applicaition/portal.
That make sense?
Thanks
Yes you can. You can use the external locations settings for it that
point to your module root. The you will use the ses routing to create
routes for those events
ahh. ses, now you did it we are not using ses, because we had issues
between our dev /test/ prod environments. Lets just say where I work
separation of duties is the order of the day.
Do I need to use ses? I'm going back to documents right now to readup
on external locations.
You don't have too but the vent string will be huuge.
Event=modules.mymod.handlers.users.list
pretty nasty. Anyways. You can get creative with the external
locations. But I would recommend using ses
Can you have multiple handler location via the external location
settting, like the model can?
We are going to have several modules/apps tied to the root app (portal).
Not yet,
Would this be beneficial?
Luis
Good question, I think so. In our instance we have rolled out a
portal with several programs (apps) initially we only had one program
active, but are now bringing more online.
From a code re-use standpoint, we have the portal code which handles
user information, security, maintenance. the programs each have both
common/shared code as well as unique code. With the way updates are
done, we have found that minimal file updates is the best, since the
developer pool may change overtime due to contracts (government).
If I could easily define a set of multiple locations for all handlers
which are then registered with coldbox, it would give the developers
maximum freedom and we may avoid uneccessary duplicity of certain
functions (this is more a result of a developer pool ranging from
junior to senior with varying knowledge of MVC and other practices and
sometimes very very short deadlines).
This last situation I am dealing with now.
So yeah I think would be good.