Does Flutter have a good way to share code between mobile and web applications? - flutter

I'm looking for a good tool to develop to Web and Mobile.
A friend of mine recommended me to learn NativeScript/Angular because with that tool is possible to write the services, models, and controllers only one time and create specific views for Mobile and Web platform, sharing almost 100% the business logic code.
But I think that native script is not so hyped as flutter and maybe flutter could be more used in the next days, so I'm searching for this type of tutorial (sharing logic between Mobile and Web) in a flutter, but I'm not sure if this is really possible.
I saw something about BLOC pattern, but I am not sure if this is the correct solution for this type of project, or even if it is possible to write logic code only one time and specific "views" for Mobile and Web in a flutter.
Can anybody help me with this issue?
Thanks in advance (and sorry about my English, I'm not fluent yet)

That's the whole propaganda of flutter. The framework is made to write one code and run everywhere (android, ios, web, desktop). So you definitely are on the right path.
Unfortunately flutter web is a bit unstable right now and maybe you can face some difficulty.

Related

Can Flutter Web replace doing regular websites?

So I'm having a client that wants an online-coaching website , and I'm an flutter app developer , I've never used flutter web, and I was wondering if I can do the work in Flutter Web instead of learning Angular or Reactjs etc , because I'm familiar with flutter and it will take less time to grasp the concepts .
Answer:
YES, 100%, it will work very well. No need to learn anything new. Same code will also create a website.
Guidelines are here
Exceptions:
In case you are using packages, double-check that those are compatible with "web" (most are compatible but otherwise, you can avoid those)
Bonus information:
You can publish to Firebase... It is free and very fast.
Guidelines here.

Flutter Web: What are the side effects of using it to build a web app

Recently, I have been exploring the Flutter API tools and builds, even the flutter-web project. So what I really want to understand is the flutter-web support which makes it possible to compile an existing or new app into a web app, to run on web browsers. The question is: "What are the possible side effects you are likely going to experience when using flutter-web to build web apps". Thanks in advance.
The main reason why it is not advised to use flutter-web is beacuse it is not yet in a stable version.
Therefore if offers low-performance compare to normal web-apps.
For more details on the advantages and disadvantages of using flutter-web.
Check the article below. It will be of help.
Read more on Flutter Web
I hope this answers your question.

What is faster ionic2 or nativescript?

I was wondering if someone knows what has faster performance speed ionic2 or nativescript? Does ionic2 still run on top of Cordova's webview? Or is it similar to nativescript?
Ionic 2 still uses the webview. Things have gotten faster and newer devices are faster of course. Ionic is doing some great stuff, but you'll have a better performing application using NativeScript IMO. I don't have any benchmarks right now but I can assure you if someone does have benchmarks NativeScript will likely win on all fronts because it's not a webview. It's similar to react native and xamarin. As with most choices it depends on what you need and factors of time, cost, etc. All of these frameworks have pros and cons. Personally I settled on NativeScript since I didnt know react for react native, and i wanted to have native UI not native looking components in a webview. However for a quick prototype or an app that you might want to reuse as a PWA (progressive web app) ionic is a good choice in that regard. You can of course get code reuse with them all using angular and react in react native but the UI is different since its not shared with the web DOM. Hope that helps some.
So that answers your question, here is a xamarin and NativeScript comparison article from Burke Holland (works for telerik) but the tests seem very impartial as I've used both products and I am aware of the items he goes over https://www.nativescript.org/blog/details/nativescript-and-xamarin
Ionic's payload is smaller with the phone already carrying the browser.
The performance of Ionic 3 is simply superb.
I have noticed an unfounded snobbery when it comes to webview based frameworks saying they're slow. Most people are not making the next Facebook or Youtube but more generally applications for CRUD operations with a little bit of mobile goodness.
That's the audience for this product.

Reuse code in iPhone, Android and a Web applications

I'm about to develop an app for iPhone, Android, and for web too. I think there must be some "standard" way for doing this, in order to reuse as much code as possible.
Which is the best way for doing that? Webservices? (only if the app uses internet) Maybe an API? Another way?
Just for the record, the web application will probably be developed in Ruby On Rails 3.
Thanks!
There are a few cross platform development tools out there that let you write once and compile for multiple platforms. I know I've seen questions on both tool here on SO, so others might have some good advice on these specific products.
PhoneGap
http://www.phonegap.com/
Appcelerator
http://www.appcelerator.com/
Barring that, if you are looking at doing native development on each platform, the web services APIs are a good way to go. I've built an App that is heavily data driven, and I built out RESTful services over JSON that do the heavy lifting for the iPhone, Android and Web versions.
There still is quite a bit of work that goes into implementing a feature on each platform, but once I architect code on one platform the hard, creative work is done and it's just porting it to the next platform (Same applies, mostly, to the graphics as well). Since I am coding for each platform individually I do try to take advantage of both code and UI conventions for that platform to give the user a native experience (say building menus for the menu button on Android, something not supported on iPhone). To me that's a benefit of developing for each platform individually, however, it also greatly increases time to market for each version.
Since you're looking at Objective-C, Java and Ruby, 3 completely different languages, there's not an easy way to develop a shared library without using a intermediary layer like those linked above.
Well, all three are different languages, so anything you write for one won't work for the other. An API on a server may be able to get you the same data to all, but its highly unlikely that you'll get any reusable code. I'm doing the same thing, and realize that, so I am just sharing common things such as UI and code-design between them.

Help asked for iPhone and Android app

Im new to the development of apps and i've got some questions.
First let me tell you about the app i need to make.
As an intern at a company i need to develop an iPhone and Android app, they want me to create an app that is based on a existing CRM database.
I need to get data from the database and show it on the iPhone, this data should be edited and send back to the database.
The company itself does not has experience in the development of mobile apps.
EDIT:
The requirements i wrote above are the basic of the application, it will have alot more functionality implemented after the basic has been made. Something like an auto sync, either the database or phone will sync with each other once in a while. And when you are called on the phone it will also check the number in the database and if found the name is displayed instead of an unknow number. Just 2 things that should be implemented after the basic app
Is such a thing possible with an iPhone/Android?
As i have no experience with Objective-C, and little experience with java
Is it easy to learn, i have good knowledge of C#
What platform could you suggest for me?
As i need to develop for both iPhone and Android,
What is the quickest way of developing for both at the same time?
i've done research but as i do not have an mac at the moment i can't try stuff out for the iPhone.
Titanium Appcelerator is something i liked, and since this works for both iPhone and Android i think this might be a good option. But as i do not have any experience i want some good advice from those who have experience before i start programming.
tnx in advance,
~kamikze the rookie
You can also try PhoneGap.
You can use web services to connect to databases
As per your requirements, use Titanium Appcelarator, which will make you write your code in JavaScript, and will generate apps for both, iPhone and Android.
What you're wanting it to do is fairly simple and shouldn't introduce a lot of complexity before you.
Go ahead with Appcelerator, if you don't want to spend a lot of time learning Android SDK and Objectiv-C
It sure is possible to access/change databases.
If you have good C# knowledge then getting started with Java should not be an issue for you.
I think it should be quite easy to implement for Android, but I also have no experience in iOS development (donĀ“t have a mac)