[Neos] Why no iframe in the "backend" editing mode?

Christopher Hlubek hlubek at networkteam.com
Fri May 9 15:32:00 CEST 2014


Hi Stefan,

I share many of the points you made about the advantages of an iframe (for quite some time). If I should name one reason why we have the current approach, it's because of a lack of time and the need to release Neos 1.0 without another huge refactoring.

We need a good proof-of-concept and architectural idea how to solve the rewrite to an iframe. But I think it can be done and it should solve many problems (and maybe brings us some new ones). Anyway it has to be based on a messaging approach between the main and content windows instead of the current data-binding. But also that would be beneficial to decouple the UI components in a better way.

If you would like to help with that, feel welcome to suggest ideas / plans or whatever to push this forward.

Greetings,

Christopher

Am 09.05.2014 um 12:45 schrieb Stefan R. <rumzucker at gmail.com>:

> Hello everyone!
> 
> For the last couple of days I played around a bit with Neos and I must say I really like lots of the new concepts in Neos. But there is one thing that is actually not that well implemented in my opinion. It's the fact that the "backend" editing mode is not using an iframe to display the actual frontend page.
> 
> So why would an iframe make sense in this case?
> 
> = There would be less problems with (wrong) styling.
> 
> For example fixed elements (like navbar-fixed in bootstrap) would appear correctly but now its hidden under the neos-application elements.
> Also if someone creates some strict css rules (for whatever reason) they can influence the neos-applikation elements and also the backend interface in a bad way, so that elements are hidden or not rendered correctly. Eg. a { color: #222 !important; } or body { margin: 0 !important; }.
> Of course one could say that if you create a style you should keep that in mind but actually I think nobody wants to think about the backend layouting in order to access all elements for editing correctly.
> 
> = There would be less (or lets say no) problems with JavaScripts.
> 
> Currently JavaScripts of both the backend and the frontend are in the same context and can influence each other (although it shouldn't because everyone writes modular JavaScript and no one pollutes the global space ;)). But let's be honest, I don't want to think about what does the backend with my page when it gets injected. Recent (fixed) example I guess was RequireJS.
> 
> = Create simpler backend interface.
> 
> When having a special area where the actual frontend page is rendered (iframe) the current user interface, that's now basically just built around a virtual window, can be created much simpler. One could also say let's use flex boxes for browsers that already support it, that way the interface would be more responsive and flexible.
> 
> = Responsive views.
> 
> If Neos would use an iframe for rendering the frontend page in editing mode one could resize the frame in order to have a look at different screen sizes as media queries are considered, which is (I guess) at the moment not possible.
> 
> = Access content in the iframe and vice versa.
> 
> Since the frontend editing view in the iframe is just a modified version of the actual frontend page with the same origin it's no problem to access elements inside the iframe and to get updates via inline edits out of it.
> 
> ---
> 
> That's just some of my thoughts and I think that this could make Neos even more attractive to some people (including me) :) ... So please correct me if I'm wrong or support the idea and give feedback ;).
> 
> So my final question:
> 
> Is there a reason for not using an iframe in the "backend" editing mode? (... except that iframes are considered evil among some people ^^)
> 
> Kind regards
> Stefan R.
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos



More information about the Neos mailing list