Newbie Question's

103 views
Skip to first unread message

Tathagat Banerjee

unread,
Apr 10, 2015, 5:56:22 AM4/10/15
to objec...@googlegroups.com
Hi All,

Have a simple newbie question. 

Context: Have a prototype PHP application which I am trying to turn into a product. The idea is to use Cappuccino to be the workflow holder. See attached image. In essence, multiple Capp GUI's will call PHP functions which sit talk to DB and file system.

Problem: I cannot use XcodeCapp. I have not programmed before in OS X, which means the magic that XcodeCapp can do confuses me. I look at some of the screencasts (Aparajita's Cup one for example) and it looks epic, except i do not understand the logic. Coding it up from scratch however, works well for me, as i see what is going on. I understand this is less efficient, but it is what it is. Hopefully this will change

  1. The thing i am wondering is this - when i create a new project using XcodeCapp, and try to delete all the components and then try to manually code up stuff it does not work. My work around is to download the Starter project, take the frameworks folder from there, and then build the Application.j around that. Is this a terrible idea? Is the starter project maintained to the latest Capp stable version?
    1. How do you compile Capp so that the code is a complied output? Currently, everything i build is 5mb+, making debugging slow. Using XcodeCapp would speed this up, but is fine for moment as i am learning about Capp doing it the hard way.
  2. How do i do user authentication nicely? I'm passing a post HTTP plaintext from the Capp app to my php function. The PHP function does all the usual - create random salt using blowfish, append to password, use DES to create hash, save hash in DB. So i am not storing the password in plaintext. But i am passing the original password from Capp -> PHP via plaintext. Is this silly or am i just paranoid - i mean, its in a compiled app right?
  3. For other functionality, i take stuff from the Capp GUI, call a controller which sends it to a PHP function as a POST request with the message in the body, and the PHP function does the rest. 
  4. The GUI's i'm looking to create are pretty basic, just Menu, Toolbar and Split View linked to an array. When I'm wiring up this GUI in XCode, where is the code? The AppController.j is empty. I'm expecting to see functions for all of these, which i can put code into manually. That is, with the split view, want a tree structure, and clicking on elements of this should change the view in the main view of the split view. Clicking on different objects in the toolbar should trigger a change in the split view. There are code samples of this around, which i am using, but how do you do this in XCode? Some pointers would be very much appreciated. 
  5. The primary way i am using Capp is to enforce workflow for the user. Is this a silly idea in itself and have i missed the point of Capp?

Notes - 
  1. I understand that the smart way to do this would be to wire it up in XcodeCapp (and XCode) and then use Ratatosk to access my databases in a RESTful manner. This is beyond my abilities for the moment. I am able to code simple PHP however and basic HTML. 
  2. In my head, the workflow is Capp GUI <-> PHP <-> DB/File System. Currently using MySQL for DB, but looking to change that to CouchDB (for the JSON and revision capabilities)
  3. This would be hosted probably on Bluemix with Cloudant (for CouchDB). Right now it sits on my desktop. 

Any pointers would be very much appreciated. I think this framework is mind-blowing, and cannot wait to become (marginally) proficient in this so can make cool things. Thanks so much.

tat


img.png

daboe01

unread,
Apr 15, 2015, 3:20:10 PM4/15/15
to objec...@googlegroups.com
hi tat,
i also feel much more comfortable by coding from scatch instead of using XCode.
you also may want to take a look at <https://github.com/daboe01/cappusance> for a text based alternative to XCode.
user auth is not constrained by cappuccino anyhow. so just go ahead with the level of security that is needed for your purposes.
i personally gave up compiling long ago and always run from source. i do not see any noticable performance implications from this, though.
best greetings,
daniel

Tathagat Banerjee

unread,
Apr 16, 2015, 2:21:28 PM4/16/15
to objec...@googlegroups.com
Hi Daniel,

Thank you very much for you suggestions. Will definitely give the below a go. Hoping to give it a crack this weekend! It looks quite interesting. 

Thanks so much.

tat

Dogild

unread,
Apr 16, 2015, 5:54:41 PM4/16/15
to objec...@googlegroups.com


On Friday, April 10, 2015 at 2:56:22 AM UTC-7, Tathagat Banerjee wrote:
Hi All,

Have a simple newbie question. 

Context: Have a prototype PHP application which I am trying to turn into a product. The idea is to use Cappuccino to be the workflow holder. See attached image. In essence, multiple Capp GUI's will call PHP functions which sit talk to DB and file system.

Problem: I cannot use XcodeCapp. I have not programmed before in OS X, which means the magic that XcodeCapp can do confuses me. I look at some of the screencasts (Aparajita's Cup one for example) and it looks epic, except i do not understand the logic. Coding it up from scratch however, works well for me, as i see what is going on. I understand this is less efficient, but it is what it is. Hopefully this will change

  1. The thing i am wondering is this - when i create a new project using XcodeCapp, and try to delete all the components and then try to manually code up stuff it does not work. My work around is to download the Starter project, take the frameworks folder from there, and then build the Application.j around that. Is this a terrible idea? Is the starter project maintained to the latest Capp stable version?
The starter contains the last release. 0.9.8 right now -> it's a stable version, we  have tested it here at Nuage Networks ! When you create a project with xCodeCapp, it will use symlinks for the framework folders. The $CAPP_BUILD os maybe not well defined on your system.

    1. How do you compile Capp so that the code is a complied output? Currently, everything i build is 5mb+, making debugging slow. Using XcodeCapp would speed this up, but is fine for moment as i am learning about Capp doing it the hard way.
 When you will deploy your application, your code and cappuccino will be pressed and flattened. This will decrease a lot the size of the application.
  1. How do i do user authentication nicely? I'm passing a post HTTP plaintext from the Capp app to my php function. The PHP function does all the usual - create random salt using blowfish, append to password, use DES to create hash, save hash in DB. So i am not storing the password in plaintext. But i am passing the original password from Capp -> PHP via plaintext. Is this silly or am i just paranoid - i mean, its in a compiled app right?
There are a lot of different way to make a authentication. You should take a look to http://en.wikipedia.org/wiki/Basic_access_authentication

  1. For other functionality, i take stuff from the Capp GUI, call a controller which sends it to a PHP function as a POST request with the message in the body, and the PHP function does the rest. 
  2. The GUI's i'm looking to create are pretty basic, just Menu, Toolbar and Split View linked to an array. When I'm wiring up this GUI in XCode, where is the code? The AppController.j is empty. I'm expecting to see functions for all of these, which i can put code into manually. That is, with the split view, want a tree structure, and clicking on elements of this should change the view in the main view of the split view. Clicking on different objects in the toolbar should trigger a change in the split view. There are code samples of this around, which i am using, but how do you do this in XCode? Some pointers would be very much appreciated. 
 
  1. The primary way i am using Capp is to enforce workflow for the user. Is this a silly idea in itself and have i missed the point of Capp?

Notes - 
  1. I understand that the smart way to do this would be to wire it up in XcodeCapp (and XCode) and then use Ratatosk to access my databases in a RESTful manner. This is beyond my abilities for the moment. I am able to code simple PHP however and basic HTML. 
I would advice to take this way actually. You will lose a lot of time now, but gain a huge amount of time in the future ;). For the RESTFUl backend, you can take a look to Flask (http://flask.pocoo.org), this is very easy and well documented ! And everybody should know python :D

Tathagat Banerjee

unread,
Apr 20, 2015, 4:12:23 AM4/20/15
to objec...@googlegroups.com
Hi Dogild,

Yes - i have been doing some more digging and understand what you mean. The problem is that i have just been hacking around expecting things to work. I ordered a starter OS X programming book of Amazon, and am going to spend some time working through it. 

Will give this another shot in a few weeks once i go through some os x programming tutorials.

Thanks so much.

tat
Reply all
Reply to author
Forward
0 new messages