Building Apps In Swift With Storyboards
Nerval's Lobster writes Apple touts the Swift programming language as easy to use, thanks in large part to features such as Interface Builder, a visual designer provided in Xcode that allows a developer to visually design storyboards. In theory, this simplifies the process of designing both screens and the connections between screens, as it needs no code and offers an easy-to-read visual map of an app's navigation. But is Swift really so easy (or at least as easy as anything else in a developer's workflow)? This new walkthrough of Interface Builder (via Dice) shows that it's indeed simple to build an app with these custom tools... so long as the app itself is simple. Development novices who were hoping that Apple had created a way to build complex apps with a limited amount of actual coding might have to spend a bit more time learning the basics before embarking on the big project of their dreams.
Where in TFA is Swift actually used? All I see is a simple Interface Builder example which has nothing do with Swift.
Are we going to be continually with crappy iOS articles repeating the basics of UI development just because they have the word "Swift" in them or that they are Dice based??
And another crappy article .. with Swift
Crappy articles are crappy articles and articles like these are the reason that Netcraft confirms that /. is dying.
I am Slashdot. Are you Slashdot as well?
I want to be able to code this to make a game:
int main(int argc, const char* argv[])
{
CreateGameThatIsSortOfLikeAngryBirdsAndMakeMeMillionsOfDollarsOvernight();
}
Anything else is too hard.
All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
Building complex apps without coding doesn't seem like a useful goal. At some point you have to express the program logic and coding has always proven to be the best way.
The dividing line between graphical tool and actual code seems to have been a shifting one over the years. So when you go to a new environment or language where there's a substantial GUI component to building an app, the desire to see it all in code is strong. What actually happens when you add that button? I expect to be able to do it either through code of GUI and if they can't tell me what the GUI did in code, then I'm left clueless as to the underpinnings and so it becomes hard to think through the implications of design decisions.
I tried Swift recently. Swift was easy enough. But Swift+Xcode was impenetrable.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
The dream of some fancy tool that builds a complex app for you (since you're an "ideas person", not a programmer) is always going to be a fantasy. The more work a tool does for you, the more specialized it has to be because there is only so much complexity a person can put into a project per hour they work on it. Either you supply that complexity, or the tool builder does, and there's an upper limit to how complex a tool can be before learning it harder than just learning a programming language and solving the problem yourself.
Someone has to do the work, and if you have grand visions the work will be hard.
I read the internet for the articles.
I'm wondering if those flowcharts actually do help people learn basic program flow and basic boolean logic. After a while, you don't need them, because you can think like the machine. But, for getting started, it might be a good step and encourage thought before shotgun coding.
"Storyboards" are Apple's name for a user interface layout tool, its not a logic flow tool so it is not really like flowcharts. A storyboard is basically a view pane where you layout the visual elements and controls, and define some constraints involved in repositioning and resizing for different resolutions. There is very limited flow control. Things like clicking on this button brings up a different storyboard.
In short storyboards let you mock up a user interface, including one view launching a different view. If you are nostalgic for the 90s think back to Microsoft's Visual Studio GUI layout and glue code generation tools. Its pretty much the same sort of stuff.
Flowcharts are documentation. And they can be pretty concise and more importantly visual.
The visualization aspect is sometimes important. It can literally be the big picture that helps one understand a process. Also visualization can help with debugging something missing at the design level.
Now I haven't used my plastic templates or some software package to generate flowcharts since undergrad days decades ago, but I still on occasion grab a yellow pad of paper and a pencil to informally (ok that was generous, crudely would be more accurate) sketch out some algorithm, data flow, logic, etc. To me its helpful when thinking about some things, planning some things, etc.
I haven't done formal flowcharts in ages, but I probably have the plastic template from college stashed in a storage box somewhere. If I'm having trouble with a piece of code, I might make a diagram to visually walkthrough the code and figure out where I'm getting stuck.
What flowcharts encourage is programming with gotos. They became outdated back in the days when structured programming came in. JSP became the thing. Then later various object diagrams being more or less standardised as UML.
The first job interview I had back in 1984 they asked me to draw a flowchart for a certain algorithm. I told them they were outdated and gave them a JSP diagram instead. And I got the job as a result. That's how out of data flowcharts are.
Interface Builder has not changed in any fundamental ways since it debuted in 1988 with NeXTstep.
Unlike crappy Microsoft tools for the 90's, it is NOT a screen drawing tool. It is an object instantiation and configuration tool. You set the properties and relationships between live objects graphically. The objects are then archived (serialized) and later unarchived (deserialized) into your running iOS app.
Watch this from 1992 http://www.youtube.com/watch?v...
Steve Jobs demonstrates Interface Builder starting 23 minutes into the video. Also note that Windows 3.1 shipped in 1992.
Just for fun, here is NeXTstep from 1988 http://www.youtube.com/watch?v...