Flutter Mentor On How He Discovered Flutter

How I discovered Flutter

A bit about me, I am Brian Kayfitz a mobile app developer who has worked in app development for over 10 years now. I started my career as a game developer building games for PlayStation and XBox.

When iOS launched its first iPhone, I started developing apps in Objective-C. My first app was to build a social network for mom’s and their children, while the app was great, the demand for the product was not there. That’s when I learned about the importance of MVP (minimum viable product), testing app in a market place with basic features prior to spending years developing a product that no one or very little amount of people wanted.

This took me to a job in one of the top banks in Canada, building an investment app that would be used by thousands of investors. I got an opportunity to work for one of the largest food chains in the country, building their eCommerce solution in Swift. When the app was launched, my CTO at the time decided to challenge me to choose a multiplatform framework for our next app project. It came down to either React Native (RN) or Flutter. RN was more established and Flutter was still in beta. But something just sang right about Flutter. All the tools were in place to create a developer experience that was on par if not better than native iOS. Where RN always had compromises. At the time I could not even figure out how to get breakpoints working in RN. In Flutter this was effortless. The simple act of pausing your code to inspect your app state is invaluable. I could not imagine debugging aƒn app without it.

In the end Flutter won exclusively because of the excellent DevX.

This allowed us to iterate and improve rapidly with a team who previously had never written a line of Dart before and now would never even consider writing a new app any other way.

Since that challenge and my discovery of Flutter, I have decided to open my own app development agency. For the past 4 years, I have helped businesses convert their apps from native to Flutter, build MVP app projects and converted my own apps into Flutter and helped become flutter mentor to other developers.

What Apps I have Developed with Flutter

There were many apps that I have developed over the years, some were originally written in native but later re-written in Flutter. Here are some of them:

Travel App – Visited is a travel app that was re-written in Flutter, since moving to Flutter we were able to match features between Android and iOS and now we can launch new features in a manner of days and not weeks or months. The apps performance has also significantly improved since, we were able to stabilize and speed up the map feature of the app.

Utility Apps – Recently I helped a company that specializes in utility apps with code reviews, mentoring and helping grow their development team. I also work with another utility app in helping add new features to an existing Flutter app, as well as guide in development strategy for an app that helps drivers calculate toll fees.

Finance Apps – I have helped a brilliant developer with feature updates and solving issues with development or bug fixes, the app help real estate investors plan their purchase cost and monthly expenses. Another app is to help people get out of debt, the app comes with custom calculator, and graphics.

Game Apps – recently I have rebuild a game that was originally written in native code into Flutter. It took a few weeks to re-write as oppose to taking months to write using native frameworks. Flutter has become an excellent framework to use to build quick games in.

These are just some of the app categories I have worked with, however, Flutter can be used in any type of app from games to utilities.

About Brian Kayfitz Flutter Development Services: 

Brian Kayfitz has opened a mobile app development firm in order to help start-ups, other developers and companies produce the best possible apps. He has transitioned into writing in Dart, using Flutter however, he still codes in Java, Objective-C, Swift and Kotlin when needed. In order to address a gap in the industry of development, Brian has started to offer the following services:

  •  App Code Reviews: Code reviews help unify the team and also ensure that the code remains of high quality regardless of what features and lines are being added.
  • Offering Mentorship Services: As a Flutter Mentor, Brian has helped multiple teams and their developers improve their Flutter knowledge and build awesome apps.
  • Bug Fixes: no app has been developed without existence of bugs, sometimes as developers we are too close to the code to see it. Therefore, flutter bug fixes services are offered to any developer or team that needs it. No matter how small or large the problem is Brian is up for the challenge.
  • Flutter Feature Update: Many apps have been written and need updating to the latest library or version, or a new feature needs to be added. Sometimes the original developer is not available, therefore, as a flutter freelancer, Brian would be more than happy get the app to its desired state.
  • App Development: Brian loves to build app from scratch, while app development takes time, a minimum viable product (MVP) app can be build fairly quickly which is ideal for those trying to test the marketplace or that are not sure on app’s full features. If you are looking to build an app, Brian can not only build it but also consult on best technical strategy for your app.

