Skip to content

Modus-Logo-Long-BlackCreated with Sketch.

  • WHAT WE DO

    OUR SERVICES

    Digital Strategy

    Define a digital strategy to achieve my strategic objectives.

    Product Development

    Create or enhance my digital products - app, software.

    Platform and Cloud

    Update my systems to improve performance and efficiency.

    Digital Operations

    Automate and optimize my processes using Atlassian solutions.

    OUR PARTNERS

    Atlassian

    Aha!

    AWS

    GitHub

    Ionic

    See other →

  • WHO WE ARE

    Our story

    Learn about our values, vision, and commitment to client success.

    Open Source

    Discover how we contribute to and benefit from the global open source ecosystem.

    Careers

    Join our dynamic team and shape the future of digital transformation.

    How we built our unique culture
  • WORK
  • BLOG
  • RESOURCES

    OUR RESOURCES

    Innovation Podcast

    Explore transformative innovation with industry leaders.

    Guides & Playbooks

    Implement leading digital innovation with our strategic guides.

    Practical guide to building an effective AI strategy
  • LET'S TALK
  • EN
  • FR

Prov.JS Meetup Recap – JavaScript Patterns in Objective C

Published on March 26, 2013
Last Updated on December 3, 2022
News

Last Thursday night, Andrew Goodale gave an excellent presentation at ProvJS that highlighted some of the similarities between JavaScript and Objective-C. It turns out there are quite a few things we use in JavaScript that can be applied here, especially when it comes to basics of getting things done.

For example:

  • Delegates, Events
  • JSON
  • Function Patterns
  • Closures
  • Loose Typing
  • Dynamic invocation – obj_msgSend() vs. Function.apply()
  • Objects – Key/Value coding vs. Hash table

These can all be taken advantage of in Objective-C. There are certainly some nuances here but it’s nice to see some familiar techniques when diving into a new language. There were some negatives mentioned such as memory management, “wordy” method/property names and funky syntax. Avoiding memory leaks was possibly the only serious fault I heard. I think the wordiness and funky syntax would be pretty easy to get used to. In fact, take a look at this:

(void)staticMethod:(int)foo

    { NSFileManager *mgr = [NSFileManager defaultManager]; NSError *myError;
    
    BOOL ok = [mgr createDirectoryAtURL : myURL withIntermediateDirectories : YES attributes : nil error : &myError]; }

Sure, its a bit wordy but as Andrew said, it’s not that far from this:

    JSFile.getDefaultManager().createDirectory({
        url: myURL,
        withIntermediateDirectories: true,
            attributes: null
    }); 

The Objective-C editor will even line up your colons (if you’re into that sort of thing).

So, if you like to code in JavaScript and were thinking about trying Objective-C, give it a shot. You may just find it a little bit familiar. Also, if you’re in the Providence area, stop by ProvJS and join us for a meetup!

Posted in News
Share this

Timothy Eagan

Timothy Eagan was a Senior Engineer at Modus Create, and is an accomplished software developer with over 20 years of experience in creating customized business solutions. He can be found in Providence, RI. Tim is also an OIF veteran, former paperboy and part-time comedian.
Follow

Related Posts

  • Testing Patterns and Anti-Patterns
    Testing Patterns and Anti-Patterns

    Every company develops their own methods for testing. A lot of these patterns naturally form…

  • The Top 6 Things We Love About Ext JS 6
    The Top 6 Things We Love About Ext JS 6

    “Sencha Ext JS is the most comprehensive MVC/MVVM JavaScript framework for building feature-rich, cross-platform web…

Want more insights to fuel your innovation efforts?

Sign up to receive our monthly newsletter and exclusive content about digital transformation and product development.

WHAT WE DO

Our services
Digital Strategy
Platform and Cloud
Product Development
Digital Operations

Our partners
Atlassian
Aha!
AWS
GitHub
Ionic
Other partners

WHO WE ARE

Our story
Careers
Open Source

OUR WORK

Our case studies

OUR RESOURCES

Blog
Innovation Podcast
Guides & Playbooks

CONNECT WITH US

GitHubYouTubeXLinkedInFacebook

GET MONTHLY DIGITAL TRANSFORMATION INSIGHTS

© 2024 Modus Create, LLC

Privacy PolicySitemap
Scroll To Top
  • WHAT WE DO
    • Digital Strategy
    • Product Development
    • Platform and Cloud
    • Digital Operations
  • WHO WE ARE
    • Our story
    • Careers
  • OUR WORK
  • OUR RESOURCES
    • Blog
    • Innovation Podcast
    • Guides & Playbooks
  • Let’s talk
  • EN
  • FR