Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Create web app that can manage Xcode projects #15

Closed
alloy opened this Issue Jun 4, 2012 · 25 comments

Comments

Projects
None yet
4 participants
Owner

alloy commented Jun 4, 2012

I.e. a Sinatra/Rails app.

Owner

fabiopelosin commented Jun 4, 2012

Out of curiosity what would be the purpose of this app?

Owner

alloy commented Jun 4, 2012

It could be a simple app that does all the things Xcode is needed for, except the editing and the crashing. This can be useful for people like me who use an external editor.

However, it was for now a purely ‘fun’ idea :) The one in #15 might be more useful.

Owner

fabiopelosin commented Jun 4, 2012

Gotcha. And how this would work? Do you use Pow and after configuration you return a zip file with xcodeproj (or a file with the DSL).

Fabio Pelosin
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday 4 June 2012 at 16:06, Eloy Durán wrote:

It could be a simple app that does all the things Xcode is needed for, except the editing and the crashing. This can be useful for people like me who use an external editor.

However, it was for now a purely ‘fun’ idea :) The one in #15 might be more useful.


Reply to this email directly or view it on GitHub:
#15 (comment)

Owner

alloy commented Jun 4, 2012

Oops, I meant to say that #14 is probably more useful :)

Owner

alloy commented Jun 4, 2012

Gotcha. And how this would work? Do you use Pow and after configuration you return a zip file with xcodeproj (or a file with the DSL).

Nah, I was thinking it would just directly manipulate an Xcode project on disk. So you would start the web app locally and go. But the question is if it doesn't become better to just have a Mac(Ruby) app that does that then…

Also, I’m thinking that personally I always just replicate a structure in my projects that resemble what's on disk, so for me #14 would make more sense.

Owner

fabiopelosin commented Jun 4, 2012

I see, and I think as well that #14 is better. I was curious about the usage of web apps for local computing :-)

Owner

alloy commented Jun 4, 2012

It was just a silly idea :D

There are sometimes good reasons for a web UI, e.g. demonized tools.

Owner

fabiopelosin commented Jun 4, 2012

It was just a silly idea :D

Thats why I was so interested :-)

iamleeg commented Jun 5, 2012

Speaking as someone who's been working on an equally silly idea, I could point out that a web app IDE can be used on an iPad while a native Mac IDE cannot...

Owner

alloy commented Jun 5, 2012

@iamleeg That’s definitely true. Question, would you use it as a full-fledged editor? (i.e. do text editing as well?) Or as a file/group manager next to your normal screen where you use an other editor? (e.g. vim/emacs)

Owner

alloy commented Jun 5, 2012

(It would actually be nice to do editing on the iPad, run build, have the Mac that runs the server use xcodebuild and then push the build to the iPad. I have played with tools that run builds on a tethered iPad, but not sure if anyone has it running over wifi yet.)

iamleeg commented Jun 5, 2012

Currently I'm just working on it for the sake of having a side project :). For now I'm only thinking about how to present the project in a read-only browser, but it wouldn't be too much of a stretch to imagine that you could edit source and run tests from the iPad.

Owner

alloy commented Jun 5, 2012

@irrationalfab Is this something you were interested in on starting on? :) (I might be able to work on it a bit tonight, not sure yet.)


I think the backend should be a simple rack/sinatra REST app which uses JSON. A front-end could then be done with either pure JS or some HTML and JS (probably zepto.js).

Some API examples:

Get root group items:

GET /

Response body:

{
  '0029A32AF6FB4472A8AAE277': { 'isa':'group', 'name':'Classes' }
}

Get items in a specific group (by hash ID):

GET /groups/0029A32AF6FB4472A8AAE277

Response body:

{
  '00BE265B5C1C40EB9EA5924F': { 'isa':'group', 'name':'A nested group' },
  '00BCFAA615BA45C6A99A558A': { 'isa':'file', 'name':'TableViewController.m' }
}

Update a group:

PUT /groups/00BE265B5C1C40EB9EA5924F

Request body:

{ 'name':'New name for nested group' }

Create a new nested group:

POST /groups/0029A32AF6FB4472A8AAE277/groups

Request body:

{ 'name':'A new child group' }

Create a new file:

