RE: [coldbox:9819] Re: WireBox scan locations

Scan locations is how coldbox model conventions work meaning it
points to the model folder and you jut refer objects from that directory down.
That has to remain also.

Yes, referring to objects from the scan locations down would still work given the possible enhancement I had suggested since it would give priority to the root of the scan location.

So what would be the goal.

As far as what the goal is-- I would say convenience and intuitiveness, and performance.

  1. Convenience: if your models are uniquely named and under the models convention folder, you could reference any of them via just their name with the stock config, which is the default alias when mapping them. I do realize that handlers, views, etc do NOT work this way as they require you to specify the package.
  2. Intuitiveness: The main reason I brought this up is because we’ve had quite a number of people on list who are using WireBox for the first time and expected it to find their models recursively. Right or wrong, I think that’s a good indication of what is intuitive and how people wish the framework behaved out-of-the-box.
  3. Performance: like I mentioned earlier in the thread, my app takes quite a hit on startup because it has to map hundreds of mappings up front. ColdBox is typically very good that lazy loading stuff when it is needed. Scan locations create the mapping the first time it is requested which is attractive to me over a mapDirectory() implementation.
    Also, a compromise might be a setting to auto-map the models convention locations (scan locations). If it’s not the default behavior, it wouldn’t necessarily satisfy goal 2 or 3, but if someone has multiple scan locations and wants to automatically map each of them recursively, it would keep them from having to define them twice.

Please realize I’m not married to this idea or anything. I’m just exploring it and like a good debate :slight_smile:

Thanks!

~Brad