How to hire Brian Kayfitz? 

Brian can be contacted by contact us form. His processes is typically to understand your app, its state and your needs, prior to providing time and budget estimate. Once all details have been discussed he typically just executes. Brian is a firm believer on making making committees while working on a feature or an app, so you would always be able to see his progress, on top of check-ins. He works on small and large projects, therefore do not hesitate.

MVC Architecture in Flutter

What is MVC Architecture?

MVC stands for model-view-controller which is a design pattern that lets you split your logic into different layers which then carry out specific tasks. Each layer can can interact with each other to ensure consistency and proper coordination. The design pattern includes the whole application from its data to user interface.

MVC Architecture or MVC Frameworks are available for object oriented programming including for mobile apps written in Java, Swift and Flutter.

What is MVC’s methodology?

You can use MVC frameworks can be implemented in different ways depending on your mobile app’s requirements. However, there are three distinct layers that developers will utilize while implementing MVC architecture:

  • Model Layer: Model layer is responsible for sorting, retrieving and app’s logic as it gets data from the back end. Basically, it deals with anything data related from validating data and carrying out any data related tasks.
  • View Layer: This is the user interface layer, which allows you to view and interact with data (model layer). It includes items such as links, buttons, input tests, forms, and drop downs.
  • Controller Layer: This is the logic layer which allows communication between view and model layers. It is the processing part and often referred to as the brain.

All three layers are needed for a successful app development.

What are the advantages to using model-view-controller? 

It is much easier to manage each component without interfering with one another. For example, if you want to make changes to the data layer, you do not need to then update your view or controller layer.  Due to its separation, you can re-use code from view or controller throughout your application, which saves your development time. Finally, it is easier to test, by isolating the layers, this makes it easier to do unit testing.

What are the disadvantages of using MVC? 

MVC framework may not be ideal for all projects, for example, for game apps, the MVC model may not provide the performance that is needed. For small projects this MVC design patter may add complexity that is not needed. Also, for anyone that is not MVC expert developer, there could be a learning curve for those not familiar with the patter.

What alternatives are there to MVC? 

There are a few other model patterns that may work better for your app development project which can include:

  • MVP (Model-view-presenter) – has a presenter component which comes between model and the view as well as handing the input and output. MVP provides a cleaner separation by centralizing all view updates in the presenter. While MVC allows the view to have direct access to the model, the MPV only allows the view layer to interact with the presenter. MVP is better for more complex applications as it is more passive and allows for better testing.
  • MVVM (Model-view-viewmodel) – is a design patter which uses viewmodel which automatically binds the data and commands from the model to the view.  This makes the view more reactive and simplifies the UI logic and data flow. The disadvantage of using MVVM keeps lots of code in the controller. It maybe to complex to use for apps that have simple UI.
  • MVI (Model-View-Intent) – it uses a unidirectional data flow, where the view gets the user’s actions to the central storage, which then updates the model based on the user’s intent (action). This MVI offers a predictable state management which makes debugging easier. This is a more complex model compared to MVC and MVP. It is a great framework for building reactive apps.

How to implement MVC architecture for Flutter?

You can create an MVC patter in Flutter, by starting with a user Model, UserProfileView and UserProfileController. The User Project Controller acts as an in between the view and the model. This way you can maintain a clean code structure which makes it easier to test and maintain your application.

As a senior MVC architect, Brian Kayfitz can help develop your app in Flutter, Swift or Java. He can also advise on best design patter to use for your specific app. There is no right or wrong framework to use, but rather, what fits your requirements best. As a senior developer, there should not be an issue with implement any framework out there, as there is no ‘one-size fits all’. You can also develop your app with multiple frameworks based on different components or screens.

Mobile Architecture Basics: What You Need to Know for App Development

A portion of success in app development goes into selecting a suitable mobile architecture. Mobile architecture contributes to identifying the grounds for improvement of your app. It also helps establish the code flow demonstrating guidelines, complaints, and patterns. Ultimately, an app that has exceptional mobile architecture can quickly bounce back from arising issues.
Here are the basics of mobile architecture that you can use to supplement your app development.

Defining Mobile Architecture

