issue - using implicit views with noLayout

As the guy who added the original implementation of external views way back, I figured I would chime in and add my worthless viewpoint. :slight_smile:

The original concept was similar to Brett’s example of a blog “mini-app” that plugged into the application. The idea was to allow modules (such as the blog mini-app) to reside in a central location on the server, and for many applications to use the same code base. So, ones directory structure might look something like this…

  • MyCoreSharedMiniApps

  • blog

  • views

  • MyApp1

  • views

  • blog

  • MyApp2

  • views

  • blog

In this scenario, both MyApp1 and MyApp2 are sharing the core blog mini-app, including all of its built-in views. However, one should be able to override the core views with application-specific views. For this reason, the explicit local views must take precedence. It makes no sense whatsoever to have it the other way around.

Now then, clearly everyone does not think the same, so perhaps a “precedence” setting can be added that would allow those who think differently to override the default behavior. Not my call.

What Matt has shown here is exactly what I do.

I like the idea of a setting, although this could get tricky. Do you have it for more than just views? Do you define a full lookup precedence order, or just external vs local?

I will be interested in Luis’s take. Some good ideas either way.

Curt

I guess as always it comes down to your requirements and business rules for that exact application you are building and the framework should be as flexible as it can. We did this with modules, where you can choose the order of locations with viewParent and layoutParent settings. This allows for the configuration to be determined by the developer and not the framework author.

So inline with all of the comments and suggestions, this might be a good ticket to add for the next release. You can already override core plugins and extend their capabilities to what you need, so I will defer this to 3.1 release, unless someone forks and contributes it :slight_smile: (Also shows me how to merge :slight_smile: )

anyways, great feedback guys!!

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Any thoughts about what brought about this commit? Does the
defaultView have precedence over an implicit view as the commit
suggests?

[Coldbox] Luis Majano committed #1c8b5db17b: The rendering schema is
now: DefaultView setting first, implicit views second. Branch: master

Hi Brett,

This was due to the conversations on this thread where you laid out that the default view be first then implicit second. Did I misinterpret the conversation?

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Yeah, I suggested that the implicit view be first and the default view
be second. The commit message reads the opposite. I didn't look at
the code to or test the change yet, was just confused by the commit
message.

Can you verify this Brett please, so it can be the way we had laid out.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Can you verify this Brett please, so it can be the way we had laid out.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Modules take care of this now, and external means external to the core and not the other way around.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Just out of curiosity how are you managing the external views in your example?

Regards,

Andrew Scott

http://www.andyscott.id.au/