Git Product home page Git Product logo

weatherapp's Introduction

WeatherApp

A simple weather iOS application that shows the weather from openweathermap

Goal

The main goal is to display the weather forecast for the 16 next days for Paris, France.

more features

In adition to the main feature of the application, I could implement more sexy things that I'll list over the time in this section.

A first tinny winny little feature is to present a detailed view of a selected weather informations. It's not a lot, but with using MVP and dividing screens/features by modules, it makes the logic very interesting to implement.

#Why? Mainly for showing off my skill to you who is reding this file ;) (also for benchworking some stuffs that will go into the more features section)

#What language ? I'll be using the SWIFT language.

Firstly because the number of technologies for developping an iOS application in 2017 is not so big (Objective-C, SWIFT, and cross-platform technos like Cordova using Javascript). Givent those choices, I feel most comfortable with SWIFT, it's clear, fast, can gives you robust code.

#What technologies ? At the time I'm writing this section, the app is still a newborn baby, so I don't realy know what fancy technologies I'll be using.

For sure, I'll be using native frameworks, like UIKit, CocoaTouch, AutoLayout and maybe others like CoreData.

###How I handled dependencies

For the dependency manager, I choose to use Carthage for its lightweightness and simplicity of use.

I decided to not use Cocoapods because it makes a lot of black magic under the hood, like creating (and forcing you to use) an XCode Workspace containing your project, and I find it sometimes pretty annoying when it shows up some obscure errors while fetching dependencies or getting a new update.

Why not Swift package manager, though ? Well... the only reason for the is that I don't know it enougth yet for using it to show of my skills. But I think it will clearly be the next reference to the Swift development comunity !

###What dependencies I used

At this time, there are only two dependencies. Those are Alamofire, and AlamofireImage.

I don't have a lot to say about it, I choose them for handling the network layer and because I think their syntax and usage are pretty easy and nice.

#Any good practices ? I'll definitely try to stick to the TDD practice. That's a good way to think of the architecture and logic before runing, head down, somewhere we don't really know.

Other practices like keeping concerns as mostly and thoughtfully separated, keeping code clean by not making any very big functions and by using explicit variables, functions, and classes names.

Talking about architecture

In this application I'll take advantage of the MVP architecture (Model-View-Presenter)

The iOS environment uses the MVC (Model-View-Controller) pattern. Which has some problems as all the logic (interface and business) are sticked to the Controller part, giving birth to objects that take hundreds or even thousands of lines of code in a single file.

The MVP patterns tends to separate the interface and the business logic, sticking the interface management into the View part, and the business logic in the Presenter one.

In a more technical way, the View of the MVP pattern contains also the UIViewController, and the Presenter is just a PONSO (aka Pure Old NSObject) which is wayyyyyy nicer and easier for testing the business logic <3

weatherapp's People

Contributors

khronoss avatar

Watchers

 avatar  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.