Easier way to write iphone apps

Discussion in 'iOS Programming' started by variable, Jul 8, 2009.

  1. variable macrumors newbie

    Dec 14, 2006
    So the guys at a company called Ansca just release a pre-beta of a product called Corona which uses Lua to let you write iPhone apps. Its free in pre-beta and is super easy to use. Lots of documentation and code samples. for instance:

    local text = display.newText("foo!", 0,0) --displays text "foo" at 0,0 on screen
    text:setTextColor(255,255,255,255) --R,G,B,A


    local rect = display.newRect( 0, 0, 100, 100) --creates a rectangle at 0,0 with size of 100x100
    rect:setFillColor(255,0,0,255) -- makes it red

    Doesn't get much easier than that!

    Check it out: http://www.anscamobile.com

    There's a link on that site to the dev site which is where you get the SDK from.
  2. AiralynRose macrumors 6502a

    Jun 3, 2008
    Pittsburgh, PA
    Sorry, but that doesn't really look any easier than Objective-C to me.
  3. moka macrumors 6502a

    Aug 11, 2008
  4. variable thread starter macrumors newbie

    Dec 14, 2006
    Ok, maybe just the text was a bad example, but take for example a fade out:

    local text = display.newText("foo!", 0,0) --displays text "foo" at 0,0 on screen
    text:setTextColor(255,255,255,255) --R,G,B,A
    transition.to(text,{alpha=0, time=1000}) --fades out said text over 1000ms (1second)

    Check out the sample code on the web site, it'll give you a good idea of why this is so powerful.
  5. MadGoat macrumors 65816


    Jul 30, 2007
    So basically we'll being seeing a bunch of crap apps all running on the same engine?

    There will be so many limits to what LUA can do, that you'll never see anything really breath taking come out of it.

    Stop being lazy, learn to code
  6. deannnnn macrumors 68000


    Jun 4, 2007
    New York City & South Florida
    Some people want to make apps as a hobby and don't have time to learn to code. It's not like learning how to ride a bike... It's like learning French.
  7. MadGoat macrumors 65816


    Jul 30, 2007
    More like driving a car without learning the basics... it's a disaster. You have to take the time and learn how to do it right.

    See unfortunately that's the problem with the app store, they let every tom, dick and harry post their junk for 99 cents and with something like corona, you're going to see even more crap flow into the app store.

    The app store needs to be fixed so that people who "code" as a hobby for a learning experience can have their own app store(give it a cutsie name like the app corner), where the farting apps and the likes can reside.

    If you don't want to learn the code, you shouldn't participate. If you want to write script that an interpreter will then write the code for you, then you should in no way be allowed in the app store... Bah I'm ranting far too much on this subject.

    Lazy coders get on my nerves.
  8. ericvmazzone macrumors regular

    Dec 9, 2008
    Kalamazoo, MI
    No, it's not like learning a non english language, computer coding is based on english. I learned German in 9 months of 8 hour days 5 days a week and can speak it fluently. I learned Objective C in the same amount of time, on my free time, aka an hour or so a day just playing around. If it's a hobby for someone but they don't want to learn the language, they need to find a different hobby. These kits will cause problems in the long run.

    Again back to the French analogy. Where I studied German, they teach French in 6 months. But using these kits is the equivalent of going to Paris and expecting to have a conversation using an English to French phrase book. Not going to be effective.
  9. MadGoat macrumors 65816


    Jul 30, 2007
    Wow learning german in 9 months as a full time job, wow, that's tough. I wish I could speak it.

    I like your English to French phrase book comparison. I think you hit it right on the head. Sure you can go to Paris and use the book, but you will totally massacre the language and usually it will not get you the results you seek. So if you want to keep a conversation going, you're going to have to class, spend time learning the language and practice a hell of a lot.
  10. coolwater macrumors 6502a


    Jun 8, 2009
    What's the best way to learn Objective-C from scratch--no programming background at all--to write a very professional, smooth, and beautiful looking app?

    Is Objective-C easier than C? C++? (I don't know what I'm talking about. :p)
  11. John89 macrumors regular

    Dec 23, 2008
    Looks interesting, but I still intend on learning to code :cool:
  12. dccorona macrumors 68020


    Jun 12, 2008
    i believe its a tad easier, but not much
    making a beautiful looking app isnt just code, but interface design...keep that in mind

    but a good place to start is a book on objective c
    not an iPhone specific one, as all these assume a basic knowledge of C

    then, check this site out
    to learn iPhone specifics
  13. hefeglass macrumors 6502a

    Apr 21, 2009
    the appstore is already chock full of shoddy apps...this will only make it easier for people to make them.

    hopefully apple will soon organize the app store to differentiate between the higher quality apps from bigger/more well known developers and the cheaper apps from hobbyists and fartmakers..
  14. FunkyTang macrumors 6502a

    Sep 16, 2008
    What does the code look like for a sixteen button fart app with an AdMob frame? That's where the real money is...
  15. jpyc7 macrumors 6502

    Mar 8, 2009
    Denver, CO
    I'd like to see a cross-platform SDK, so that you can write an app for Android, WebOS, iPhone OS, and Windows Mobile. According to their website, they aren't doing that.
  16. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    You know how difficult that would be?
  17. mccannmarc macrumors 6502


    Aug 15, 2008
    Manchester, UK
    Sounds like you should be learning HTML and Ajax
  18. jpyc7 macrumors 6502

    Mar 8, 2009
    Denver, CO
    Good point.
  19. kainjow Moderator emeritus


    Jun 15, 2000
    So I suppose you code in binary then? :D
  20. variable thread starter macrumors newbie

    Dec 14, 2006
    I don't really see why learning Objective-C has to be a starting point, or rather what defines it as learning the basics. Its like telling a non-english speaking person that they have to learn German before they can learn English so they'll understand the roots.

    Objective-C is a pain in butt to learn as a starting point. Doing the hardest thing first is a good way to deter people from doing it in the first place. You don't go to the gymn and start with the heaviest weights. But don't let that statement undervalue Lua as a language. Keep in mind too that Corona is in Pre-Beta and a lot of functionality is still on its way.

    Don't knock it before you try it.
  21. Moles macrumors newbie

    Jul 9, 2009
    Learn to code first, then learn a language

    Best way to learn a language is read a book. Best way to learn to actually write software is not via a language book, its through software engineering books (not language specific) and through experience. I taught myself VB and pascal in grade school/high school by a language book. I learned how to code correctly in college and on the job via software engineering classes and experiences. Developing software isn't just writing code. Syntax is a very small part of writing effective code. Data structures, storage and allocations, abstraction of classes, UI design are so much more important than just syntax.

  22. Jeremy1026 macrumors 68020


    Nov 3, 2007
    Not at all. Learning Objective-C is the starting point and the end point. That is what iPhone apps are written in. Your analogy makes no sense in this situation. For it to be viable, you'd have to start on C then move to Objective-C.

    Then learn a lesser language on a different platform. Write some simple applications for your computer to learn how to program, then move to Objective-C for the iPhone.
  23. variable thread starter macrumors newbie

    Dec 14, 2006
    To the most part I agree with you, my analogy was really meant for madgoat who seems to think that corona/lua is an inferior and useless language. If I was going to learn how to 'program' in general, I would probably start with C and branch out from there, but if my objective was to write iphone apps, then this is a great way to go. True, iphone apps were up till now written in objective-c, but now you don't need to know it. I suspect this is an argument with no real winner, more just opinions, so I think harping on it isn't going to get anywhere especially helpful.

    Someone mentioned earlier that this will allow more crap applications to make it to the app store... maybe, but apple still has to approve everything. Just because more crap gets created, doesn't mean it'll get approved. Exceptional C programmers can produce crap too.
  24. variable thread starter macrumors newbie

    Dec 14, 2006
    Just to let you know, they now have device builds working from within the simulator and a likely pricing guide in the forums.
  25. Darkroom Guest


    Dec 15, 2006
    Montréal, Canada

    - (void)whateverFade:(UIView *)theView
    	[UIView beginAnimations:@"whateverFade" context:NULL];
    	[UIView setAnimationDuration:kDuration];
    	[theView setAlpha:0.0];
    	[UIView commitAnimations];
    is this new program/language object oriented? procedural scripts can get pretty heavy.

Share This Page