GithubHelp home page GithubHelp logo

SwiftObjects

Swift4.2 Swift5 macOS tuxOS

A very important first note: This is a demo and an experiment to see whether and how the WebObjects API might work in Swift. Do not try this at home, it is not how you write web servers nowadays! Nor is it optimized, or fast at all, to the contrary.

Careful: Lots of Java'ism: A lot of the code is still very Java'ish. This is a rather stupid 1:1 port, of a Java port of an Objective-C code base. Contributions and suggestions on how to make things Swift'ier are very welcome!

Blog

This is part of a blog entry, called: An Introduction to WebObjects, in Swift.

Install

Note: Setup to work with Swift 5.0 aka Xcode 10.2 (can be changed manually to 4.x). The SwiftXcode setup now requires Xcode 10.2.

We use Homebrew to install the SwiftObjects development environment. To install the swift xcode SwiftObjects image image, simply run those commands:

brew install swiftxcode/swiftxcode/swift-xcode-wo
swift xcode link-templates

That will take a moment to install and compile, but then we are ready to go!

Create a new WOApp

Within Xcode, create a new project (⌘-Shift-N), go to the "macOS" section and select the "WOApplication" template, very much at the bottom of the inspector (pro tip: type "wo" in the filter field at the upper right):

Give your project a name, say "HelloWOrld" create it somewhere, and you should end up with something like this:

Press the Play/Run button to build and start the application. Open your favorite browser and navigate to http://localhost:1337/:

Yay. History is up and running!

Who

SwiftObjects is brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

There is a channel on the Noze.io Slack.

swiftobjects's Projects

runtime icon runtime

A Swift Runtime library for viewing type info, and the dynamic getting and setting of properties.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.