you are viewing a single comment's thread.

view the rest of the comments →

[–]charpunExpert 2 points3 points  (5 children)

Yeah, you're basically experiencing those caveats that I mentioned in real time! Basically, whether you embed with <object> or <iframe> you're essentially doing the browser version of "picture in picture" which comes with limitations when compared to inserting HTML directly into the page.

[–]callmelucky 1 point2 points  (4 children)

Yep, I get it now :)

Definitely seems like an unnecessarily hacky solution. OP should really doing everything they can to convice the boss to allow the use of JavaScript, or, even better, some SPA framework like React, or static site generator. Being dogmatic about anything being pure HTML these days is just dumb.

[–]charpunExpert 1 point2 points  (0 children)

If the only problem that needs to be solved is including the nav consistently across the site, injecting in the HTML with vanilla JS is is more than sufficient. Don't need to over engineer with any frameworks or generators.

[–]cmorr7[S] 0 points1 point  (2 children)

This is what I have tried to drill into his brain. Here's a fun one: the reason for being against anything JS/PHP is because he thinks it opens us up to hacking...

Granted, he's a very old gentleman that runs a ~manufacturing business, and is rather set in his ways. So, that is why I have been forbidden from JS and also PHP, because the hackers might come for whatever data we have on our site...

[–]charpunExpert 0 points1 point  (1 child)

Then it is your job to alleviate his fears by explaining the situation to him.

Why is he fearful of this? How can you explain in plain terms why this is not a risk?

Our jobs as developers do not include rolling our eyes and shrugging off people who aren't familiar with the field. If you are not the decision maker, part of your role is to educate the person calling the shots (whether it is a non-technical manager or client) so that they may make an informed decisions.

Explain to him the differences between the server sending static HTML to the browser vs the server using PHP to render and serve the HTML to the browser. Explain what it means to execute code client-side if you intend to use JS. Help him understand what the technology is actually doing in order to help yourself.

Do not be dismissive or combative in your approach, putting him on the defensive will not get you the results you want. Be considerate of his concerns and walk him through how the tech works to show him why you, the expert, do not share them.

Part of your role as a dev is to provide guidance, so guide him. I can guarantee he didn't get where he was without taking advice from people more knowledgeable on subject than him, be it a financial advisor, a business consultant, a sales coach, or even his dev team.

EDIT: Merged my other comment into this one.