Coder Social home page Coder Social logo

cloudmetal / typhoon-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appsquickly/typhoon-example

0.0 2.0 0.0 5.1 MB

An example application built with Typhoon dependency injection framework.

License: Apache License 2.0

Objective-C 94.19% C 4.85% C++ 0.13% Shell 0.83%

typhoon-example's Introduction

Typhoon-example

An example application built with Typhoon.

###Features:

  • Returns weather reports from a remote cloud service
  • Caches weather reports locally, for later off-line use.
  • Stores (creates, reads, updates deletes) the cities that the user is interested in receiving reports for.
  • Can use metric or imperial units.

###Running the sample:

  • Clone this repository, open the Xcode project in your favorite IDE, and run it. It'll say you need an API key.
  • Get an API key from http://free.worldweatheronline.com.
  • Using your API key, set the application configuration.
  • Run the App in the simulator or on your device. Look up the weather in your town, and put a jacket on, if you need to (Ha!). Now, proceed to the exercises below.

Exercises

  1. Study the core assembly and view controllers. Notice how the framework allows you to group related components together. Notice how dependency injection allows for centralized configuration, at the same time as using aggressive memory management. (With default prototype-scope, components will go away whenever they're not being used).
  2. Study the test cases. Imagine that you needed to use one service URL for integration tests and another for production. How would you do it?
  3. Imagine that you decided to save the list of cities that the user wants to get reports for to iCloud, instead of locally on the device. Notice how you'd only need to change one line of code to supply your new implementation in place of the old one. And you'd be able to reuse the existing test cases.
  4. Imagine that you'd like to integrate with other weather data providers, and let the user choose at runtime. How would you do it?
  5. Try writing the same Application without dependency injection. What would the code look like?

####Alternative Configuration Style

  1. Study the xml application assembly, and view controllers. Which style do you prefer? Would it be appropriate to add some auto-wiring?

The App

Weather Report Add City List Cities

githalytics.com alpha

typhoon-example's People

Contributors

jasperblues avatar lotz avatar gqadonis avatar

Watchers

 avatar James Cloos avatar

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.