We are in the process of revamping all our iOS apps recently using: HTML+CSS+JavaScript to handle the front end and the back end is handled by Objective-C. The development became very interestingly for both UI designer and the programmer.
Before we took this approach, we were adding new functionality using Swift. After a few version upgrade on Swift/XCode, we found out that compilation error and warning will make us go mad. We don't think we can handle this and we don't like this to happen again and again. So, we decided to migrate all Swift codes that we have written back to Objective-C.
The next thing we are facing is the UI (user interface) and we are tiring in looking for solution on showing the popup and adjust the coordinate the popup appear in the correct position, etc. The storyboard file is particularly another bottleneck and wasted a lot of hours in "waiting for others to complete before they can start work".
With the new approach, the UI designer will work on the HTML+CSS. Once the layout has been confirmed by the team, the UI designer will continue to work on beautifying it and the Javascript & Objective-C programmer will start coding.
This approach reduce the development time as well as adding new features tremendously.
Time wasted in Swift version upgrade:
- New attribute
- Casting with ?, ?? or !....
- Casting between the data type: NSString, NSString?, NSString!....
Time wasted in implementing new idea using Storyboard:
- How to show a popup window.
- How to position the popup window correctly.
- How to partition a "view" into smaller view(s)/component(s) and then aggregate it to what we want.
- Screen flow/navigation.... try this API.. not this one, try another one... ah... obsolete API, look for new API... endless.. :(
With new approach:
- HTML+CSS - that's my what my UI designer good at.
- Javscript - that's what we are doing for web application since 2008.
- Objective-C - this is not the area that we are good at and we can't afford to spend too much time in researching for the correct code. But, we need is to store the data and load the data. Since we are good in SQL statement and we decided to store the data in SQLite.
Future upgrade for the app...?
- Adding new HTML elements.. small problem.
- Reposition the popup... small problem.
- Revamp the color theme... small problem.. just replace the color and background color in CSS.
- Adding new screen... just add a new HTML file.
- Adding new function... just add a new Javascript to handle and some backend code in Objective C.
Our objective is to minimize the upgrade time and cost. Another thing is that we don't need to use any big framework that is already doing this (you can Google search for it) because those framework upgrade might break and we need to spends many hours in chasing their tail.
We love programming but we don't like to chasing the tail become someone decided to make some API obsolete and replace it by some new API.
:)