Mobile architecture is the skeleton of a program that determines the quality of an app. It refers to the structural components and interface that makes up an app. This structure includes the system utilized for development and the framework’s behavior that establishes its significant features. Missing a single component can compromise the quality of your app. At the same time, a comprehensive mobile architecture is an efficient one.
Multiple layers go into designing mobile app architecture. Here are these layers:

  • Presentation Layer

This layer involves the UI aspect of the app, including its process elements.

  • Business Layer

It involves the workflows and the business component of the program. The business layer is where domain processes are situated.

  • Data Layer

Like the data utilities, components, and service agents, all the technical details form the data layer.

User Interface

The User Interface (UI) forms on the presentation layer serving as the interaction point with users. Simply put, this is what the users see when they navigate around your app. Therefore, UI design is vital to be able to meet the growing demands of your target audience.

Navigation

Another crucial aspect of efficient mobile architecture is the ease of navigation. You should always strive towards convenient and comfortable control methods to attract more users. Acknowledge that people have a variety of preferences when it comes to their ideal app. What you need to do is to highlight the preferences of your target audience.
Here are the most common navigation methods that popular apps use:

  • Stacked navigation bar
  • Tab controller
  • Modal controller
  • Single view
  • Gesture-based navigation
  • Scroll views
  • Search driven navigation

What Makes a Mobile Architecture ‘Good’?

Now that you have a clear understanding of mobile architecture in app development let’s discuss the criteria of a good one. It is integral that the mobile architecture is created based on a simple process. A low-maintenance app makes it easier to perform tweaks like debugging, expansion, and testing.
Program codes must be written from scratch and ideally not backed by any framework. This code fosters a universal mobile architecture that allows the installation of various plug-ins and faster troubleshooting. Furthermore, well-designed mobile architecture saves time, effort, and additional costs.

Need help with your Mobile Architecture?

Brian Kayfitz has helped numerous clients, establish architecture for an app, fix existing code and help train jr developers in mobile app agencies. Contact him today!

Start Up Mobile Technology: Native Vs. Flutter

The decision that most start-up companies need to make is what technology is right for their business. Making the wrong decision can affect the bottom line, project timeline and sometimes even the success of the product. Therefore, there are a few things to consider when picking the right mobile technology. There are a few frameworks: Cross Platform (Flutter and React Native), Native (Swift, Java) and Unity.

  1. Type of App – If your app is a game then Unity is probably the best tool. Otherwise Cross platform or native would be the right solution.
  2. Distribution of your App – If the app is going to be available only in iOS or exclusively on Android, then Native development is the way to go. For both platforms, Cross platform maybe a consideration.
  3. Time-frame – Development times can different for native apps you would need to write the app twice once for iOS in Swift and once in Java for Android. While cross platform saves development time by having to only write the code ones.

If you have decided to go with cross platform development due to its ability to save time and therefore decrease budget now it is time to decide between Flutter or React Native?

  • Complexity – React native is a Facebook developed framework which is ideal for projects which are similar to website as oppose to building an app. Flutter is a Google framework which is designed to be aligned with the native development. Therefore, for an app it is ideal.
  • Developer availability – Flutter has been recently launched (announced in 2017) and while it is picking up steam it maybe hard to hire a developer. However, you may choose to work with a flutter development firm instead. React Native has been around longer and due to its easy transition from website development has attracted many developers. It is therefore, easier to find React Native developers to hire for in-house development.

Now that the technology has been decided the next thing to figure out is whether to hire a developer in-house or remote. The pros of hiring outside expertise is that it usually comes with a smaller budget,  faster turn-around and greater expertise. The con of hiring a mobile freelancer or development agency is the maintenance of future projects relies on the quality of code of those developers.

If you are looking to hire a mobile app developer for your project and need help making a decision on what technology to choose, you can contact Brian Kayfitz, a mobile app consultant, with over 10 years of experience.

The Importance of Mobile Architecture

When developing an app, it’s often very enticing to just jump right in, focus solely on your Minimum Viable Product (MVP) and get your app onto the market as fast as possible.  However, when you code without a plan, you are effectively stealing time from the future. This is the epitome of technical debt.  Sure, the program might be out and in the hands of customers, but it’s also a ticking time bomb, waiting to collapse upon itself with one extra line of code.

