How to use Dart Flutter for desktop and mobile applications - dart

Can you explain me how to use Dart flutter with just an ordinary desktop web site?
Let's say I have a website, which has a good responsive design, but I want to make it more handy for mobile users. So, I decide to use Dart, I create a server and then? Do I need to redirect users to f.e. m.mysite.com which is built on flutter widgets, but PC users will redirect to mysite.com? Also, there is an information that since June 2019 you can write desktop web application. What does it mean, we couldn't do that before?

As #Randal Schwartz noted, Flutter Web is in very early stages of development (alpha, I believe), meaning you should not roll with it in production. However, it is the only way to use Flutter to build websites. You can find it at:
https://flutter.dev/web
https://flutter.dev/docs/get-started/web
https://flutter.dev/docs/development/platform-integration/web
If you want to use Dart (not Flutter) in a website, you can try these. They are more mature than Flutter Web, but you'll lose "Flutter" features:
VueDart (https://refi64.com/vuedart/)
AngularDart (https://angulardart.dev/)
React-Dart (https://github.com/cleandart/react-dart) (This one is tricky!)
These are all ports of popular JS frameworks (Vue, Angular, and React) to Dart, so you can use them for responsive website design. Note that you might have to do some background research in the original JS framework, to fill in documentation.
Note: All of the above work on both Mac and Windows. Flutter Web/Dart frameworks are not platform dependent.

Flutter has primarily targeted the mobile platform. What is changing is that Flutter is also being developed for desktop and web applications. Not clear what you mean by "desktop web". Both desktop and web flutter are "not ready for prime time", but progress is being made rapidly.

Related

Ant Design antd vs antd-mobile for non-native mobile web development

Reading about Ant Design I am getting confused about which library to use for mobile web development. There are two libraries, antd and antd-mobile. While it is clear that antd-mobile supports react-native on iOS and Android, it is unclear which one is best suited for plain mobile (non-native / SPA) web development.
Reading the antd introduction you see statements like "Ant Design which is specially created for internal desktop applications, ...", while reading the antd-mobile introduction you will see "Support Web / iOS / Android platform (Based on React Native)"
From this I would think that ant is somehow not very suitable for web development other than web based desktop (i.e. Elektron) apps.
But trying to build a normal web app with ant-mobile I couldn't get it to work. For example the Button is showing but DatePicker is not. Switching to ant everything seems to work fine.
Am I right to assume that for any non-native mobile development you need to use ant instead of ant-mobile?
If so, what is this supported "Web" platform that antd-mobile is mentioning?
From my experience:
Antd:
Intended for full browser web only (or electron) development, they are no mobile first design, some cases you have to tweak to make you web page look good in mobile.
Antd-mobile:
Antd mobile exports 2 versions of components, the web one (which uses DOM) and the react native version (uses View, Text etc...)
Web version: You can think it's like jQuery Mobile, Sencha Touch etc, it's intended to build pure mobile web page/application, the application that you are going to see in a mobile browser. example, go and open facebook.com, amazon.com with a mobile browser (they look really different then the desktop one).
React Native version: You will use this to build a Mobile App (a hybrid app) that sits in Google Play store/App Store, an app that needs to be installed.
Hope it helps.
If I made mistakes please let me know.

Clojurescript: how to make a web app version coexist with desktop electron version

I have created a leiningen-based clojurescript webapp.
More specifically, I am using the re-frame template: https://github.com/Day8/re-frame-template.
I wonder if it is possible to compile this project into an electron-based desktop app? I noticed there are electron templates like https://github.com/Gonzih/cljs-electron, but I have no idea how to make the web version coexist with the electron version.
Is this even possible?
Update:
To make my question more clear:
How do you make the electron-based version and web-based version share the same code base? Is there any examples for doing so?
I've shipped re-frame apps that run in Electron, so this is certainly possible. We host our JS on the web, so we could serve our apps as webapps, we just choose not to. I didn't work on the Electron setup, but any ClojureScript/Electron template should get you started.
Your question about web versions coexisting with Electron isn't very clear. You can either serve your app from the web and treat Electron as a browser, or you could ship compiled ClojureScript and run it locally.

Building Hybrid Mobile App using Ionic Framework

I am exploring different options for creating my first mobile app. I am from a web development background using Rails and Postgres.
I am unsure of how something like the Ionic framework works. I've looked around on the web but I weren't able to find answers to my specific question. Is my understanding correct that I will be able to create a full Rails/Postgres backend with various API's and then talk to the backend from my Hybrid mobile app (Ionic framework)?
Can anybody point me to a tutorial that might have worked for them please?
We've just released a tutorial on how to integrate a Rails backend with Ionic, based on our experience building many real world production apps.
You can find it here:
http://www.dovetaildigital.io/blog/2015/8/21/rails-and-ionic-make-love-part-one
This is the first of a three part series in which we move from basic integration to full user authentication and integration testing. Hopefully this is of some help to you!
So if you have any epxerience in web design ionic is a very easy. You build a webpage just like you would for hosting on a server. All ionic does, along with angular js, is extend html's vocabulary using something called directives. I would use the intel xdk. It has brackets as a built in text editor, a built in phone emulator, and a build server for mobile apps all tied into one. You can also start with an ionic template. what you end up with is some html, javascript (mostly angular js), and some css. Then that code is built into a mobile app for whatever platform you choose through the cordova build process. You can grab the intel xdk here https://software.intel.com/en-us/html5/tools, ionic docs are here http://ionicframework.com/docs/, and an ionic tutorial here http://ionicframework.com/getting-started/. Best of luck to you!

How to use Xamarin in Visual Studio and Mac in the same time

I have just developed and android app using eclipse and now I want to develope its IOS version. I want to use Visual Studio and C# (I feel pretty much comfortable in these environments).
I read that, to achieve this I can use Xamarine. Everything is OK with configuring Xamarine on Visual Studio and using it in Visual Studio (I understood this part). I couldnt understant the "mac" part. They are saying that in order to build this app I need a mac running in my local network. Unfortunately I have no idea about Mac. Instead of using it in a local network, could I just install it in a Virtual Machine in windows and configure it on that way that I can see this mac from Visual Studio (How can I do this ?! :S).
I am sorry if my question is unclear but I would be greateful if any of you helps me understand these issues and help me develop my first IOS app in Visual Studio.
If you are going to do iOS development using Xamarin you need a Mac. A Mac will always be required to submit the app to the app store, and the way Xamarin works, you need to use a Mac to create the UI for iOS apps as well.
To get the most of the Xamarin, you ideally would develop your base code using Xamarin and C#, then build separate UI's for both Android and iOS. While your UIs are separate, your base core code is all the same for both apps.
It really does not make sense to have a native Android app all in Java, and then write the entire iOS app in C#. Either stick to completely native apps for both platforms, or use a wrapper like Xamarin for both.
Xamarin.iOS for Visual Studio makes it possible to develop iOS
applications on Windows, but you will still need a Mac in order to
compile and run the code.
Today, Xamarin.iOS integration in Visual Studio is focused on enabling
developers to develop in C#. Xamarin developers who write Xamarin.iOS
applications on Windows typically hand-code their user interfaces—or
they will need to switch to the Mac to use Xcode (or a beta version of
Xamarin’s new iOS Designer) to interactively design an iOS user
interface layout.
"or use a wrapper like Xamarin for both"
I have discovered the term wrapping is not correct for this product.
Unlike other products (Corona, Phonegap, Titanium, ...) that wrap up in a common, genericized library, Xamarin compiles at core level with no penalty. It is 100% native. All functionality in all it's supported platforms is 100% available and not watered down.
Wrappers can be faster to program in, in theory, but when you factor in the time you will spend looking for workarounds for the one piece of functionality that is available natively but not in your wrapper library. When you factor in the constant bugs because wrapping for 3 or more platforms is a constantly moving target and you can't count on it working from day to day.
When you factor all those things in, writing native in c# for all platforms is the better option.
I tried them all, and xamarin was my last choice as I was distracted chasing that perfect golden goose wrapper product.

BlackBerry J2ME vs HTML Javascript framework like PhoneGap

A client wants a blackberry application for listening live radio for his radio station. We focused on iPhone development. I know Java language have done several projects. However haven't tried yet J2ME. Which do you recommend J2ME or HTML Javascript framework like PhoneGap or any other cross platform framework? What are the advantages and disadvantages of them? Thanks.
If you are comfortable with Java Swing or other Java UI programming then going with native is probably a great idea.
If you are more comfortable with HTML, JavaScript and CSS then use PhoneGap. If you are planning on deploying your application to more than one platform then definitely use PhoneGap. PhoneGap also allows you to write native BlackBerry Java code and integrate that with the HTML / JS code in case the specific APIs you need are not exposed.
With the imminent release of BlackBerry OS 6 things should get a lot better on that platform for both PhoneGap (since the browser is now WebKit based) and for native Java programming.
There are many other comparisons between PhoneGap and X on stackoverflow, though most other cross platform frameworks don't support BlackBerry.
J2ME: Blackberry supports this (and is fact still the BB's core), however it's a rapidly aging platform. You can't do many interesting things in BB without the proprietary APIs.
Phonegap: Haven't used it myself but I've heard so-so things about it. High footprint, lowest-common-denominator etc.

Resources