POST /groups/0029A32AF6FB4472A8AAE277/files

Request body:

{ 'name':'A new file' }
Owner

alloy commented Jun 5, 2012

Oh, and the idea would be to then add a xcodeproj bin tool with a serve NAME.xcodeproj command which would then start a WEBRick server. (Or Thin etc, if the user has that installed.)

Owner

alloy commented Jun 8, 2012

Ok, just took a little time to setup the server component and implement the first few API methods:

Owner

fabiopelosin commented Jun 8, 2012

Interesting stuff.

Would you implement the front end with backbone.js?

Owner

alloy commented Jun 8, 2012

I would probably go with zepto.js, as the last time I heard my boss rant about these things zepto was the winner for him (especially on iOS).

Here is an example of what he makes with it (also check on an iOS device):

But in the end the idea would be the same yes, do all the UI stuff dynamically on the front-end.

Owner

fabiopelosin commented Jun 8, 2012

I understand that zepto is a very light alternative to jQuery. But wouldn't development be easier if on the top of it we use a more fledged framework like backbone or similar. A front end for xcodeproj at minimun would require to have multiple editable views.

Btw, I guess that you use vim for iOS development. Any trick to cope with the missing autcompletion?

[I'm a mostly noob about js for front end]

Owner

alloy commented Jun 9, 2012

I’m mostly a noob with these frameworks as well, so it could well be that something like backbone.js, or even ember.js are a better fit :)

Regarding vim, I type most by hand. I know there are some things like clang_complete, but I have yet to take the time to find something that just works. Let me know if you do.

Owner

fabiopelosin commented Jun 9, 2012

My understanding is that jQuery (and Zepto) are libraries that do not provide an MVC framework. The development of any non trivial front-end is greatly simplified by the usage of a framework like Backbone or Ember (which require jQuery of a compatible framework).

Backbone is very light but leaves some abstraction to the dev, while Ember appears to be a more full fledged solution. I have explored a bit of Backbone and it offers routing, models and views binding, and model synchronization with a REST backend. I'll have a look at Ember today as Backbone is not very leaves complex scenarios like nested views un-handled (there are some libraries that aim to simply them

So to be clear that we are in the same page this would work something like:

$ xcodeproj [app.xcodeproj]
-> starting the server on localhost:7654

The should be reserved for viewing the app.

https://localhost:7654
https://localhost:7654#files
https://localhost:7654#targets
https://localhost:7654#project_settings

The rest api should be available under api.

https://localhost:7654/api/groups/00BE265B5C1C40EB9EA5924F

For me the remaining question is where the file of the front end would reside in the project?

Owner

alloy commented Jun 9, 2012

I’m just always a bit afraid of frameworks like Ember that might try to implement a UI for all platforms, but then don't work the way you want on just specific platforms and that modifying them becomes a PITA. However, if you want to play with this, then by all means pick what you prefer :)

Let’s say: xcodeproj server app.xcodeproj. But yes, that's the general idea.

I think the main HTML/CSS page and JS assets can be served statically like so:`

https://localhost:7654/index.html
https://localhost:7654/assets/css/pwetty.css
https://localhost:7654/assets/js/backbone-ember-shamazing.js
https://localhost:7654/assets/images/lolcat.jpg

The api doesn't have to be namespaced, because the app is nothing but an API. So just like the current code already is.

Owner

alloy commented Jun 9, 2012

I think you can use the Rack::Static middleware to have /assets look in a specific directory. That directory could just be lib/xcodeproj/server/assets.

Contributor

xslim commented Feb 19, 2013

did you thought about using https://github.com/intridea/grape for API stuff?

Owner

fabiopelosin commented Apr 3, 2013

If somebody is interested in the server-frontend branch there some toying around with the front end. It is not functional and I'm not sure that it still runs… but it is there just in case.

@fabiopelosin fabiopelosin added feature fun idea and removed feature labels Mar 27, 2014

@fabiopelosin fabiopelosin changed the title from [Fun idea] Create web app that can manage Xcode projects to Create web app that can manage Xcode projects Mar 27, 2014

Owner

fabiopelosin commented Jul 19, 2014

Lets face it, this would be a super cool nerdism but it is a pretty big effort, outside the scope of Xcodeproj. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment