Embedding Cappuccino in other web content

24 views
Skip to first unread message

Luke

unread,
May 22, 2019, 1:55:04 PM5/22/19
to Cappuccino & Objective-J
I'd like to place my Cappuccino client into a section (div, I guess) of some existing web content, rather than having it take over the entire page.
That way I can have the regular site navigation bar, footer etc in place, but hopefully have the Cappuccino app table up residual space in the body of the page. 

I can't find any documentation or posts about doing this, but if this is possible, then there must be a way to anchor it in the page content.  Just loading the ObjectiveJ.js seems to always have Cappuccino take over the whole page.



 

Luke

unread,
May 22, 2019, 2:32:57 PM5/22/19
to Cappuccino & Objective-J
... maybe I could just throw an iframe on the hosting page and load the Cappuccino app into that - but perhaps there's a better way.

Keary Suska

unread,
May 22, 2019, 3:01:10 PM5/22/19
to objec...@googlegroups.com
I think the short answer is no. If there are any calls to absolute parent objects, these will fail due to same-origin policy. If everything is on the same site, you can expect that Capp will pollute your global namespace and potentially break other scripts.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
> To post to this group, send email to objec...@googlegroups.com.
> Visit this group at https://groups.google.com/group/objectivej.
> To view this discussion on the web visit https://groups.google.com/d/msgid/objectivej/cefda263-83b7-412a-8206-ecfd3fd7bd30%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Kjell Nilsson

unread,
May 24, 2019, 2:28:35 AM5/24/19
to 'daboe01' via Cappuccino & Objective-J
I think you can look at Michel Bach site. https://michaelbach.de/ot/-misc/cappuccino/index.html
He has embedded Cappuccino in his pages.

I dunno if he uses other JavaScript libs together with Cappuccino though.

My 2 c
—kjell
Kerusan
> To view this discussion on the web visit https://groups.google.com/d/msgid/objectivej/64EDA75B-0864-4CA9-BF6E-A74A12778E7F%40esoteritech.com.

Prof. Michael Bach

unread,
May 24, 2019, 7:25:47 AM5/24/19
to objec...@googlegroups.com
Dear Keary, Kjell & All:

> I think you can look at Michel Bach site. https://michaelbach.de/ot/-misc/cappuccino/index.html
> He has embedded Cappuccino in his pages.
Yes indeed. I had been following this thread but wasn’t entirely sure I understood the question, but now. So here goes:
I have about 100 small Cappuccino programs running there, with ≈2000 visitors daily, and organised as follows:
• only »jake release« is used, not deploy, so no cappuccino libraries are embedded

• the usual Cappuccino »index.html« is referenced in an iFrame

• said index.html has ONE important line, which I show here in context
==============
<!-- Custom javascript goes here -->
<!-- End custom javascript -->
<script type="text/javascript">
OBJJ_INCLUDE_PATHS = ["../../-misc/cappuccino/Frameworks"];
OBJJ_MAIN_FILE = "main.j";
==============
so the »OBJJ_INCLUDE_PATHS« is used to point to the folder where all Cappuccino stuff lives.

• The site is arranged like so
-<-misc>/cappuccino/Frameworks/ <AppKit, Foundation, … own classes>
|
-<item1>/capp/index.html <here also release stuff, like <Browser.environment, Res…, …>
|
-<item2>/capp/index.html <here also release stuff, like <Browser.environment, Res…, …>
|

|
-<item99>/capp/index.html <here also release stuff, like <Browser.environment, Res…, …>

• All in all: “released” stuff runs at same speed as “deployed”, and I have only one instance of all of Cappuccino’s frameworks, thus saving massively on download

• it speeds up enormously to enable GZIP, in Apache these two lines did the job for me
AddOutputFilter DEFLATE sj j cib js css
AddOutputFilter DEFLATE .obj


> I dunno if he uses other JavaScript libs together with Cappuccino though.
No. In a few cases I use P5 or threejs, but Cappuccino’s GUI is so much better. I have recently removed jQuery when switching to Jekyll, and through the help of Jekyll nearly all of JavaScript was replaced by Liquid, speeding up rendering.


Enjoy, best, Michael


PS: I'm really lookin forward to Aristo 3, and thank everyone being so hard at work on this.
--
Prof. Michael Bach PhD, Eye Center, University of Freiburg, Germany.
Michae...@uni-freiburg.de <https://michaelbach.de>

Reply all
Reply to author
Forward
0 new messages