How to set up Objective-J and Cappuccino - cappuccino

I am trying to start development in Objective-J but I am completely lost as to how to set it up. The documentation about setting it up, didn't really help me. I am very familiar with web development and Objective-C so I can write the programs if I can get everything set up. Could somebody please give me step-by-step directions as to how to set it up on my (shared) server?
This little "tutorial" didn't help me out at all.

Go to the Cappuccino download page and download the starter package. Unzip it into a folder your choice. Congratulations, you now have your first Cappuccino app ready to run! If you are using Safari you can open up index-debug.html right away and start trying out the starter app. (If you use other browsers like Chrome and Firefox they might not allow you to run a web app from a file:// URL. Instead you'll need to start up a web server and surf to the index-debug.html file through the server.)
Then you can start to edit the sample application right away and explore.
Once you are ready to learn more, take a look at these Cappuccino tutorials and instructions. They are still under development - we're not quite there with our new site yet - but they are definitely more up to date.

Related

How to link customized chromium fork with omaha?

I have been working on a chromium fork to build a custom desktop browser, however I am stuck at implementing the auto-update mechanism for browser.
I am using Crystalnix omaha server and have successfully set it up on docker but couldn't find any guide or tutorials on what changes should need to be made on browser side and where?
If somebody could give some pointers or provide a link to some documentation would be great.

How can you tell whether a website is using the LAMP or MEAN Stack when looking at the script in the developer panel?

I'm starting to learn the basics of LAMP and MEAN. I'd like to dive in by learning LAMP first.
There's a website that I like to replicate, but I don't know whether it's using LAMP or MEAN.
How can I tell the difference by taking a cursory look within the developer panel in the Chrome browser?
I assume the good framework is using REST or LESS or something that does not include a file extension in the URL (.php, .html etc)
you can use guess.scritch.org/ or... a new post with the chrome dev tool method will be posted in a minute.

Desktop application using Firefox WebExtensions

I am working on a XUL desktop application, where I use the browser tag and load a URL in that tag within the desktop application.
However, some websites display as old format and according to Mozilla, XUL is deprecated and will not be useable at the end of 2017. I want to build the application with the latest technology: WebExtensions.
I have searched many examples on the usage of WebExtensions, but all are working within the browser. Can I make a standalone desktop application just like XUL, but using WebExtensions?
If yes, then please give me some hints on how to get started.
If no, is any alternative for the same requirement available?
Webextensions are fairly limited in their scope. Even if there was an application runtime utilising them, you probably wouldn't get much use out of them due to the restrictive isolation from the host system.
Strictly speaking not webextensions, albeit very similar:
The Electron framework/runtime*
Someone at Mozilla is also working on an alternative dubbed "Positron"** though that software's future is uncertain and there is a chance he might abandon it for an entirely new, highly simplified project (at least that's what I gathered from my conversation with him on Github).
*http://electron.atom.io/
**https://github.com/mozilla/positron

Using the browser for desktop UI