Photo by Kaleidico on Unsplash

This is where thinking about mobile architecture becomes invaluable; it separates the ‘ok’ apps from the ones that stand the test of time.  It allows your app to grow and expand your product without worrying that the whole thing is going to come tumbling down like a stack of cards.

When beginning to plan the mobile architecture for your app, there are some simple questions that need to be asked.

  1. How can we break down the business problems into layers?
  2. Where are all the places where your apps state can change?
  3. What are the external systems we need to connect to?

As always, if you need to add a senior mobile developer to your project with a mobile architecture first mentality, contact us.

Layers

Layers are one of the most fundamental architectural concepts.  They essentially involve you breaking down your app into a hierarchy of responsibilities.  Each layer, or group of classes, handles one job – such as making network requests or drawing user interfaces.  If a layer needs more information, it can talk to the layer either directly above it or below it, but that’s it.

The following diagram illustrates a simple layering strategy for a mobile app.

Mobile Architecture - Layers

At the topmost layer, we have our user interface (UI).  These are our buttons, screens, lists, switches, etc.  If it needs to be painted on the screen, it goes here.  The user interface knows know to talk to two different lower layers – The Business Logic layer and the Analytics layer.  We already have a very clear, but albeit simplified separation.  The UI doesn’t know any of the rules for our app, it just knows how to make things look pretty.  It can also report to the analytics layer when something interesting happens, like a screen view or a form submit.  Notice that the UI layer only knows about generic analytics, not specific providers like Google or Facebook.

There is also a full layer of indirection between the User Interface and Networking layers.  This implies that under no condition are classes in the UI layer allowed to make network calls – they must talk through an intermediary.  The reasoning for this is because the business logic layer may not need to talk to the network every time the UI makes a request.  It has the option of choosing whether to talk to the network or caching layers.  If the app has already retrieved data from its API, it is now in a position to intelligently decide if it can use previously fetched data or make a fresh request.  These are all decisions that are much easier for a developer to make when their code is compartmentalized into components.

 

Handling State

State is hard.  Managing state in apps, especially the mutation of state and synchronizing these changes with the UI, is one of the most constantly debated topics amongst developers.  The prevalence of design patterns that try to solve this problem should immediately indicate its complexity – Redux, MobX, MVVM, MVC, Rx, BLoC, etc.

Which one should you choose?  Is Redux the one pattern to rule them all?  No.

Mobile architecture decisions need to start from the top down.  You need to carefully gather your requirements for the app and analyze all the different points where your apps state is mutated.  After completing this exercise, the way forward should become clear.

  • Is your app primarily a CRUD app? Try MVC.
  • Do you need an undo feature or want to replay your user’s actions?  Try Redux.
  • If one element in your app changes, do many components need to response?  Try BLoC.

Also, it’s never too late to choose some combination of state management or even something unique that applies to your apps specific requirements.

Managing External Systems

Photo by Kaleidico on Unsplash

Apps rarely exist in a vacuum.  At the very least, your app will likely need to communicate with a backend system that is hosted on a remote server.  In addition, there could be multiple analytics systems, advertising providers or integrations with external hardware via Bluetooth.  Every time data leaves your app to travel to another application, some extra considerations need to be made when architecting the integrations.

Firstly, integrations between systems, are the first vector of attack that hackers will target.  These are exposed entry points in your system that need to be protected carefully.  At a bare minimum, all communication over the internet should be done over HTTPS, not HTTP.  In addition, there are extra layers of authentications that can be used such as JWT (Json Web Tokens) or OAuth.

As with user data, external systems are also often in a state of flux.  APIs change.  Servers can fail and the wear and tear of the physical world can impact your apps connection to other devices.  Understanding and accounting for the fallibility of external connections is critical to providing a strong user experience, even when things don’t go according to plan.  Strong mobile architecture plans for the worst but hopes for the best.

Though it may seem like excessive effort, investing in scalable mobile architecture pays dividends as your app matures and expands.

If you want to build a mobile app that can stand the test of time, contact us today at www.briankayfitz.com