Web application programming using objective-c?

前端 未结 5 997
挽巷
挽巷 2020-12-29 06:25

Just say you have a quite large and complicated desktop application written in objective-c/cocoa written properly in MVC. You then wish to replace the V and C so that it is

5条回答
  •  北海茫月
    2020-12-29 06:54

    You can leave the server almost as-is. I'd run it as a daemon in the background.

    I'd split the controller part. One part of it resides on the server as a connection between HTTP requests and the daemon.

    • You could run a self-made http server.
    • You could build it into a Apache module as you mentioned.
    • You could access your controller through CGI. This is the easiest option as I see it.

    The second part of the controller is written in Javascript in the browser, exchanging data with the server and updating the GUI.

    The view part is written completely in javascript.


    • You could - if you want - leave out the controller on the server and make the model understand HTTP requests.

    • For the Controller / View part consider using a framework.

      • jQuery for only a light interface. (Or a similar framework.)
      • I haven't yet found a framework that leaves all the model stuff to the server. Maybe you can use SproutCore or Cappuccino accordingly.
      • SproutCore, the full-backed MVC framework that is used by Apple. (Think so at least.)
      • Cappuccino, another full-backed MVC framework.

提交回复
热议问题