How can I use the browser as a UI for a desktop app? The ways I have come up with so far are...
Use all HTML/Javascript. Problem: Can't access filesystem or just about anything else.
Run a local webserver while the application is in use. Problem: How do I kill it when the user is done? My users are not technical enough to Ctrl+C.
Embed a browser component in a regular GUI. Problem: Embedded browser components tend to be glitchy at best. The support for Javascript/CSS is never as good as it is in a real browser.
...?
The ideal solution would work with any technology. I know there are options like writing Firefox extensions, but I want to have complete freedom in the backend technology and browser independence.
Please note that if you choose to run a local webserver, you're creating a security risk.
Any webpage running on the same machine that knows about your app can send requests to your server using Javascript, and you have no simple and reliable way of knowing what the request came from. (Don't trust the referer header)
Google Desktop, which uses a similar approach, has had several real-world vulnerabilities that allow any webpage to read any file on disk.
There are several ways to protect against this; I would recommend requiring each request to have a auth key which is randomly generated per-machine (and expires at some point), which you could put in the source for the actual pages. XHR protection would prevent malicious websites from reading the auth key, rendering them powerless.
If you are looking for a python Web Server with a Kill link, you could always check CherryPy.
import webbrowser
import cherrypy
import threading
class MyApp:
""" Sample request handler class. """
#cherrypy.expose
def index(self):
return """<html><head><title>An example application</title></head>
<body>
<h1>This is my sample application</h1>
Put the content here...
<hr>
Quit
</body></html>"""
#cherrypy.expose
def exit(self):
raise SystemExit(0)
class MyBGThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.start()
def run(self):
cherrypy.tree.mount(MyApp())
cherrypy.quickstart()
myThread = MyBGThread()
webbrowser.open("http://127.0.0.1:8080")
This code is based on the sample from the SingleClickAndRun on the cherrypy website:
http://tools.cherrypy.org/wiki/SingleClickAndRun
Note than in a normal WebApp you would probably use a templating engine and load templates from methods like main.
Something that would be nice would be to embbed a browser control in a gui window and close the server when the app exits.
For the security, you could possibly add an authentication scheme. There are a few that are supported by cherrypy, but you possibly could implement your own too, using tool modules.
I am looking to do the exact same thing (desktop app that uses an up to date HTML5 / CSS3 browser as the desktop app's GUI), only with Ruby (various reasons why I decided to work with Ruby). Its amazing the number of cross platform libraries people have come up with. But yet, few to no one, has done any work on trying to get a web browser to be a desktop app UI. Cross platform issue... well I won't say solved, but I will say several steps in the right direction taken.
To me this would be perfect with the new HTML5 / CSS3 standards coming out. I know it can be done with a web server running locally.
Another way might be like how the guys from “280 North” are doing what they do. They developed Objective-J (an extension of regular JavaScript that mimics how Objective-C extends regular C) and Cappuccino (the Objective-J equivalent of Objective-C’s Cocoa frame work on the MAC). They also developed “Atlas” which is 280 North’s version of Apple’s “Interface Builder” from Xcode, for their Objective-J and Cappuccino frameworks to build Internet Applications. Atlas is actually a Cappuccino web app running on your desktop as a desktop app. In this case they use the Narwhal… a cross platform, general purpose, JavaScript platform for developing JS apps outside of the browser (basically a specialized web server).
If any one can come up with an idea to make “Browser, direct connect to Desktop App” work without the need of a web server co-existing and still get to manipulate the local FS, I to would be very interested… Hmmm... Now that I think about it, I wonder if the new Google Chrome project “Native Client” can be used to do that. NaCL is much like Active X except you are not limited to a windows platform (but will be limited to the Google Chrome browser, at least for now). Only there is added security via Sandboxing, but you can manipulate the local FS… The more I think about it, the more I am beginning to suspect that it can be done.
Any thoughts?
In Windows, you could embed the IE ActiveX control, which uses the same rendering engine as IE. (That's a plus and a minus) You can set the ScriptObject property in your host code and access it in Javascript as window.external to do things that Javascript cannot do.
If you run a local webserver, you could have an exit link in the app that kills the websever.
You did not mention the OS you will need to target. But you might be able to create a program statared web server, then launced the default browser. Wait until the browser is terminated by the user and then shut down the web server.
So for example on windows you can use CreateProcess() to spawn the process
then MsgWaitForMultipleObjects() to wait until it is finished executing.
HTML Applications (HTA, for short) have been around for a while. You can read all about them here. They are basically HTML and Javascript with some extra options to create a window and with access to the local file system. They seem to be exactly what you want. It is Microsoft technology, so this will only work with IE on Windows systems. I've successfully used this as a front-end for a CD-ROM which was used to distribute software to first year students
Another option would be to use Adobe Air. I'm not all that familiar with the technology, but it seems to provide a framework to deploy web pages as desktop applications. I can't post a second link as a guest, but just google it and you'll find it soon enough.
Today, in 2023, you can simply use any installed web browser as GUI using the WebUI library.

how to make web application?

I want to implement web application using xcode?is it possible?if yes then then please advicse me?
example:http://pinoypay.com/iphone/
While I have no personal experience with it I think you are looking for Dashcode rather than Xcode for developing web applications such as the one you linked.
It's located in /Developer/Applications/Dashcode after installing the developer tools.
You can read more about using Dashcode to develop web applications in the Dashcode User Guide.
Is it possible? Yes.
Is it convenient or pleasant? No.
I'm sorry but from the question, it appears you are trying to run before you can walk. Or possibly even crawl.
XCode is not required to build an iPhone styled website, only to write an iPhone application. You would be better off starting with some HTML-CSS tutorials.
XCode is an IDE. You can use it to build a web application but you must use some kind of web application framework in the first place.
The best option is to use one of the frameworks becoming available and maturing.
In the first instance as has been said look at Dashcode, particularly the latest release as this has templates for web based apps and will actually generate the code for dual, Browser and iPhone app so the resultant code will function in both.
The there are a number of third party solutions of varying quality, ease of use and documentation.
In no particular order there is:
IUI library
webapp
iWebkit
jqtouch (this is jquery based)
phone-universal
quickconnect (which has large parts of an OReilly book devoted to it)
All of these give you the javascript and the css to make a web app look and feel and act like a native iPhone app (to one degree or another).
Dashcode is excellent for some solutions as it gives you access to all the Apple tools and has reasonable IDE. The result then runs on a normal web server.
Quickconnect actually has Dashcode templates which you load into Dashcode and build the first part of the app in, then this is exported and imported into Xcode and you completed the project in Xcode and deliver it as a Web App for the iPhone.
Thee other frameworks can be used and developed with any tools, Textmate, Eclipse etc. and the resulting code it then run on a normal web servers
In my opinion, yes.
And while xCode does not target to the web development as other software (like Brackets, DW, etc.) it has a nice feature: a drop-down menu of javascript functions, which would be extremely useful to have in other web development IDEs...

Resources